4 Protocol Examples

This example shows a sample call, following the example specified in section 1.3, with IDs set as follows:

  • O1: 6479f083cfb245c29c713f586d6e038f

  • V1: 9d7e9c15f59b4cf9952b03616aa51ebe

  • O3: 20e435b512f64c848a1acd8737359b24

  • V3: 61ac933f7d2546149715c9d928b23f5e

  • M3: ef073687d9984f8c974b0d7e9a4bba48

The client sends a LnkSvrMessage message with a TRKSVR_CALL_SEARCH structure as follows.

 typedef struct {
     TRKSVR_MESSAGE_TYPE MessageType = SEARCH;
     TRKSVR_MESSAGE_PRIORITY Priority = PRI_9;
  
     [switch_is(MessageType)] union {
         ...
         [case (SEARCH)]
         TRKSVR_CALL_SEARCH Search = {see below};
     };
  
     [string] TCHAR *ptszMachineID = NULL;
 } TRKSVR_MESSAGE_UNION;
  
 typedef struct {
     [range(1,1)] unsigned long cSearch = 1;
     [size_is(cSearch)] TRK_FILE_TRACKING_INFORMATION *rgSearch = 
         {see below};
 } TRKSVR_CALL_SEARCH;
  
 typedef struct {
     CDomainRelativeObjId droidBirth= { 
             9d7e9c15f59b4cf9952b03616aa51ebe,
             6479f083cfb245c29c713f586d6e038f };
     CDomainRelativeObjId droidLast = {
             irrelevant, filled in by server};
     CMachineId mcidLast = {
             irrelevant, filled in by server};
     HRESULT hr = {
             irrelevant, filled in by server};
 } TRK_FILE_TRACKING_INFORMATION;

The server looks up the specified FileID, finds an entry in its database, returns zero from the LnkSvrMessage method, with the TRKSVR_MESSAGE_UNION and TRKSVR_CALL_SEARCH wrapper left unmodified and the embedded TRK_FILE_TRACKING_INFORMATION updated as follows.

  
 typedef struct {
     CDomainRelativeObjId droidBirth = { 
             9d7e9c15f59b4cf9952b03616aa51ebe,
             6479f083cfb245c29c713f586d6e038f };
     CDomainRelativeObjId droidLast = { 
             61ac933f7d2546149715c9d928b23f5e, 
             20e435b512f64c848a1acd8737359b24 };
     CMachineId mcidLast = { 
             ef073687d9984f8c974b0d7e9a4bba48 };
     HRESULT hr = 0;
 } TRK_FILE_TRACKING_INFORMATION;
Show: