Jump to content

WinQueryObjectPath: Difference between revisions

From EDM2
Ak120 (talk | contribs)
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== WinQueryObjectPath ==
Get the path name of the object.
;WinQueryObjectPath(objectHandle, pathName, sizeOfPathName) : Get the path name of the object.
 
==Syntax==
WinQueryObjectPath(objectHandle, pathName, sizeOfPathName)


=== Parameters ===
=== Parameters ===
;objectHandle - [[HOBJECT]] - input : Object's handle.
;''objectHandle'' ([[HOBJECT]]) - input : Object's handle.
;pathName - [[PSZ]] - output : Memory for the path name of the object.
;''pathName'' ([[PSZ]]) - output : Memory for the path name of the object.
;sizeOfPathName - [[ULONG]] - input : The size of the memory buffer for the path name - in bytes.
;''sizeOfPathName'' ([[ULONG]]) - input : The size of the memory buffer for the path name - in bytes.


=== Returns ===
=== Returns ===
Line 12: Line 14:
* [[FALSE]]
* [[FALSE]]
Returns from [[WinGetLastError]] should WinQueryObjectPath fail:
Returns from [[WinGetLastError]] should WinQueryObjectPath fail:
* [[OS2_API:PMI:error#PMERR_INVALID_PARAMETER|PMERR_INVALID_PARAMETER]]
* [[PM Error Codes#PMERR_INVALID_PARAMETER|PMERR_INVALID_PARAMETER]]
* [[OS2_API:PMI:error#WPERR_BUFFER_TOO_SMALL|WPERR_BUFFER_TOO_SMALL]]
* [[PM Error Codes#WPERR_BUFFER_TOO_SMALL|WPERR_BUFFER_TOO_SMALL]]
* [[OS2_API:PMI:error#WPERR_OBJECT_NOT_FOUND|WPERR_OBJECT_NOT_FOUND]]
* [[PM Error Codes#WPERR_OBJECT_NOT_FOUND|WPERR_OBJECT_NOT_FOUND]]


=== Define (C/C++) ===
=== Define (C/C++) ===
INCL_WINWORKPLACE
INCL_WINWORKPLACE


=== Calling conversion ===
=== Calling Convention ===
[[Cdecl32]]
[[Cdecl32]]


Line 32: Line 34:
  ...
  ...


=== Related Functions ===
=== OS Version Introduced ===
OS/2 Warp 3.0
 
==Related Functions==
*[[WinCreateObject]]
*[[WinCreateObject]]
*[[WinQueryObject]]
*[[WinQueryObject]]
=== OS Version Introduced ===
OS/2 Warp 3.0


[[Category:Win]]
[[Category:Win]]

Latest revision as of 04:44, 15 June 2025

Get the path name of the object.

Syntax

WinQueryObjectPath(objectHandle, pathName, sizeOfPathName)

Parameters

objectHandle (HOBJECT) - input
Object's handle.
pathName (PSZ) - output
Memory for the path name of the object.
sizeOfPathName (ULONG) - input
The size of the memory buffer for the path name - in bytes.

Returns

This function returns a BOOL with the values of:

Returns from WinGetLastError should WinQueryObjectPath fail:

Define (C/C++)

INCL_WINWORKPLACE

Calling Convention

Cdecl32

Example Code

...
HOBJECT className;
PSZ pathName;
ULONG sizeOfPathName; // use CCHMAXPATH plus one.
BOOL rc;
...
rc = WinQueryObjectPath (objectHandle, pathName, sizeOfPathName);
...

OS Version Introduced

OS/2 Warp 3.0

Related Functions