CredRead function advapi32

Win32Result<bool> CredRead(
  1. PCWSTR targetName,
  2. CRED_TYPE type,
  3. Pointer<Pointer<CREDENTIAL>> credential
)

Reads a credential from the user's credential set.

To learn more, see learn.microsoft.com/windows/win32/api/wincred/nf-wincred-credreadw.

Implementation

Win32Result<bool> CredRead(
  PCWSTR targetName,
  CRED_TYPE type,
  Pointer<Pointer<CREDENTIAL>> credential,
) {
  final result_ = CredReadW_Wrapper(targetName, type, NULL, credential);
  return Win32Result(value: result_.value.i32 != FALSE, error: result_.error);
}