well just try the cool example of Vortex in NASM

can any one post a exemple with the dll loaded in memory insted writing it to disk ?

; ---------------------------------------------------------------
%include "\lab\vasm\inc\nagoa.inc"

extern obj_dll_data ; entry to this dll obj made with bin2o.exe



library db "c:\~." ; make a strange name to mydll.dll
; it will be made at c:\ and then deleted at end of program.


..start:

call _lcreat,library,0
CONST hFile, dd 0
mov ,eax
call _lwrite,,obj_dll_data,3072
call _lclose,

call LoadLibrary,library
CONST hLib, dd 0
mov ,eax
CONST myfunc, db "msgbox",0
call GetProcAddress,,myfunc
CONST func, dd 0
mov ,eax
CALL
call FreeLibrary,
call DeleteFile,library
call ExitProcess,NULL
;--------------------------------------------------------------
Posted on 2003-03-20 18:08:43 by Nguga
%include '\lab\vasm\inc\nagoa.inc'
%include '\lab\vasm\inc\pgcmacro.asm'

global DllMain ; Here is the entry point of our dll ( in NaGoA is always DllMain teel now..)
global msgbox ;make DLL Function MsgBox global
export msgbox ;DLL Function to Export is MsgBox



caption db "Hello!",0
msg db 'How are you?',0



DllMain:

rotin DllEntry,hInstance,reason,reserved1
mov eax,TRUE
_ret
endrotin

msgbox:
call MessageBox,NULL,addr msg,addr caption,MB_OK
ret
Posted on 2003-03-20 18:28:50 by Nguga