Jump to content

WinMoveObject: Difference between revisions

From EDM2
linked WPERR_xxx to definition
corrected links to namespace version.
Line 4: Line 4:


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


=== Constants ===
=== Constants ===
* [[CO_FAILIFEXISTS]]
* [[OS2 API:Constant#CO_FAILIFEXISTS|CO_FAILIFEXISTS]]


=== Returns ===
=== Returns ===
<!-- From the toolkit API doc: -->
<!-- From the toolkit API doc: -->
[[HOBJECT]] of the object moved or [[NULLHANDLE]] if the object exists already exists or the current object's handle is [[NULLHANDLE]].
[[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]].
<!--
<!--
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.
* [[TRUE]]
* [[OS2 API:DataType:TRUE|TRUE]]
* [[FALSE]]
* [[OS2 API:DataType:FALSE|FALSE]]
-->
-->
Returns from [[WinGetLastError]] should [[WinMoveObject]] fail:
Returns from [[OS2 API:WinGetLastError|WinGetLastError]] should [[OS2 API:WinMoveObject|WinMoveObject]] fail:
* [[OS2_API:PMI:error#WPERR_ALREADY_EXISTS|WPERR_ALREADY_EXISTS]]
* [[OS2_API:PMI:error#WPERR_ALREADY_EXISTS|WPERR_ALREADY_EXISTS]]
* [[OS2_API:PMI:error#WPERR_INVALID_FLAGS|WPERR_INVALID_FLAGS]]
* [[OS2_API:PMI:error#WPERR_INVALID_FLAGS|WPERR_INVALID_FLAGS]]
Line 39: Line 39:


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


=== Related Functions ===
=== Related Functions ===
[[WinCreateObject]]
[[OS2 API:WinCreateObject|WinCreateObject]]
[[WinQueryObject]]
[[OS2 API:WinQueryObject|WinQueryObject]]
[[WinCopyObject]]
[[OS2 API:WinCopyObject|WinCopyObject]]
[[WinSaveObject]]
[[OS2 API:WinSaveObject|WinSaveObject]]
[[WinOpenObject]]
[[OS2 API:WinOpenObject|WinOpenObject]]
[[WinSetObjectData]]
[[OS2 API:WinSetObjectData|WinSetObjectData]]


=== Notes ===
=== Notes ===
The REXX function is [[SysMoveObject]].
The REXX function is [[OS2 API:REXX:SysMoveObject|SysMoveObject]].


=== OS Version Introduced ===
=== OS Version Introduced ===
OS/2 Warp 3.0 and above, eCS 1.0 and above
OS/2 Warp 3.0 and above, eCS 1.0 and above

Revision as of 06:38, 29 April 2005

WinMoveObject

WinMoveObject(moveObject, destinationObject, option)

Moves object from one location to the desired location.

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

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:

Module

Define (C/C++)

INCL_WINWORKPLACE

Export name/Ordinal

Calling conversion

Cdecl32

Example Code

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

Related Functions

WinCreateObject WinQueryObject WinCopyObject WinSaveObject WinOpenObject WinSetObjectData

Notes

The REXX function is SysMoveObject.

OS Version Introduced

OS/2 Warp 3.0 and above, eCS 1.0 and above