Click here to Skip to main content
15,913,316 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: png file Pin
Hamid_RT1-Feb-08 20:16
Hamid_RT1-Feb-08 20:16 
GeneralRe: png file Pin
Mark Salsbery1-Feb-08 5:51
Mark Salsbery1-Feb-08 5:51 
GeneralRe: png file Pin
bob169721-Feb-08 17:27
bob169721-Feb-08 17:27 
GeneralRe: png file Pin
Mark Salsbery2-Feb-08 7:26
Mark Salsbery2-Feb-08 7:26 
GeneralRe: png file Pin
Randor 1-Feb-08 5:53
professional Randor 1-Feb-08 5:53 
GeneralCFile prob!!! Pin
rowdy_vc++31-Jan-08 18:46
rowdy_vc++31-Jan-08 18:46 
AnswerRe: CFile prob!!! Pin
Rajkumar R31-Jan-08 19:14
Rajkumar R31-Jan-08 19:14 
GeneralRe: CFile prob!!! Pin
rowdy_vc++31-Jan-08 19:38
rowdy_vc++31-Jan-08 19:38 
GeneralRe: CFile prob!!! Pin
Cedric Moonen31-Jan-08 20:11
Cedric Moonen31-Jan-08 20:11 
JokeRe: CFile prob!!! Pin
vijay_aroli31-Jan-08 20:24
vijay_aroli31-Jan-08 20:24 
GeneralRe: CFile prob!!! Pin
Cedric Moonen31-Jan-08 20:55
Cedric Moonen31-Jan-08 20:55 
QuestionRe: CFile prob!!! Pin
David Crow1-Feb-08 3:38
David Crow1-Feb-08 3:38 
GeneralDLL rebase Pin
George_George31-Jan-08 18:40
George_George31-Jan-08 18:40 
GeneralRe: DLL rebase Pin
Stephen Hewitt3-Feb-08 12:42
Stephen Hewitt3-Feb-08 12:42 
GeneralRe: DLL rebase Pin
George_George3-Feb-08 14:04
George_George3-Feb-08 14:04 
GeneralRe: DLL rebase Pin
Stephen Hewitt3-Feb-08 14:09
Stephen Hewitt3-Feb-08 14:09 
GeneralRe: DLL rebase Pin
George_George3-Feb-08 14:22
George_George3-Feb-08 14:22 
GeneralRe: DLL rebase Pin
Stephen Hewitt3-Feb-08 15:19
Stephen Hewitt3-Feb-08 15:19 
GeneralRe: DLL rebase Pin
George_George3-Feb-08 15:37
George_George3-Feb-08 15:37 
GeneralRe: DLL rebase Pin
Stephen Hewitt3-Feb-08 15:51
Stephen Hewitt3-Feb-08 15:51 
Nothing special needs to be done. Here's the def file of my DLL:
LIBRARY Dll.dll
 
EXPORTS
 Exported @ 1 NONAME


Here's the DLL's header file which I include in the EXE and DLL.
// Dll.h
 
#ifndef __DLL_H__INCLUDED__
#define __DLL_H__INCLUDED__
 
#ifdef __cplusplus
extern "C"
{
#endif // __cplusplus
 
void __stdcall Exported();
 
#ifdef __cplusplus
}
#endif // __cplusplus
 
#endif // !__DLL_H__INCLUDED__


In the EXE I link to the DLL's import library and call the function by name:
int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
 	Exported();
 
	return 0;
}


If you look at the EXE using Depends (or some other utility offering similar functionality) you'll see no function name is ever mentioned. The name information is in the DLL's import library so the linker can resolve it but it doesn't make it into the EXE or DLL.

Steve

GeneralRe: DLL rebase Pin
George_George3-Feb-08 16:11
George_George3-Feb-08 16:11 
GeneralRe: DLL rebase Pin
Stephen Hewitt3-Feb-08 16:15
Stephen Hewitt3-Feb-08 16:15 
GeneralRe: DLL rebase Pin
George_George3-Feb-08 16:36
George_George3-Feb-08 16:36 
GeneralRe: DLL rebase Pin
Stephen Hewitt3-Feb-08 16:39
Stephen Hewitt3-Feb-08 16:39 
GeneralRe: DLL rebase Pin
George_George3-Feb-08 17:02
George_George3-Feb-08 17:02 

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.