Jump to content

wpReplaceObject

From EDM2

This method is specific to Version 4, or higher, of the OS/2 operating system.

This instance method replaces an object in another folder.

Syntax

_wpReplaceObject(somSelf, targetObject, fMove);

Parameters

somSelf (WPObject *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPObject.
targetObject (WPObject *) - input
Object to replace.
fMove (BOOL32) - input
Type of move flag.
TRUE: Move and replace object.
FALSE: Copy and replace object.

Returns

rc (BOOL32) - returns
Success indicator.
TRUE: Successful completion.
FALSE: Error occurred.

Remarks

The wpReplaceObject method deletes the target object, copies the current object to the folder that contained the target object, then optionally deletes the current object (if the fMove parameter is set to TRUE).

Usage

This method can be called at any time to replace one object with a copy of the current object.

How to Override

This method is not generally overridden.

Example Code

In this example, we replace the target object with a copy of the source object.

_wpReplaceObject(SourceObject,TargetObject,FALSE);

Related Methods