DismGetDrivers function

Lists the drivers in an image.

Syntax

HRESULT WINAPI DismGetDrivers(
  _In_  DismSession       Session,
  _In_  BOOL              AllDrivers,
  _Out_ DismDriverPackage **DriverPackage,
  _Out_ UINT              *Count
);

Parameters

Session [in]
A valid DismSession. The DismSession must be associated with an image. You can associate a session with an image by using the DismOpenSession.

AllDrivers [in]
A Boolean value specifying which drivers to retrieve.

Value Description
TRUE Retrieve all drivers.
FALSE Retrieve only out-of-box drivers. Out-of-box drivers are drivers that were not originally included in the Windows image.

DriverPackage [out]
A pointer to the address of an array of DismDriverPackage structures.

Count [out]
The number of DismDriverPackage structures that were returned.

Return value

Returns S_OK on success.

Example

HRESULT hr = S_OK;
DismDriver* DriverPackageInfos;
UINT Count;
hr = DismGetDrivers(Session, TRUE, &DriverPackageInfos, &Count);

Requirements

Requirement Description
Supported host platforms DISM API can be used on any operating system supported by the Windows Assessment and Deployment Kit (Windows ADK). For more information, see the Windows ADK Technical Reference.
Supported image platforms Windows 7, Windows Server 2008 R2, Windows PE 3.0, Windows 8, Windows Server 2012, Windows Preinstallation Environment (Windows PE) 4.0, Windows 8.1, Windows Server 2012 R2, Windows 10, Windows Server 2016
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Header DismAPI.h
Library DismAPI.lib
DLL DismAPI.dll

See also

DismAddDriver

DismRemoveDriver

DismGetDriverInfo

DismDelete