Machine Vision Camera SDK (C) Developer Guide
4.8.8 MV_GIGE_ForceIp
Force the camera IP address.
API Definition
int MV_GIGE_ForceIp(
void
*handle,
unsigned int nIP
);
Parameters
handle
[IN] Device handle, which is returned by MV_CC_CreateHandle or
MV_CC_CreateHandleWithoutLog .
nIP
[IN] IP address
Return Value
Return MV_OK(0) on success, and return Error Code on failure.
Remarks
This function is supported only by GigEVision cameras.
After force the IP address, you should create the device handle again.
If device is in DHCP status, after calling this API to force camera network parameter, the device
will restart.
This API is not supported, and the API MV_GIGE_ForceIpEx is recommended.
See Also
MV_GIGE_ForceIpEx
Example
The following sample code is for reference only.
#include "MvCameraControl.h"
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};
151
    "