Click here to Skip to main content
15,920,508 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Replacing open/save dialogs Pin
David Crow13-Dec-05 3:57
David Crow13-Dec-05 3:57 
AnswerRe: Replacing open/save dialogs Pin
Krishnan V13-Dec-05 18:26
Krishnan V13-Dec-05 18:26 
QuestionAccess Synchronization in VC++ Pin
zinc_z13-Dec-05 2:35
zinc_z13-Dec-05 2:35 
AnswerRe: Access Synchronization in VC++ Pin
kakan13-Dec-05 3:30
professionalkakan13-Dec-05 3:30 
AnswerRe: Access Synchronization in VC++ Pin
Sheng Jiang 蒋晟13-Dec-05 9:57
Sheng Jiang 蒋晟13-Dec-05 9:57 
QuestionExporting a function from an .exe?? Pin
Gunn31713-Dec-05 2:34
Gunn31713-Dec-05 2:34 
AnswerRe: Exporting a function from an .exe?? Pin
David Crow13-Dec-05 3:58
David Crow13-Dec-05 3:58 
GeneralRe: Exporting a function from an .exe?? Pin
Gunn31713-Dec-05 4:35
Gunn31713-Dec-05 4:35 
It IS possible! In searching the internet, I came across this article:

http://www.codeguru.com/Cpp/W-P/dll/article.php/c3649/

In trying to solve this problem yesterday, I had created a Win32 DLL using the VS.NET wizard with one function I was exporting. So, I just copy/pasted the code into a new header file which I included in one of my .exe source files, then linked. That was it and it worked.

I was able to call LoadLibrary() on the exe, then GetProcAddress() for the function. Here's the complete .h needed (VERSION_EXPORTS was defined in the project properties):

<br />
#ifdef VERSION_EXPORTS<br />
#define VERSION_API __declspec(dllexport)<br />
#else<br />
#define VERSION_API __declspec(dllimport)<br />
#endif<br />
<br />
VERSION_API int fnVersion(void)<br />
{<br />
return 6030;<br />
}<br />

GeneralRe: Exporting a function from an .exe?? Pin
toxcct13-Dec-05 5:22
toxcct13-Dec-05 5:22 
GeneralRe: Exporting a function from an .exe?? Pin
Gunn31713-Dec-05 5:36
Gunn31713-Dec-05 5:36 
QuestionProblem with regions Pin
emadns13-Dec-05 2:03
emadns13-Dec-05 2:03 
AnswerRe: Problem with regions Pin
Blake Miller13-Dec-05 9:47
Blake Miller13-Dec-05 9:47 
GeneralRe: Problem with regions Pin
emadns13-Dec-05 16:12
emadns13-Dec-05 16:12 
QuestionMessage Queue Implementation how to create queue Pin
selva198013-Dec-05 1:56
selva198013-Dec-05 1:56 
QuestionHow to do programmatical digest authentication against active directory? Pin
redclover13-Dec-05 1:52
redclover13-Dec-05 1:52 
QuestionDefining global variables Pin
abhinarulkar13-Dec-05 1:35
abhinarulkar13-Dec-05 1:35 
AnswerRe: Defining global variables Pin
Alex Orovetskiy13-Dec-05 1:42
Alex Orovetskiy13-Dec-05 1:42 
AnswerRe: Defining global variables Pin
JonEngle13-Dec-05 1:46
JonEngle13-Dec-05 1:46 
Questionclistctrl's drawitem Pin
lorey12-Dec-05 23:43
lorey12-Dec-05 23:43 
AnswerRe: clistctrl's drawitem Pin
sdancer7513-Dec-05 6:59
sdancer7513-Dec-05 6:59 
AnswerRe: clistctrl's drawitem Pin
PJ Arends13-Dec-05 15:53
professionalPJ Arends13-Dec-05 15:53 
AnswerRe: clistctrl's drawitem Pin
sdancer7519-Dec-05 20:57
sdancer7519-Dec-05 20:57 
QuestionIs it easy to implement CFrameWnd::DoModal()? Pin
followait12-Dec-05 22:06
followait12-Dec-05 22:06 
AnswerRe: Is it easy to implement CFrameWnd::DoModal()? Pin
ThatsAlok12-Dec-05 23:03
ThatsAlok12-Dec-05 23:03 
AnswerRe: Is it easy to implement CFrameWnd::DoModal()? Pin
peterchen13-Dec-05 5:58
peterchen13-Dec-05 5:58 

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.