Registers the services on the language-specific SLPHandle handle and returns the results through the callback.
SLPError SLPReg (hSLP, pcSrvURL,
usLifetime, pcSrvType,
pcAttrs, fresh,
callback, pvCookie)SLPHandle hSLP;
const char *pcSrvURL;
const unsigned short usLifetime;
const char *pcSrvType;
const char *pcAttrs;
SLPBoolean fresh;
SLPRegReport callback;
void *pvCookie;
The SLPReg subroutine registers the URL specified by the pcSrvURL parameter having the usLifeTime lifetime with the attribute list specified by the pcAttrs parameter. The attribute list is a comma-separated list of attributes. The pcSrvType parameter is the service type name and can be included in the scheme service URL that are not in the service. In the case of the scheme service URL with service, the pcSrvType parameter is ignored. The fresh flag specifies that this registration is a new or an update-only registration. If the fresh parameter is set to SLP_TRUE, the registration replaces existing registrations. If the fresh parameter is set to SLP_FALSE, the registration only updates existing registrations. The usLifeTime parameter must be nonzero and less than or equal to SLP_LIFETIME_MAXIMUM. The registration takes place in the language locale of hhSLP handle.
Item | Description |
---|---|
hSLP | The language-specific SLPHandle handle on which to register the services. |
pcSrvURL | The URL that needs to be registered. |
usLifetime | The time after which the registered URL will expire. |
pcSrvType | Specifies the service type name that can be included in the service URL, which is not in the scheme service. |
pcAttrs | The comma-separated list of attributes to be registered along with the service URL. |
fresh | If the fresh parameter is set to SLP_TRUE, the registration is new; if the fresh parameter is set to SLP_FALSE, this registration updates an existing registration. |
callback | A callback function through which the results of the operation are reported. |
pvCookie | The memory passed to callback code from the client. The parameter can be set to NULL. |
Item | Description |
---|---|
SLP_OK | The subroutine has run successfully. |
SLPError | An error occurred. |