IPortableDevice::Close method (portabledeviceapi.h)

The Close method closes the connection with the device.

Syntax

HRESULT Close();

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
The method succeeded.

Remarks

You should not usually need to call this method yourself. When the last reference to the IPortableDevice interface is released, Windows Portable Devices calls Close for you. Calling this method manually forces the connection to the device to close, and any Windows Portable Devices objects hosted on this device will cease to function. You can call Open to reopen the connection.

Requirements

Requirement Value
Target Platform Windows
Header portabledeviceapi.h
Library PortableDeviceGUIDs.lib

See also

IPortableDevice Interface

IPortableDevice::Open