Jump to content

WinOpenObject: Difference between revisions

From EDM2
m changed namespace links.
m corrected links
Line 9: Line 9:
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 - [[OS2 API:DataType:BOOL|BOOL]] - input :  
; flag - [[OS2 API:DataType:BOOL|BOOL]] - input :  
* [[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]].
* [[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]].
* [[OS2 API:DataType:FALSE|FALSE]] - Opens a view of the object by calling [[OS2 API:wpOpen|wpOpen]].
* [[OS2 API:Constant:FALSE|FALSE]] - Opens a view of the object by calling [[OS2 API:wpOpen|wpOpen]].


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

Revision as of 06:50, 4 March 2006

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

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

Cdecl32

Example Code

...
HOBJECT objectHandle;
ULONG viewForObject;
BOOL flag;
BOOL rc;
...
rc = WinOpenObject (objectHandle, viewForObject, flag);
...

Related Functions

WinCreateObject

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