Jump to content

WinOpenObject: Difference between revisions

From EDM2
WinOpenObject created.
 
 
(15 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== WinOpenObject ==
; WinOpenObject(objectHandle, viewForObject, flag) :
Opens object with the specified view, or, if already open, surfaces it.
Opens object with the specified view, or, if already open, surfaces it.


=== Parameters ===
==Syntax==
; objectHandle - [[HOBJECT]] - input :  
WinOpenObject(objectHandle, viewForObject, flag)
Handle of the object to open.
 
; viewForObject - [[ULONG]] - input :  
== Parameters ==
Specifies which view to open.  An object can define its own view codes.  The system defines those listed in the constants section.
;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 :  
; flag - [[BOOL]] - input :  
* [[TRUE]] - Opens a view of the object which already exists by calling [[wpViewObject]], otherwise by calling [[wpOpen]].
* [[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]].
* [[FALSE]] - Opens a view of the object by calling wpOpen.


=== Constants ===
== Constants ==
* OPEN_CONTENTS
* OPEN_CONTENTS
* OPEN_DEFAULT
* OPEN_DEFAULTS
* OPEN_DETAILS
* OPEN_DETAILS
* OPEN_HELP
* OPEN_HELP
Line 21: Line 20:
* OPEN_TREE
* OPEN_TREE


=== Returns ===
== Returns ==
True if successful, false if not successful.
True if successful, false if not successful.
* [[TRUE]]
* [[TRUE]]
* [[FALSE]]
* [[FALSE]]
Returns from [[WinGetLastError]] should [[WinOpenObject]] fail:
Returns from [[WinGetLastError]] should '''WinOpenObject''' fail:
* WPERR_OBJECT_NOT_FOUND
* [[PM Error Codes#WPERR_OBJECT_NOT_FOUND|WPERR_OBJECT_NOT_FOUND]]
* WPERR_INVALID_FLAGS
* [[PM Error Codes#WPERR_INVALID_FLAGS|WPERR_INVALID_FLAGS]]
 
=== Module ===


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


=== Export name/Ordinal ===
== Calling Convention ==
[[Cdecl32]]


=== Calling conversion ===
== Example Code ==
[[Cdecl32]]
...
HOBJECT objectHandle;
ULONG  viewForObject;
BOOL    flag;
BOOL    rc;
...
rc = WinOpenObject (objectHandle, viewForObject, flag);
...


=== Example Code ===
== Related Functions ==
...<br>
*[[WinCreateObject]]
[[HOBJECT]] objectHandle;<br>
[[ULONG]] viewForObject;<br>
[[BOOL]] flag;<br>
[[BOOL]] rc;<br>
...<br>
rc = WinOpenObject (objectHandle, viewForObject, flag);<br>
...<br>


=== Related Functions ===
== Notes ==
[[WinCreateObject]]
If concurrent views are off, ''wpViewObject'' will resurface an existing object.
The REXX counterpart is ''SysOpenObject''.


=== Notes ===
== OS Version Introduced ==
If concurrent views are off, [[wpViewObject]] will resurface an existing object.
OS/2 Warp 3.0
The REXX counterpart is [[SysOpenObject]].


=== OS Version Introduced ===
[[Category:Win]]
OS/2 Warp 3.0 and above, eCS 1.0 and above

Latest revision as of 02:12, 1 December 2019

Opens object with the specified view, or, if already open, surfaces it.

Syntax

WinOpenObject(objectHandle, viewForObject, flag)

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

  • OPEN_CONTENTS
  • OPEN_DEFAULTS
  • OPEN_DETAILS
  • OPEN_HELP
  • OPEN_RUNNING
  • OPEN_SETTINGS
  • OPEN_TREE

Returns

True if successful, false if not successful.

Returns from WinGetLastError should WinOpenObject fail:

Define (C/C++)

INCL_WINWORKPLACE

Calling Convention

Cdecl32

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