.586
.model flat, stdcall
option casemap :none
include d:\masm32\include\windows.inc
include d:\masm32\include\kernel32.inc
include d:\masm32\include\advapi32.inc
include d:\masm32\include\masm32.inc
includelib d:\masm32\lib\kernel32.lib
includelib d:\masm32\lib\advapi32.lib
includelib d:\masm32\lib\masm32.lib
CTEXT MACRO y:VARARG ;This is a good macro
LOCAL sym
CONST segment
IFIDNI ,<>
sym db 0
ELSE
sym db y,0
ENDIF
CONST ends
EXITM
ENDM
_ReLaunch proto
;CTEXT MACRO text
; local lbl
; .const
; lbl db text,0
; .code
; exitm
;ENDM
.code
start proc
LOCAL stStartupInfo : STARTUPINFO
LOCAL procinfo : PROCESS_INFORMATION
invoke CreateMutex, NULL, TRUE, CTEXT('GetSys1_Mutex')
invoke GetLastError
.if eax==ERROR_ALREADY_EXISTS
invoke RtlZeroMemory, addr stStartupInfo, sizeof stStartupInfo
mov stStartupInfo.cb, sizeof stStartupInfo
invoke CreateProcess, 0, CTEXT('regedit.exe'), 0, 0, 0, 0, 0, 0, addr stStartupInfo, addr procinfo
invoke CloseHandle, procinfo.hProcess
invoke CloseHandle, procinfo.hThread
.else
invoke _ReLaunch
.endif
invoke ExitProcess, NULL
start endp
编译的时候CTEXT未定义,前面宏定义了,不知道什么错误,恳请高手指点一下
谢谢了,
在线等!!!
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!