flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Garthower
Here is a work example.
file test.asm: Code: format PE GUI entry Start include 'C:\fasm\INCLUDE\MACRO\STRUCT.INC' include 'C:\fasm\INCLUDE\MACRO\PROC32.INC' include 'C:\fasm\INCLUDE\MACRO\IMPORT32.INC' section '.code' code readable executable Start: invoke LoadLibraryA,DLLName invoke LoadMenuA,eax,1000 ;return in eax handle to menu invoke ExitProcess,0 section '.data' data readable writeable DLLName db 'test_dll.dll',0 section '.idata' import data readable writeable library kernel32,'KERNEL32.DLL',\ user32,'USER32.DLL' include 'C:\fasm\INCLUDE\APIA\kernel32.inc' include 'C:\fasm\INCLUDE\APIA\user32.inc' file test_dll.asm: Code: format PE GUI DLL entry DLLMain include 'C:\fasm\INCLUDE\MACRO\STRUCT.INC' include 'C:\fasm\INCLUDE\MACRO\PROC32.INC' include 'C:\fasm\INCLUDE\MACRO\IMPORT32.INC' section '.code' code readable executable proc DLLMain hinstDLL,dwReason,lpvReserved mov eax,1 ret endp section '.rsrc' resource from 'test_dll.res' readable file test_dll.rc: Code: 1000 MENUEX BEGIN POPUP "" BEGIN MENUITEM "Item1",1 MENUITEM "Item2",2 MENUITEM "",,0x00000800 MENUITEM "Item3",2 END END BAT-file for compile (usage: bat_file your_asm_file): Code: @echo off cls echo FASM batch-compiler with resources echo: if exist %1.rc goto RC1 :COMPILE c:\fasm\fasm.exe %1.asm goto EXIT :RC1 echo: echo Current RC file founded... echo: if not exist %1.res goto LAB1 del %1.res :LAB1 C:\fasm\GoRC.exe /r /machine x64 %1.rc goto COMPILE :EXIT |
|||
![]() |
|
ghst
Garthower, thank you very much for your reply.
I've already tried before something similar with your example, but the program kept crashing.. I was passing the dll menu handle to WNDCLASS.lpszMenuName instead using it with CreateWindow ![]() |
|||
![]() |
|
Garthower
ghst:
Post here your source code, maybe any mistake can eat there. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.