wpCopyObject

From EDM2
Jump to: navigation, search

This instance method is called to create a new copy of the object.

Original Class 
WPObject

Syntax

rc = _wpCopyObject(somSelf, Folder, fLock);

Parameters

somSelf (WPObject *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPObject.
Folder (WPFolder *) - input
Pointer to a Folder object.
A pointer to a Folder object in which to place this new object. This pointer can be determined by issuing a call to the wpclsQueryFolder method.
fLock (BOOL) - input
Lock object flag.

If this flag is false, the newly created object will be made dormant whenever the object and the folder containing the object are closed. If this flag is true, the new object will remain active until the caller issues the wpUnlockObject method on it.

Return Code

rc (WPObject *) - returns
Pointer to the newly created object.

A return value of NULL indicates that an error occurred.

Remarks

Copies of an object can always be deleted and moved by default, even if the original has the OBJSTYLE_NODELETE or OBJSTYLE_NOMOVE style set.

Override

This method can be overridden by classes which need to keep track of where instances are generated.

C Include

#define INCL_WINWORKPLACE
#include <os2.h>