WpSetContentsFromPointer: Difference between revisions
Appearance
Created page with "{{DISPLAYTITLE:wpSetContentsFromPointer}} This method is specific to Version 4, or higher, of the OS/2 operating system. This instance method sets a WPDataFile object's contents based on a pointer to shared memory. ==Syntax== _wpSetContentsFromPointer(somSelf, pData) ==Parameters== ;''somSelf'' (WPDataFile *) - input :Pointer to the object on which the method is being invoked. :Points to an object of class WPDataFile. ;''pData'' (PVOID) - input :Poin..." |
(No difference)
|
Latest revision as of 02:49, 25 November 2025
This method is specific to Version 4, or higher, of the OS/2 operating system.
This instance method sets a WPDataFile object's contents based on a pointer to shared memory.
Syntax
_wpSetContentsFromPointer(somSelf, pData)
Parameters
- somSelf (WPDataFile *) - input
- Pointer to the object on which the method is being invoked.
- Points to an object of class WPDataFile.
- pData (PVOID) - input
- Pointer to shared memory.
- The first word must be a **ULONG** that contains the length, followed immediately by the data.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE Successful completion.
- FALSE Error occurred.
How to Override
This method is not generally overridden.
Usage
This method can be called at any time to change the contents of a data file.
Remarks
This method is not covered in the provided text.
Example Code
#define INCL_WINWORKPLACE
#include <os2.h>
WPDataFile *somSelf; /* Pointer to the object on which the method is being invoked. */
PVOID pData; /* Pointer to shared memory. */
BOOL rc; /* Success indicator */
rc = _wpSetContentsFromPointer(somSelf, pData);
/* Example code provided in the source: */
PVOID pData;
pData = _wpQueryPointerFromContents(SourceDataFile);
if (pData)
{
_wpSetContentsFromPointer(TargetDataFile,pData);
DosFreeMem(pData);
}