void WSStopRegisteringLinkService(WSENV e, WSLINK l, WSServiceRef r)

terminates the WSTP network link service registration operation referred to by r and closes the link l.


  • Registering a link service name is fundamentally an asynchronous operation. WSRegisterLinkService(), WSRegisterLinkServiceWithHostname(), and WSRegisterLinkServiceWithPortAndHostname() start the registration operation and return immediately. The WSTP library will make callbacks to the application with status updates about the registration.
  • The link service name registration will continue to run until the program calls WSStopRegisteringLinkService() or an error occurs with the operating system's service browsing mechanism.
  • Once a program has called WSStopRegisteringLinkService(), it should then invalidated or delete any cached service name and resources associated with the service.
  • The reference object r must be the same object returned by WSRegisterLinkService(), WSRegisterLinkServiceWithHostname(), or WSRegisterLinkServiceWithPortAndHostname().


Basic Examples  (1)

#include "wstp.h"

void RegisterCallbackFunction(WSENV e, WSServiceRef ref, const char *name, void *context);

void managerRegisterOperation(WSENV e, const char *serviceName)
    WSServiceRef theRef;
    WSLINK theLink;
    int error;

    theLink = WSRegisterLinkService(e, serviceName,
        RegisterCallbackFunction, NULL /* Use the default domain */,
        NULL /* No context for this example */, &theRef, &error);

    if(theLink == NULL || error != WSEOK)
    { /* Handle the error */ }

    /* ... */

    WSStopRegisteringLinkService(e, theLink, theRef);

void RegisterCallbackFunction(WSENV e, const char *name, void *context)

See Also

WSRegisterLinkService()  WSRegisterLinkServiceWithHostname()  WSRegisterLinkServiceWithPortAndHostname()