Jump to content

wpclsQueryObject

From EDM2
Revision as of 21:42, 25 May 2025 by Martini (talk | contribs) (Created page with "{{DISPLAYTITLE:wpclsQueryObject}} This class method returns the object pointer for a given persistent object handle. ==Syntax== _wpclsQueryObject(somSelf, hObject) ==Parameters== ;'''somSelf''' (M_WPObject *) - input :Pointer to the WPObject class object. ;'''hObject''' (HOBJECT) - input :Handle for a given object instance. ;'''object''' (WPObject *) - returns :Pointer to the object. The pointer to the object that corresponds to the given object handle or NULL...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This class method returns the object pointer for a given persistent object handle.

Syntax

_wpclsQueryObject(somSelf, hObject)

Parameters

somSelf (M_WPObject *) - input
Pointer to the WPObject class object.
hObject (HOBJECT) - input
Handle for a given object instance.
object (WPObject *) - returns
Pointer to the object. The pointer to the object that corresponds to the given object handle or NULLHANDLE if that object no longer exists.

Returns

object (WPObject *) - returns
Pointer to the object. The pointer to the object that corresponds to the given object handle or NULLHANDLE if that object no longer exists.

Remarks

All workplace objects can be uniquely identified by a persistent object handle within a given machine. Once an object handle is obtained for an object (using the wpQueryHandle instance method), the handle can be used at any subsequent time even if the system was powered off in the meantime, provided that the object instance has not been destroyed. This method is intended for use by objects that wish to communicate with other objects using method calls. At any point in time, an object can reestablish contact with another object by using this method. For example, a WPShadow object will use this method to get the object pointer to the object it is currently shadowing when it is made awake. Note that the returned object is locked so that the called object can access the returned pointer without the risk of the object being made dormant. When the object pointer is no longer needed, the wpUnlockObject method should be invoked to permit the system to make that object dormant when all other locks on it have been released.

Using HOBJECT for .INI files or files in which an application uses a rename/save/delete sequence is not supported.

How to Override

This class method is generally not overridden.

Usage

This method can be called at any time.

Related Methods