wpQueryProgDetails
Appearance
WPProgram
This instance method is called to allow the object to query its program details.
Syntax
_wpQueryProgDetails(somSelf, pProgDetails, pulSize)
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.
- pulSize (PULONG) - in/out
- Size of the **pProgDetails** buffer.
- If **NULL** is specified for **pProgDetails**, then the size of the current **pProgDetails** is returned in **pulSize**.
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 determine the details of 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. */
PULONG pulSize; /* Size of the pProgDetails buffer. */
BOOL rc; /* Success indicator. */
rc = _wpQueryProgDetails(somSelf, pProgDetails,
pulSize);
/* Example usage embedded in provided text: */
PPROGDETAILS pProgDetails;
ULONG ulSize;
/* Get information about a program object */
if ((_wpQueryProgDetails (self, (PPROGDETAILS)NULL, &ulSize)))
{
if ((pProgDetails = (PPROGDETAILS) _wpAllocMem( self, ulSize, NULL)) != NULL)
{
if ((_wpQueryProgDetails (self, pProgDetails, &ulSize)))
{
somPrintf("_wpQueryProgDetails reports:\n");
somLPrintf(1,"pszExecutable = %s\n", pProgDetails->pszExecutable);
somLPrintf(1,"pszParameters = %s\n", pProgDetails->pszParameters);
}
else
{
somPrintf("_wpQueryProgDetails - unable to get details.\n");
return 1;
}
}
else
{
somPrintf("_wpAllocMem error\n");
return 1;
}
}
else
{
somPrintf("_wpQueryProgDetails - unable to determine size for buffer.\n");
return 1;
}
Related Methods
- wpQueryProgDetails (WPProgramFile)
- wpSetProgDetails (WPProgram)
- wpSetProgDetails (WPProgramFile)
WPProgramFile
This instance method is called to allow the object to query its program details.
Syntax
_wpQueryProgDetails(somSelf, pProgDetails, pSize)
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.
- pSize (PULONG) - in/out
- Size of the **pProgDetails** buffer.
- If **NULL** is specified for **pProgDetails**, then the size of the current **pProgDetails** is returned in **pSize**.
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 determine the details of 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. */
PULONG pSize; /* Size of the pProgDetails buffer. */
BOOL rc; /* Success indicator. */
rc = _wpQueryProgDetails(somSelf, pProgDetails,
pSize);
/* Example usage embedded in provided text: */
PPROGDETAILS pProgDetails;
ULONG ulSize;
/* Get information about a program object */
if ((_wpQueryProgDetails (self, (PPROGDETAILS)NULL, &ulSize)))
{
if ((pProgDetails = (PPROGDETAILS) _wpAllocMem( self, ulSize, NULL)) != NULL)
{
if ((_wpQueryProgDetails (self, pProgDetails, &ulSize)))
{
somPrintf("_wpQueryProgDetails reports:\n");
somLPrintf(1,"pszExecutable = %s\n", pProgDetails->pszExecutable);
somLPrintf(1,"pszParameters = %s\n", pProgDetails->pszParameters);
}
else
{
somPrintf("_wpQueryProgDetails - unable to get details.\n");
return 1;
}
}
else
{
somPrintf("_wpAllocMem error\n");
return 1;
}
}
else
{
somPrintf("_wpQueryProgDetails - unable to determine size for buffer.\n");
return 1;
}
Related Methods
- wpQueryProgDetails (WPProgram)
- wpSetProgDetails (WPProgram)
- wpSetProgDetails (WPProgramFile)
- wpSetProgDetails