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

# SafeArrayLock(3w)

## NAME

**SafeArrayLock** (OLEAUT32.21)

## SYNOPSIS

HRESULT SafeArrayLock\
  (\
   SAFEARRAY\* *psa*\
  )

## DESCRIPTION

Increment the lock counter of a SafeArray.

## PARAMS

*psa* **\[Out\]**  SafeArray to lock.

## RETURNS

**Success:** **S\_OK**. The array lock is incremented.

**Failure:** **E\_INVALIDARG** if *psa* is **NULL**, or **E\_UNEXPECTED** if too many locks are held on the array at once.

## NOTES

In Win32 these locks are not thread safe. See **[SafeArray(3w)](/SafeArray/3w.md)**.

## IMPLEMENTATION

Declared in **"oleauto.h"**.

Implemented in **"dlls/oleaut32/safearray.c"**.

Debug channel **"variant"**.
