IHandle
- The IHandle class is a wrapper for a generic handle object. You can create objects of this class, although
such objects have limited utility.
The Open Class Library provides other handle classes which represent specific types of handles, such as window handles,
bitmap handles, or thread identifiers. You use these specific handle classes when calling Open Class Library functions.
The advantage of providing separate classes for each handle type is that they become distinct enough to
prevent a user from passing the wrong handle type to a given function.
IHandle - Member Functions and Data by Group
Constructors & Destructor
Use the function in this group to create a handle of class IHandle.
- IHandle
public:
IHandle(Value value)
- Constructs an IHandle object from an operating system handle of type Value. Typically this
value originates in a system API call.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
Diagnostics
Use these functions to obtain diagnostic information.
- asDebugInfo
public:
IString asDebugInfo() const
- Returns the handle as a string containing diagnostic information.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
- asString
public:
IString asString() const
- Returns the handle as a string of form nnnn.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
- asUnsigned
public:
unsigned long asUnsigned() const
- Returns the handle value as an unsigned long value.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
Type Conversions
Use these type conversion operators to convert objects of this class to a different type.
- operator Value
public:
operator Value() const
- Returns the handle as its operating system dependent type. Use this operator when you
use the handle object as an argument to an operating system function.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
- Value
typedef void * Value
- This type definition defines Value to be a void* on the Windows platforms. On all other platforms
Value is defined to be an unsigned long.
- Variation 1
typedef void * Value
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
No |
No |
Variation 2
typedef unsigned long Value
- Supported Platforms
Windows |
OS/2 |
AIX |
No |
Yes |
Yes |
IHandle - Associated Globals
operator <<
ostream& operator <<(ostream& aStream, const IHandle& aHandle)
- Streams this handle object out to the passed ostream.
IHandle - Inherited Member Functions and Data
Inherited Public Functions
Inherited Public Data
Inherited Protected Functions
Inherited Protected Data
- IHandle
-