News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

how to pass argumenst in it

Started by stanley, October 13, 2009, 12:59:15 AM

Previous topic - Next topic

stanley

.386
.model flat,stdcall
option casemap: none
include \masm32\include\windows.inc
include \masm32\include\advapi32.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\advapi32.lib
includelib \masm32\lib\kernel32.lib
.data
.code
start:
SetRegString proto :dword,:dword,:dword,:dword
SetRegString proc hkey:dword,lpszkeyname:dword,lpszvaluename:dword,lpszstringname:dword
local disp:dword
local pkey:dword
local dwsize:dword
invoke RegCreateKeyEx,HKEY_LOCAL_MACHINE,lpszvaluename,NULL,NULL,REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,NULL,addr pkey,addr disp
.if eax== ERROR_SUCCESS
invoke lstrlen,lpszstringname
mov dwsize,eax
invoke RegSetValueEx, pkey,lpszvaluename,NULL,REG_SZ,lpszstringname, dwsize
push eax
invoke RegCloseKey,pkey
pop eax
.endif
ret
SetRegString endp
end start



help me to pass arguments to it to access registry