WpCopyObject: Difference between revisions
Appearance
mNo edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
==Parameters== | ==Parameters== | ||
; somSelf (WPObject *) - input: Pointer to the object on which the method is being invoked. | ; ''somSelf'' (WPObject *) - input: Pointer to the object on which the method is being invoked. | ||
::Points to an object of class WPObject. | ::Points to an object of class WPObject. | ||
; Folder (WPFolder *) - input: Pointer to a Folder object. | ; ''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. | ::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. | ; ''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 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. | If this flag is true, the new object will remain active until the caller issues the wpUnlockObject method on it. | ||
==Return Code== | ==Return Code== | ||
; rc (WPObject *) - returns:Pointer to the newly created object. | ; ''rc'' (WPObject *) - returns:Pointer to the newly created object. | ||
A return value of NULL indicates that an error occurred. | A return value of NULL indicates that an error occurred. | ||
Line 29: | Line 29: | ||
#include <os2.h> | #include <os2.h> | ||
[[Category: | [[Category:Category:Workplace Instance Methods]] |
Revision as of 22:59, 10 September 2025
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>