Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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

Show:
© 2017 Microsoft