Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- format PE GUI 4.0 DLL
- include '%include%/win32a.inc'
- entry DllMain
- section '.data' data readable writeable
- msgBoxText db "Hello, Java! I'm FASM.", 0
- msgBoxCaption db "HELLOJ.DLL", 0
- section '.text' code readable executable
- proc DllMain, hInst, dwReason, lpReserved
- mov eax, TRUE
- ret
- endp
- proc Java_Program_showHello stdcall, jenv:DWORD, jcls:DWORD
- invoke MessageBox, HWND_DESKTOP, msgBoxText, msgBoxCaption, MB_OK
- ret
- endp
- section '.idata' import data readable
- library user32, 'USER32.DLL'
- import user32,\
- MessageBox, 'MessageBoxA'
- section '.edata' export data readable
- export 'HELLOJ.DLL',\
- Java_Program_showHello, 'ShowHello'
- section '.reloc' fixups data readable discardable
Advertisement
Add Comment
Please, Sign In to add comment