LsaRetrievePrivateData function
Applies to: desktop apps only
Do not use the LSA private data functions. Instead, use the CryptProtectData and CryptUnprotectData functions.
Syntax
NTSTATUS LsaRetrievePrivateData( __in LSA_HANDLE PolicyHandle, __in PLSA_UNICODE_STRING KeyName, __out PLSA_UNICODE_STRING *PrivateData );
Parameters
- PolicyHandle [in]
-
A handle to a Policy object. The handle must have the POLICY_GET_PRIVATE_INFORMATION access right. For more information, see Opening a Policy Object Handle.
- KeyName [in]
-
Pointer to an LSA_UNICODE_STRING structure that contains the name of the key under which the private data is stored.
To create a specialized object, add one of the following prefixes to the key name.
Prefix Meaning - L$
For local objects.
- G$
For global objects.
- M$
For computer objects.
If you are not creating one of these specialized types, you do not need to specify a key name prefix. For more information, see Private Data Object.
- PrivateData [out]
-
Pointer to a variable that receives a pointer to an LSA_UNICODE_STRING structure that contains the private data.
When you no longer need the information, pass the returned pointer to LsaFreeMemory.
Return value
If the function succeeds, the function returns STATUS_SUCCESS.
If the function fails, it returns an NTSTATUS value, which can be the following value or one of the LSA Policy Function Return Values.
| Return code | Description |
|---|---|
|
No private data is stored under the name specified by the KeyName parameter. |
You can use the LsaNtStatusToWinError function to convert the NTSTATUS value to a Windows error code.
Requirements
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 3/6/2012