WSALookupServiceBegin Parameter Values for Resolving Peer Names (Windows CE 5.0)

Send Feedback

The following list shows the values to pass in the WSALookupServiceBegin (Windows Sockets) function is called to resolve peer names.

  • The lpqsRestrictions parameter references the WSAQUERYSET (Windows Sockets) structure. The following table shows the values that this structure must store when resolving names.

    Values Description
    dwSize Specifies the size of this structure.
    lpszServiceInstanceName Specifies a peer name to resolve.
    lpServiceClassID Must be SVCID_PNRPNAME.
    dwNameSpace Must be either NS_PNRPNAME or NS_ALL.
    lpNSProviderID Must be either NS_PROVIDER_PNRPNAME or NULL.
    lpszContext Must be a valid cloud name, an empty string, or NULL. If this value is NULL or an empty string, the default cloud, "Global_" is used.
    lpBlob Must be either a pointer to a BLOB (Windows Sockets) structure or NULL. If it is NULL, default values are used.

    If it is set, lpBlob points to a PNRPINFO structure, and specific parameters in the PNRPINFO structure must be set.

    Note   PNRP uses the BLOB structure to pass data to the WSAQUERYSET structure during calls to several functions. For use with PNRP, the BLOB structure points to either a PNRPINFO structure or a PNRPCLOUDINFO structure.

    If the lpBlob member of the WSAQUERYSET structure is set, values of PNRPINFO must also be set. The following table shows the PNRPINFO values to set when resolving names.

    Values Description
    dwSize Specifies the size of this structure.
    nMaxResolve Specifies the requested number of matches. The default is 1. Maximum number is 64.
    dwTimeout Specifies the requested timeout period to wait for responses. The default is 30 seconds. The maximum is 600 seconds (10 minutes).
    enResolveCriteria Must be one of the allowed values. The default is PNRP_RESOLVE_CRITERIA_NON_CURRENT_PROCESS_PEER_NAME. Valid values are specified by PNRP_RESOLVE_CRITERIA.
  • The dwControlFlags parameter controls the depth of the search. The following table shows the possible values for the flags are supported by PNRP.

    Value Description
    LUP_RETURN_NAME Returns a name and context.
    LUP_RETURN_COMMENT Returns a comment associated with a name.
    LUP_RETURN_ADDR Returns an address associated with a name.

See Also

Resolving a Peer Name | Peer-to-Peer Application Development

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.