Compartir a través de


IPortableDevice::Close

banner art

Previous Next

IPortableDevice::Close

The Close method closes the connection with the device.

Syntax

  HRESULT Close();

Parameters

This method takes no parameters.

Return Values

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 device interface (IPortableDevice) 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

Header: Defined in PortableDeviceApi.h

Library: PortableDeviceGUIDs.lib

See Also

Previous Next