IWMDeviceManager::GetDeviceCount method (mswmdm.h)

The GetDeviceCount method retrieves the number of portable devices that are currently connected to the computer.

Syntax

HRESULT GetDeviceCount(
  [out] DWORD *pdwCount
);

Parameters

[out] pdwCount

Pointer to a DWORD specifying the count of known devices.

Return value

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 extensive list of possible error codes, see Error Codes.

Requirements

Requirement Value
Target Platform Windows
Header mswmdm.h
Library Mssachlp.lib

See also

Enumerating Devices

IWMDeviceManager Interface