LSAPI Status Code Constants

This section describes the standard LSAPI status code constants. They are listed in alphabetic order.

Constant Status Value Meaning
LS_AUTHORIZATION_ UNAVAILABLE 0xC0001005 The license system has no license resources to complete the request.
LS_BAD_ARG 0xC000100E One or more of the arguments is incorrect.
LS_BAD_HANDLE 0xC0001001 The handle used on the call does not describe a valid license system context.
LS_BAD_INDEX 0xC000100B An invalid index was specified in a call to the LSEnumProviders or the LSQuery function.
LS_BUFFER_TOO_SMALL 0xC000100D Either the buffer pointed to by the Buffer parameter in the LSGetMessage function is too small to accommodate the text string to be returned, or the challenge data structure is too small to accommodate the challenge response.
LS_INSUFFICIENT_UNITS 0xC0001002 The license system cannot locate enough available license resources to complete the request.
LS_LICENSE_EXPIRED 0x8000100C The license associated with the current context has expired. This may be due to a time restriction on the license.
LS_LICENSE_TERMINATED 0xC0001004 The license system has determined that the resources used to complete a previous request are no longer granted to the calling software.
LS_LICENSE_UNAVAILABLE 0xC0001006 The license system has license resources that could complete the request, but they were not available at the time of the request.
LS_NETWORK_ UNAVAILABLE 0xC0001008 The network is unavailable.
LS_RESOURCES_ UNAVAILABLE 0xC0001007 The request cannot be completed because of insufficient resources, such as memory.
LS_SUCCESS 0x0 The function completed successfully.
LS_SYSTEM_UNAVAILABLE 0xC0001003 A license system cannot be found to carry out the called function.
LS_TEXT_UNAVAILABLE 0x80001009 An error occurred while looking up an error message string with the LSGetMessage function.
LS_UNKNOWN_STATUS 0xC000100A An unrecognized status code was passed to the LSGetMessage function.

These values are 32-bit unsigned values. The value is divided into 3 fields. The format of these fields with their bit positions are shown following.

Field Meaning
31 - 30 The high-order 2 bits indicate a severity code. Possible values include the following:
00 success
01 information
10 warning
11 error
29 - 16 The middle 14 bits are reserved, and must equal zero.
15 - 0 The low-order 16 bits are a unique value LSAPI assigns to indicate the area responsible for the condition, error, or warning.