Jump to content

WinMoveObject: Difference between revisions

From EDM2
m formatting
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== WinMoveObject ==
Moves an object from one location to the desired location.
; WinMoveObject(moveObject, destinationObject, option) : Moves object from one location to the desired location.


=== Parameters ===
==Syntax==
; moveObject - [[OS2 API:DataType:HOBJECT|HOBJECT]] - input : Handle of the object to be moved.
WinMoveObject(moveObject, destinationObject, option)
; destinationObject - [[OS2 API:DataType:HOBJECT|HOBJECT]] - input : Handle of the destination folder to move the moveObject into.
; option - [[OS2 API:DataType:ULONG|ULONG]] - input : The only supported option is [[OS2 API:Constant:CO#CO_FAILIFEXISTS|CO_FAILIFEXISTS]].


=== Constants ===
== Parameters ==
* [[OS2 API:Constant:CO#CO_FAILIFEXISTS|CO_FAILIFEXISTS]]
;moveObject ([[HOBJECT]]) - input : Handle of the object to be moved.
;destinationObject ([[HOBJECT]]) - input : Handle of the destination folder to move the moveObject into.
;option ([[ULONG]]) - input : The only supported option is CO_FAILIFEXISTS.


=== Returns ===
== Constants ==
*CO_FAILIFEXISTS
 
== Returns ==
<!-- From the toolkit API doc: -->
<!-- From the toolkit API doc: -->
[[OS2 API:DataType:HOBJECT|HOBJECT]] of the object moved or [[OS2 API:DataType:NULLHANDLE|NULLHANDLE]] if the object exists already exists or the current object's handle is [[OS2 API:DataType:NULLHANDLE|NULLHANDLE]].
[[HOBJECT]] of the object moved or [[NULLHANDLE]] if the object exists already exists or the current object's handle is NULLHANDLE.
<!--
<!--
OR
OR
from OS/2 Warp Presentation Manager API book:
from OS/2 Warp Presentation Manager API book:
2. True if successful, false if not successful.
2. True if successful, false if not successful.
* [[OS2 API:DataType:TRUE|TRUE]]
* [[TRUE]]
* [[OS2 API:DataType:FALSE|FALSE]]
* [[FALSE]]
-->
-->
Returns from [[OS2 API:WinGetLastError|WinGetLastError]] should [[OS2 API:WinMoveObject|WinMoveObject]] fail:
Returns from [[WinGetLastError]] should WinMoveObject fail:
* [[OS2_API:PMI:error#WPERR_ALREADY_EXISTS|WPERR_ALREADY_EXISTS]]
* [[PM Error Codes#WPERR_ALREADY_EXISTS|WPERR_ALREADY_EXISTS]]
* [[OS2_API:PMI:error#WPERR_INVALID_FLAGS|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 ==
 
=== Calling conversion ===
[[Cdecl32]]
[[Cdecl32]]


=== Example Code ===
== Example Code ==
  ...
  ...
  [[OS2 API:DataType:HOBJECT|HOBJECT]] moveObject;
  HOBJECT moveObject;
  [[OS2 API:DataType:HOBJECT|HOBJECT]] destinationObject;
  HOBJECT destinationObject;
  [[OS2 API:DataType:ULONG|ULONG]] option;
  ULONG option;
  [[OS2 API:DataType:HOBJECT|HOBJECT]] rc;
  HOBJECT rc;
  ...
  ...
  rc = WinMoveObject (moveObject, destinationObject, option);
  rc = WinMoveObject (moveObject, destinationObject, option);
  ...
  ...


=== Related Functions ===
== Related Functions ==
[[OS2 API:WinCreateObject|WinCreateObject]]
*[[WinCreateObject]]
[[OS2 API:WinQueryObject|WinQueryObject]]
*[[WinQueryObject]]
[[OS2 API:WinCopyObject|WinCopyObject]]
*[[WinCopyObject]]
[[OS2 API:WinSaveObject|WinSaveObject]]
*[[WinSaveObject]]
[[OS2 API:WinOpenObject|WinOpenObject]]
*[[WinOpenObject]]
[[OS2 API:WinSetObjectData|WinSetObjectData]]
*[[WinSetObjectData]]
 
== Notes ==
The REXX function is ''SysMoveObject''.


=== Notes ===
== OS Version Introduced ==
The REXX function is [[OS2 API:REXX:SysMoveObject|SysMoveObject]].
*OS/2 Warp 3.0


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

Latest revision as of 19:33, 14 May 2025

Moves an object from one location to the desired location.

Syntax

WinMoveObject(moveObject, destinationObject, option)

Parameters

moveObject (HOBJECT) - input
Handle of the object to be moved.
destinationObject (HOBJECT) - input
Handle of the destination folder to move the moveObject into.
option (ULONG) - input
The only supported option is CO_FAILIFEXISTS.

Constants

  • CO_FAILIFEXISTS

Returns

HOBJECT of the object moved or NULLHANDLE if the object exists already exists or the current object's handle is NULLHANDLE. Returns from WinGetLastError should WinMoveObject fail:

Define (C/C++)

INCL_WINWORKPLACE

Calling Convention

Cdecl32

Example Code

...
HOBJECT moveObject;
HOBJECT destinationObject;
ULONG option;
HOBJECT rc;
...
rc = WinMoveObject (moveObject, destinationObject, option);
...

Related Functions

Notes

The REXX function is SysMoveObject.

OS Version Introduced

  • OS/2 Warp 3.0