Click here to Skip to main content
15,921,454 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: WIndows Controls Pin
James Brown21-Jun-05 7:30
James Brown21-Jun-05 7:30 
GeneralRe: WIndows Controls Pin
Andy Moore21-Jun-05 7:35
Andy Moore21-Jun-05 7:35 
GeneralRe: WIndows Controls Pin
Ross White21-Jun-05 8:08
Ross White21-Jun-05 8:08 
Generaldynamic check box creation Pin
softtec21-Jun-05 4:33
softtec21-Jun-05 4:33 
GeneralRe: dynamic check box creation Pin
Blake Miller21-Jun-05 6:05
Blake Miller21-Jun-05 6:05 
GeneralUltimate Grid 6.1 (tab font) Pin
smbelow21-Jun-05 4:32
smbelow21-Jun-05 4:32 
GeneralRe: Ultimate Grid 6.1 (tab font) Pin
lynchspawn21-Jun-05 4:41
lynchspawn21-Jun-05 4:41 
GeneralDLL question ( clueless ) Pin
Maximilien21-Jun-05 4:05
Maximilien21-Jun-05 4:05 
( in VC6 )

I have a DLL from a 3rd party.

there is only one function in the DLL which is declared like this in the simplist documentation :

int __stdcall Function( long,double*, long , long );<code><br />
<br />
in my code I do this : <br />
<br />
<pre>
 typedef int (*FunctionProc)(long , double*, long, long );
/// LoadLibrary and GetProcAdress work ( they don't return NULL )
///...
 double* p;
 int iRes = FunctionProc( 1, p, 2, 3 );
// cleanup ....
}</pre><br />
<br />
When I run this, I get a ESP error telling me the calling convention is not good between the DLL function and the function prototype I use.<br />
<br />
I changed the calling conventions of my sample project from __cdecl to __stdcall ( in the project settings ) and it looks like it works, the Function gets called without crashing.<br />
<br />
Is there a way to "transform" the function calling convention ? <br />
<br />
in my real application, I would like not to change the calling convention if possible, I don't really know the implications.<br />
<br />
Thanks.<br />
<br />
Max.<br />
 <br />
<br />
<hr><a href="http://www.thesorus.qc.ca">Maximilien Lincourt</a><br />
Your Head A Splode - Strong Bad

GeneralRe: DLL question ( clueless ) Pin
LCI21-Jun-05 4:15
LCI21-Jun-05 4:15 
GeneralRe: DLL question ( clueless ) Pin
Tom Archer21-Jun-05 4:15
Tom Archer21-Jun-05 4:15 
GeneralRe: DLL question ( clueless ) Pin
Antony M Kancidrowski21-Jun-05 4:24
Antony M Kancidrowski21-Jun-05 4:24 
GeneralRe: DLL question ( clueless ) probably self-answered Pin
Maximilien21-Jun-05 4:30
Maximilien21-Jun-05 4:30 
GeneralRe: DLL question ( clueless ) probably self-answered Pin
Antony M Kancidrowski21-Jun-05 4:44
Antony M Kancidrowski21-Jun-05 4:44 
QuestionSDI w/ splitter - SetActiveView()??? Pin
lynchspawn21-Jun-05 4:04
lynchspawn21-Jun-05 4:04 
GeneralReading a node value from XML file Pin
LCI21-Jun-05 3:40
LCI21-Jun-05 3:40 
GeneralRe: Reading a node value from XML file Pin
Tom Archer21-Jun-05 4:24
Tom Archer21-Jun-05 4:24 
GeneralRe: Reading a node value from XML file Pin
Tom Archer21-Jun-05 4:27
Tom Archer21-Jun-05 4:27 
GeneralRe: Reading a node value from XML file Pin
LCI21-Jun-05 5:03
LCI21-Jun-05 5:03 
Generalusing ifstream to read a file. Pin
Hachaso21-Jun-05 2:12
Hachaso21-Jun-05 2:12 
GeneralRe: using ifstream to read a file. Pin
xiaohe52121-Jun-05 3:17
xiaohe52121-Jun-05 3:17 
GeneralRe: using ifstream to read a file. Pin
Hachaso21-Jun-05 3:32
Hachaso21-Jun-05 3:32 
GeneralRe: using ifstream to read a file. Pin
S. Senthil Kumar21-Jun-05 3:34
S. Senthil Kumar21-Jun-05 3:34 
GeneralSave &amp; Open Pin
suroor45321-Jun-05 1:52
suroor45321-Jun-05 1:52 
GeneralRe: Save &amp; Open Pin
ThatsAlok21-Jun-05 2:14
ThatsAlok21-Jun-05 2:14 
GeneralRe: Save &amp; Open Pin
xiaohe52121-Jun-05 3:12
xiaohe52121-Jun-05 3:12 

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.