WSStopResolvingLinkService (C Function)

void WSStopResolvingLinkService(WSENV e,WSServiceRef r)

terminates the WSTP network link service resolve operation referred to by r.

Details

  • Resolving the connection details to a link service available on the network is fundamentally an asynchronous operation. Call WSResolveLinkService() to start the resolve operation. The WSTP library will make callbacks to a provided callback function as connection details become available.
  • The network resolve operation will continue to run until the program calls WSStopResolvingLinkService() or an error occurs with the operating system's service browsing mechanism.
  • The reference object r must be the same object returned by WSResolveLinkService().

Examples

Basic Examples  (1)

#include "wstp.h"

void ResolveCallbackFunction(WSENV e, WSServiceRef r, const char *serviceName, const char *linkName, const char *protocol, int options, void *context);

void managerResolveOperations(WSENV e, const char *name)
{
    WSServiceRef theRef;
    int apiResult;

    apiResult = WSResolveLinkService(e, ResolveCallbackFunction, name,
        NULL /* No context object for this example */, &theRef);
    if(apiResult != 0)
    { /* Handle the error */ }

    ...

    WSStopResolvingLinkService(e, theRef);
}


void ResolveCallbackFunction(WSENV e, WSServiceRef r, const char *serviceName, const char *linkName, const char *protocol, int options, void *context)
{
    ...
}