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

# GetFileSecurityA(3w)

## NAME

**GetFileSecurityA** (ADVAPI32.@)

## SYNOPSIS

BOOL GetFileSecurityA\
  (\
   LPCSTR               *lpFileName*,\
   SECURITY\_INFORMATION *RequestedInformation*,\
   PSECURITY\_DESCRIPTOR *pSecurityDescriptor*,\
   DWORD                *nLength*,\
   LPDWORD              *lpnLengthNeeded*\
  )

## DESCRIPTION

Obtains Specified information about the security of a file or directory.

## PARAMS

*lpFileName* **\[In\]**  Name of the file to get information for.

*RequestedInformation* **\[In\]**  **SE\_** flags from **"winnt.h"**.

*pSecurityDescriptor* **\[Out\]**  Destination for security information.

*nLength* **\[In\]**  Length of *pSecurityDescriptor*.

*lpnLengthNeeded* **\[Out\]**  Destination for length of returned security information.

## RETURNS

**Success:** **TRUE**. *pSecurityDescriptor* contains the requested information.

**Failure:** **FALSE**. *lpnLengthNeeded* contains the required space to return the info.

## NOTES

The information returned is constrained by the callers access rights and privileges.

## IMPLEMENTATION

Declared in **"winbase.h"**.

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

Debug channel **"advapi"**.
