here is the following code
.386

.model flat, stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\user32.inc
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib

.data
MsgCaption db "Iczelion's tutorial no.2",0
MsgBoxText db "Win32 Assembly is Great!",0
FileName db "C:\RobotError.log",0

.code
start:
invoke MessageBox, NULL,addr MsgBoxText, addr MsgCaption, MB_OK
invoke ShellExecute, NULL, NULL, ADDR FileName, NULL, NULL, SHOW_DEFAULT
invoke ExitProcess, NULL
end start

whats the problem with it? i know it has something to do with shellexecute
Posted on 2003-11-22 16:23:51 by chimaira

here is the following code
.386

.model flat, stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\user32.inc
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib

.data
MsgCaption db "Iczelion's tutorial no.2",0
MsgBoxText db "Win32 Assembly is Great!",0
FileName db "C:\RobotError.log",0

.code
start:
invoke MessageBox, NULL,addr MsgBoxText, addr MsgCaption, MB_OK
invoke ShellExecute, NULL, NULL, ADDR FileName, NULL, NULL, SHOW_DEFAULT
invoke ExitProcess, NULL
end start

whats the problem with it? i know it has something to do with shellexecute



Change SHOW_DEFAULT to SW_SHOWDEFAULT and add this two lines
To includes: include \masm32\include\Shell32.inc
To libs: includelib \masm32\lib\Shell32.lib

Or just copy this :tongue:

option casemap:none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\user32.inc
include \masm32\include\Shell32.inc

includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\Shell32.lib

.data
MsgCaption db "Iczelion's tutorial no.2",0
MsgBoxText db "Win32 Assembly is Great!",0
FileName db "C:\RobotError.log",0

.code
start:
invoke MessageBox, NULL,addr MsgBoxText, addr MsgCaption, MB_OK
invoke ShellExecute, NULL, NULL, ADDR FileName, NULL, NULL,SW_SHOWDEFAULT
invoke ExitProcess, NULL
end start
Posted on 2003-11-22 16:36:09 by AceEmbler
ty a lot
Posted on 2003-11-22 16:37:51 by chimaira