Jump to content

WinOpenObject: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
Line 3: Line 3:


=== Parameters ===
=== Parameters ===
; objectHandle - [[OS2 API:DataType:HOBJECT|HOBJECT]] - input : Handle of the object to open.
; objectHandle - [[HOBJECT]] - input : Handle of the object to open.
; 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.
; 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 - [[OS2 API:DataType:BOOL|BOOL]] - input :  
; flag - [[BOOL]] - input :  
* [[OS2 API:Constant:TRUE|TRUE]] - Opens a view of the object which already exists by calling [[OS2 API:wpViewObject|wpViewObject]], otherwise by calling [[OS2 API:wpOpen|wpOpen]].
* [[TRUE]] - Opens a view of the object which already exists by calling [[wpViewObject]], otherwise by calling [[wpOpen]].
* [[OS2 API:Constant:FALSE|FALSE]] - Opens a view of the object by calling [[OS2 API:wpOpen|wpOpen]].
* [[FALSE]] - Opens a view of the object by calling wpOpen.


=== Constants ===
=== Constants ===
* [[OS2 API:Constant:OPEN#OPEN_CONTENTS|OPEN_CONTENTS]]
* [[OPEN#OPEN_CONTENTS|OPEN_CONTENTS]]
* [[OS2 API:Constant:OPEN#OPEN_DEFAULT|OPEN_DEFAULTS]]
* [[OPEN#OPEN_DEFAULT|OPEN_DEFAULTS]]
* [[OS2 API:Constant:OPEN#OPEN_DETAILS|OPEN_DETAILS]]
* [[OPEN#OPEN_DETAILS|OPEN_DETAILS]]
* [[OS2 API:Constant:OPEN#OPEN_HELP|OPEN_HELP]]
* [[OPEN#OPEN_HELP|OPEN_HELP]]
* [[OS2 API:Constant:OPEN#OPEN_RUNNING|OPEN_RUNNING]]
* [[OPEN#OPEN_RUNNING|OPEN_RUNNING]]
* [[OS2 API:Constant:OPEN#OPEN_SETTINGS|OPEN_SETTINGS]]
* [[OPEN#OPEN_SETTINGS|OPEN_SETTINGS]]
* [[OS2 API:Constant:OPEN#OPEN_TREE|OPEN_TREE]]
* [[OPEN#OPEN_TREE|OPEN_TREE]]


=== Returns ===
=== Returns ===
True if successful, false if not successful.
True if successful, false if not successful.
* [[OS2 API:Constant:TRUE|TRUE]]
* [[TRUE]]
* [[OS2 API:Constant:FALSE|FALSE]]
* [[FALSE]]
Returns from [[OS2 API:WinGetLastError|WinGetLastError]] should [[OS2 API:WinOpenObject|WinOpenObject]] fail:
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]]
=== Module ===


=== Define (C/C++) ===
=== Define (C/C++) ===
INCL_WINWORKPLACE
INCL_WINWORKPLACE
=== Export name/Ordinal ===


=== Calling conversion ===
=== Calling conversion ===
Line 38: Line 34:
=== Example Code ===
=== Example Code ===
  ...
  ...
  [[OS2 API:DataType:HOBJECT|HOBJECT]] objectHandle;
  HOBJECT objectHandle;
  [[OS2 API:DataType:ULONG|ULONG]]   viewForObject;
  ULONG  viewForObject;
  [[OS2 API:DataType:BOOL|BOOL]]   flag;
  BOOL    flag;
  [[OS2 API:DataType:BOOL|BOOL]]   rc;
  BOOL    rc;
  ...
  ...
  rc = WinOpenObject (objectHandle, viewForObject, flag);
  rc = WinOpenObject (objectHandle, viewForObject, flag);
Line 47: Line 43:


=== Related Functions ===
=== Related Functions ===
[[OS2 API:WinCreateObject|WinCreateObject]]
*[[WinCreateObject]]


=== Notes ===
=== Notes ===
If concurrent views are off, [[OS2 API:wpViewObject|wpViewObject]] will resurface an existing object.
If concurrent views are off, [[wpViewObject]] will resurface an existing object.
The REXX counterpart is [[OS2 API:REXX:SysOpenObject|SysOpenObject]].
The REXX counterpart is ''SysOpenObject''.


=== OS Version Introduced ===
=== OS Version Introduced ===
OS/2 Warp 3.0 and above, eCS 1.0 and above
OS/2 Warp 3.0
 
 
 
[[OS2_API | Back to OS/2 API]]
 


[[Category:The OS/2 API Project]]
[[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

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