Function Reference
_SafeArrayLock
Locks a SafeArray to prevent other threads from accessing it, allowing safe data manipulation.
Parameters
| $pSafeArray |
Pointer to the SafeArray to lock.
|
Return Value
| Success: |
0 (S_OK). |
| Failure: |
Non-zero HRESULT and sets @error to 1 (DllCall failure). |
Remarks
Must be followed by _SafeArrayUnlock to release the lock. Locking ensures safe access to the SafeArray's data,
typically used with _SafeArrayAccessData. Multiple locks increment the lock count; each requires a corresponding unlock.
Related
_SafeArrayUnlock, _SafeArrayAccessData, _SafeArrayUnaccessData