
12.11.2009, 15:55
|
|
Участник форума
Регистрация: 02.07.2008
Сообщений: 132
С нами:
9399214
Репутация:
52
|
|
Код:
var
NtQuerySystemInformation: function (infoClass: DWORD;
buffer: Pointer;
bufSize: DWORD;
returnSize: TPDword): DWORD; stdcall;
procedure GetInstallDriver;
var
temp, Index, numBytes, numEntries: DWORD;
buf: TPDword;
driverInfo: ^TDriverInfo;
begin
if @NtQuerySystemInformation = nil then
NtQuerySystemInformation := GetProcAddress(GetModuleHandle('ntdll.dll'),'NtQuerySystemInformation');
NtQuerySystemInformation(DRIVER_INFORMATION, @temp, 0, @numBytes);
buf := AllocMem(numBytes * 2);
NtQuerySystemInformation(DRIVER_INFORMATION, buf, numBytes * 2, @numBytes);
numEntries := buf^;
driverInfo := Pointer(DWORD(buf) + 12);
for Index := 1 to numEntries do
begin
Writeln(Format('| $%-5s | %-48s |',[IntToHex(DWORD(driverInfo^.Address),8),driverInfo^.Name]));
Inc(driverInfo);
end;
FreeMem(buf);
end;
вот этот код =)
|
|
|