News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

getting functions out of Obj file

Started by hmi222, August 19, 2009, 09:08:56 PM

Previous topic - Next topic

hmi222

Hi...
Im new in MASM and ive got a obj.file with functions in it.
How can i include that obj file and use its functions?
First i converted to Static lib and used it.. runs...
But how can i use it directly??
Thanx in advance...

ecube

just add to your linker when building

\MASM32\BIN\ML /c /coff /Cp test.asm
\MASM32\BIN\link /SUBSYSTEM:WINDOWS test.obj extraobj1.obj extraobj2.obj etc...

hmi222

Thanx E^cube
and what to add in ASM file and include with its functions???

ecube

you add the same function proto's you would if you linked to it as a lib. If you have it as a lib you can use l2inc in the masm tools folder to generate the function protos in a inc, otherwise you can try http://www.vortex.masmcode.com/files/obj2def101.zip to convert obj to inc.

If the obj was made by a C/C++ compiler you may have to declare as

funcname proto C :DWORD,:DWORD etc.. for params

if its stdcalling convention just use

funcname proto :DWORD,:DWORD etc.. for params

hmi222