Share via


IWMDeviceManager::GetRevision

banner art

The GetRevision method retrieves the version number of Windows Media Device Manager currently in use.

Syntax

HRESULT GetRevision(DWORD*pdwRevision);

Parameters

pdwRevision

[out]  Pointer to a DWORD specifying the Windows Media Device Manager version number. Windows Media Device Manager 10 returns 0x00080000.

Return Values

The method returns an HRESULT. All the interface methods in Windows Media Device Manager can return any of the following classes of error codes:

  • Standard COM error codes
  • Windows error codes converted to HRESULT values
  • Windows Media Device Manager error codes

For an extenstive list of possible error codes, see Error Codes.

Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK The method succeeded.
E_INVALIDARG The pdwRevision parameter is an invalid or NULL pointer.
E_FAIL An unspecified error occurred.

Example Code

The following C++ code retrieves the revision from the global IWMDMDeviceManager interface, and displays it in hexadecimal using a custom macro.

DWORD revision = 0;
hr = m_IWMDeviceMgr->GetRevision(&revision);
CHECK_HR(hr, "Revision of WMDM: " << hex << revision << dec, "Couldn't get the WMDM revision number.");

Requirements

Header: Defined in mswmdm.h.

Library: mssachlp.lib

See Also