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

# WNetGetCachedPassword(3w)

## NAME

**WNetGetCachedPassword** (MPR.@)

## SYNOPSIS

DWORD WNetGetCachedPassword\
  (\
   LPSTR  *pbResource*,\
   WORD   *cbResource*,\
   LPSTR  *pbPassword*,\
   LPWORD *pcbPassword*,\
   BYTE   *nType*\
  )

## PARAMS

*pbResource* **\[In\]**  Name of workgroup,computer,or resource.

*cbResource* **\[In\]**  Size of name.

*pbPassword* **\[Out\]**  Buffer to receive password.

*pcbPassword* **\[Out\]**  Receives size of password.

*nType* **\[In\]**  Type of password to retrieve.

## DESCRIPTION

WNetGetCachedPassword \[**MPR**.@\] Retrieves password from cache.

## NOTES

the stub seems to be wrong: arg1: pointer 0x40xxxxxx -\> (no string) arg2: len **36** arg3: pointer 0x40xxxxxx -\> (no string) arg4: pointer 0x40xxxxxx -\> 0xc8 arg5: type? **4.**

**----** everything below this line might be wrong (js) **-----.**

## RETURNS

**Success:** **WN\_SUCCESS**

**Failure:** **WN\_ACCESS\_DENIED**, **WN\_BAD\_PASSWORD**, **WN\_BAD\_VALUE**, **WN\_NET\_ERROR**, **WN\_NOT\_SUPPORTED**, **WN\_OUT\_OF\_MEMORY**

## IMPLEMENTATION

Declared in **"winnetwk.h"**.

Implemented in **"dlls/mpr/pwcache.c"**.

Debug channel **"mpr"**.
