Click here to Skip to main content
15,914,016 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: In VC6.0, how to change Release to Debug? Pin
Michael Dunn11-Dec-03 14:45
sitebuilderMichael Dunn11-Dec-03 14:45 
GeneralRe: In VC6.0, how to change Release to Debug? Pin
Shay Harel12-Dec-03 6:51
Shay Harel12-Dec-03 6:51 
AnswerRe: In VC6.0, how to change Release to Debug? Pin
Anthony_Yio11-Dec-03 22:19
Anthony_Yio11-Dec-03 22:19 
GeneralMy DllMain is not getting invoked. Pin
Matthew Busche11-Dec-03 12:02
Matthew Busche11-Dec-03 12:02 
GeneralRe: My DllMain is not getting invoked. Pin
Peter Molnar11-Dec-03 13:36
Peter Molnar11-Dec-03 13:36 
GeneralRe: My DllMain is not getting invoked. Pin
Matthew Busche11-Dec-03 14:07
Matthew Busche11-Dec-03 14:07 
GeneralRe: My DllMain is not getting invoked. Pin
Peter Molnar11-Dec-03 14:40
Peter Molnar11-Dec-03 14:40 
GeneralSUCCESS!!! Pin
Matthew Busche12-Dec-03 18:08
Matthew Busche12-Dec-03 18:08 
Much thanks to Peter Molnar for mailing me a completely trivial DevStudio project containing a DllMain() that got properly invoked. What I was missing (and what I had never seen documented) was the APIENTRY declaration for the DLL entry point function. The DllMain must be declared like this:
BOOL APIENTRY DllMain(HINSTANCE , DWORD , LPVOID )

Once those 8 pesky characters were added, it worked great.

Also, for those who care, this works independently of the application type (i.e., works for both console apps and windows apps) and (as Peter said in an earlier message on this thread) works independently of how the library is loaded. (I.e., you can use either load-time dynamic linking or run-time dynamic linking.)

Matt
GeneralRe: My DllMain is not getting invoked. Pin
Mike Dimmick12-Dec-03 2:03
Mike Dimmick12-Dec-03 2:03 
GeneralFloating CDialogBar Pin
Jon Sagara11-Dec-03 11:38
Jon Sagara11-Dec-03 11:38 
GeneralRe: Floating CDialogBar Pin
Jon Sagara11-Dec-03 19:46
Jon Sagara11-Dec-03 19:46 
QuestionHelp? Pin
Anonymous11-Dec-03 11:34
Anonymous11-Dec-03 11:34 
AnswerRe: Help? Pin
Terry O'Nolley11-Dec-03 15:23
Terry O'Nolley11-Dec-03 15:23 
GeneralDLL question Pin
Diarrhio11-Dec-03 11:18
Diarrhio11-Dec-03 11:18 
GeneralRe: DLL question Pin
Diarrhio11-Dec-03 12:52
Diarrhio11-Dec-03 12:52 
Generalmight be a dumb question... Pin
l a u r e n11-Dec-03 11:07
l a u r e n11-Dec-03 11:07 
GeneralRe: might be a dumb question... Pin
Jörgen Sigvardsson11-Dec-03 11:11
Jörgen Sigvardsson11-Dec-03 11:11 
GeneralRe: might be a dumb question... Pin
l a u r e n11-Dec-03 11:19
l a u r e n11-Dec-03 11:19 
GeneralRe: might be a dumb question... Pin
Matthew Busche11-Dec-03 11:17
Matthew Busche11-Dec-03 11:17 
Generalresource DLL Pin
alex.barylski11-Dec-03 10:03
alex.barylski11-Dec-03 10:03 
GeneralRe: resource DLL Pin
Jörgen Sigvardsson11-Dec-03 11:08
Jörgen Sigvardsson11-Dec-03 11:08 
GeneralRe: resource DLL Pin
Michael Dunn11-Dec-03 14:46
sitebuilderMichael Dunn11-Dec-03 14:46 
GeneralRe: resource DLL Pin
alex.barylski11-Dec-03 15:09
alex.barylski11-Dec-03 15:09 
GeneralCStatusbar and an afxMsg question Pin
ns11-Dec-03 9:06
ns11-Dec-03 9:06 
GeneralRe: CStatusbar and an afxMsg question Pin
Ravi Bhavnani11-Dec-03 9:35
professionalRavi Bhavnani11-Dec-03 9:35 

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.