Dear all,

How masm32 call c library?
Should I include some .inc files or library?
I worte "invoke printf, addr str" in my prog and compiler
it show me "undefined symbol: printf"

By the way, can I create a c function in VC++ and compiler it as an obj file
And them invoke it in my masm32 program?


Please give me some advice
thanks

Best Regards.
Posted on 2003-03-12 02:13:47 by harvey.lin
First of all,you need an import library/static library to call external functions.In our case,
it's an import library:msvcrt.dll or crtdll.dll
Second,we have to declare our external functions:func PROTO param1:size,param2:size,etc...

You can check the thread:

http://www.asmcommunity.net/board/index.php?topic=11266&highlight=strcat

Regards,

Vortex
Posted on 2003-03-12 02:32:15 by Vortex

First of all,you need an import library/static library to call external functions.In our case,
it's an import library:msvcrt.dll or crtdll.dll
Second,we have to declare our external functions:func PROTO param1:size,param2:size,etc...

You can check the thread:

http://www.asmcommunity.net/board/index.php?topic=11266&highlight=strcat

Regards,

Vortex



Thanks Vortex
This is a very useful information.
:alright:
Posted on 2003-03-12 21:34:08 by harvey.lin
Hmm...it seems that everyone wants to use C runtimes :D

i think it will be really helpfull if its clearly documented in the FAQ :D
Posted on 2003-03-15 11:23:28 by himanshu
Your right, it would be... the problem is you need to recruit some dedicated people to do such a task.. Im way too busy myself, but perhaps there are others looking for a rewarding project..??

:NaN:
Posted on 2003-03-15 23:07:18 by NaN
If I remember correctly NTDLL.DLL also contains the standard C functions
Posted on 2003-03-16 02:25:17 by ThoughtCriminal

If I remember correctly NTDLL.DLL also contains the standard C functions


ThoughtCriminal,

Thanks for the info:alright:
Posted on 2003-03-16 12:52:50 by Vortex
Hi,

see them too, most of C funcs, if not all, however there's no import library for ntdll.lib.
Posted on 2003-03-16 16:52:37 by _Servil_
You get it from the DDK. I have the one from the W2K DDK: (lib file in the zip)















Since MS lets you donload the DDKs, I guess it is okay to post this here. I not, the mods know what to do....
Posted on 2003-03-16 23:28:04 by ThoughtCriminal
i give you this , maybe you already have it
Posted on 2003-03-18 04:10:38 by NEMO
Nemo,

Thanks for the msvcrt.inc file,nice work:alright:

Regards,

Vortex
Posted on 2003-03-18 04:16:09 by Vortex