CLEAR
Declare long ShellExecute IN "shell32" LONG,STRING,STRING,STRING,STRING,LONG
Declare long Wow64DisableWow64FsRedirection IN "kernel32" long @
Declare long Wow64RevertWow64FsRedirection IN "kernel32" long
Declare long LoadLibrary IN "kernel32" string
Declare long FreeLibrary IN "kernel32" long
Declare long GetProcAddress IN "kernel32" long,string
*!*
32位进程在64位系统中shell要预判断,64位进程不用考虑
IF is64()==1
LOCAL fsRedirect
STORE 0 TO m.fsRedirect
m.fsRedirect=Wow64DisableWow64FsRedirection(@m.fsRedirect)
IF m.fsRedirect>0
ShellExecute(0,"open","osk.exe","","c:\windows\system32",1)
Wow64RevertWow64FsRedirection(m.fsRedirect)
ENDIF
ENDIF
FUNCTION is64() as long
LOCAL hMod,lPA1,lPA2
STORE 0 TO m.hMod,m.lPA1,m.lPA2
m.hMod = LoadLibrary("Kernel32")
If m.hMod >0
m.lPA1 = GetProcAddress(m.hMod, "Wow64DisableWow64FsRedirection")
m.lPA2 = GetProcAddress(m.hMod, "Wow64RevertWow64FsRedirection")
FreeLibrary(m.hMod)
ENDIF
IF m.lPA1>0 AND m.lPA2>0
RETURN 1
ELSE
RETURN 0
ENDIF
ENDFUNC
[此贴子已经被作者于2023-12-16 00:33编辑过]