CryptUnprotectMemory function crypt32

Win32Result<bool> CryptUnprotectMemory(
  1. Pointer<NativeType> pDataIn,
  2. int cbDataIn,
  3. int dwFlags
)

Decrypts memory that was encrypted using the CryptProtectMemory function.

To learn more, see learn.microsoft.com/windows/win32/api/dpapi/nf-dpapi-cryptunprotectmemory.

Implementation

Win32Result<bool> CryptUnprotectMemory(
  Pointer pDataIn,
  int cbDataIn,
  int dwFlags,
) {
  final result_ = CryptUnprotectMemory_Wrapper(pDataIn, cbDataIn, dwFlags);
  return .new(value: result_.value.i32 != FALSE, error: result_.error);
}