CredDelete function advapi32

Win32Result<bool> CredDelete(
  1. PCWSTR targetName,
  2. CRED_TYPE type
)

Deletes a credential from the user's credential set.

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

Implementation

Win32Result<bool> CredDelete(PCWSTR targetName, CRED_TYPE type) {
  resolveGetLastError();
  final result_ = _CredDelete(targetName, type, NULL);
  return .new(value: result_ != FALSE, error: GetLastError());
}