Skip to content
This SDK only works with devices released within the past 3 years. We regularly optimize and update the SDK to ensure compatibility and performance. We do not guarantee compatibility or provide technical support for devices older than 3 years.

# NET_SDK_DiscoverDevice

### Interface Definition

C++C#

    1
    2
    3
    4
    int NET_SDK_DiscoverDevice(
        NET_SDK_DEVICE_DISCOVERY_INFO* pDeviceInfo,
        int bufNum,
        int waitSeconds = 3);

    1
    2
    3
    4
    public static extern int NET_SDK_DiscoverDevice(
        IntPtr pDeviceInfo,
        int bufNum,
        int waitSeconds);

### Function Description

LAN front-end device discovery.

### Parameter Description

Parameters | Type | Remark
--- | --- | ---
pDeviceInfoout | `NET_SDK_DEVICE_DISCOVERY_INFO`* | Used to save the discovered device information. An array needs to be passed in. The array size is bufNum. If the discovered device is larger than bufNum, only bufNUm devices will be returned.
bufNumin | int | The size of the pDeviceInfo array.
waitSecondsin | int | Waiting time, in seconds, the default value is 3.

### Return Value

- Type：int

- Remark：The return value is the number of devices found. If no device is found or the search fails, the return value is 0.

### Remarks

None

Error Code