I created a New project with Masm32 ,but need a dll generated from VC6.0,So I write as below(the lib was generated from VC6.0)
...
includelib mylib
Myproc proto :dword
...
invoke Myproc,Arg1
but the linker can't recognize Myproc,After deep thinking,I found the lib not compatible with mam32?
How can I use the lib gennerated by VC?
How were all the libs in masm32 generated?
Any comments orideas would be appreciated...
...
includelib mylib
Myproc proto :dword
...
invoke Myproc,Arg1
but the linker can't recognize Myproc,After deep thinking,I found the lib not compatible with mam32?
How can I use the lib gennerated by VC?
How were all the libs in masm32 generated?
Any comments orideas would be appreciated...
Did you define your C function as STDCALL before to make the lib ?
Yes,I did so in my VC dll project:
int WINAPI Myproc(int a,int b)
{
....
}
but still not work...I think there must be something different between VC .libs and MASm32 .libs,is it true?
int WINAPI Myproc(int a,int b)
{
....
}
but still not work...I think there must be something different between VC .libs and MASm32 .libs,is it true?
No, I already converted some C code to a (static) lib to use in my asm programs.
Is it C or C++ ?
Is it C or C++ ?
If your dll is a C++ file, put extern "C" { } around the export declarations, so your functions won't get C++ suffixes (testFunc@AENBEYHB) but stdcall (testFunc@8).
Thomas
Thomas
I use C++,many thx to Thomas for your suggestion,It really worked!
Now I know the diffirence convention(name or call) diffirence betwwen Masm , C++,C.
Thx for your amswer!I would ask more stupid questions...hmmm....
Now I know the diffirence convention(name or call) diffirence betwwen Masm , C++,C.
Thx for your amswer!I would ask more stupid questions...hmmm....