wpQueryDetailsData
This instance method is called to allow the object to query its current details data.
Syntax
_wpQueryDetailsData(somSelf, ppDetailsData, pcp)
Parameters
- somSelf (WPObject *) - input
- Pointer to the object on which the method is being invoked.
- Points to an object of class WPObject.
- ppDetailsData (PVOID *) - output
- Pointer to detail data information.
- pcp (PULONG) - in/out
- Length of **ppDetailsData** buffer. If **ppDetailsData** is set to NULL, the actual size of **ppDetailsData** is returned in **pcp**.
Returns
- rc (ULONG) - returns
- Success indicator.
- TRUE: Successful completion.
- FALSE: Error occurred.
Remarks
All objects which have information to display in **details** view must override this method. **ppDetailsData** is a pointer to the beginning of the buffer into which details data should be written. The override should write whatever data it is responsible for and then increment the pointer to the beginning of the area of the next class in the hierarchy (1 byte past the last field for which it is responsible). Note that **ppDetailsData** must be modified so that the subclasses write in the appropriate place. The details data returned by a class must match the information returned in wpclsQueryDetailsInfo.
Usage
This method can be called at any time in order to determine the current object details.
How to Override
All objects which have information to display in **details** view must override this method. Note that the parent method must always be called before writing the data and adjusting the pointer.
Example Code
This example returns the myfile specific data for the details view of this object and sets the pointer (*ppDetailsData) to the beginning of the buffer into which the data is written.
SOM_Scope ULONG SOMLINK myf_wpQueryDetailsData(MYFILE *somSelf, PVOID *ppDetailsData, PULONG pcp) { PMYFILEDETAILS pMYFILEDetails; PBYTE pSize; MYFILEData *somThis = MYFILEGetData(somSelf); MYFILEMethodDebug("MYFILE","myf_wpQueryDetailsData"); parent_wpQueryDetailsData(somSelf,ppDetailsData, pcp); if (ppDetailsData) /* query data */ { pMYFILEDetails = (PMYFILEDETAILS) *ppDetailsData; pMYFILEDetails->pszLastWorker = _queryLastWorker(somSelf); /* point to buffer location after our details data */ *ppDetailsData = ((PBYTE) (*ppDetailsData)) + sizeof(*pMYFILEDetails); } else { *pcp += sizeof(*pMYFILEDetails); /* caller is querying size of buffer */ } return( TRUE ); }