LsaStorePrivateData (advapi32)
Last changed: anonymous

.
Summary
TODO - a short description

C# Signature:

[DllImport("advapi32.dll", SetLastError = true, PreserveSig = true)]

    private static extern uint LsaStorePrivateData(
         IntPtr policyHandle,
         ref LSA_UNICODE_STRING KeyName,
         ref LSA_UNICODE_STRING PrivateData
    );

VB Signature:

Declare Function LsaStorePrivateData Lib "advapi32.dll" (TODO) As TODO

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

None.

Tips & Tricks:

Do not use the LSA private data functions. Instead, use the CryptProtectData and CryptUnprotectData functions.

But LsaStorePrivatData is still usefull for storing DefaultPassword in LSA and avoid to have the password in cleartext in registry.

Sample Code:

See sample code on LsaRetrievePrivateData

Documentation