wpQueryDetailsData - 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 );

}


[Back: wpQueryDetailsData - Related Methods]
[Next: wpQueryDetailsData - Topics]