WinOpenObject: Difference between revisions
Appearance
m Martini moved page OS2 API:WinOpenObject to OS2 API:PMI:WinOpenObject |
mNo edit summary |
||
Line 3: | Line 3: | ||
=== Parameters === | === Parameters === | ||
; objectHandle - [[ | ; objectHandle - [[HOBJECT]] - input : Handle of the object to open. | ||
; viewForObject - [[ | ; viewForObject - [[ULONG]] - input : Specifies which view to open. An object can define its own view codes. The system defines those listed in the constants section. | ||
; flag - [[ | ; flag - [[BOOL]] - input : | ||
* [[ | * [[TRUE]] - Opens a view of the object which already exists by calling [[wpViewObject]], otherwise by calling [[wpOpen]]. | ||
* [[ | * [[FALSE]] - Opens a view of the object by calling wpOpen. | ||
=== Constants === | === Constants === | ||
* [[ | * [[OPEN#OPEN_CONTENTS|OPEN_CONTENTS]] | ||
* [[ | * [[OPEN#OPEN_DEFAULT|OPEN_DEFAULTS]] | ||
* [[ | * [[OPEN#OPEN_DETAILS|OPEN_DETAILS]] | ||
* [[ | * [[OPEN#OPEN_HELP|OPEN_HELP]] | ||
* [[ | * [[OPEN#OPEN_RUNNING|OPEN_RUNNING]] | ||
* [[ | * [[OPEN#OPEN_SETTINGS|OPEN_SETTINGS]] | ||
* [[ | * [[OPEN#OPEN_TREE|OPEN_TREE]] | ||
=== Returns === | === Returns === | ||
True if successful, false if not successful. | True if successful, false if not successful. | ||
* [[ | * [[TRUE]] | ||
* [[ | * [[FALSE]] | ||
Returns from [[ | Returns from [[WinGetLastError]] should '''WinOpenObject''' fail: | ||
* [[OS2_API:PMI:error#WPERR_OBJECT_NOT_FOUND|WPERR_OBJECT_NOT_FOUND]] | * [[OS2_API:PMI:error#WPERR_OBJECT_NOT_FOUND|WPERR_OBJECT_NOT_FOUND]] | ||
* [[OS2_API:PMI:error#WPERR_INVALID_FLAGS|WPERR_INVALID_FLAGS]] | * [[OS2_API:PMI:error#WPERR_INVALID_FLAGS|WPERR_INVALID_FLAGS]] | ||
=== Define (C/C++) === | === Define (C/C++) === | ||
INCL_WINWORKPLACE | INCL_WINWORKPLACE | ||
=== Calling conversion === | === Calling conversion === | ||
Line 38: | Line 34: | ||
=== Example Code === | === Example Code === | ||
... | ... | ||
HOBJECT objectHandle; | |||
ULONG viewForObject; | |||
BOOL flag; | |||
BOOL rc; | |||
... | ... | ||
rc = WinOpenObject (objectHandle, viewForObject, flag); | rc = WinOpenObject (objectHandle, viewForObject, flag); | ||
Line 47: | Line 43: | ||
=== Related Functions === | === Related Functions === | ||
[[ | *[[WinCreateObject]] | ||
=== Notes === | === Notes === | ||
If concurrent views are off, [[ | If concurrent views are off, [[wpViewObject]] will resurface an existing object. | ||
The REXX counterpart is | The REXX counterpart is ''SysOpenObject''. | ||
=== OS Version Introduced === | === OS Version Introduced === | ||
OS/2 Warp 3.0 | OS/2 Warp 3.0 | ||
[[Category: | [[Category:Win]] |
Revision as of 19:20, 8 December 2016
WinOpenObject
- WinOpenObject(objectHandle, viewForObject, flag)
- Opens object with the specified view, or, if already open, surfaces it.
Parameters
- objectHandle - HOBJECT - input
- Handle of the object to open.
- viewForObject - ULONG - input
- Specifies which view to open. An object can define its own view codes. The system defines those listed in the constants section.
- flag - BOOL - input
- TRUE - Opens a view of the object which already exists by calling wpViewObject, otherwise by calling wpOpen.
- FALSE - Opens a view of the object by calling wpOpen.
Constants
Returns
True if successful, false if not successful.
Returns from WinGetLastError should WinOpenObject fail:
Define (C/C++)
INCL_WINWORKPLACE
Calling conversion
Example Code
... HOBJECT objectHandle; ULONG viewForObject; BOOL flag; BOOL rc; ... rc = WinOpenObject (objectHandle, viewForObject, flag); ...
Related Functions
Notes
If concurrent views are off, wpViewObject will resurface an existing object. The REXX counterpart is SysOpenObject.
OS Version Introduced
OS/2 Warp 3.0