Re: OTOH, you folks are smart ...
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Thu, 20 Sep 2007 20:50:52 -0400
Well, you could do a GetModuleHandle on your DLL name. AfxGetInstanceHandle is defined to
give you the instance handle of the executable image, not the current DLL.
joe
On Thu, 20 Sep 2007 10:29:13 -0500, "BobF" <rNfOrSePeAzMe@xxxxxxxxxxx> wrote:
Joseph M. Newcomer [MVP]
"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in message
news:n135f3p6afsrvj8sftv5c4e8jpks1kstuf@xxxxxxxxxx
Why do you need AfxGetInstanceHandle? If you are in a DLL, you will get
the instance
handle to the DLL as the first parameter to DllMain, and you just save it.
joe
If I query for the DLL instance handle, I can get rid of the SDK DllMain and
let the default from the runtime suffice. Then I'll have the SDK in the
lib, thus satisfying my OCD tendencies. The *only* thing the SDK-provided
DllMain does is to save the instance handle.
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- Follow-Ups:
- Re: OTOH, you folks are smart ...
- From: BobF
- Re: OTOH, you folks are smart ...
- References:
- Re: OTOH, you folks are smart ...
- From: BobF
- Re: OTOH, you folks are smart ...
- From: Joseph M . Newcomer
- Re: OTOH, you folks are smart ...
- From: BobF
- Re: OTOH, you folks are smart ...
- From: Joseph M . Newcomer
- Re: OTOH, you folks are smart ...
- From: BobF
- Re: OTOH, you folks are smart ...
- From: Joseph M . Newcomer
- Re: OTOH, you folks are smart ...
- From: BobF
- Re: OTOH, you folks are smart ...
- From: Joseph M . Newcomer
- Re: OTOH, you folks are smart ...
- From: BobF
- Re: OTOH, you folks are smart ...
- From: Joseph M . Newcomer
- Re: OTOH, you folks are smart ...
- From: BobF
- Re: OTOH, you folks are smart ...
- Prev by Date: Re: converting ANSI to UNICODE
- Next by Date: Re: passing a string to a dll
- Previous by thread: Re: OTOH, you folks are smart ...
- Next by thread: Re: OTOH, you folks are smart ...
- Index(es):
Relevant Pages
|