IPortableDevice::Close method

The Close method closes the connection with the device.

Syntax


HRESULT Close();

Parameters

This method has no parameters.

Return value

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

Return codeDescription
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

Header

PortableDeviceApi.h

Library

PortableDeviceGUIDs.lib

See also

IPortableDevice Interface
IPortableDevice::Open

 

 

Community Additions

ADD
Show: