Click here to Skip to main content
15,900,108 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralWin32 capture Escape and Enter key window message. Pin
Hirakawa31-Jan-08 16:52
Hirakawa31-Jan-08 16:52 
GeneralRe: Win32 capture Escape and Enter key window message. Pin
Rajkumar R31-Jan-08 22:27
Rajkumar R31-Jan-08 22:27 
GeneralRe: Win32 capture Escape and Enter key window message. Pin
Catherine Sea15-Feb-08 15:16
Catherine Sea15-Feb-08 15:16 
GeneralC++ Interface Pin
George_George31-Jan-08 15:32
George_George31-Jan-08 15:32 
GeneralRe: C++ Interface Pin
Stephen Hewitt31-Jan-08 17:19
Stephen Hewitt31-Jan-08 17:19 
GeneralRe: C++ Interface Pin
George_George31-Jan-08 17:45
George_George31-Jan-08 17:45 
GeneralWindows App using way too much CPU Pin
gpascale31-Jan-08 14:41
gpascale31-Jan-08 14:41 
GeneralRe: Windows App using way too much CPU Pin
Iain Clarke, Warrior Programmer1-Feb-08 3:18
Iain Clarke, Warrior Programmer1-Feb-08 3:18 
GeneralRe: Windows App using way too much CPU Pin
gpascale1-Feb-08 5:40
gpascale1-Feb-08 5:40 
GeneralRe: Windows App using way too much CPU Pin
Mark Salsbery1-Feb-08 5:40
Mark Salsbery1-Feb-08 5:40 
GeneralRe: Windows App using way too much CPU Pin
gpascale1-Feb-08 5:41
gpascale1-Feb-08 5:41 
GeneralRe: Windows App using way too much CPU Pin
Mark Salsbery1-Feb-08 5:56
Mark Salsbery1-Feb-08 5:56 

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.