CNntpClient::AttachHandle Method  
 
VOID AttachHandle(
  HCLIENT hClient  
);

The AttachHandle method attaches the specified client handle to the current instance of the class.

Parameters

hClient
The handle to the client session that will be attached to the current instance of the class object.

Return Value

None.

Remarks

This method is used to attach a client handle created outside of the class using the SocketTools API. Once the client handle is attached to the class, the other class member functions may be used with that client session.

If a client handle already has been created for the class, that handle will be released when the new handle is attached to the class object. If you want to prevent the previous client session from being terminated, you must call the DetachHandle method. Failure to release the detached handle may result in a resource leak in your application.

Note that the hClient parameter is presumed to be a valid client handle and no checks are performed to ensure that the handle is valid. Specifying an invalid client handle will cause subsequent method calls to fail.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools11.h
Import Library: csnwsv11.lib

See Also

AttachThread, DetachHandle, GetHandle