WinQueryObject: Difference between revisions
Appearance
m →Returns |
|||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
== | Get the handle to the object id. | ||
==Syntax== | |||
WinQueryObject(objectID) | |||
=== Parameters === | === 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. | ;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 === | === Returns === | ||
Line 9: | Line 10: | ||
Returns from [[WinGetLastError]] should '''WinQueryObject''' fail: | Returns from [[WinGetLastError]] should '''WinQueryObject''' fail: | ||
* [[ | * [[PM Error Codes#WPERR_OBJECT_NOT_FOUND|WPERR_OBJECT_NOT_FOUND]] | ||
* [[ | * [[PM Error Codes#WPERR_INVALID_OBJECTID|WPERR_INVALID_OBJECTID]] | ||
=== Define (C/C++) === | === Define (C/C++) === | ||
Line 26: | Line 27: | ||
... | ... | ||
=== Related Functions | === Notes === | ||
This API call allows the retrieval of the persistent 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. | |||
==Related Functions== | |||
*[[WinCopyObject]] | *[[WinCopyObject]] | ||
*[[WinCreateObject]] | *[[WinCreateObject]] | ||
Line 34: | Line 38: | ||
*[[WinSaveObject]] | *[[WinSaveObject]] | ||
*[[WinSetObjectData]] | *[[WinSetObjectData]] | ||
[[Category:Win]] | [[Category:Win]] |
Latest revision as of 02:15, 1 December 2019
Get the handle to the object id.
Syntax
WinQueryObject(objectID)
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 Convention
Example Code
... PSZ objectID; HOBJECT rc; ... rc = WinQueryObject (objectID); ...
Notes
This API call allows the retrieval of the persistent 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.