Carbon


NSLStandardRegisterURL

Header: NSL.h Carbon status: Supported

Registers the URL of a service.

NSLError NSLStandardRegisterURL (
    NSLPath urlToRegister, 
    NSLNeighborhood neighborhoodToRegisterIn
);
Parameter descriptions
urlToRegister

On input, a value of type NSLPath specifying the URL to register.

neighborhoodToRegisterIn

On input, a value of type NSLNeighborhood specifying the neighborhood in which to register the service, or NULL. If NULL, the plug-ins that handle the service specified by urlToRegister determine the neighborhood in which the service is registered.

function result

If the value returned by NSLStandardRegisterURL is noErr, the service was registered. The NSLStandardRegisterURL function returns kNSLNoSupportForService, which indicates that none of the currently installed plug-ins support the service for which registration is requested or that none of the currently installed plug-ins support any type of service registration.

DISCUSSION

The NSLStandardRegisterURL function registers the specified URL with the NSL Manager without requiring that your application previously call NSLOpenNavigationAPI.

NSLStandardRegisterURL returns kNSLBadURLSyntax if urlToRegister contains illegal characters. If portions of the URL that you are registering contain illegal characters, call NSLHexEncodeText NSLHexEncodeText to encode the illegal characters before you call NSLStandardRegisterURL.

An application that provides a network service should call NSLStandardRegisterURL as part of its standard startup procedure.

Your application should deregister the service by calling NSLStandardDeregisterURL as part of its standard shutdown routine to indicate that the service is no longer available.

The NSLStandardRegisterURL function is available in NSL 1.1 and later, and supersedes the NSLRegisterService function, which was provided in NSL 1.0.


© 2000 Apple Computer, Inc. (Last Updated 7/13/2000)