![]() |
Problem mit NtQueryObject
Ich will NtQueryObject aufrufen, bekomme aber eine AccessViolation. Wieso?
So ist NtQueryObject importiert:
Delphi-Quellcode:
So rufe ich es auf:
const
ntdll = 'ntdll.dll'; NTSTATUS = ULONG; PVOID = Pointer; USHORT = Word; OBJECT_INFORMATION_CLASS = (ObjectBasicInformation, ObjectNameInformation, ObjectTypeInformation, ObjectAllInformation, ObjectDataInformation); TObjectInformationClass = OBJECT_INFORMATION_CLASS; function NtQueryObject( ObjectHandle: THandle; ObjectInformationClas: TObjectInformationClass; out ObjectInformation: PVOID; ObjectInformationLength: ULONG; out ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryObject';
Delphi-Quellcode:
var
ObjectInformation: Pointer; ReturnLength: PULONG; hMutex: THandle; begin hMutex := CreateMutex(nil, False, 'testmutex'); if hMutex = 0 then begin SysErrorMessage(GetLastError); Exit; end; NtQueryObject(hMutex, ObjectNameInformation, ObjectInformation, 2048, ReturnLength); end; |
Re: Problem mit NtQueryObject
Also erstmal:
Delphi-Quellcode:
Tcha und dann müßte ich näher drauf schauen ... hab aber bis Freitag kommender Woche keine Zeot für solche Kapriolen. Wenn bis dahin keine Lösung existiert, schreib mir ne kurze Mail.
{$MINENUMSIZE 4}
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 20:49 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz