NLSAddAssignment(3nw)


NLSAddAssignment -- restricts the use of a license certificate based on assignment type

Synopsis

   LS_STATUS_CODE NLSAddAssignment( 
      LS_STR          *licenseSystem, 
      LS_STR          *publisher, 
      LS_STR          *product, 
      LS_STR          *version, 
      LS_LICENSE_ID    licenseID, 
      LS_ULONG         assignmentType, 
      LS_VOID         *assignmentInfo, 
      LS_ULONG        *assignmentInfoLen); 

Description

The parameters are as follows:

licenseSystem
(IN) Points to the licensing system on which the specified product license certificate exists. It must be the specific name of a licensing system as returned by LSEnumProviders, or LS_ANY.

publisher
(IN) Points to the publisher name of the license certificate to which the assignment is added (not LS_ANY).

product
(IN) Points to the product name of the license certificate to which the assignment is added (not LS_ANY).

version
(IN) Points to the version string of the license certificate to which the assignment is added (not LS_ANY).

licenseID
(IN) Specifies the ID of the license certificate to which assignment is added.

assignmentType
(IN) Specifies the type of assignment to add in assignmentInfo. Current valid values and their associated assignmentInfo format are as follows:

LS_USER_NAME restricts based on a user or object name. NDS containers or group names can be specified. All elements that exist under a container or group then have access. assignmentInfo should contain the name to which access is being assigned.

LS_MACHINE restricts based on a machine address. This allows a license certificate to be assigned to one or more machines. assignmentInfo should contain the station address of the machine.

assignmentInfo
(IN) Points to the information required for performing the assignment based on the parameter assignmentType.

assignmentInfoLen
(IN) Points to the length of assignmentInfo, including the NULL terminator.

Return values

This function returns a detailed error code that can be directly processed by the caller, or that can be converted by LSGetMessage to one of these message strings:

LS_SUCCESS
The requested functionality completed successfully.

LS_SYSTEM_UNAVAILABLE
DOS TSR or Windows DLL is not properly configured or available, or client has no licensing system to communicate with.

LS_RESOURCES_UNAVAILABLE
Insufficient resources (such as memory) available to complete request.

LS_BAD_ARG
One or more parameters are invalid.

LS_AUTHORIZATION_UNAVAILABLE
Either the license certificate specified could not be located, or the current user was not security-equivalent to the license certificate.

Notices

NLSAddAssignment restricts the usage of a license certificate based on assignmentType. This allows license certificates to be reserved for a specific user, group, or machine. Additional restriction types will become available as their need is determined.

NLSAddAssignment applies restrictions to a specific license certificate, so all input must be fully specified. Also, this effect is additive. Additional calls to NLSAddAssignment cause the new restriction to be added in an ``OR-like`` fashion. To change the assignment to a different user, first remove the old restriction with NLSRemoveAssignment.

To add assignments, the user associated with the current connection must be security-equivalent to the owner attribute of the license certificate.


30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.