CryptUpdateProtectedState function crypt32

int CryptUpdateProtectedState(
  1. Pointer<NativeType> pOldSid,
  2. Pointer<Utf16> pwszOldPassword,
  3. int dwFlags,
  4. Pointer<Uint32> pdwSuccessCount,
  5. Pointer<Uint32> pdwFailureCount,
)

The CryptUpdateProtectedState function migrates the current user's master keys after the user's security identifier (SID) has changed. This function can be used to preserve encrypted data after a user has been moved from one domain to another.

BOOL CryptUpdateProtectedState(
  [in]  PSID    pOldSid,
  [in]  LPCWSTR pwszOldPassword,
  [in]  DWORD   dwFlags,
  [out] DWORD   *pdwSuccessCount,
  [out] DWORD   *pdwFailureCount
);

Implementation

int CryptUpdateProtectedState(
        Pointer pOldSid,
        Pointer<Utf16> pwszOldPassword,
        int dwFlags,
        Pointer<Uint32> pdwSuccessCount,
        Pointer<Uint32> pdwFailureCount) =>
    _CryptUpdateProtectedState(
        pOldSid, pwszOldPassword, dwFlags, pdwSuccessCount, pdwFailureCount);