Overview
Group
Quick Info

Windows NT
Yes
Win95
Yes
Win32s
No
Import Library
lsapi32.lib
Header File
lsapi.h
Unicode
No
Platform Notes
None

LSRelease

This is preliminary documentation for technology that will be supported in future releases of Microsoft Windows.

The LSRelease function requests that the license system release the licensing resources associated with the license context identified by the LicenseHandle parameter.

LS_STATUS_CODE LS_API_ENTRY LSRelease(

LS_HANDLE LicenseHandle,
// handle to the license context
LS_ULONG TotUnitsConsumed,
// units consumed in this handle context
LS_STR *LogComment
// pointer to optional comment associated with the request
);

Parameters

LicenseHandle

[in] Specifies the handle to the license context. This parameter must be a handle created with the LSRequest function.

TotUnitsConsumed

[in] Specifies the total number of units consumed in this handle context since the initial call to the LSRequest function. You can specify this license policy attribute within the application. A value of LS_DEFAULT_UNITS indicates that the license system should determine the appropriate value using its own license policy mechanisms.

LogComment

[in] Points to an optional string indicating a comment that will be associated with the request. The license system can log the comment if logging is supported and enabled. If an error is returned, the license system can log both the error and the comment, but this is not guaranteed. If you do not specify a string, the value must be LS_NULL.

Return Values

If the function succeeds, the return value is LS_SUCCESS.

If the function fails, the return value is a status code. For extended error information, call LSGetMessage to return the status text corresponding to the status code. The LSGetMessage function may return one of the following status codes:

Value
Meaning
LS_BAD_HANDLE
The handle used on the call does not describe a valid licensing system context.
LS_INSUFFICIENT_UNITS
The licensing system cannot locate enough available licensing resources to complete the request.
LS_NETWORK_UNAVAILABLE
The network is unavailable.
LS_BAD_ARG
One or more of the arguments is incorrect.

Remarks

Use the LSRelease function to release licensing resources associated with the license context identified by the LicenseHandle parameter. If a policy that consumes licenses is in effect, and if you choose to implement such a license policy in the application, then you can pass the license units to be consumed in the TotUnitsConsumed parameter.

The LSRelease function does not free the license handle context. See the reference topic for LSFreeHandle.

See Also

LSFreeHandle
, LSGetMessage, LSRequest

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database