RtGVCreateSharedBuffer
RtGVCreateSharedBuffer creates a shared buffer of RTGV_FRAME objects, which can be accessed from both an RTSS application and a Windows application linked to RTAPI.
Syntax
HANDLE RtGVCreateSharedBuffer( UINT height, UINT width, UINT bitsPerPixel, UINT numChannels, UINT numElements, UINT metaDataSize, PTCHAR pBufferName );
Parameters
height
The height of the images that will be passed from RTSS to Windows using this buffer.
width
The width of the images that will be passed from RTSS to Windows using this buffer.
bitsPerPixel
The bits-per-pixel of the images that will be passed from RTSS to Windows using this buffer.
numChannels
The number of channels of the images that will be passed from RTSS to Windows using this buffer.
numElements
The number of elements (ie. images) in the shared buffer.
metaDataSize
The size of the metadata of the images that will be passed from RTSS to Windows using this buffer.
pBufferName
The name of the shared buffer.
Return Values
The function returns a handle to the newly created shared buffer if it succeeds. Otherwise, it returns NULL. Call GetLastError for extended error information.
Remarks
Parameter metaDataSize should be set to sizeof(RTGV_FRAME) + <size of any custom meta data in the RTGV_FRAME>.
A shared buffer only contains empty frames when it is created. You can retrieve these empty frames using RtGVSharedBufferGetEmptyFrame.
We recommend you do not create a new shared buffer with the same name as one that already exists. If the shared buffer name already exists, the existing shared buffer will be overwritten with the new shared buffer.
Requirements
Minimum Supported Version | RTX64 3.7 SDK |
Header |
RtGVComm.h |
Library |
RtGVComm.lib |