GetLastFrameBitmapBits
Delphi
function GetLastFrameBitmapBits (BufferIndex: LongInt; WithOverlays: Boolean; ReleaseFrame: Boolean): Pointer;
C++Builder
void * __fastcall GetLastFrameBitmapBits(System::LongInt BufferIndex, bool WithOverlays, bool ReleaseFrame);
C#
public IntPtr GetLastFrameBitmapBits(int BufferIndex, bool WithOverlays, bool ReleaseFrame);
VB.NET
Public Function GetLastFrameBitmapBits(BufferIndex As Integer, WithOverlays As Boolean, ReleaseFrame As Boolean) As IntPtr
C++/Qt
void * GetLastFrameBitmapBits (int BufferIndex, BOOL WithOverlays, BOOL ReleaseFrame);
Locks the bitmap bits of the last video frame and returns a pointer to them.
Immediately after processing the bitmap bits, invoke the function again with the ReleaseFrame parameter set to true to release the sample, e.g.:
...
BYTE *pBits = (BYTE *) GetLastFrameBitmapBits (0, true, false);
// do what you need with the bitmap bits
GetLastFrameBitmapBits (0, true, true);
...
Note: to also get the bitmap dimensions, invoke GetLastFrameBitmapBits2 instead: it works the same way and also returns the bitmap format information.