Click here to Skip to main content
16,008,075 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Does anyone know this error?? Pin
Anonymous2-Nov-02 13:42
Anonymous2-Nov-02 13:42 
GeneralRe: Does anyone know this error?? Pin
Pett3-Nov-02 4:48
Pett3-Nov-02 4:48 
QuestionNewbie question - C++ 6.0 Pro or Standard? Pin
jta2-Nov-02 8:17
jta2-Nov-02 8:17 
AnswerRe: Newbie question - C++ 6.0 Pro or Standard? Pin
ian mariano2-Nov-02 10:04
ian mariano2-Nov-02 10:04 
GeneralI/O Completion Port and Queue Status :: Winsock Pin
valikac2-Nov-02 8:04
valikac2-Nov-02 8:04 
GeneralRe: I/O Completion Port and Queue Status :: Winsock Pin
ian mariano2-Nov-02 10:09
ian mariano2-Nov-02 10:09 
Generalexplicit linking to DLLs Pin
tUpp2-Nov-02 7:32
tUpp2-Nov-02 7:32 
GeneralRe: explicit linking to DLLs Pin
ian mariano2-Nov-02 14:00
ian mariano2-Nov-02 14:00 
tUpp wrote:
My question is: Where is HINSTANCE and LPFNDLLFUNC1 defined?

LPFNDLLFUNC is defined in the example:

typedef UINT (CALLBACK* LPFNDLLFUNC1)(DWORD,UINT);


That "prototypes" the function in the DLL.

HINSTANCE is defined #includeing <windows.h> (it's actually in a file included by windows.h, windefs.h, I think.)

If you want to use the example, you have to: Create a DLL, which exports the hypothetical function, and make sure the sample .exe you create can find it (e.g., place the DLL in the same folder.)

Read more about DLL Frequently Asked Questions[^]

Normally, you'd export the function in a header (.h) file, stating the function comes from an imported DLL:

__declspec(dllimport) UINT function(DWORD,UINT);


And you would link to the library. Explicitly linking means you don't have the headers, but you know the function(s) you wish to call, hence that typedef.

-- ian

"The greatest danger to humanity is humanity without an open mind."
  - Ian Mariano - http://www.ian-space.com/

GeneralToolBar Pin
sikrip2-Nov-02 6:55
sikrip2-Nov-02 6:55 
GeneralRe: ToolBar Pin
includeh102-Nov-02 7:07
includeh102-Nov-02 7:07 
GeneralDispatchMessage vs own function Pin
S van Leent2-Nov-02 4:55
S van Leent2-Nov-02 4:55 
GeneralRe: DispatchMessage vs own function Pin
ian mariano2-Nov-02 6:38
ian mariano2-Nov-02 6:38 
GeneralRe: DispatchMessage vs own function Pin
S van Leent2-Nov-02 10:12
S van Leent2-Nov-02 10:12 
GeneralRe: DispatchMessage vs own function Pin
Paul M Watt2-Nov-02 10:14
mentorPaul M Watt2-Nov-02 10:14 
GeneralRe: DispatchMessage vs own function Pin
S van Leent2-Nov-02 10:21
S van Leent2-Nov-02 10:21 
GeneralRe: DispatchMessage vs own function Pin
ian mariano2-Nov-02 15:19
ian mariano2-Nov-02 15:19 
GeneralRe: DispatchMessage vs own function Pin
S van Leent2-Nov-02 10:54
S van Leent2-Nov-02 10:54 
GeneralStrange List Box Problem Pin
Ayush2-Nov-02 4:36
Ayush2-Nov-02 4:36 
GeneralRe: Strange List Box Problem Pin
ian mariano2-Nov-02 10:40
ian mariano2-Nov-02 10:40 
GeneralRe: Strange List Box Problem Pin
Ayush2-Nov-02 14:35
Ayush2-Nov-02 14:35 
GeneralRe: Strange List Box Problem Pin
ian mariano2-Nov-02 15:11
ian mariano2-Nov-02 15:11 
QuestionHow to define operator = in CStringArray? Pin
ooosawaddee32-Nov-02 3:08
ooosawaddee32-Nov-02 3:08 
AnswerRe: How to define operator = in CStringArray? Pin
Dominik Reichl2-Nov-02 3:26
Dominik Reichl2-Nov-02 3:26 
Generalask another question Pin
ooosawaddee32-Nov-02 3:57
ooosawaddee32-Nov-02 3:57 
GeneralRe: ask another question Pin
Dominik Reichl2-Nov-02 6:03
Dominik Reichl2-Nov-02 6:03 

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.