Delphi-PRAXiS
Seite 2 von 6     12 34     Letzte »    

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi Dateisperre freigeben (https://www.delphipraxis.net/53005-dateisperre-freigeben.html)

mumu 10. Sep 2005 14:39

Re: Dateisperre freigeben
 
der programmierer von unlock hat mir folgendes dazu geschrieben:

Zitat:

Hello,

You need to first find all locks opened by a system using undocumented functions such as ZwQueryObject and NtQueryObject.

Then to get informations you need you write a device driver since some informations are only accessible at the device driver level. There is no device driver specific function, it is just that you need to run in a driver to have maximum access to the system.

Good luck

Olli 10. Sep 2005 16:40

Re: Dateisperre freigeben
 
Zitat:

You need to first find all locks opened by a system using undocumented functions such as ZwQueryObject and NtQueryObject.
Zuvor muß man sie erstmal rausbekommen, die Objekte. Wie man unten sieht, braucht man nämlich bereits ein Handle. Der Treiber ist wirklich sehr simpel. Sowas kann man relativ schnell nachbauen. ;)

Liste der Funktionen:
http://jedi-apilib.sourceforge.net/n...ativeList.html

Delphi-Quellcode:
function NtQueryObject(
    ObjectHandle : HANDLE;
    ObjectInformationClass : OBJECT_INFORMATION_CLASS;
    ObjectInformation : PVOID;
    ObjectInformationLength : ULONG;
    ReturnLength : PULONG
  ): NTSTATUS; stdcall; external ntdll;
Zitat:

Then to get informations you need you write a device driver since some informations are only accessible at the device driver level. There is no device driver specific function, it is just that you need to run in a driver to have maximum access to the system.
Den Treiber braucht man wie gesagt nicht per-se. Aber auf einem normalen System braucht man ihn schon, weil das NtGlobalFlag eben einen bestimmten Wert haben muß. Das ist es, was ich oben meinte.

Daniel G 10. Sep 2005 18:29

Re: Dateisperre freigeben
 
Zitat:

Zitat von Olli
Zitat:

Zitat von Kedariodakon
Wie kann man überhaupt eine Liste der gesperrten Dateien sehen?

Indem man die Handles des Prozesses auflistet und deren Namen findet. Das geht zwar auch ohne Treiber, aber nur in einem bestimmten Fall. Daher vermutlich der Treiber.

Und wie geht das genau? Oder habe ich die Lösung überlesen?

Olli 10. Sep 2005 19:16

Re: Dateisperre freigeben
 
ZwQuerySystemInformation und ZwQueryObject - ich empfehle dringend Nebbetts Buch. Wird aber nicht mehr aufgelegt.

Kedariodakon 12. Sep 2005 09:52

Re: Dateisperre freigeben
 
Zitat:

Zitat von Olli
ZwQuerySystemInformation und ZwQueryObject - ich empfehle dringend Nebbetts Buch. Wird aber nicht mehr aufgelegt.

Gut hast du da ne ISBN oder ähnliches?
Denn wennn ich mit "Nebbetts Buch" in ne Buchhandlung geh, ist alles was sie machen mich dumm anschaun :zwinker:

Bye

Olli 12. Sep 2005 09:56

Re: Dateisperre freigeben
 
Zitat:

Zitat von Kedariodakon
Gut hast du da ne ISBN oder ähnliches?
Denn wennn ich mit "Nebbetts Buch" in ne Buchhandlung geh, ist alles was sie machen mich dumm anschaun :zwinker:

Gern: 1-57870-199-6
Wird aber wie gesagt nicht mehr aufgelegt - also am ehesten in Antiquariaten suchen ;). Am besten du schreibst mir mal eine kurze PN ;)

Auch -> Bei Google suchenGary Nebbett

leddl 12. Sep 2005 10:41

Re: Dateisperre freigeben
 
:roll: Einfach bei Amazon mal "Nebbett" eingeben, und du bekommst: http://www.amazon.de/exec/obidos/ASIN/1578701996/delphipraxis-21

Kedariodakon 12. Sep 2005 10:48

Re: Dateisperre freigeben
 
[OT]Meine suche ergab aber mehr als ein Buch, und alle kaufe ich bestimmt nicht...[/OT]

Bye

Olli 12. Sep 2005 11:13

Re: Dateisperre freigeben
 
Liste der Anhänge anzeigen (Anzahl: 1)
Wie man sehen kann, ist mein Exemplar von 2001 schon etwas abgegriffen und unförmig *g*

leddl 12. Sep 2005 11:15

Re: Dateisperre freigeben
 
Also bei Amazon gibts das noch, sonst hätt ich den Link nicht gepostet. Dauert zwar ein paar Tage, aber das wird ja noch zu verkraften sein. ;)


Alle Zeitangaben in WEZ +1. Es ist jetzt 12:04 Uhr.
Seite 2 von 6     12 34     Letzte »    

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-2025 by Thomas Breitkreuz