CNewsFeed::AttachHandle Method  
 
VOID AttachHandle(
  HCHANNEL hChannel  
);

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

Parameters

hChannel
The handle to the channel that will be attached to the current instance of the class object.

Return Value

None.

Remarks

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

If a handle has already 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 news feed channel from being closed, you must call the DetachHandle method. Failure to close the detached handle may result in a resource leak in your application.

Note that the hChannel parameter is presumed to be valid and no checks are performed to ensure its validity. Specifying an invalid handle value 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: cstools12.h
Import Library: csrssv12.lib

See Also