---
name: "CryptGetDefaultProviderW"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/CryptGetDefaultProviderW"
---

# CryptGetDefaultProviderW(3w)

## NAME

**CryptGetDefaultProviderW** (ADVAPI32.@)

## SYNOPSIS

BOOL CryptGetDefaultProviderW\
  (\
   DWORD  *dwProvType*,\
   DWORD\* *pdwReserved*,\
   DWORD  *dwFlags*,\
   LPWSTR *pszProvName*,\
   DWORD\* *pcbProvName*\
  )

## DESCRIPTION

Finds the default **CSP** of a certain provider type.

## PARAMS

*dwProvType* **\[In\]**  Provider type to look for.

*pdwReserved* **\[In\]**  Reserved for future use and must be **NULL**.

*dwFlags* **\[In\]**  CRYPT\_MACHINE\_DEFAULT/USER\_DEFAULT.

*pszProvName* **\[Out\]**  Name of the default **CSP**.

*pcbProvName* **\[In/Out\]**  Size of *pszProvName*.

## RETURNS

**Success:** **TRUE**

**Failure:** **FALSE**.

## NOTES

If *pszProvName* is **NULL**, *pcbProvName* will hold the size of the buffer for memory allocation purposes on return.

## IMPLEMENTATION

Declared in **"wincrypt.h"**.

Implemented in **"dlls/advapi32/crypt.c"**.

Debug channel **"crypt"**.
