Hey,
I've just started programming Assembly with TASM and started to try win32 programming. Since TASM doesn't have invoke like MASM does...i'm having trouble using the CreateFileA API function. Here's my code:
.386
.model flat, stdcall
mb_ok equ 0
hWnd equ 0
extrn ExitProcess ROC
extrn MessageBoxA ROC
extrn CreateFileA ROC
.data
caption db "My Problem", 0
msg db "Trying to use CreateFileA", 0
.code
start:
push mb_ok
push offset caption
push offset msg
push hWnd
call MessageBoxA
;push my parameters for CreateFileA here
;call CreateFileA here
call ExitProcess
end start
Now my problem is getting the parameters like dwDesiredAcess into the stack. This is the API reference i'm using:
It describes all of the parameters needed, but i need to get them into the stack so i can call CreateFileA. I found _masta_'s tutorial to be a little bit confusing. In his tutorial all of the DWORD values he has converted into numbers such as OPEN_EXISTING = 3 and i have no idea where he gets these numbers from.
Any help would be appreciated,
Murray
I've just started programming Assembly with TASM and started to try win32 programming. Since TASM doesn't have invoke like MASM does...i'm having trouble using the CreateFileA API function. Here's my code:
.386
.model flat, stdcall
mb_ok equ 0
hWnd equ 0
extrn ExitProcess ROC
extrn MessageBoxA ROC
extrn CreateFileA ROC
.data
caption db "My Problem", 0
msg db "Trying to use CreateFileA", 0
.code
start:
push mb_ok
push offset caption
push offset msg
push hWnd
call MessageBoxA
;push my parameters for CreateFileA here
;call CreateFileA here
call ExitProcess
end start
Now my problem is getting the parameters like dwDesiredAcess into the stack. This is the API reference i'm using:
It describes all of the parameters needed, but i need to get them into the stack so i can call CreateFileA. I found _masta_'s tutorial to be a little bit confusing. In his tutorial all of the DWORD values he has converted into numbers such as OPEN_EXISTING = 3 and i have no idea where he gets these numbers from.
Any help would be appreciated,
Murray