S
sy0116
Unregistered / Unconfirmed
GUEST, unregistred user!
我想用以下代码实现先判断系统版本,如果是WIN 9X则用RegisterServiceProcess隐藏进程,但是,当我在Win XP上运行时没有对话框跳出来说“OK”却也提示<br>无法定位程序输入点RegisterServiceProcess于动态链接库KERNEL32.DLL<br>好像if... then...被忽略了<br>而在Win98下运行一切正常<br>=============================================<br>type <br>TOSVersion = (osUnknown, os95, os98, osME, osNT3, osNT4, os2K, osXP); <br><br><br>function GetOS: TOSVersion; <br>var <br>OS: TOSVersionInfo; <br>begin <br>ZeroMemory(@OS,SizeOf(OS)); <br>OS.dwOSVersionInfoSize := SizeOf(OS); <br>GetVersionEx(OS); <br>if (((OS.dwMajorVersion = 4) and (OS.dwMinorVersion = 0)) or<br> ((OS.dwMajorVersion = 4) and (OS.dwMinorVersion = 10)) or<br> ((OS.dwMajorVersion = 4) and (OS.dwMinorVersion = 90))) then<br> begin<br> ShowMessage('ok');<br> RegisterServiceProcess(GetCurrentProcessID, 1);<br> end;<br>end;