Hi...
Well, i have been build a dll library with functions utilities that i need...
These utilities are:

DECBIN = Converts a Dec number to a string binary representation of the number
DECHEX = Converts a Dec number to a string Hexadecimal representation of the number

This are some functions, but the rest does work with Masm32 assembler.. return a error..
I have test the library with Rapid-Q, and Visual basic and this has no problem...

For example, the function HexDec, that convert a string hex number to Dec number return a error

I send to all the library DLL, Lib and the INC files, adn i send the visual basic and rapid-q
declarations... i don?t know wath is the problem...
The files are in RADAsm project.

Note, the archive have the .LIB and the .INC library tath need to be copied to MASM32\INCLUDE and MASM32\LIB directories.
I asume the functions return pointers are in eax----


(I?m new in the win32 asm)

Thank?s :(
Posted on 2002-05-13 12:50:13 by rabm
I don't have a method of building your project as I don't have RadAsm set up but the first thing is you need to have a LIBMAIN proc at the beginning of the code.

This one below is taken out of a MASM32 example but at the minimum you MUST return TRUE (non-zero) for the DLL to start.

Regards,

hutch@movsd.com



; ##########################################################################

LibMain proc hInstDLL:DWORD, reason:DWORD, unused:DWORD

szText LmTitle,"tstdll's LibMain Function"

.if reason == DLL_PROCESS_ATTACH
szText ATTACHPROCESS,"PROCESS_ATTACH"
invoke MessageBox,NULL,ADDR ATTACHPROCESS,addr LmTitle,MB_OK

return TRUE
; -----------------------------
; If error at startup, return 0
; System will abort loading DLL
; -----------------------------

.elseif reason == DLL_PROCESS_DETACH
szText DETACHPROCESS,"PROCESS_DETACH"
invoke MessageBox,NULL,addr DETACHPROCESS,addr LmTitle,MB_OK

.elseif reason == DLL_THREAD_ATTACH
szText ATTACHTHREAD,"THREAD_ATTACH"
invoke MessageBox,NULL,addr ATTACHTHREAD,addr LmTitle,MB_OK

.elseif reason == DLL_THREAD_DETACH
szText DETACHTHREAD,"THREAD_DETACH"
invoke MessageBox,NULL,addr DETACHTHREAD,addr LmTitle,MB_OK

.endif

ret

LibMain Endp

; ##########################################################################

Posted on 2002-05-13 18:38:44 by hutch--