AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Festplatte ausschalten

Ein Thema von Der_Ventilator · begonnen am 20. Mär 2005 · letzter Beitrag vom 20. Mär 2007
Antwort Antwort
Seite 4 von 6   « Erste     234 56      
Muetze1
(Gast)

n/a Beiträge
 
#31

Re: Festplatte ausschalten

  Alt 15. Jul 2006, 00:07
Zitat von Der_Ventilator:
Das Problem am PowerManagement ist, das die Platte eben nicht aus bleibt. Windows soll auf die Backupplatte eben nix draufschreiben können, auch wenn es das will.
Und du glaubst wirklich mit dem Standby Befehl ist das anders? Übersetz dir mal Stand-By ins deutsche oder anders: Schalte deine Platte in den Standby und geh dann mal im Arbeitsplatz auf die selbige....

Sie bleibt nicht aus - um das zu erreichen ist dies hier der völlig falsche Ansatz. Für dein Problem musst du den Weg wie von himitsu beschrieben gehen.
  Mit Zitat antworten Zitat
Benutzerbild von ManuMF
ManuMF

Registriert seit: 11. Jul 2005
1.016 Beiträge
 
Delphi 6 Personal
 
#32

Re: Festplatte ausschalten

  Alt 15. Jul 2006, 12:28
Hallo,

was ist hier eigentlich der Unterschied zwischen Standby und Sleep?
Gruß,
ManuMF

Endlich hab ich was Positives an Vista entdeckt: Das mitgelieferte Mahjongg
  Mit Zitat antworten Zitat
Muetze1
(Gast)

n/a Beiträge
 
#33

Re: Festplatte ausschalten

  Alt 15. Jul 2006, 14:51
Zitat von ManuMF:
was ist hier eigentlich der Unterschied zwischen Standby und Sleep?
Warum muss ich hier immer die ATA Specs lesen, schau selber nach:

ATA 7 Specs, Volume 1 release 4a
ATA 7 Specs, Volume 2 release 4a
ATA 7 Specs, Volume 3 release 4a
  Mit Zitat antworten Zitat
Benutzerbild von ManuMF
ManuMF

Registriert seit: 11. Jul 2005
1.016 Beiträge
 
Delphi 6 Personal
 
#34

Re: Festplatte ausschalten

  Alt 15. Jul 2006, 15:26
Hallo,

was heißt hier "muss"?

Das war eine einfache Frage, es hätte ja auch eine eine einfache Antwort geben können.

Die Specs möchte ich selbst auch nicht durchforsten, aber dass Manche aus einer Frage einen Befehl machen...
Gruß,
ManuMF

Endlich hab ich was Positives an Vista entdeckt: Das mitgelieferte Mahjongg
  Mit Zitat antworten Zitat
Muetze1
(Gast)

n/a Beiträge
 
#35

Re: Festplatte ausschalten

  Alt 15. Jul 2006, 16:36
Zitat von ManuMF:
Die Specs möchte ich selbst auch nicht durchforsten, ...
Genau - und warum solltes andere machen? Die interessiert die Frage schliesslich nicht...
  Mit Zitat antworten Zitat
TurboMartin

Registriert seit: 13. Feb 2006
Ort: Bad Honnef
765 Beiträge
 
Turbo Delphi für Win32
 
#36

Re: Festplatte ausschalten

  Alt 15. Jul 2006, 16:49
Soweit ich weiß, geht das noch viel einfacher.

Delphi-Quellcode:
var hIntr: Longword (* Interruptnummer *)

(* fürs ausschalten: *)
IOUnregisterInterrupt(hIntr);
IODisconnectInterrupt(hIntr);

(* fürs einschalten: *)
IoConnectInterrupt(
    OUT PKINTERRUPT *InterruptObject,
    IN PKSERVICE_ROUTINE ServiceRoutine,
    IN PVOID ServiceContext,
    IN PKSPIN_LOCK SpinLock OPTIONAL,
    IN ULONG Vector,
    IN KIRQL Irql,
    IN KIRQL SynchronizeIrql,
    IN KINTERRUPT_MODE InterruptMode,
    IN BOOLEAN ShareVector,
    IN KAFFINITY ProcessorEnableMask,
    IN BOOLEAN FloatingSave
    );
IORegisterInterrupt(hIntr);
(* aus der MSDNLibary, da ich nicht alle Parameter auswendig weiß. Mehr dazu weiter unten. *)
Oder noch einfacher:

Delphi-Quellcode:
(* fürs ausschalten: *)
IoDeleteDevice(
    IN PDEVICE_OBJECT DeviceObject
    );
IoDeleteSymbolicLink(
    IN PUNICODE_STRING SymbolicLinkName
    );

(* fürs einschalten: *)
IoCreateDevice(
    IN PDRIVER_OBJECT DriverObject,
    IN ULONG DeviceExtensionSize,
    IN PUNICODE_STRING DeviceName OPTIONAL,
    IN DEVICE_TYPE DeviceType,
    IN ULONG DeviceCharacteristics,
    IN BOOLEAN Exclusive,
    OUT PDEVICE_OBJECT *DeviceObject
    );
IoCreateSymbolicLink(
    IN PUNICODE_STRING SymbolicLinkName,
    IN PUNICODE_STRING DeviceName
    );
(* aus der MSDNLibary, da ich nicht alle Parameter auswendig weiß. Mehr dazu weiter unten. *)
MSDN-Links:
IODeleteDevice
IOCreateDevice
IODeleteSymbolicLink
IOCreateSymbolicLink

Die restlichenLinks poste ich mal nicht, die sind dann auch leicht in der Navi links zu finden.
ACHTUNG!!! Bei allen muss noch eine wdm.h oder ntddk.h eingebunden werden, unter Delphi ist es nicht drin (hab ich jedenfals nicht gefunden).
Tomorrow will be cancelled due to lack of interest.

  Mit Zitat antworten Zitat
Daniel G
(Gast)

n/a Beiträge
 
#37

Re: Festplatte ausschalten

  Alt 15. Jul 2006, 17:48
Das sind genau dieselben Funktionen, die der Treiber aufruft. Wenn man diese Funktionen also in einen Treiber packen muss*, wird die Sache eher komplizierter, da man mit Delphi keine Treiber schreiben kann sollte. (Das Aufwand - Nutzen - Verhältnis stimmt nicht.)

//Edit:
*ja, muss man:
Zitat:
The IoCreateDevice routine creates a device object for use by a driver.
  Mit Zitat antworten Zitat
Muetze1
(Gast)

n/a Beiträge
 
#38

Re: Festplatte ausschalten

  Alt 15. Jul 2006, 22:42
Zitat von TurboMartin:
ACHTUNG!!! Bei allen muss noch eine wdm.h oder ntddk.h eingebunden werden, unter Delphi ist es nicht drin (hab ich jedenfals nicht gefunden).
Jo, Delphi hat zwar eine teilweise übersetzte WinAPI SDK dabei, aber die werden bestimmt keine DDK übersetzen und beipacken. Das DDK kannste nicht umsonst auch nur als registrierter Entwickler und Lizenznehmer runterladen (MSDN Abo).

Sleep Command:
Zitat:
This command is the only way to cause the device to enter Sleep mode.
This command shall cause the device to set the BSY bit to one, prepare to enter Sleep mode, clear the BSY
bit to zero and assert INTRQ. The host shall read the Status register in order to clear the Interrupt Pending
and allow the device to enter Sleep mode. In Sleep mode, the device shall only respond to the assertion of
the RESET- signal and the writing of the SRST bit in the Device Control register and shall release the device
driven signal lines (See Figure 4). The host shall not attempt to access the Command Block registers while
the device is in Sleep mode.
Because some host systems may not read the Status register and clear the Interrupt Pending, a device may
release INTRQ and enter Sleep mode after a vendor specific time period of not less than 2 s.
The only way to recover from Sleep mode is with a software reset, a hardware reset, or a DEVICE RESET
command.
A device shall not power-on in Sleep mode nor remain in Sleep mode following a reset sequence.
Standby Command:
Zitat:
This command causes the device to enter the Standby mode.
If the Sector Count register is non-zero then the Standby timer shall be enabled. The value in the Sector
Count register shall be used to determine the time programmed into the Standby timer (See Table 19).
If the Sector Count register is zero then the Standby timer is disabled.
Standby Immediatly Command:
Zitat:
This command causes the device to immediately enter the Standby mode.
Idle Command:
Zitat:
The IDLE command allows the host to place the device in the Idle mode and also set the Standby timer.
INTRQ may be asserted even though the device may not have fully transitioned to Idle mode.
If the Sector Count register is non-zero then the Standby timer shall be enabled. The value in the Sector
Count register shall be used to determine the time programmed into the Standby timer (See 4.5). If the
Sector Count register is zero then the Standby timer is disabled.
Idle Immediatly Command:
Zitat:
Default Fuction:
The IDLE IMMEDIATE command allows the host to immediately place the device in the Idle mode. INTRQ
may be asserted even though the device may not have fully transitioned to Idle mode (See 4.5).
Unload Feature:
The UNLOAD FEATURE of the IDLE IMMEDIATE command allows the host to immediately unload/park the
heads. The device shall stop read look-ahead if it is in process. If the device is performing a write operation,
the device shall suspend writing cached data onto the media as soon as possible, and keep unwritten
sectors stored in the buffer until receiving a new command.
A device that supports load/unload technology shall retract the head(s) onto the ramp position as soon as
receiving this command. INTRQ shall be asserted and BSY shall be cleared after the head(s) is(are)
completely retracted onto the ramp position and latched if available. The time to complete the unload
operation is vendor specific, this typically would be within 500 milliseconds of receiving the command. The
unload controlling method by the Unload Feature of the Idle Immediate command shall be the same as that
by Power mode transition, and shall not effect the specification of normal load/unload times per device life.
A device that supports contact start/stop technology shall seek to the landing zone. INTRQ shall be asserted
and BSY shall be cleared after seek completion. The time to complete the seek operation is vendor specific,
this typically would be within 300 milliseconds of receiving this command.
The device shall stay at Low Power Idle mode, shall not go into Standby mode and shall not load the head(s)
onto the media until receiving a new command. Power consumption of the device is not an issue for this
case. If a device receives this command while the head(s) is(are) currently on ramp/parked no physical
action is needed.
The device shall retain data in the write cache and resume writing the cached data onto the media after
receiving a Software Reset, a Hardware Reset, or any new command except IDLE IMMEDIATE with
UNLOAD FEATURE.
  Mit Zitat antworten Zitat
TurboMartin

Registriert seit: 13. Feb 2006
Ort: Bad Honnef
765 Beiträge
 
Turbo Delphi für Win32
 
#39

Re: Festplatte ausschalten

  Alt 16. Jul 2006, 11:43
Zitat von Muetze1:
Zitat von TurboMartin:
ACHTUNG!!! Bei allen muss noch eine wdm.h oder ntddk.h eingebunden werden, unter Delphi ist es nicht drin (hab ich jedenfals nicht gefunden).
Jo, Delphi hat zwar eine teilweise übersetzte WinAPI SDK dabei, aber die werden bestimmt keine DDK übersetzen und beipacken. Das DDK kannste nicht umsonst auch nur als registrierter Entwickler und Lizenznehmer runterladen (MSDN Abo).
Also ich hab gestern das neuste ohne Registrierung vom Microsoft-Server geladen. Nur EULA muste ich akzeptiren.
Tomorrow will be cancelled due to lack of interest.

  Mit Zitat antworten Zitat
Muetze1
(Gast)

n/a Beiträge
 
#40

Re: Festplatte ausschalten

  Alt 16. Jul 2006, 19:38
Dann gib mir den Link - und bitte nicht zu einem DirectX SDK, dem Platform SDK oder sonstigem SDK, sondern zum DDK. Den würde ich gerne haben.
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 4 von 6   « Erste     234 56      


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:16 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz