السلام عليكم و رحمة الله و بركاته
- تحديد نسخة النظام المستخدم من الكيرنل , RtlGetVersion & NtBuilder
- إعادة تعريف للـ RtlGetVersion : الملفات المصدرية غير مرفقة مع Meerkat
القيم الممكنة هنا :
![[صورة: sdfsd.gif]](http://img840.imageshack.us/img840/9365/sdfsd.gif)
بالتوفيق,,
- تحديد نسخة النظام المستخدم من الكيرنل , RtlGetVersion & NtBuilder
PHP كود :
{*******************************************************}
{ Open source sample. }
{ Free to use. }
{ Coded By TF6M | 22-11-2010 Www.Delphi4Arab.Com }
{*******************************************************}
Unit GetOSinfo;
{$WARNINGS OFF}{$HINTS OFF}
{$OPTIMIZATION ON}{$OverFlowChecks Off}
interface
Uses nt_status, ntoskrnl;
function _DriverEntry(DriverObject:PDriverObject;
RegistryPath:PUnicodeString
):NTSTATUS; stdcall;
implementation
procedure DriverUnload(DriverObject:PDriverObject); stdcall;
begin
DbgPrint('Unload Routine Called !!!');
end;
Function _DriverEntry(DriverObject:PDriverObject;RegistryPath:PUnicodeString):NTSTATUS; stdcall;
Var
_Rtk:RTL_OSVERSIONINFOEXW;
_Os:ANSI_STRING;
begin
DriverObject^.DriverUnload:=@DriverUnload;
Result:= STATUS_SUCCESS;
DbgPrint('DriverEntry Routine Called With Code Error : 0x%.8X',Result);
//RtlZeroMemory(@_Rtk,SizeOf(_Rtk));
_Rtk.dwOSVersionInfoSize:= SizeOf(RTL_OSVERSIONINFOEXW);
If RtlGetVersion(PRTL_OSVERSIONINFOW(@_Rtk)) = STATUS_SUCCESS Then
Begin
If (_Rtk.dwMajorVersion = 5) And (_Rtk.dwMinorVersion = 1) Then
RtlInitAnsiString(@_Os,'Microsoft Windows XP');
If (_Rtk.dwMajorVersion = 5) And (_Rtk.dwMinorVersion = 2) Then
RtlInitAnsiString(@_Os,'Microsoft Windows Server 2003');
If (_Rtk.dwMajorVersion = 6) And (_Rtk.dwMinorVersion = 0) Then
RtlInitAnsiString(@_Os,'Microsoft Windows Vista');
If (_Rtk.dwMajorVersion = 6) And (_Rtk.dwMinorVersion = 1) Then
RtlInitAnsiString(@_Os,'Microsoft Windows 7');
DbgPrint('Your OS Version is %Z < %ld.%ld.%ld > Service Pack %d.%d '
,@_Os,_Rtk.dwMajorVersion,_Rtk.dwMinorVersion,_Rtk.dwBuildNumber
,_Rtk.wServicePackMajor,_Rtk.wServicePackMinor);
End;
end;
end.
كود :
Type
_OSVERSIONINFOW = Record
dwOSVersionInfoSize :ULONG;
dwMajorVersion :ULONG ;
dwMinorVersion :ULONG ;
dwBuildNumber :ULONG ;
dwPlatformId :ULONG ;
szCSDVersion :Array [0..127] Of WCHAR;
End;
RTL_OSVERSIONINFOW = _OSVERSIONINFOW;
PRTL_OSVERSIONINFOW = ^RTL_OSVERSIONINFOW;
Function RtlGetVersion(lpVersionInformation :PRTL_OSVERSIONINFOW ) :NTSTATUS;StdCall;
implementation
Function RtlGetVersion; external NtKernel name '_RtlGetVersion';PHP كود :
NT 3.1 - 528
NT 3.5 - 807
NT 3.51 -1057
NT 4 - 1381
NT 5.2 Windows Server 2003 3790
NT 5.2 Windows XP (x64) 3790
NT 6.1 Windows 7
2195 - Windows 2000
2600 - Windows XP
3790 - Windows 2003
4052 - Windows Longhorn aka Vista PDC
5xxx - Windows Vista
![[صورة: sdfsd.gif]](http://img840.imageshack.us/img840/9365/sdfsd.gif)
بالتوفيق,,
I'M Fly Like A G6


