This topic has not yet been rated - Rate this topic

CHandle Class

This class provides methods for creating and using a handle object.

class CHandle

A CHandle object can be used whenever a handle is required: the main difference is that the CHandle object will automatically be deleted.

NoteNote

Some API functions will use NULL as an empty or invalid handle, while others use INVALID_HANDLE_VALUE. CHandle only uses NULL and will treat INVALID_HANDLE_VALUE as a real handle. If you call an API which can return INVALID_HANDLE_VALUE, you should check for this value before calling CHandle::Attach or passing it to the CHandle constructor, and instead pass NULL.

Header: atlbase.h

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.