Click here to Skip to main content
15,891,253 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to Convert unsigned char to UTF-8,Unicode? Pin
Nemanja Trifunovic16-Sep-07 1:27
Nemanja Trifunovic16-Sep-07 1:27 
GeneralRe: how to Convert unsigned char to UTF-8,Unicode? Pin
kcynic16-Sep-07 15:30
kcynic16-Sep-07 15:30 
QuestionFunny timing results in threading project Pin
Cyrilix15-Sep-07 10:27
Cyrilix15-Sep-07 10:27 
AnswerRe: Funny timing results in threading project Pin
carrivick15-Sep-07 20:51
carrivick15-Sep-07 20:51 
GeneralRe: Funny timing results in threading project Pin
Cyrilix16-Sep-07 7:07
Cyrilix16-Sep-07 7:07 
AnswerRe: Funny timing results in threading project Pin
Randor 16-Sep-07 6:07
professional Randor 16-Sep-07 6:07 
GeneralRe: Funny timing results in threading project Pin
Cyrilix16-Sep-07 7:05
Cyrilix16-Sep-07 7:05 
QuestionHow export functions from an exe file? Pin
Hongjun Ge15-Sep-07 7:18
Hongjun Ge15-Sep-07 7:18 
I want to export some functions from an executeable file. How to do it.....Confused | :confused:

In exe export function like below, and add .def file add foo to exports.
<br />
__declspec(dllexport) int __stdcall foo(int i, int j)<br />
{<br />
    return i+j;<br />
}<br />

In another exe file invoke function like this:

<br />
typedef int (__stdcall *FOO)(int, int);<br />
<br />
HMODULE hModule = LoadLibrary("C:\\Export.exe");<br />
if (hModule != NULL)<br />
{<br />
    FOO pFun = (FOO)GetProcAddress(hModule, "foo");<br />
    if (pFun != NULL)<br />
    {<br />
        TRACE("%d\n", pFun(1, 3));<br />
    }<br />
}<br />

I Got an "Access Violation" error.





Hongjun Ge

AnswerRe: How export functions from an exe file? Pin
Chris Losinger15-Sep-07 7:23
professionalChris Losinger15-Sep-07 7:23 
GeneralRe: How export functions from an exe file? Pin
Nemanja Trifunovic15-Sep-07 12:29
Nemanja Trifunovic15-Sep-07 12:29 
GeneralRe: How export functions from an exe file? Pin
Chris Losinger15-Sep-07 13:17
professionalChris Losinger15-Sep-07 13:17 
GeneralRe: How export functions from an exe file? Pin
Eytukan15-Sep-07 17:34
Eytukan15-Sep-07 17:34 
GeneralRe: How export functions from an exe file? Pin
Hongjun Ge16-Sep-07 2:24
Hongjun Ge16-Sep-07 2:24 
AnswerRe: How export functions from an exe file? Pin
Eytukan15-Sep-07 17:49
Eytukan15-Sep-07 17:49 
GeneralRe: How export functions from an exe file? Pin
glitteringsound18-Mar-10 10:16
glitteringsound18-Mar-10 10:16 
JokeRe: How export functions from an exe file? Pin
Rama Krishna Vavilala20-Mar-10 7:48
Rama Krishna Vavilala20-Mar-10 7:48 
QuestionToolbar with two columns how Pin
sharp_k15-Sep-07 5:35
sharp_k15-Sep-07 5:35 
AnswerRe: Toolbar with two columns how Pin
Mark Salsbery16-Sep-07 8:27
Mark Salsbery16-Sep-07 8:27 
GeneralRe: Toolbar with two columns how Pin
sharp_k17-Sep-07 12:21
sharp_k17-Sep-07 12:21 
QuestionWinMain and argv/argc Pin
dellthinker15-Sep-07 5:29
dellthinker15-Sep-07 5:29 
QuestionRe: WinMain and argv/argc Pin
David Crow15-Sep-07 11:49
David Crow15-Sep-07 11:49 
AnswerRe: WinMain and argv/argc Pin
dellthinker15-Sep-07 13:32
dellthinker15-Sep-07 13:32 
GeneralRe: WinMain and argv/argc Pin
David Crow15-Sep-07 17:27
David Crow15-Sep-07 17:27 
AnswerRe: WinMain and argv/argc Pin
carrivick15-Sep-07 21:00
carrivick15-Sep-07 21:00 
Questionashen character Pin
youbo15-Sep-07 3:33
youbo15-Sep-07 3:33 

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.