Platform SDK: Performance Monitoring |
The EnumDeviceDrivers function retrieves the load address for each device driver in the system.
BOOL EnumDeviceDrivers( LPVOID *lpImageBase, // array of load addresses DWORD cb, // size of array LPDWORD lpcbNeeded // number of bytes returned );
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
It is a good idea to give EnumDeviceDrivers a large array of LPVOID values, because it is hard to predict how many device drivers there will be at the time you call EnumDeviceDrivers. To determine how many device drivers were enumerated by the call to EnumDeviceDrivers, divide the resulting value in the lpcbNeeded parameter by sizeof(LPVOID).
Windows NT/2000: Requires Windows NT 4.0 or later.
Header: Declared in Psapi.h.
Library: Use Psapi.lib.