DismGetDriverInfo function

Gets information about an .inf file in a specified image.

Syntax

HRESULT WINAPI DismGetDriverInfo(
  _In_      DismSession       Session,
  _In_      PCWSTR            DriverPath,
  _Out_     DismDriver        **Driver,
  _Out_     UINT              *Count,
  _Out_opt_ DismDriverPackage **DriverPackage
);

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.

DriverPath [in]
A relative or absolute path to the driver .inf file.

Driver [out]
The address of a pointer to an array of DismDriver structures.

Count [out]
Returns the number of DismDriver structures that were returned.

DriverPackage [out, optional]
Optional. A pointer to the address of a DismDriverPackage structure.

Return value

Returns S_OK on success.

Remarks

This function returns information about the .inf file installed on the image. The driver associated with the .inf file may or may not be installed in the image.

Example

HRESULT hr = S_OK;
DismDriverInfo* DriverInfo;
UINT Count;
hr = DismGetDriverInfo(Session, L"usb.inf", &DriverInfo, &Count, &DriverPackageInfo);

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

DismGetDrivers

DismAddDriver

DismRemoveDriver

DismDelete