CBFS Storage 2020 .NET Edition

Questions / Feedback?

GetDriverStatus Method

Retrieves the status of the system driver.

Syntax

public int GetDriverStatus(string productGUID, int module);
Public Function GetDriverStatus(ByVal ProductGUID As String, ByVal Module As Integer) As Integer

Remarks

This method retrieves the status of the system driver module specified by Module. This status can then be used to verify whether it has been properly installed and is ready for use.

The value returned by the method corresponds to the dwCurrentState field of the SERVICE_STATUS structure from the Windows API. It will be one of the following:

MODULE_STATUS_NOT_PRESENT0x00000000The specified module is not present on the system.

MODULE_STATUS_STOPPED0x00000001The specified module is in the Stopped state.

MODULE_STATUS_RUNNING0x00000004The specified module is loaded and running.

ProductGUID is used to distinguish between driver installations performed by different applications. Such information is necessary to guard against unexpected situations such as, e.g., the driver being uninstalled by one application despite other applications still needing it.

The GUID must be specified in so-called "Registry Format" (e.g., "{1FAD0EF2-9A03-4B87-B4BC-645B7035ED90}") with curly braces included.

To ensure proper operation, it is critical that each individual application have its own unique ProductGUID value, and that applications (and their installation scripts) use that value when calling any of the following methods:

The Module parameter specifies which driver module to query the status of. Possible values are:

MODULE_DRIVER_PNP_BUS0x00000001PnP Bus Driver (.sys file).

This module must be installed if the application wishes to make use of Plug-and-Play (PnP) storage features in the CBDisk, CBDrive, and CBMemDrive component. PnP storage devices are those visible as disks in the Device Manager, and the system treats such storage devices differently from other purely virtual devices.

The virtual disk driver must be re-installed anytime this module is added or removed.

MODULE_DRIVER_BLOCK0x00000002Virtual disk driver (.sys file).

The product's virtual disk driver module, which provides core functionality; it must be installed for the CBDisk, CBDrive, or CBMemDrive component to function correctly.

MODULE_DRIVER_FS0x00000004Filesystem driver (.sys file).

The product's filesystem driver module, which provides core functionality; it must be installed for the CBDrive or CBMemDrive component to function correctly.

MODULE_HELPER_DLL0x00010000Shell Helper DLL (CBDriveShellHelper2020.dll)

This module provides supplementary functionality for the CBDisk, CBDrive, and CBMemDrive component; please refer to the Helper DLL topic for more information.

Note: Not applicable when calling the GetDriverStatus method.

This method is available in both the component API and the Installer DLL included with the product; please refer to the Driver Installation in Windows topic for more information about the latter.

Note: This method cannot be called within events.

Copyright (c) 2021 Callback Technologies, Inc. - All rights reserved.
CBFS Storage 2020 .NET Edition - Version 20.0 [Build 8031]