4.1 Inserting a Record into a WINS Database

The following example illustrates the use of the RPC methods defined in this specification to insert a record into the database of a WINS server. If the WINS database on the specified server does not have a record with name "WINS-TEST-00001", then the client calls the RPC method R_WinsRecordAction (section 3.1.4.1) with the following parameters:

  • ServerHdl set to the endpoint of the WINS server on which the R_WinsRecordAction method is executed.

  • ppRecAction pointing to a structure of type WINSINTF_RECORD_ACTION_T (section 2.2.2.3), with members set as follows:

    • Cmd_e to WINSINTF_E_INSERT.

    • pName to point to the string "WINS-TEST-00001" followed by a NetBIOS suffix of 0x00.

    • NameLen to 16.

    • TypOfRec_e to 3, indicating a multihomed (1) record.

    • NoOfAdds to 2.

    • pAdd to point to two IP addresses: 192.168.1.1 and 192.168.1.2.

    • NodeTyp to 1, indicating a p-node.

    • fStatic to 0, indicating a dynamic record.