4.6 Retrieving All of the Records of a WINS Database

This example illustrates the use of the RPC methods defined in this specification to retrieve all the records from the database of a WINS server.

  • The client calls the R_WinsGetDbRecsByName method repeatedly with the following parameters.

  • Set pWinsAdd to NULL, Location to zero, pName to NULL, NameLen to zero, fStaticOnly, to 4 and NoOfRecsDesired to the desired number of records. As noted in the description of R_WinsGetDbRecsByName, the server resets the NoOfRecsDesired parameter to 5,000 if the parameter's value is greater than 5,000.

  • Check how many R_WinsGetDbRecsByName has returned by looking at the value in the NoOfRecs field. If this value is less than the NoOfRecsDesired value, the retrieval is complete. Otherwise, if the number of returned values is the same as the value of NoOfRecsDesired, call to the R_WinsGetDbRecsByName with the following parameter settings:

  • Set pWinsAdd to NULL, Location to 0, pName to the name of the last record retrieved in the previous iteration, NameLen to the length of pName, fStaticOnly to 4, and NoOfRecsDesired to the desired number of records.

  • Repeated this procedure until the value of NoOfRecs is less than the value of NoOfRecsDesired.