28
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
dw,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) &lpMsgBuf,
0, NULL );
sprintf(szBuf,
"Failed with error %d: %s", dw, lpMsgBuf);
mexPrintf("Unable to lock memory for
acquire.\n%s\n",szBuf);
LocalFree(lpMsgBuf);
return FALSE;
}
Status = OlFgAllocateBuiltInFrame ( CurDevInfo.DevId,
OLC_FG_DEV_MEM_VOLATILE,
OLC_FG_NEXT_FRAME,
&FrameId);
if ( !OlImgIsOkay(Status))
{
mexPrintf("Unable to Allocate Frame.");
}
// Have the memory, attempt the acquire
Status = OlFgAcquireFrameToHost(CurDevInfo.DevId, FrameId,
hpAcquireBuf, ulMinBufSize);
if ( !OlImgIsOkay(Status))
{
mexPrintf("Unable to acquire.");
(void) OlFgDestroyFrame( CurDevInfo.DevId, FrameId);
GlobalUnlock(hAcquireBuf);
GlobalFree(hAcquireBuf);
return FALSE;
}
return TRUE;
}
Comentários a estes Manuais