
Machine Vision Camera SDK (C) Developer Guide
Parameters
handle
[IN] Device handle, which is returned by MV_CC_CreateHandle or
MV_CC_CreateHandleWithoutLog .
hWnd
[IN] Window handle
Return Value
Return MV_OK(0) on success, and return Error Code on failure.
Remarks
● Call this API after MV_CC_StartGrabbing to display acquired images.
● This API is not supported by the camera with image in JPEG format.
● This API is not supported by CameraLink device.
Example
(For Windows system) The following sample code is for reference only.
#include "MvCameraControl.h"
typedef HWND (WINAPI *PROCGETCONSOLEWINDOW)();
PROCGETCONSOLEWINDOW GetConsoleWindowAPI;
void main()
{
int nRet = -1;
void* m_handle = NULL;
//Enumerate all devices corresponding to specified transport protocol
within subnet
unsigned int nTLayerType = MV_GIGE_DEVICE | MV_USB_DEVICE;
MV_CC_DEVICE_INFO_LIST m_stDevList = {0};
int nRet = MV_CC_EnumDevices(nTLayerType, &m_stDevList);
if (MV_OK != nRet)
{
printf("error: EnumDevices fail [%x]\n", nRet);
return;
}
int i = 0;
if (m_stDevList.nDeviceNum == 0)
{
printf("no camera found!\n");
return;
}
//Select the first found online device and create device handle
134



































































































































































































































































































































































































