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...
Posted on 2002-04-08 09:44:35 by Hume
Did you define your C function as STDCALL before to make the lib ?
Posted on 2002-04-08 09:45:55 by JCP
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?
Posted on 2002-04-08 09:57:29 by Hume
No, I already converted some C code to a (static) lib to use in my asm programs.
Is it C or C++ ?
Posted on 2002-04-08 10:07:50 by JCP
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).

Posted on 2002-04-08 10:25:57 by 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....
Posted on 2002-04-08 22:47:35 by Hume