API referenceRendering & Viewer

rasLock

Nominally two independent locking mechanisms — a general

C
void __stdcall rasLock(IPGC CachePtr);
void __stdcall rasUnLock(IPGC CachePtr);
void __stdcall rasLockTileBuffer(IPGC CachePtr);
void __stdcall rasUnLockTileBuffer(IPGC CachePtr);
Delphi
procedure rasLock(CachePtr: IPGC); stdcall;
procedure rasUnLock(CachePtr: IPGC); stdcall;
procedure rasLockTileBuffer(CachePtr: IPGC); stdcall;
procedure rasUnLockTileBuffer(CachePtr: IPGC); stdcall;

Purpose. Nominally two independent locking mechanisms — a general cache lock (rasLock/rasUnLock) and a tile-buffer-specific lock (rasLockTileBuffer/rasUnLockTileBuffer).

Description. Verified: all four functions share exactly one counter. rasLock and rasLockTileBuffer are both literally Inc(C.LockCount); rasUnLock and rasUnLockTileBuffer are both literally if C.LockCount > 0 then Dec(C.LockCount). There is no separate tile-buffer lock state at all — calling rasLock then rasUnLockTileBuffer (mixing the two "different" mechanisms) releases exactly the same lock as calling rasLock/rasUnLock, and a real tile worker checks the one shared LockCount before replacing MainBuf (per an inline "GAP-7 (full): tile-buffer lock nesting (LockCount is real cache state a tile worker checks before replacing MainBuf)" comment) — so the locking *effect* is real, just not actually distinct between the two named pairs.

Parameters.

ParameterDescription
CachePtrTarget page cache — all four functions increment/decrement the same LockCount.

Return value. None (all four are procedures).

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern void rasLock(IntPtr CachePtr);
Area
Rendering & Viewer
Category

Rasterizer/Rendering

Exported names

rasLock

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.