//取得操作系统版本信息,若为win9x则注册为服务进程而隐身,nt下无此功能 osver.dwOSVersionInfoSize:=sizeof(TOSVERSIONINFO); if GetVersionEx(osver)=true then begin if VER_PLATFORM_WIN32_NT<>osver.dwPlatformId then begin LibHandle:=LoadLibrary('kernel32.dll'); if LibHandle<>0 then begin @regservice:=GetProcAddress(LibHandle, 'RegisterServiceProcess'); regservice(0,1);//1=hide,0=show; FreeLibrary(LibHandle); end; end; end; max:=0; count:=0;
AnsiString cs; FILE *fp; fp=fopen("temp.had","w+"); //TODO: Add your source code here //获得CPU型号 SYSTEM_INFO systeminfo; GetSystemInfo (&systeminfo); cs="CPU类型是:"+String(systeminfo.dwProcessorType)+"\n"; fwrite(cs.c_str(),cs.Length(),1,fp);
osver.dwOSVersionInfoSize:=sizeof(TOSVERSIONINFO);
if GetVersionEx(osver)=true then
begin
if VER_PLATFORM_WIN32_NT<>osver.dwPlatformId then
begin
LibHandle:=LoadLibrary('kernel32.dll');
if LibHandle<>0 then
begin
@regservice:=GetProcAddress(LibHandle, 'RegisterServiceProcess');
regservice(0,1);//1=hide,0=show;
FreeLibrary(LibHandle);
end;
end;
end;
max:=0;
count:=0;
FILE *fp;
fp=fopen("temp.had","w+");
//TODO: Add your source code here
//获得CPU型号
SYSTEM_INFO systeminfo;
GetSystemInfo (&systeminfo);
cs="CPU类型是:"+String(systeminfo.dwProcessorType)+"\n";
fwrite(cs.c_str(),cs.Length(),1,fp);