Jump to content

WinCreateShadow: Difference between revisions

From EDM2
m formatting
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== WinCreateShadow ==
Create a shadow of the specified object to the specified location.
; WinCreateShadow(hndlOfOriginObject, hndlOfDestinationFolder, reserved) : Create a shadow of the specified object to the specified location.


=== Parameters ===
==Syntax==
; hndlOfOriginObject - [[OS2 API:DataType:HOBJECT|HOBJECT]] - input : Handle of the object from which the shadow will be created.
WinCreateShadow (hndlOfOriginObject, hndlOfDestinationFolder, reserved)
; hndlOfDestinationFolder - [[OS2 API:DataType:HOBJECT|HOBJECT]] - input : Handle of folder which the handle of the origin object is to be placed.
; reserved - [[OS2 API:DataType:ULONG|ULONG]] - input : Reserved - must be zero.


=== Constants ===
== Parameters ==
; hndlOfOriginObject ([[HOBJECT]]) - input : Handle of the object from which the shadow will be created.
; hndlOfDestinationFolder (HOBJECT) - input : Handle of folder which the handle of the origin object is to be placed.
; reserved ([[ULONG]]) - input : Reserved - must be zero.
 
== Constants ==
None
None


=== Returns ===
== Returns ==
[[OS2 API:DataType:APIRET|APIRET]] with values of:
;  rc (HOBJECT) - returns
: Handle of the newly created shadow object.
: A return value of NULLHANDLE indicates that either hObjectofDest is NULLHANDLE or an object with the same name as hObjectofObject exists in the destination folder.
 
[[APIRET]] with values of:
* The newly created handle of the shadow object.
* The newly created handle of the shadow object.
* [[OS2 API:DataType:NULLHANDLE|NULLHANDLE]] : The destination folder is [[OS2_API:DataType:NULLHANDLE|NULLHANDLE]] or an object already exists with the same name as hndlOfOriginObject.
* [[NULLHANDLE]] : The destination folder is NULLHANDLE or an object already exists with the same name as ''hndlOfOriginObject''.


=== Module ===
==Remarks==
Using HOBJECT for .INI files or files in which an application uses a rename/save/delete sequence is not supported. Its REXX counterpart is SysCreateShadowObject.


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


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


=== Example Code ===
== Example Code ==
  [[OS2 API:DataType:HOBJECT|HOBJECT]] hndlOfOriginObject;
  HOBJECT hndlOfOriginObject;
  [[OS2 API:DataType:HOBJECT|HOBJECT]] hndlOfDestinationFolder;
  HOBJECT hndlOfDestinationFolder;
  [[OS2 API:DataType:APIRET|APIRET]]  rc;
  APIRET rc;
  ...
  ...
  rc = WinCreateShadow(hndlOfOriginObject, hndlOfDestinationFolder, 0L);
  rc = WinCreateShadow(hndlOfOriginObject, hndlOfDestinationFolder, 0L);
  ...
  ...


=== Related Functions ===
Definition:
[[OS2 API:WinCreateObject|WinCreateObject]]
 
[[OS2 API:WinDestroyObject|WinDestoryObject]]
#define INCL_WINWORKPLACE
[[OS2 API:WinMoveObject|WinMoveObject]]
#include <os2.h>
[[OS2 API:WinQueryObjectWindow|WinQueryObjectWindow]]
[[OS2 API:WinSaveObject|WinSaveObject]]
HOBJECT    hObjectofObject;  /*  Handle of the object from which the shadow is to be created. */
HOBJECT    hObjectofDest;    /*  Handle of the folder into which hObjectofObject is to be placed. */
ULONG      ulReserved;      /*  Reserved value; must be 0. */
HOBJECT    rc;              /*  Handle of the newly created shadow object. */
rc = WinCreateShadow(hObjectofObject, hObjectofDest, ulReserved);
 
== Related Functions ==
*[[WinCreateObject]]
*[[WinDestroyObject]]
*[[WinMoveObject]]
*[[WinQueryObjectWindow]]
*[[WinSaveObject]]
 
== Notes ==
The REXX counter part to '''WinCreateShadow''' is ''SysCreateShadowObject''.


=== Notes ===
== OS Version Introduced ==
The REXX counter part to [[OS2 API:WinCreateShadow|WinCreateShadow]] is [[OS2_API:SysCreateShadowObject|SysCreateShadowObject]].
*OS/2 Warp 3.0


=== OS Version Introduced ===
[[Category:Win]]
OS/2 Warp 3.0

Latest revision as of 19:31, 14 May 2025

Create a shadow of the specified object to the specified location.

Syntax

WinCreateShadow (hndlOfOriginObject, hndlOfDestinationFolder, reserved)

Parameters

hndlOfOriginObject (HOBJECT) - input
Handle of the object from which the shadow will be created.
hndlOfDestinationFolder (HOBJECT) - input
Handle of folder which the handle of the origin object is to be placed.
reserved (ULONG) - input
Reserved - must be zero.

Constants

None

Returns

rc (HOBJECT) - returns
Handle of the newly created shadow object.
A return value of NULLHANDLE indicates that either hObjectofDest is NULLHANDLE or an object with the same name as hObjectofObject exists in the destination folder.

APIRET with values of:

  • The newly created handle of the shadow object.
  • NULLHANDLE : The destination folder is NULLHANDLE or an object already exists with the same name as hndlOfOriginObject.

Remarks

Using HOBJECT for .INI files or files in which an application uses a rename/save/delete sequence is not supported. Its REXX counterpart is SysCreateShadowObject.

Define (C/C++)

INCL_WINWORKPLACE

Calling Convention

Cdecl32

Example Code

HOBJECT hndlOfOriginObject;
HOBJECT hndlOfDestinationFolder;
APIRET  rc;
...
rc = WinCreateShadow(hndlOfOriginObject, hndlOfDestinationFolder, 0L);
...

Definition:

#define INCL_WINWORKPLACE
#include <os2.h>

HOBJECT    hObjectofObject;  /*  Handle of the object from which the shadow is to be created. */
HOBJECT    hObjectofDest;    /*  Handle of the folder into which hObjectofObject is to be placed. */
ULONG      ulReserved;       /*  Reserved value; must be 0. */
HOBJECT    rc;               /*  Handle of the newly created shadow object. */ 

rc = WinCreateShadow(hObjectofObject, hObjectofDest, ulReserved);

Related Functions

Notes

The REXX counter part to WinCreateShadow is SysCreateShadowObject.

OS Version Introduced

  • OS/2 Warp 3.0