Notice: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
);
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. |
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.
Windows NT: Requires version 3.51 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in lsapi.h.
Import Library: Use lsapi32.lib.
License Service Application Programming Interface Overview, LSAPI Functions, LSFreeHandle, LSGetMessage, LSRequest