Megosztás a következőn keresztül:


IpcGetLicenseProperty function

Retrieves the information available from a license.

Syntax

HRESULT WINAPI IpcGetLicenseProperty(
  _In_  IPC_LICENSE_HANDLE hLicense,
        DWORD              dwPropID,
        LCID               lcid,
  _Out_ LPVOID             *ppvProperty
);

Parameters

hLicense [in]

A handle to the license or template to be queried.

You can get a license handle from these functions:

dwPropID

The ID of the license property for which to query. The pvLicenseInfo parameter must match this property ID. For a list of valid property IDs, see License Property Types.

When querying for user rights, take note of the setting of cbSize on the IPC_USER_RIGHTS_LIST structure. For more information, see IPC_USER_RIGHTS_LIST.

lcid

For localized properties, contains the locale identifier (LCID) of the descriptor to query. This parameter is ignored unless dwPropID is IPC_LI_DESCRIPTOR.

Note

See the Frequently asked questions section of the Release notes topic for information about the API behavior regarding language.

ppvProperty [out]

A pointer to a variable that receives a pointer to the buffer that contains the license information. The buffer is allocated by the RMS Client 2.1 and must be freed by calling IpcFreeMemory. The structure of the data returned depends on the property ID specified in dwPropID. For more information, see License Property Types.

Return value

If the function succeeds, the return value is S_OK. If the function fails, it returns an HRESULT value that indicates the error.

For more information, see Error codes for a description of all RMS SDK 2.1 return values.

Possible values include, but are not limited to, those in the following list.

IPCERROR_LOCALE_NOT_FOUND

Meaning: The application specified a nonzero lcid, but no templates were available that had a descriptor in this locale.

Action: For more information about lcid see, the description of IPC_LI_DESCRIPTOR in License Property Types. Also see the Frequently asked questions section of the Release notes topic.

Requirements

Minimum supported client
Windows Vista with SP2
Minimum supported server
Windows Server 2008
Header
Ipcprot.h (include Msipc.h)
Library
Msipc.lib
DLL
Msipc.dll

See also

IPC_USER_RIGHTS_LIST

IpcCreateLicenseFromScratch

IpcCreateLicenseFromTemplateID

IpcFreeMemory

IpcSerializeLicense

IpcSetLicenseProperty

License Property Types

Release notes

Error codes