WinOpenObject: Difference between revisions
Appearance
linked WPERR_xxx to definition. |
corrected links to namespace version. |
||
Line 4: | Line 4: | ||
=== Parameters === | === Parameters === | ||
; objectHandle - [[HOBJECT]] - input : | ; objectHandle - [[OS2 API:DataType:HOBJECT|HOBJECT]] - input : | ||
Handle of the object to open. | Handle of the object to open. | ||
; viewForObject - [[ULONG]] - input : | ; viewForObject - [[OS2 API:DataType:ULONG|ULONG]] - input : | ||
Specifies which view to open. An object can define its own view codes. The system defines those listed in the constants section. | 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 : | ; flag - [[OS2 API:DataType:BOOL|BOOL]] - input : | ||
* [[TRUE]] - Opens a view of the object which already exists by calling [[wpViewObject]], otherwise by calling [[wpOpen]]. | * [[OS2 API:DataType:TRUE|TRUE]] - Opens a view of the object which already exists by calling [[OS2 API:wpViewObject|wpViewObject]], otherwise by calling [[OS2 API:wpOpen|wpOpen]]. | ||
* [[FALSE]] - Opens a view of the object by calling [[wpOpen]]. | * [[OS2 API:DataType:FALSE|FALSE]] - Opens a view of the object by calling [[OS2 API:wpOpen|wpOpen]]. | ||
=== Constants === | === Constants === | ||
* [[OPEN_CONTENTS]] | * [[OS2 API:Constant#OPEN_CONTENTS|OPEN_CONTENTS]] | ||
* [[OPEN_DEFAULT]] | * [[OS2 API:Constant#OPEN_DEFAULT|OPEN_DEFAULTS]] | ||
* [[OPEN_DETAILS]] | * [[OS2 API:Constant#OPEN_DETAILS|OPEN_DETAILS]] | ||
* [[OPEN_HELP]] | * [[OS2 API:Constant#OPEN_HELP|OPEN_HELP]] | ||
* [[OPEN_RUNNING]] | * [[OS2 API:Constant#OPEN_RUNNING|OPEN_RUNNING]] | ||
* [[OPEN_SETTINGS]] | * [[OS2 API:Constant#OPEN_SETTINGS|OPEN_SETTINGS]] | ||
* [[OPEN_TREE]] | * [[OS2 API:Constant#OPEN_TREE|OPEN_TREE]] | ||
=== Returns === | === Returns === | ||
True if successful, false if not successful. | True if successful, false if not successful. | ||
* [[TRUE]] | * [[OS2 API:DataType:TRUE|TRUE]] | ||
* [[FALSE]] | * [[OS2 API:DataType:FALSE|FALSE]] | ||
Returns from [[WinGetLastError]] should [[WinOpenObject]] fail: | Returns from [[OS2 API:WinGetLastError|WinGetLastError]] should [[OS2 API:WinOpenObject|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]] | ||
Line 40: | Line 40: | ||
=== Example Code === | === Example Code === | ||
... | ... | ||
[[HOBJECT]] objectHandle; | [[OS2 API:DataType:HOBJECT|HOBJECT]] objectHandle; | ||
[[ULONG]] viewForObject; | [[OS2 API:DataType:ULONG|ULONG]] viewForObject; | ||
[[BOOL]] flag; | [[OS2 API:DataType:BOOL|BOOL]] flag; | ||
[[BOOL]] rc; | [[OS2 API:DataType:BOOL|BOOL]] rc; | ||
... | ... | ||
rc = WinOpenObject (objectHandle, viewForObject, flag); | rc = WinOpenObject (objectHandle, viewForObject, flag); | ||
... | ... | ||
=== Related Functions === | === Related Functions === | ||
[[WinCreateObject]] | [[OS2 API:WinCreateObject|WinCreateObject]] | ||
=== Notes === | === Notes === | ||
If concurrent views are off, [[wpViewObject]] will resurface an existing object. | If concurrent views are off, [[OS2 API:wpViewObject|wpViewObject]] will resurface an existing object. | ||
The REXX counterpart is [[SysOpenObject]]. | The REXX counterpart is [[OS2 API:REXX:SysOpenObject|SysOpenObject]]. | ||
=== OS Version Introduced === | === OS Version Introduced === | ||
OS/2 Warp 3.0 and above, eCS 1.0 and above | OS/2 Warp 3.0 and above, eCS 1.0 and above |
Revision as of 06:32, 29 April 2005
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:
Module
Define (C/C++)
INCL_WINWORKPLACE
Export name/Ordinal
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 and above, eCS 1.0 and above