Prev Next

LSEnumProviders info  Overview  Group

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

The LSEnumProviders function returns a unique string for each installed license system service provider.

LS_STATUS_CODE LS_API_ENTRY LSEnumProviders(

    LS_ULONG Index,

// index of the service provider

    LS_STR *Buffer

// pointer to string identifying the service provider

   );

Parameters

Index
[in] Specifies the index of the service provider. The first provider has an index of zero, the second has an index of one, and so forth. This index should be incremented by the caller for each successive call to LSEnumProviders until it returns the LS_BAD_INDEX status code.
Buffer
[out] Points to a buffer in which the unique null-terminated string identifying the license system service provider is to be placed. The buffer pointed to by the Buffer parameter must be at least 255 bytes long. The value of LS_ANY indicates that the current index is not in use, but it is not the last index to obtain.

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_INDEX

An invalid index was specified in a call to the LSEnumProviders or the LSQuery function.

LS_BUFFER_TOO_SMALL

The buffer that the Buffer parameter points to is too small to accommodate the text string to be returned; or the challenge data structure is too small to accommodate the challenge response.

Remarks

The LSEnumProviders function returns a unique string for each installed provider. The unique null-terminated string typically identifies the vendor, product, and version of the license system. This value is the same as the one returned by an appropriate call to the LSQuery function. In a networked environment, it returns the version of the client, not the server.

An application can enumerate the installed license system service providers by calling LSEnumProviders successively. The value specified in the Index parameter is passed in and the calling application should increment it in each call until it returns the LS_BAD_INDEX status code. This code indicates that the value of the Index parameter is higher than the number of providers currently installed.

See Also

LSGetMessage, LSQuery