Click here to Skip to main content
15,911,531 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: BitBlt problem ????????????? Pin
TooShy2Talk4-Mar-08 20:37
TooShy2Talk4-Mar-08 20:37 
GeneralRe: BitBlt problem ????????????? Pin
Naveen4-Mar-08 20:41
Naveen4-Mar-08 20:41 
GeneralRe: BitBlt problem ????????????? Pin
TooShy2Talk4-Mar-08 21:26
TooShy2Talk4-Mar-08 21:26 
GeneralRe: BitBlt problem ????????????? Pin
Naveen4-Mar-08 21:31
Naveen4-Mar-08 21:31 
Questionabout assignment Pin
savitri4-Mar-08 18:59
savitri4-Mar-08 18:59 
GeneralRe: about assignment Pin
Christian Graus4-Mar-08 19:07
protectorChristian Graus4-Mar-08 19:07 
GeneralGetting the correct DLL handle Pin
Wheatbread4-Mar-08 18:03
Wheatbread4-Mar-08 18:03 
GeneralRe: Getting the correct DLL handle Pin
Naveen4-Mar-08 19:09
Naveen4-Mar-08 19:09 
Wheatbread wrote:
Why does mainDLL return the handle of app.exe when I call GetModuleHandle(NULL) instead of the handle for mainDLL?


First read the MSDN well. it says

"If this parameter is NULL, GetModuleHandle returns a handle to the file used to create the calling process (.exe file)."


The module handle of the mainDLL will be passed to the DllMain of the mainDLL ( HINSTANCE ). Save that HINSTANCE so that you can pass that value to the libraryDLL when need.

Another option is to use the below code to get the module handle

MEMORY_BASIC_INFORMATION stMemoryInfo; <br />
            static int nAddress;            <br />
            // Get the information about the virtual address space of the calling process<br />
            if( !VirtualQuery( &nAddress, &stMemoryInfo, sizeof( stMemoryInfo ))<br />
                                                                        != 0 )<br />
            {            <br />
                return false; <br />
            }<br />
	    HMODULE hModule = (HMODULE)stMemoryInfo.AllocationBase;



Questionabout functions Pin
savitri4-Mar-08 17:48
savitri4-Mar-08 17:48 
QuestionRe: about functions Pin
Maxwell Chen4-Mar-08 18:25
Maxwell Chen4-Mar-08 18:25 
GeneralRe: about functions Pin
savitri4-Mar-08 19:02
savitri4-Mar-08 19:02 
GeneralRe: about functions Pin
Maxwell Chen4-Mar-08 19:20
Maxwell Chen4-Mar-08 19:20 
GeneralRe: about functions Pin
Rajkumar R4-Mar-08 19:27
Rajkumar R4-Mar-08 19:27 
GeneralRe: about functions Pin
Rajkumar R4-Mar-08 19:22
Rajkumar R4-Mar-08 19:22 
Questionhow to assign this value to y? Pin
gentleguy4-Mar-08 17:48
gentleguy4-Mar-08 17:48 
AnswerRe: how to assign this value to y? Pin
Rajkumar R4-Mar-08 18:26
Rajkumar R4-Mar-08 18:26 
GeneralRe: how to assign this value to y? Pin
Maxwell Chen4-Mar-08 18:27
Maxwell Chen4-Mar-08 18:27 
GeneralRe: how to assign this value to y? Pin
ThatsAlok4-Mar-08 20:30
ThatsAlok4-Mar-08 20:30 
GeneralRe: how to assign this value to y? Pin
Maxwell Chen4-Mar-08 20:34
Maxwell Chen4-Mar-08 20:34 
GeneralRe: how to assign this value to y? Pin
ThatsAlok5-Mar-08 0:59
ThatsAlok5-Mar-08 0:59 
AnswerRe: how to assign this value to y? Pin
uusheikh4-Mar-08 20:44
uusheikh4-Mar-08 20:44 
AnswerRe: how to assign this value to y? Pin
David Crow5-Mar-08 3:55
David Crow5-Mar-08 3:55 
QuestionHow to identify the code of login page? Pin
chinakknd4-Mar-08 17:38
chinakknd4-Mar-08 17:38 
AnswerRe: How to identify the code of login page? Pin
Christian Graus4-Mar-08 19:10
protectorChristian Graus4-Mar-08 19:10 
GeneralCHttpFile::EndRequest Fails Pin
yaminisridaran4-Mar-08 16:36
yaminisridaran4-Mar-08 16:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.