Click here to Skip to main content
15,923,006 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC Doc/View and CButton Pin
Mark Salsbery10-Apr-07 7:04
Mark Salsbery10-Apr-07 7:04 
QuestionRe: MFC Doc/View and CButton Pin
David Crow10-Apr-07 2:29
David Crow10-Apr-07 2:29 
QuestionDLL fails on 9x platform, runs on NT platform Pin
JeffRoz9-Apr-07 14:14
JeffRoz9-Apr-07 14:14 
AnswerRe: DLL fails on 9x platform, runs on NT platform Pin
Rick York9-Apr-07 15:54
mveRick York9-Apr-07 15:54 
GeneralRe: DLL fails on 9x platform, runs on NT platform Pin
JeffRoz9-Apr-07 16:49
JeffRoz9-Apr-07 16:49 
GeneralRe: DLL fails on 9x platform, runs on NT platform Pin
Steve S10-Apr-07 0:16
Steve S10-Apr-07 0:16 
GeneralRe: DLL fails on 9x platform, runs on NT platform Pin
JeffRoz10-Apr-07 3:09
JeffRoz10-Apr-07 3:09 
GeneralRe: DLL fails on 9x platform, runs on NT platform Pin
JudyL_MD10-Apr-07 7:36
JudyL_MD10-Apr-07 7:36 
I'm not Steve, but I'll take a crack at explaining this. The fact that you have a return in your code before you call function X does not affect what the OS does when it tries to load your program. All it has is a list of functions that your program needs to run - that list is created when the program is linked together. If any function in that list is not available when the OS tries to load your program, it will fail.

Steve's use of the term "proper dynamic linking" is made to distinguish it from what you get when you use an import library. You link with the .lib and that .lib contains references to the DLL it is associated with. However, as you've found out, it creates dependencies on functions that you may not use _at execution time_. "Proper" does not create that dependency at the expense of making more work for you in your program. You'll need to do something like:

if os is nt or greater
{
LoadLibrary ("the name of the dll containing the function")
GetProcAddress (handle from LoadLibrary, "name of function");
(function pointer from GetProcAddress) (parameters to function)
}
else
{
whatever you do in the windows 95 and 98 case
}

This way, the function in question is not in the list of functions that the OS tries to resolve when your program is loaded.

Judy

GeneralRe: DLL fails on 9x platform, runs on NT platform Pin
JeffRoz10-Apr-07 8:43
JeffRoz10-Apr-07 8:43 
GeneralRe: DLL fails on 9x platform, runs on NT platform Pin
JudyL_MD10-Apr-07 8:55
JudyL_MD10-Apr-07 8:55 
GeneralRe: DLL fails on 9x platform, runs on NT platform Pin
JeffRoz10-Apr-07 17:26
JeffRoz10-Apr-07 17:26 
QuestionRe: DLL fails on 9x platform, runs on NT platform Pin
JeffRoz16-Apr-07 5:26
JeffRoz16-Apr-07 5:26 
AnswerRe: DLL fails on 9x platform, runs on NT platform Pin
JudyL_MD16-Apr-07 6:05
JudyL_MD16-Apr-07 6:05 
QuestionHow to send update text message with only standard windows library Pin
theFrenchHornet9-Apr-07 12:55
theFrenchHornet9-Apr-07 12:55 
AnswerRe: How to send update text message with only standard windows library Pin
Mark Salsbery9-Apr-07 16:38
Mark Salsbery9-Apr-07 16:38 
GeneralRe: How to send update text message with only standard windows library Pin
theFrenchHornet10-Apr-07 4:27
theFrenchHornet10-Apr-07 4:27 
GeneralRe: How to send update text message with only standard windows library Pin
theFrenchHornet10-Apr-07 4:45
theFrenchHornet10-Apr-07 4:45 
AnswerRe: How to send update text message with only standard windows library Pin
prasad_som9-Apr-07 18:36
prasad_som9-Apr-07 18:36 
GeneralRe: How to send update text message with only standard windows library Pin
theFrenchHornet10-Apr-07 4:46
theFrenchHornet10-Apr-07 4:46 
QuestionNeed help on game creation Pin
thesad9-Apr-07 10:15
thesad9-Apr-07 10:15 
QuestionRe: Need help on game creation Pin
David Crow9-Apr-07 10:52
David Crow9-Apr-07 10:52 
AnswerRe: Need help on game creation Pin
Rick York9-Apr-07 15:58
mveRick York9-Apr-07 15:58 
GeneralRe: Need help on game creation Pin
Rajesh R Subramanian9-Apr-07 20:00
professionalRajesh R Subramanian9-Apr-07 20:00 
AnswerRe: Need help on game creation Pin
Wes Aday10-Apr-07 4:26
professionalWes Aday10-Apr-07 4:26 
Questionhidden process Pin
mahdiehIR9-Apr-07 10:12
mahdiehIR9-Apr-07 10:12 

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.