Jump to content

WinQueryObject: Difference between revisions

From EDM2
m Redirected page to OS2 API:PMI:WinQueryObject
Ak120 (talk | contribs)
No edit summary
Line 1: Line 1:
#REDIRECT [[OS2 API:PMI:WinQueryObject]]
== WinQueryObject ==
; WinQueryObject(objectID) : Get the handle to the object id.
 
=== Parameters ===
; objectID - [[PSZ]] - input : Object id of an existing object as assigned by [[WinCreateObject]] or [[WinSetObjectData]], or the fully qualified path name of the object.
 
=== Returns ===
This function returns a [[HOBJECT]] or [[NULLHANDLE]] with the occurrence of an error.
 
Returns from [[WinGetLastError]] should '''WinQueryObject''' fail:
* [[OS2_API:PMI:error#WPERR_OBJECT_NOT_FOUND|WPERR_OBJECT_NOT_FOUND]]
* [[OS2_API:PMI:error#WPERR_INVALID_OBJECTID|WPERR_INVALID_OBJECTID]]
 
=== Define (C/C++) ===
INCL_WINWORKPLACE
 
=== Calling conversion ===
[[Cdecl32]]
 
=== Example Code ===
...
PSZ objectID;
HOBJECT rc;
...
rc = WinQueryObject (objectID);
...
 
=== Related Functions ===
*[[WinCopyObject]]
*[[WinCreateObject]]
*[[WinDestroyObject]]
*[[WinMoveObject]]
*[[WinOpenObject]]
*[[WinSaveObject]]
*[[WinSetObjectData]]
 
=== Notes ===
This API call allows the retrieval of the persistant object handle for any file object with the fully qualified file name. Also, any object's handle can be retrieved by its object ID string. Using the object's handle, its state can be manipulated with [[WinSetObjectData]], or delete the object with [[WinDestroyObject]]. Valid object ID strings start with the "<" character and end with the ">" character.
 
[[Category:Win]]

Revision as of 19:16, 8 December 2016

WinQueryObject

WinQueryObject(objectID)
Get the handle to the object id.

Parameters

objectID - PSZ - input
Object id of an existing object as assigned by WinCreateObject or WinSetObjectData, or the fully qualified path name of the object.

Returns

This function returns a HOBJECT or NULLHANDLE with the occurrence of an error.

Returns from WinGetLastError should WinQueryObject fail:

Define (C/C++)

INCL_WINWORKPLACE

Calling conversion

Cdecl32

Example Code

...
PSZ objectID;
HOBJECT rc;
...
rc = WinQueryObject (objectID);
...

Related Functions

Notes

This API call allows the retrieval of the persistant object handle for any file object with the fully qualified file name. Also, any object's handle can be retrieved by its object ID string. Using the object's handle, its state can be manipulated with WinSetObjectData, or delete the object with WinDestroyObject. Valid object ID strings start with the "<" character and end with the ">" character.