Jump to content

WinCopyObject: Difference between revisions

From EDM2
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== WinCopyObject ==
Copies object from its existing location to the destination location.
; WinCopyObject(hndlOriginalObject, hndlDestinationObject, reserved) : Copies object from its existing location to the destination location.


=== Parameters ===
==Syntax==
; hndlOriginalObject - [[OS2 API:DataType:HOBJECT|HOBJECT]] - input : Handle of Workplace object being copied.
WinCopyObject (hndlOriginalObject, hndlDestinationObject, reserved)
; hndlDestinationObject - [[OS2 API:DataType:HOBJECT|HOBJECT]] - input : Handle of the destination folder where hndlOriginalObject will be copied.
; reserved - [[OS2 API:DataType:ULONG|ULONG]] - input : Must be set to zero, reserved paramter.


=== Constants ===
== Parameters ==
;hndlOriginalObject ([[HOBJECT]]) - input : Handle of Workplace object being copied.
;hndlDestinationObject (HOBJECT) - input : Handle of the destination folder where hndlOriginalObject will be copied.
; reserved ([[ULONG]]) - input : Must be set to zero, reserved paramter.
 
== Constants ==
None
None


=== Returns ===
== Returns ==
[[OS2 API:DataType:APIRET|APIRET]] with values of:
[[APIRET]] with values of:
* [[OS2 API:DataType:HOBJECT|HOBJECT]] - Newly copied object.
* [[HOBJECT]] - Newly copied object.
* [[OS2 API:DataType:NULLHANDLE|NULLHANDLE]] - If pre-existing or destination folder is [[OS2 API:DataType:NULLHANDLE|NULLHANDLE]].
* [[NULLHANDLE]] - If pre-existing or destination folder is NULLHANDLE.
 
=== Module ===


=== 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]] hndlOriginalObject;
  HOBJECT hndlOriginalObject;
  [[OS2 API:DataType:HOBJECT|HOBJECT]] hndlDestinationObject;
  HOBJECT hndlDestinationObject;
  [[OS2 API:DataType:APIRET|APIRET]] rc;
  APIRET rc;
  ...
  ...
  rc = WinCopyObject(hndlOriginalObject, hndlDestinationObject, 0L);
  rc = WinCopyObject(hndlOriginalObject, hndlDestinationObject, 0L);
  ...
  ...


=== Related Functions ===
== Related Functions ==
* [[OS2 API:WinCreateObject|WinCreateObject]]
* [[WinCreateObject]]
* [[OS2 API:WinDestroyObject|WinDestroyObject]]
* [[WinDestroyObject]]
* [[OS2 API:WinMoveObject|WinMoveObject]]
* [[WinMoveObject]]
* [[OS2 API:WinQueryObjectWindow|WinQueryObjectWindow]]
* WinQueryObjectWindow
* [[OS2 API:WinSaveObject|WinSaveObject]]
* [[WinSaveObject]]
 
=== Notes ===
The REXX version of this function is [[OS2 API:SysCopyObject|SysCopyObject]].


=== OS Version Introduced ===
== Notes ==
OS2 Warp 3.0
The REXX version of this function is ''SysCopyObject''.


== OS Version Introduced ==
*OS/2 Warp 3.0


[[Category:The OS/2 API Project]]
[[Category:Win]]

Latest revision as of 19:56, 7 April 2024

Copies object from its existing location to the destination location.

Syntax

WinCopyObject (hndlOriginalObject, hndlDestinationObject, reserved)

Parameters

hndlOriginalObject (HOBJECT) - input
Handle of Workplace object being copied.
hndlDestinationObject (HOBJECT) - input
Handle of the destination folder where hndlOriginalObject will be copied.
reserved (ULONG) - input
Must be set to zero, reserved paramter.

Constants

None

Returns

APIRET with values of:

  • HOBJECT - Newly copied object.
  • NULLHANDLE - If pre-existing or destination folder is NULLHANDLE.

Define (C/C++)

INCL_WINWORKPLACE

Calling Convention

Cdecl32

Example Code

HOBJECT hndlOriginalObject;
HOBJECT hndlDestinationObject;
APIRET  rc;
...
rc = WinCopyObject(hndlOriginalObject, hndlDestinationObject, 0L);
...

Related Functions

Notes

The REXX version of this function is SysCopyObject.

OS Version Introduced

  • OS/2 Warp 3.0