public void OpenSDK_Data_GetDeviceInfoTest() { int intResult = 0; intResult = TestInit(); IntPtr intptrSession = IntPtr.Zero; int intLenght = 0; SDK_EzvizSDK.MsgHandler m = new SDK_EzvizSDK.MsgHandler(MsgHandler); intResult = SDK_EzvizSDK.OpenSDK_AllocSessionEx(m, IntPtr.Zero, out intptrSession, out intLenght); SDK_EzvizSDK.DataCallBack callback = new SDK_EzvizSDK.DataCallBack(DataCallBack); IntPtr intptrToken = Marshal.StringToHGlobalAnsi(ProgParameter.strEzviz_AccessToken); IntPtr intptrDevSerial = Marshal.StringToHGlobalAnsi("756217914"); IntPtr intptrDevInfo = IntPtr.Zero; int intLength; intResult = SDK_EzvizSDK.OpenSDK_Data_GetDeviceInfo(intptrToken, intptrDevSerial, out intptrDevInfo, out intLength); string strResult = Marshal.PtrToStringAnsi(intptrDevInfo); intResult = TestRelease(intptrSession); Assert.AreEqual("1", strResult); }