RawDisk

Direct access to disks and protected files from user-mode applications in Windows

RawDisk.GetDriverStatus method

Filter:

Pascal    C++ (DLL/Lib)    C++ (VCL)    C++ (.NET)    C#    VB.NET   

RawDisk     See also    

Overview

Returns information about the installed driver

Declaration

[Pascal]
    class procedure GetDriverStatus( ProgramName : AnsiString; var DriverInstalled : boolean; var FileVersionHigh : Integer; var FileVersionLow : Integer; ServiceStatus : PServiceStatus);

[C++ (DLL/Lib)]
    static void GetDriverStatus( const char * ProgramName, bool *DriverInstalled, long *FileVersionHigh, long *FileVersionLow, SERVICE_STATUS *ServiceStatus);

[C++ (VCL)]
    static void __fastcall GetDriverStatus( const char * ProgramName, bool *DriverInstalled, long *FileVersionHigh, long *FileVersionLow, SERVICE_STATUS *ServiceStatus);

[C++ (.NET)]
    static void GetDriverStatus( String* ProgramName, bool *DriverInstalled, long *FileVersionHigh, long *FileVersionLow, SERVICE_STATUS *ServiceStatus);

[C#]
    static void GetDriverStatus( string ProgramName, ref bool DriverInstalled, ref int FileVersionHigh, ref int FileVersionLow, ref SERVICE_STATUS ServiceStatus);

[VB.NET]
    Shared Sub GetDriverStatus( ByVal ProgramName As String, ByRef DriverInstalled As Boolean, ByRef FileVersionHigh As Integer, ByRef FileVersionLow As Integer, ByRef ServiceStatus As SERVICE_STATUS)

Parameters

  • ProgramName - the ProgramName string that identifies installation of the driver by your application
  • DriverInstalled - on return contains true if the driver has been installed or false otherwise.
  • FileVersionHigh - on return contains driver file version (high-order values)
  • FileVersionLow - on return contains driver file version (low-order values)
  • ServiceStatus - on return this parameter contians various information that describes the driver status. The structure format is defined by Windows and is described in Windows SDK.

Description

Use this method to get information about the installed driver. ProgramName is used to distinguish between installations of the driver made by different applications and to prevent the situation when the driver is installed by two applications and further deinstallation of one of them removes the driver.

If the method fails for whatever reason, an exception with Windows-defined error code is thrown.

See also

InstallDriver     UninstallDriver    

Back to top