Массив с IP-устройством от камеры
Hi , I have a function inside a windows service in visual studio 2017 that captures alarms from a security camera, when I want to get an IP from the camera it returns a number "48" which is the sum of the numbers of IP 192.168.xx.xx, but I need not that number but the IP in a char [16] , some data that I need to change the code ?, I only get a number 48 in the position m_storeDev [0],functions get data from the cameras with communication SDK C++
cDeviceIP[0] = 48 (it is the sum of the numbers of IP 192.168.xx.xx) cDeviceIP[1] = 0 cDeviceIP[2] = 0 cDeviceIP[3] = 0 cDeviceIP[4] = 0 cDeviceIP[5] = 0 cDeviceIP[6] = 0 cDeviceIP[7] = 0 cDeviceIP[8] = 0 cDeviceIP[9] = 0 cDeviceIP[10] = 0 cDeviceIP[11] = 0 cDeviceIP[12] = 0 cDeviceIP[13] = 0 cDeviceIP[14] = 0 cDeviceIP[15] = 0 I need to have the IP numbers in each position of the array m_storeDev[16]
Что я уже пробовал:
Структура склонения (NVSSDK.dll)
[StructLayout(LayoutKind.Sequential)] public struct PNVS_NFS_DEV { [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public Char[] cDeviceIP; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 250)] public Char[] cStorePath; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public Char[] cUsername; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public Char[] cPassword; public int iState; };
Вызов из службы Windows
PNVS_NFS_DEV m_storeDev; int iRetx1 = NVSSDK.NetClient_NetFileGetMapStoreDevice(_ulLogonID, ref m_storeDev);