When I try to compile this code it gives me this error message.
ERRORMSG:
D:\projects\con-fasm>fasm convert2.asm con.exe
flat assembler version 1.43
convert2.asm [35] library [2]:
library kernel,'KERNEL32.DLL',\
error: undefined symbol.
ERRORMSG:
D:\projects\con-fasm>fasm convert2.asm con.exe
flat assembler version 1.43
convert2.asm [35] library [2]:
library kernel,'KERNEL32.DLL',\
error: undefined symbol.
format PE GUI 4.0
entry ConvertEntry
include '%include%\equatesa\kernel32.inc'
include '%include%\equatesa\user32.inc'
include '%include%\macro\stdcall.inc'
include '%include%\macro\import.inc'
include '%include%\macro\resource.inc'
section '.data' data readable writeable
section '.udata' data readable writeable
section '.code' code readable executable
ConvertEntry:
ret
section '.idata' import data readable writeable
library kernel,'KERNEL32.DLL',\
user,'USER32.DLL'
kernel:
include '%include%\apia\kernel32.inc'
user:
include '%include%\apia\user32.inc'
The import macro in this package is different from the original, your '.idata' should look like:
library kernel32,'KERNEL32.DLL',\
user32,'USER32.DLL'
include '%include%\apia\kernel32.inc'
include '%include%\apia\user32.inc'
Okay that worked. The question I now have is in fasmw.asm the .idata section looks like this. That's where I got my idea from.
section '.idata' import data readable writeable
library kernel,'KERNEL32.DLL',\
user,'USER32.DLL',\
gdi,'GDI32.DLL',\
comctl,'COMCTL32.DLL',\
comdlg,'COMDLG32.DLL',\
shell,'SHELL32.DLL'
kernel:
import GetModuleHandle,'GetModuleHandleA',\
Okay, it now compiles, but instead of outputing a exe file I get all the output back to the command prompt.
That's because the "con" name is reserved for the console device.
Oh... I did not know that thanks. Works good now.
Thanks for all the hard work.
Thanks for all the hard work.