Partager via


3.2.4.1 Completing a LnkSearchMachine Call

This section prescribes the actions that are necessary when completing a call to the LnkSearchMachine method.

When a client initiates a LnkSearchMachine call, the return value and output parameters are calculated as specified in section 3.1.4.1. If the return value indicates success (a value of zero or higher), the client has completed the operation, and a new UNC has been found. The client updates the FileLinkInformation that it maintains for the file:

  • The UNC MUST be updated to the value returned in the ptszPath parameter of the call.

  • The MachineID MUST be updated to be the MachineID of the server to which the call was made.

  • The FileID MUST be updated to be that which is returned in the pdroidLast parameter of the call.

If an error value of 0xC0020017 is returned, indicating that the requested endpoint was not found, and the client had used the named pipe endpoint "\\pipe\trkwks", then the client MUST repeat the call by using the named pipe endpoint "\\pipe\ntsvcs".

If an error value of TRK_E_REFERRAL is returned, and the client has not already made a request for this file to the DLT Workstation server on the MachineID indicated in the pmcidNext parameter returned by the server in this call, then the client MAY<26> initiate another call to a DLT Workstation server on that computer. If it makes this call, it MUST call LnkSearchMachine with input parameters set as follows:

pdroidBirthLast: The same value as in the completed call.

pdroidLast: The value returned by the server in the pdroidNext field.

Restrictions: This parameter is unused and MUST be set to zero.

If the preceding algorithm does not produce a successful return value, the client MUST return an error indication to the upper layers that triggered the call. If the return value specifically is TRK_E_POTENTIAL_FILE_FOUND, the client MUST also return an indication of such, as well as the updated MachineID, FileLocation, FileID, and UNC, to the upper layers that triggered the call.<27>