IExternalConnection::ReleaseConnection method (objidlbase.h)

Decrements the count of an object's strong external connections.

Syntax

DWORD ReleaseConnection(
  [in] DWORD extconn,
  [in] DWORD reserved,
  [in] BOOL  fLastReleaseCloses
);

Parameters

[in] extconn

The type of external connection to the object. The only type of external connection currently supported by this interface is strong, which means that the object must remain alive as long as this external connection exists. Strong external connections are represented by the value EXTCONN_STRONG, which is defined in the enumeration EXTCONN.

[in] reserved

Information about the connection. This parameter is reserved for use by OLE. Its value can be zero, but not necessarily. Therefore, implementations of ReleaseConnection should not contain blocks of code whose execution depends on whether a zero value is returned.

[in] fLastReleaseCloses

This parameter is TRUE if the connection being released is the last external lock on the object, and therefore the object should close. Otherwise, the object should remain open until closed by the user or another process.

Return value

The method returns the count of connections. This value is intended to be used only for debugging purposes.

Remarks

If fLastReleaseCloses equals TRUE, calling ReleaseConnection causes the object to shut itself down. Calling this method is the only way in which a DLL object, running in the same process space as the container application, will know when to close following a silent update.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header objidlbase.h (include ObjIdl.h)

See also

IExternalConnection