Jump to content

WinQueryObject

From EDM2
Revision as of 02:15, 1 December 2019 by Martini (talk | contribs) (Returns)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

Cdecl32

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.

Related Functions