CallbackProcess

Control process start and stop operations in Windows and .NET applications

CallbackProcess.GetDriverStatus method

Filter:

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

CallbackProcess     See also    

Overview

Returns information about the installed driver

Declaration

[Pascal]
    class procedure GetDriverStatus(ProductName : AnsiString; var Installed : boolean; var FileVersionHigh : integer; var FileVersionLow : integer; ServiceStatus : PServiceStatus);

[C++ (Lib)]
    static void GetDriverStatus(LPCSTR ProductName, LPBOOL Installed, LPINT FileVersionHigh, LPINT FileVersionLow, LPSERVICE_STATUS ServiceStatus);

[C++ (VCL)]
    static void __fastcall GetDriverStatus(__classid(TCallbackProcess), AnsiString ProductName, bool &Installed, int &FileVersionHigh, int &FileVersionLow, Winsvc::PServiceStatus ServiceStatus);

[C++ (.NET)]
    static void GetDriverStatus(String^ ProductName, bool% Installed, int% FileVersionHigh, int% FileVersionLow, SERVICE_STATUS% ServiceStatus);

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

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

Parameters

  • ProductName - the ProductName string that identifies installation of the driver by your application
  • Installed - 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. ProductName 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.

FileVersionHigh and FileVersionLow both contain two values - one in the upper 16 bits and the other in the lower 16 bits.
For example for 2.32.6.28

VersionHigh - 0x00020020 = "2.32"
VersionLow - 0x0006001C = "6.28"

See also

Install     Uninstall    

Back to top