wpSetProgDetails
Appearance
WPProgram
This instance method is called to allow the object to change its program details.
Syntax
_wpSetProgDetails(somSelf, pProgDetails)
Parameters
- somSelf (WPProgram *) - input
- Pointer to the object on which the method is being invoked.
- Points to an object of class WPProgram.
- pProgDetails (PPROGDETAILS) - input
- Pointer to the program details.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE Successful completion.
- FALSE Error occurred.
How to Override
This method is generally not overridden.
Usage
This method can be called at any time in order to set the details for this object.
Remarks
This method is not covered in the provided text.
Example Code
#define INCL_WINWORKPLACE
#include <os2.h>
WPProgram *somSelf; /* Pointer to the object on which the method is being invoked. */
PPROGDETAILS pProgDetails; /* Pointer to the program details. */
BOOL rc; /* Success indicator. */
rc = _wpSetProgDetails(somSelf, pProgDetails);
/* Example usage embedded in provided text: */
PPROGDETAILS pProgDetails;
ULONG ulSize;
/* Change the executable of a program object to be VIEW.EXE */
if ((_wpQueryProgDetails (self, pProgDetails, &ulSize))) {
pProgDetails->pszExecutable = "VIEW.EXE";
if ((rc = _wpSetProgDetails (self, pProgDetails))) {
somPrintf("Program changed to VIEW.EXE\n");
} else {
somPrintf("_wpSetProgDetails failed.\n");
return 1;
} /* endif */
} else {
somPrintf("_wpQueryProgDetails failed.\n");
return 1;
} /* endif */
Related Methods
WPProgramFile
This instance method is called to allow the object to change its program details.
Syntax
_wpSetProgDetails(somSelf, pProgDetails)
Parameters
- somSelf (WPProgramFile *) - input
- Pointer to the object on which the method is being invoked.
- Points to an object of class WPProgramFile.
- pProgDetails (PPROGDETAILS) - input
- Pointer to the program details.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE Successful completion.
- FALSE Error occurred.
How to Override
This method is generally not overridden.
Usage
This method can be called at any time in order to set the details for this object.
Remarks
This method is not covered in the provided text.
Example Code
#define INCL_WINWORKPLACE
#include <os2.h>
WPProgramFile *somSelf; /* Pointer to the object on which the method is being invoked. */
PPROGDETAILS pProgDetails; /* Pointer to the program details. */
BOOL rc; /* Success indicator. */
rc = _wpSetProgDetails(somSelf, pProgDetails);
/* Example usage embedded in provided text: */
PPROGDETAILS pProgDetails;
ULONG ulSize;
/* Change the executable of a program object to be VIEW.EXE */
if ((_wpQueryProgDetails (self, pProgDetails, &ulSize))) {
pProgDetails->pszExecutable = "VIEW.EXE";
if ((rc = _wpSetProgDetails (self, pProgDetails))) {
somPrintf("Program changed to VIEW.EXE\n");
} else {
somPrintf("_wpSetProgDetails failed.\n");
return 1;
} /* endif */
} else {
somPrintf("_wpQueryProgDetails failed.\n");
return 1;
} /* endif */