HDRVR GetNextDriver(hdrvr, fdwFlag) | |||||
HDRVR hdrvr; | /* handle of installable driver | */ | |||
DWORD fdwFlag; | /* search flag, */ |
The GetNextDriver function enumerates instances of an installable driver.
hdrvr
Identifies the installable driver for which instances should be enumerated. This parameter must be retrieved by the OpenDriver function. If this parameter is NULL, the enumeration begins at either the beginning or end of the list of installable drivers (depending on the setting of the flags in the fdwFlag parameter).
fdwFlag
Specifies whether the function should return a handle identifying only the first instance of a driver and whether the function should return handles identifying the instances of the driver in the order in which they were loaded. This parameter can be one or more of the following flags:
Value | Meaning |
GND_FIRSTINSTANCEONLY | Returns a handle identifying the first instance of an installable driver. When this flag is set, the function will enumerate only the first instance of an installable driver, no matter how many times the driver has been installed. |
GND_FORWARD | Enumerates subsequent instances of the driver. (Using this flag has the same effect as not using the GND_REVERSE flag.) |
GND_REVERSE | Enumerates instances of the driver as it was loaded—each subsequent call to the function returns the handle of the next instance. |
The return value is the instance handle of the installable driver if the function is successful.