Click here to Skip to main content
15,904,415 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: BitBlt problem ????????????? Pin
Naveen4-Mar-08 19:29
Naveen4-Mar-08 19:29 
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 
Lets see if I can explain this.

I have an app.exe (basically a test app) which loads, via LoadLibrary, mainDLL (which exports c-style functions as an api) that uses libraryDLL which contains class definitions which are exported.

app.exe passes hInstance to mainDLL via DllMain. mainDLL uses classes defined in LibraryDLL. It appears that libraryDLL is loaded everytime an exported class is used by mainDLL (as expected I guess, but this isnt my confused point)

The problem is when libraryDLL gets hInstance, its always the handle of app.exe and not mainDLL. I need libraryDLL to use retrieve mainDLL handle and name because other files are used based on the mainDLL name.

Questions:
- How do I get libraryDLL to get the handle of mainDLL?
- libraryDLL is always loaded first. Can I control this? I'm guessing I cant since its not an api dll but exported classes
- Why does mainDLL return the handle of app.exe when I call GetModuleHandle(NULL) instead of the handle for mainDLL?
- Do I need a DLLMain in both mainDLL and libraryDLL?
If so, should I use hInstance? If so, hInstance is always of the wrong module so why use it?

Is it apparent I"m confused? ANy help or articles to read would be appreciated.

TIA
-C
GeneralRe: Getting the correct DLL handle Pin
Naveen4-Mar-08 19:09
Naveen4-Mar-08 19:09 
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 

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.