Click here to Skip to main content
16,005,121 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How do you determine who loaded a DLL? Pin
Perspx25-Aug-07 14:23
Perspx25-Aug-07 14:23 
GeneralRe: How do you determine who loaded a DLL? Pin
Joe Woodbury25-Aug-07 23:05
professionalJoe Woodbury25-Aug-07 23:05 
GeneralRe: How do you determine who loaded a DLL? Pin
Perspx25-Aug-07 23:35
Perspx25-Aug-07 23:35 
GeneralRe: How do you determine who loaded a DLL? Pin
David Crow27-Aug-07 3:21
David Crow27-Aug-07 3:21 
GeneralRe: How do you determine who loaded a DLL? Pin
Joe Woodbury27-Aug-07 5:55
professionalJoe Woodbury27-Aug-07 5:55 
AnswerRe: How do you determine who loaded a DLL? Pin
cmk28-Aug-07 2:20
cmk28-Aug-07 2:20 
GeneralRe: How do you determine who loaded a DLL? Pin
Joe Woodbury28-Aug-07 5:50
professionalJoe Woodbury28-Aug-07 5:50 
GeneralRe: How do you determine who loaded a DLL? Pin
cmk28-Aug-07 12:23
cmk28-Aug-07 12:23 
Interesting.
I don't think there is a perfect solution for what you want.

e.g.
User writes an exe, the exe first loads your API dll, which then properly loads your low-level dll.
Later in the exe they load a low-level dll directly, at this point i don't think you will get a DllMain(DLL_PROCESS_ATTACH) call in the low-level dll, i just think it's ref count will be increased.

If it is to prevent 'casual' attempts then you may want to export a NONAME init function from the low-level dll that takes some cryptic params. Your API dll would then call this after loading the low-level, but before using any of it's functions. A 3rd party dev would have to hack your API dll to see what is going on. The down-side here is that the low-level functions would have to check some init flag to see if everything is ok - a little extra overhead. I've seen this method used by a number of 3rd party libraries.


...cmk

Save the whales - collect the whole set

Question[VC8 MFC] How is it possible to set the font color for an Edit Control and Static Text ? Pin
abiemann24-Aug-07 6:35
abiemann24-Aug-07 6:35 
AnswerRe: [VC8 MFC] How is it possible to set the font color for an Edit Control and Static Text ? Pin
Mark Salsbery24-Aug-07 7:10
Mark Salsbery24-Aug-07 7:10 
GeneralRe: [VC8 MFC] How is it possible to set the font color for an Edit Control and Static Text ? Pin
abiemann24-Aug-07 8:20
abiemann24-Aug-07 8:20 
GeneralRe: [VC8 MFC] How is it possible to set the font color for an Edit Control and Static Text ? Pin
Mark Salsbery24-Aug-07 8:31
Mark Salsbery24-Aug-07 8:31 
GeneralRe: [VC8 MFC] How is it possible to set the font color for an Edit Control and Static Text ? Pin
abiemann24-Aug-07 11:13
abiemann24-Aug-07 11:13 
GeneralRe: [VC8 MFC] How is it possible to set the font color for an Edit Control and Static Text ? Pin
Mark Salsbery24-Aug-07 11:22
Mark Salsbery24-Aug-07 11:22 
GeneralRe: [VC8 MFC] How is it possible to set the font color for an Edit Control and Static Text ? Pin
Mark Salsbery24-Aug-07 11:30
Mark Salsbery24-Aug-07 11:30 
AnswerRe: [VC8 MFC] How is it possible to set the font color for an Edit Control and Static Text ? Pin
Jim Crafton24-Aug-07 7:12
Jim Crafton24-Aug-07 7:12 
Questionstackwalk64 compilation error on 64 bit windows - Cannot convert parameter from 'int' to 'HANDLE' Pin
John Oliviers24-Aug-07 5:39
John Oliviers24-Aug-07 5:39 
AnswerRe: stackwalk64 compilation error on 64 bit windows - Cannot convert parameter from 'int' to 'HANDLE' Pin
Maxwell Chen24-Aug-07 6:10
Maxwell Chen24-Aug-07 6:10 
GeneralRe: stackwalk64 compilation error on 64 bit windows - Cannot convert parameter from 'int' to 'HANDLE' Pin
John Oliviers24-Aug-07 7:31
John Oliviers24-Aug-07 7:31 
GeneralRe: stackwalk64 compilation error on 64 bit windows - Cannot convert parameter from 'int' to 'HANDLE' [modified] Pin
Maxwell Chen24-Aug-07 7:56
Maxwell Chen24-Aug-07 7:56 
GeneralRe: stackwalk64 compilation error on 64 bit windows - Cannot convert parameter from 'int' to 'HANDLE' Pin
John Oliviers24-Aug-07 8:34
John Oliviers24-Aug-07 8:34 
GeneralRe: stackwalk64 compilation error on 64 bit windows - Cannot convert parameter from 'int' to 'HANDLE' Pin
Maxwell Chen24-Aug-07 8:39
Maxwell Chen24-Aug-07 8:39 
GeneralRe: stackwalk64 compilation error on 64 bit windows - Cannot convert parameter from 'int' to 'HANDLE' Pin
John Oliviers24-Aug-07 8:48
John Oliviers24-Aug-07 8:48 
GeneralRe: stackwalk64 compilation error on 64 bit windows - Cannot convert parameter from 'int' to 'HANDLE' Pin
Maxwell Chen24-Aug-07 9:07
Maxwell Chen24-Aug-07 9:07 
GeneralRe: stackwalk64 compilation error on 64 bit windows - Cannot convert parameter from 'int' to 'HANDLE' Pin
John Oliviers24-Aug-07 9:16
John Oliviers24-Aug-07 9:16 

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.