Pulnix TMC-7DSP Instrukcja Użytkownika Strona 28

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 32
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 27
27
/* Function: AcquireToHost */
BOOL AcquireToHost()
{
OLT_APISTATUS Status = 0L;
ULNG ulPixelDepth = 0L;
ULNG ulMinBufSize = 0L;
Frame = GlobalAlloc (GHND, sizeof(OLT_FG_FRAME_INFO));
ulHeight = 0L;
ulWidth = 0L;
GlobalUnlock(hAcquireBuf);
GlobalFree(hAcquireBuf);
hAcquireBuf = NULL;
hpAcquireBuf = NULL;
// Query for Height, Width and Pixel Depth of the frame
(void) OlFgQueryInputControlValue(CurDevInfo.DevId,
CurDevInfo.InputSource,
OLC_FG_CTL_FRAME_HEIGHT,
&ulHeight);
(void) OlFgQueryInputControlValue(CurDevInfo.DevId,
CurDevInfo.InputSource,
OLC_FG_CTL_FRAME_WIDTH,
&ulWidth);
(void) OlFgQueryInputCaps(CurDevInfo.DevId,
OLC_FG_IC_PIXEL_DEPTH,
&ulPixelDepth,
sizeof(ULNG));
// calculate minimum size of buffer in bytes *
ulMinBufSize = ulHeight * ulWidth * ulPixelDepth;
hAcquireBuf = GlobalAlloc(GHND, ulMinBufSize);
if ( !hAcquireBuf )
{
// unable to allocate memory
mexPrintf("Unable to allocate enough memory for
acquire.\n");
return FALSE;
}
hpAcquireBuf = (HPUCHR) GlobalLock(hAcquireBuf);
if ( !hpAcquireBuf)
{
// unable to lock memory
TCHAR szBuf[80];
LPVOID lpMsgBuf;
DWORD dw = GetLastError();
Przeglądanie stron 27
1 2 ... 23 24 25 26 27 28 29 30 31 32

Komentarze do niniejszej Instrukcji

Brak uwag