IDXGIFactory::CreateSoftwareAdapter method (dxgi.h)

Create an adapter interface that represents a software adapter.

Syntax

HRESULT CreateSoftwareAdapter(
        HMODULE      Module,
  [out] IDXGIAdapter **ppAdapter
);

Parameters

Module

Type: HMODULE

Handle to the software adapter's dll. HMODULE can be obtained with GetModuleHandle or LoadLibrary.

[out] ppAdapter

Type: IDXGIAdapter**

Address of a pointer to an adapter (see IDXGIAdapter).

Return value

Type: HRESULT

A return code indicating success or failure.

Remarks

A software adapter is a DLL that implements the entirety of a device driver interface, plus emulation, if necessary, of kernel-mode graphics components for Windows. Details on implementing a software adapter can be found in the Windows Vista Driver Development Kit. This is a very complex development task, and is not recommended for general readers.

Calling this method will increment the module's reference count by one. The reference count can be decremented by calling FreeLibrary.

The typical calling scenario is to call LoadLibrary, pass the handle to CreateSoftwareAdapter, then immediately call FreeLibrary on the DLL and forget the DLL's HMODULE. Since the software adapter calls FreeLibrary when it is destroyed, the lifetime of the DLL will now be owned by the adapter, and the application is free of any further consideration of its lifetime.

Requirements

Requirement Value
Target Platform Windows
Header dxgi.h
Library DXGI.lib

See also

IDXGIFactory