If int HCE300_Read(int TrackNo, char *ReadData); is the prototype, then it uses the default calling convention. It my understanding that's __cdecl for MS compilers. Win32::API uses the __stdcall calling convention since that's what the Win32 API (kernel32.dll, etc) uses.
| Argument-passing order | Stack-maintenance responsibility | |
|---|---|---|
| __stdcall | Right to left | Called function pops its own arguments from the stack |
| __cdecl | Right to left | Calling function pops the arguments from the stack |
Win32::API expects the DLL function to reset the stack, but the DLL function expects its caller to reset the stack.
In reply to Re^3: Correct call for dll with Win32::API
by ikegami
in thread Correct call for dll with Win32::API
by walto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |