I'm fairly new to MASM32 and ive never built a DLL in it before, but thats my current focus. Are there any Powerbasic+MASM32 gurus out there that can kindly port this over from Powerbasic to MASM32 for me?
#COMPILE DLL

#INCLUDE "win32api.inc"

FUNCTION LIBMAIN(BYVAL hInstance AS LONG, _
BYVAL fwdReason AS LONG, _
BYVAL lpvReserved AS LONG) EXPORT AS LONG
LIBMAIN = 1 'success!
EXIT FUNCTION
END FUNCTION

SUB ShowObjects (szObject AS ASCIIZ, szResult AS ASCIIZ) EXPORT
ON ERROR RESUME NEXT
MSGBOX "Object = " & szObject & $CRLF & _
"Result = " & szResult, %MB_OK + %MB_ICONINFORMATION, "DLL Test"
END SUB

SUB InitDLL () EXPORT
ON ERROR RESUME NEXT
MSGBOX "DLL Initialised!", %MB_OK + %MB_ICONINFORMATION, "DLL Test"
END SUB

Thanks for any help in advance! Im looking forward to seeing how they compare :)
Posted on 2002-07-03 11:48:13 by 1bitshort
Attached.
Posted on 2002-07-03 12:01:50 by comrade
lol, I didn't need the job done within 10 minutes, but thanks very much for the superfast response :) :) :)
I'll check it out now! I just had a quick look at the source and it looks right :)
Posted on 2002-07-03 12:06:01 by 1bitshort
thats working perfectly, thanks! :)
My last question -- the MASM32-compiled DLL was 2560 bytes, whereas the Visual C++ DLL was 1152 bytes. Are there any optimisations that can be made to build.bat? :)
Thanks again!
Posted on 2002-07-03 13:26:29 by 1bitshort
You can /merge sections.
Posted on 2002-07-03 14:20:59 by comrade