hi all,
i need some help about calling conventions:
i have the following 32bit code where i use STDCALL convention. I need to call the dll function MyProc but in the DLL i use windows pascal convention. So i get confused ...
the DLL start as follow
Is the order of the parameters declared after MyProc correct or have i to invert them ?
Thanks, B7
i need some help about calling conventions:
i have the following 32bit code where i use STDCALL convention. I need to call the dll function MyProc but in the DLL i use windows pascal convention. So i get confused ...
model flat,stdcall
.data
A BYTE 1
B DWORD 2
C DWORD 3
....
....
....
call MyProc A,B,C
....
the DLL start as follow
model flat,windows pascal
...
...
MyProc A:BYTE, B:DWORD, C:DWORD
...
...
...
ret
MyProc endp
Is the order of the parameters declared after MyProc correct or have i to invert them ?
Thanks, B7
I think INVOKE knows the difference. So as long as you use INVOKE to call the PROC, you shouldn't have to worry about it.
Add the /Sg flag to ML and check out the generated code in the listing. :)
Add the /Sg flag to ML and check out the generated code in the listing. :)
You'll probably have to set up a prototype for the function in the
DLL, telling your assembler that it deviates from the stdcall and
is actually using pascal calling convention.
DLL, telling your assembler that it deviates from the stdcall and
is actually using pascal calling convention.
thanks,
S/390, the problem is that i'm unfortunately using tasm :( and i can't use INVOKE. I will try with a prototype declaration.
Bye
S/390, the problem is that i'm unfortunately using tasm :( and i can't use INVOKE. I will try with a prototype declaration.
Bye