Machine Vision Camera SDK (DotNet) Developer Guide
uint nTLayerType = MyCamera.MV_GIGE_DEVICE | MyCamera.MV_USB_DEVICE;
MyCamera.MV_CC_DEVICE_INFO_LIST stDevList = new MyCamera.MV_CC_DEVICE_INFO_LIST();
int nRet = MyCamera.MV_CC_EnumDevices_NET(nTLayerType, ref stDevList);
if (MyCamera.MV_OK != nRet)
{
Console.WriteLine("Enum device failed:{0:x8}", nRet);
}
}
}
}
Example
VB
Imports System.Runtime.InteropServices
Imports System.Threading.Thread
Imports System.Net.IPAddress
Imports MvCamCtrl.NET
Module Module1
Sub Main()
Dim dev As MyCamera = New MyCamera
Dim Info As String
Dim nRet As Int32 = MyCamera.MV_OK
Dim stDeviceInfoList As MyCamera.MV_CC_DEVICE_INFO_LIST = New MyCamera.MV_CC_DEVICE_INFO_LIST
'Enumerate devices
nRet = dev.MV_CC_EnumDevices_NET((MyCamera.MV_GIGE_DEVICE Or MyCamera.MV_USB_DEVICE),
stDeviceInfoList)
If MyCamera.MV_OK <> nRet Then
Console.Writeline"Enumerating device failed!"+ Convert.ToString(nRet))
Return
End If
If (0 = stDeviceInfoList.nDeviceNum) Then
MsgBox("No Find Gige | Usb Device !")
Return
End If
4.1.4 MvCamCtrl.NET::MyCamera::MV_CC_EnumDevicesEx_NET
Enumerate all devices with specified transport protocol and manufacturer in the subnet.
API Definition
static int MV_CC_EnumDevicesEx_NET(
uint
nTLayerType,
ref MyCamera.MV_CC_DEVICE_INFO_LIST stDevList,
string
pManufacturerName
);
21
    "