BoxedAppSDK_SharedMem_Lock
Description
The function returns a pointer that can be used to directly access a memory block allocated in the shared memory area shared among all attached processes.
Use this function after allocating memory with BoxedAppSDK_SharedMem_Alloc to read or modify the shared data.
Once you are done with the memory, you should release the lock by calling BoxedAppSDK_SharedMem_Unlock to avoid resource conflicts.
Syntax
typedef LONGLONG BOXEDAPP_SHARED_PTR;
PVOID __stdcall BoxedAppSDK_SharedMem_Lock(BOXEDAPP_SHARED_PTR shared_ptr);type
BOXEDAPP_SHARED_PTR = LargeInt;
function BoxedAppSDK_SharedMem_Lock(shared_ptr: BOXEDAPP_SHARED_PTR): Pointer; stdcall;Parameters
shared_ptr
A handle to the memory block previously allocated with BoxedAppSDK_SharedMem_Alloc.
Remarks
The pointer returned by this function gives direct access to the memory block in the shared memory segment. Multiple processes sharing the same virtual environment can use this pointer to exchange or synchronize data.
Always pair this function with BoxedAppSDK_SharedMem_Unlock after finishing read or write operations to ensure the stability of the shared environment.