kazelee
2025-05-20 ef839d119eec2c28fac5f5ba175d71f926afae44
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.ComponentModel;
 
namespace NetSDKCS
{
    public static class NETClient
    {
        #region << constant >>
 
        /// <summary>
        /// whether to throw an execption.
        /// 是否抛异常
        /// </summary>
        private static bool m_IsThrowErrorMessage = false;
 
        /// <summary>
        /// Query splice screen(struct NET_COMPOSITE_CHANNEL)
        /// </summary>
        public static uint NET_DEVSTATE_COMPOSITE_CHN = 0x0047;
 
        /// <summary>
        /// en-us language
        /// 英文错误码对应的错误信息
        /// </summary>
        private static Dictionary<EM_ErrorCode, string> en_us_String = new Dictionary<EM_ErrorCode, string>()
        {
            {EM_ErrorCode.NET_NOERROR,"No error"},
            {EM_ErrorCode.NET_ERROR,"Unknown error"},
            {EM_ErrorCode.NET_SYSTEM_ERROR,"Windows system error"},
            {EM_ErrorCode.NET_NETWORK_ERROR,"Protocol error it may result from network timeout"},
            {EM_ErrorCode.NET_DEV_VER_NOMATCH,"Device protocol does not match"},
            {EM_ErrorCode.NET_INVALID_HANDLE,"Handle is invalid"},
            {EM_ErrorCode.NET_OPEN_CHANNEL_ERROR,"Failed to open channel"},
            {EM_ErrorCode.NET_CLOSE_CHANNEL_ERROR,"Failed to close channel"},
            {EM_ErrorCode.NET_ILLEGAL_PARAM,"User parameter is illegal"},
            {EM_ErrorCode.NET_SDK_INIT_ERROR,"SDK initialization error"},
            {EM_ErrorCode.NET_SDK_UNINIT_ERROR,"SDK clear error"},
            {EM_ErrorCode.NET_RENDER_OPEN_ERROR,"Error occurs when apply for render resources"},
            {EM_ErrorCode.NET_DEC_OPEN_ERROR,"Error occurs when opening the decoder library"},
            {EM_ErrorCode.NET_DEC_CLOSE_ERROR,"Error occurs when closing the decoder library"},
            {EM_ErrorCode.NET_MULTIPLAY_NOCHANNEL,"The detected channel number is 0 in multiple-channel preview"},
            {EM_ErrorCode.NET_TALK_INIT_ERROR,"Failed to initialize record library"},
            {EM_ErrorCode.NET_TALK_NOT_INIT,"The record library has not been initialized"},
            {EM_ErrorCode.NET_TALK_SENDDATA_ERROR,"Error occurs when sending out audio data"},
            {EM_ErrorCode.NET_REAL_ALREADY_SAVING,"The real-time has been protected"},
            {EM_ErrorCode.NET_NOT_SAVING,"The real-time data has not been save"},
            {EM_ErrorCode.NET_OPEN_FILE_ERROR,"Error occurs when opening the file"},
            {EM_ErrorCode.NET_PTZ_SET_TIMER_ERROR,"Failed to enable PTZ to control timer"},
            {EM_ErrorCode.NET_RETURN_DATA_ERROR,"Error occurs when verify returned data"},
            {EM_ErrorCode.NET_INSUFFICIENT_BUFFER,"There is no sufficient buffer"},
            {EM_ErrorCode.NET_NOT_SUPPORTED,"The current SDK does not support this function"},
            {EM_ErrorCode.NET_NO_RECORD_FOUND,"There is no searched result"},
            {EM_ErrorCode.NET_NOT_AUTHORIZED,"You have no operation right"},
            {EM_ErrorCode.NET_NOT_NOW,"Can not operate right now"},
            {EM_ErrorCode.NET_NO_TALK_CHANNEL,"There is no audio talk channel"},
            {EM_ErrorCode.NET_NO_AUDIO,"There is no audio"},
            {EM_ErrorCode.NET_NO_INIT,"The network SDK has not been initialized"},
            {EM_ErrorCode.NET_DOWNLOAD_END,"The download completed"},
            {EM_ErrorCode.NET_EMPTY_LIST,"There is no searched result"},
            {EM_ErrorCode.NET_ERROR_GETCFG_SYSATTR,"Failed to get system property setup"},
            {EM_ErrorCode.NET_ERROR_GETCFG_SERIAL,"Failed to get SN"},
            {EM_ErrorCode.NET_ERROR_GETCFG_GENERAL,"Failed to get general property"},
            {EM_ErrorCode.NET_ERROR_GETCFG_DSPCAP,"Failed to get DSP capacity description"},
            {EM_ErrorCode.NET_ERROR_GETCFG_NETCFG,"Failed to get network channel setup"},
            {EM_ErrorCode.NET_ERROR_GETCFG_CHANNAME,"Failed to get channel name"},
            {EM_ErrorCode.NET_ERROR_GETCFG_VIDEO,"Failed to get video property"},
            {EM_ErrorCode.NET_ERROR_GETCFG_RECORD,"Failed to get record setup"},
            {EM_ErrorCode.NET_ERROR_GETCFG_PRONAME,"Failed to get decoder protocol name"},
            {EM_ErrorCode.NET_ERROR_GETCFG_FUNCNAME,"Failed to get 232 COM function name"},
            {EM_ErrorCode.NET_ERROR_GETCFG_485DECODER,"Failed to get decoder property"},
            {EM_ErrorCode.NET_ERROR_GETCFG_232COM,"Failed to get 232 COM setup"},
            {EM_ErrorCode.NET_ERROR_GETCFG_ALARMIN,"Failed to get external alarm input setup"},
            {EM_ErrorCode.NET_ERROR_GETCFG_ALARMDET,"Failed to get motion detection alarm"},
            {EM_ErrorCode.NET_ERROR_GETCFG_SYSTIME,"Failed to get device time"},
            {EM_ErrorCode.NET_ERROR_GETCFG_PREVIEW,"Failed to get preview parameter"},
            {EM_ErrorCode.NET_ERROR_GETCFG_AUTOMT,"Failed to get audio maintenance setup"},
            {EM_ErrorCode.NET_ERROR_GETCFG_VIDEOMTRX,"Failed to get video matrix setup"},
            {EM_ErrorCode.NET_ERROR_GETCFG_COVER,"Failed to get privacy mask zone setup"},
            {EM_ErrorCode.NET_ERROR_GETCFG_WATERMAKE,"Failed to get video watermark setup"},
            {EM_ErrorCode.NET_ERROR_GETCFG_MULTICAST,"Failed to get config multicast port by channel"},
            {EM_ErrorCode.NET_ERROR_SETCFG_GENERAL,"Failed to modify general property"},
            {EM_ErrorCode.NET_ERROR_SETCFG_NETCFG,"Failed to modify channel setup"},
            {EM_ErrorCode.NET_ERROR_SETCFG_CHANNAME,"Failed to modify channel name"},
            {EM_ErrorCode.NET_ERROR_SETCFG_VIDEO,"Failed to modify video channel"},
            {EM_ErrorCode.NET_ERROR_SETCFG_RECORD,"Failed to modify record setup"},
            {EM_ErrorCode.NET_ERROR_SETCFG_485DECODER,"Failed to modify decoder property"},
            {EM_ErrorCode.NET_ERROR_SETCFG_232COM,"Failed to modify 232 COM setup"},
            {EM_ErrorCode.NET_ERROR_SETCFG_ALARMIN,"Failed to modify external input alarm setup"},
            {EM_ErrorCode.NET_ERROR_SETCFG_ALARMDET,"Failed to modify motion detection alarm setup"},
            {EM_ErrorCode.NET_ERROR_SETCFG_SYSTIME,"Failed to modify device time"},
            {EM_ErrorCode.NET_ERROR_SETCFG_PREVIEW,"Failed to modify preview parameter"},
            {EM_ErrorCode.NET_ERROR_SETCFG_AUTOMT,"Failed to modify auto maintenance setup"},
            {EM_ErrorCode.NET_ERROR_SETCFG_VIDEOMTRX,"Failed to modify video matrix setup"},
            {EM_ErrorCode.NET_ERROR_SETCFG_COVER,"Failed to modify privacy mask zone"},
            {EM_ErrorCode.NET_ERROR_SETCFG_WATERMAKE,"Failed to modify video watermark setup"},
            {EM_ErrorCode.NET_ERROR_SETCFG_WLAN,"Failed to modify wireless network information"},
            {EM_ErrorCode.NET_ERROR_SETCFG_WLANDEV,"Failed to select wireless network device"},
            {EM_ErrorCode.NET_ERROR_SETCFG_REGISTER,"Failed to modify the actively registration parameter setup"},
            {EM_ErrorCode.NET_ERROR_SETCFG_CAMERA,"Failed to modify camera property"},
            {EM_ErrorCode.NET_ERROR_SETCFG_INFRARED,"Failed to modify IR alarm setup"},
            {EM_ErrorCode.NET_ERROR_SETCFG_SOUNDALARM,"Failed to modify audio alarm setup"},
            {EM_ErrorCode.NET_ERROR_SETCFG_STORAGE,"Failed to modify storage position setup"},
            {EM_ErrorCode.NET_AUDIOENCODE_NOTINIT,"The audio encode port has not been successfully initialized"},
            {EM_ErrorCode.NET_DATA_TOOLONGH,"The data are too long"},
            {EM_ErrorCode.NET_UNSUPPORTED,"The device does not support current operation"},
            {EM_ErrorCode.NET_DEVICE_BUSY,"Device resources is not sufficient"},
            {EM_ErrorCode.NET_SERVER_STARTED,"The server has boot up"},
            {EM_ErrorCode.NET_SERVER_STOPPED,"The server has not fully boot up"},
            {EM_ErrorCode.NET_LISTER_INCORRECT_SERIAL,"Input serial number is not correct"},
            {EM_ErrorCode.NET_QUERY_DISKINFO_FAILED,"Failed to get HDD information"},
            {EM_ErrorCode.NET_ERROR_GETCFG_SESSION,"Failed to get connect session information"},
            {EM_ErrorCode.NET_USER_FLASEPWD_TRYTIME,"The password you typed is incorrect. You have exceeded the maximum number of retries"},
            {EM_ErrorCode.NET_LOGIN_ERROR_PASSWORD,"Password is not correct"},
            {EM_ErrorCode.NET_LOGIN_ERROR_USER,"The account does not exist"},
            {EM_ErrorCode.NET_LOGIN_ERROR_TIMEOUT,"Time out for log in returned value"},
            {EM_ErrorCode.NET_LOGIN_ERROR_RELOGGIN,"The account has logged in"},
            {EM_ErrorCode.NET_LOGIN_ERROR_LOCKED,"The account has been locked"},
            {EM_ErrorCode.NET_LOGIN_ERROR_BLACKLIST,"The account has been in the blocklist"},
            {EM_ErrorCode.NET_LOGIN_ERROR_BUSY,"Resources are not sufficient. System is busy now"},
            {EM_ErrorCode.NET_LOGIN_ERROR_CONNECT,"Time out. Please check network and try again"},
            {EM_ErrorCode.NET_LOGIN_ERROR_NETWORK,"Network connection failed"},
            {EM_ErrorCode.NET_LOGIN_ERROR_SUBCONNECT,"Successfully logged in the device but can not create video channel. Please check network connection"},
            {EM_ErrorCode.NET_LOGIN_ERROR_MAXCONNECT,"exceed the max connect number"},
            {EM_ErrorCode.NET_LOGIN_ERROR_PROTOCOL3_ONLY,"protocol 3 support"},
            {EM_ErrorCode.NET_LOGIN_ERROR_UKEY_LOST,"There is no USB or USB info error"},
            {EM_ErrorCode.NET_LOGIN_ERROR_NO_AUTHORIZED,"Client-end IP address has no right to login"},
            {EM_ErrorCode.NET_LOGIN_ERROR_USER_OR_PASSOWRD,"user or password error"},
            {EM_ErrorCode.NET_RENDER_SOUND_ON_ERROR,"Error occurs when Render library open audio"},
            {EM_ErrorCode.NET_RENDER_SOUND_OFF_ERROR,"Error occurs when Render library close audio"},
            {EM_ErrorCode.NET_RENDER_SET_VOLUME_ERROR,"Error occurs when Render library control volume"},
            {EM_ErrorCode.NET_RENDER_ADJUST_ERROR,"Error occurs when Render library set video parameter"},
            {EM_ErrorCode.NET_RENDER_PAUSE_ERROR,"Error occurs when Render library pause play"},
            {EM_ErrorCode.NET_RENDER_SNAP_ERROR,"Render library snapshot error"},
            {EM_ErrorCode.NET_RENDER_STEP_ERROR,"Render library stepper error"},
            {EM_ErrorCode.NET_RENDER_FRAMERATE_ERROR,"Error occurs when Render library set frame rate"},
            {EM_ErrorCode.NET_RENDER_DISPLAYREGION_ERROR,"Error occurs when Render lib setting show region"},
            {EM_ErrorCode.NET_RENDER_GETOSDTIME_ERROR,"An error occurred when Render library getting current play time"},
            {EM_ErrorCode.NET_GROUP_EXIST,"Group name has been existed"},
            {EM_ErrorCode.NET_GROUP_NOEXIST,"The group name does not exist"},
            {EM_ErrorCode.NET_GROUP_RIGHTOVER,"The group right exceeds the right list"},
            {EM_ErrorCode.NET_GROUP_HAVEUSER,"The group can not be removed since there is user in it"},
            {EM_ErrorCode.NET_GROUP_RIGHTUSE,"The user has used one of the group right. It can not be removed"},
            {EM_ErrorCode.NET_GROUP_SAMENAME,"New group name has been existed"},
            {EM_ErrorCode.NET_USER_EXIST,"The user name has been existed"},
            {EM_ErrorCode.NET_USER_NOEXIST,"The account does not exist"},
            {EM_ErrorCode.NET_USER_RIGHTOVER,"User right exceeds the group right"},
            {EM_ErrorCode.NET_USER_PWD,"Reserved account. It does not allow to be modified"},
            {EM_ErrorCode.NET_USER_FLASEPWD,"password is not correct"},
            {EM_ErrorCode.NET_USER_NOMATCHING,"Password is invalid"},
            {EM_ErrorCode.NET_USER_INUSE,"account in use"},
            {EM_ErrorCode.NET_ERROR_GETCFG_ETHERNET,"Failed to get network card setup"},
            {EM_ErrorCode.NET_ERROR_GETCFG_WLAN,"Failed to get wireless network information"},
            {EM_ErrorCode.NET_ERROR_GETCFG_WLANDEV,"Failed to get wireless network device"},
            {EM_ErrorCode.NET_ERROR_GETCFG_REGISTER,"Failed to get actively registration parameter"},
            {EM_ErrorCode.NET_ERROR_GETCFG_CAMERA,"Failed to get camera property"},
            {EM_ErrorCode.NET_ERROR_GETCFG_INFRARED,"Failed to get IR alarm setup"},
            {EM_ErrorCode.NET_ERROR_GETCFG_SOUNDALARM,"Failed to get audio alarm setup"},
            {EM_ErrorCode.NET_ERROR_GETCFG_STORAGE,"Failed to get storage position"},
            {EM_ErrorCode.NET_ERROR_GETCFG_MAIL,"Failed to get mail setup"},
            {EM_ErrorCode.NET_CONFIG_DEVBUSY,"Can not set right now"},
            {EM_ErrorCode.NET_CONFIG_DATAILLEGAL,"The configuration setup data are illegal"},
            {EM_ErrorCode.NET_ERROR_GETCFG_DST,"Failed to get DST setup"},
            {EM_ErrorCode.NET_ERROR_SETCFG_DST,"Failed to set DST"},
            {EM_ErrorCode.NET_ERROR_GETCFG_VIDEO_OSD,"Failed to get video osd setup"},
            {EM_ErrorCode.NET_ERROR_SETCFG_VIDEO_OSD,"Failed to set video osd"},
            {EM_ErrorCode.NET_ERROR_GETCFG_GPRSCDMA,"Failed to get CDMA\\GPRS configuration"},
            {EM_ErrorCode.NET_ERROR_SETCFG_GPRSCDMA,"Failed to set CDMA\\GPRS configuration"},
            {EM_ErrorCode.NET_ERROR_GETCFG_IPFILTER,"Failed to get IP Filter configuration"},
            {EM_ErrorCode.NET_ERROR_SETCFG_IPFILTER,"Failed to set IP Filter configuration"},
            {EM_ErrorCode.NET_ERROR_GETCFG_TALKENCODE,"Failed to get Talk Encode configuration"},
            {EM_ErrorCode.NET_ERROR_SETCFG_TALKENCODE,"Failed to set Talk Encode configuration"},
            {EM_ErrorCode.NET_ERROR_GETCFG_RECORDLEN,"Failed to get The length of the video package configuration"},
            {EM_ErrorCode.NET_ERROR_SETCFG_RECORDLEN,"Failed to set The length of the video package configuration"},
            {EM_ErrorCode.NET_DONT_SUPPORT_SUBAREA,"Not support Network hard disk partition"},
            {EM_ErrorCode.NET_ERROR_GET_AUTOREGSERVER,"Failed to get the register server information"},
            {EM_ErrorCode.NET_ERROR_CONTROL_AUTOREGISTER,"Failed to control actively registration"},
            {EM_ErrorCode.NET_ERROR_DISCONNECT_AUTOREGISTER,"Failed to disconnect actively registration"},
            {EM_ErrorCode.NET_ERROR_GETCFG_MMS,"Failed to get mms configuration"},
            {EM_ErrorCode.NET_ERROR_SETCFG_MMS,"Failed to set mms configuration"},
            {EM_ErrorCode.NET_ERROR_GETCFG_SMSACTIVATION,"Failed to get SMS configuration"},
            {EM_ErrorCode.NET_ERROR_SETCFG_SMSACTIVATION,"Failed to set SMS configuration"},
            {EM_ErrorCode.NET_ERROR_GETCFG_DIALINACTIVATION,"Failed to get activation of a wireless connection"},
            {EM_ErrorCode.NET_ERROR_SETCFG_DIALINACTIVATION,"Failed to set activation of a wireless connection"},
            {EM_ErrorCode.NET_ERROR_GETCFG_VIDEOOUT,"Failed to get the parameter of video output"},
            {EM_ErrorCode.NET_ERROR_SETCFG_VIDEOOUT,"Failed to set the configuration of video output"},
            {EM_ErrorCode.NET_ERROR_GETCFG_OSDENABLE,"Failed to get osd overlay enabling"},
            {EM_ErrorCode.NET_ERROR_SETCFG_OSDENABLE,"Failed to set OSD overlay enabling"},
            {EM_ErrorCode.NET_ERROR_SETCFG_ENCODERINFO,"Failed to set digital input configuration of front encoders"},
            {EM_ErrorCode.NET_ERROR_GETCFG_TVADJUST,"Failed to get TV adjust configuration"},
            {EM_ErrorCode.NET_ERROR_SETCFG_TVADJUST,"Failed to set TV adjust configuration"},
            {EM_ErrorCode.NET_ERROR_CONNECT_FAILED,"Failed to request to establish a connection"},
            {EM_ErrorCode.NET_ERROR_SETCFG_BURNFILE,"Failed to request to upload burn files"},
            {EM_ErrorCode.NET_ERROR_SNIFFER_GETCFG,"Failed to get capture configuration information"},
            {EM_ErrorCode.NET_ERROR_SNIFFER_SETCFG,"Failed to set capture configuration information"},
            {EM_ErrorCode.NET_ERROR_DOWNLOADRATE_GETCFG,"Failed to get download restrictions information"},
            {EM_ErrorCode.NET_ERROR_DOWNLOADRATE_SETCFG,"Failed to set download restrictions information"},
            {EM_ErrorCode.NET_ERROR_SEARCH_TRANSCOM,"Failed to query serial port parameters"},
            {EM_ErrorCode.NET_ERROR_GETCFG_POINT,"Failed to get the preset info"},
            {EM_ErrorCode.NET_ERROR_SETCFG_POINT,"Failed to set the preset info"},
            {EM_ErrorCode.NET_SDK_LOGOUT_ERROR,"SDK log out the device abnormally"},
            {EM_ErrorCode.NET_ERROR_GET_VEHICLE_CFG,"Failed to get vehicle configuration"},
            {EM_ErrorCode.NET_ERROR_SET_VEHICLE_CFG,"Failed to set vehicle configuration"},
            {EM_ErrorCode.NET_ERROR_GET_ATM_OVERLAY_CFG,"Failed to get ATM overlay configuration"},
            {EM_ErrorCode.NET_ERROR_SET_ATM_OVERLAY_CFG,"Failed to set ATM overlay configuration"},
            {EM_ErrorCode.NET_ERROR_GET_ATM_OVERLAY_ABILITY,"Failed to get ATM overlay ability"},
            {EM_ErrorCode.NET_ERROR_GET_DECODER_TOUR_CFG,"Failed to get decoder tour configuration"},
            {EM_ErrorCode.NET_ERROR_SET_DECODER_TOUR_CFG,"Failed to set decoder tour configuration"},
            {EM_ErrorCode.NET_ERROR_CTRL_DECODER_TOUR,"Failed to control decoder tour"},
            {EM_ErrorCode.NET_GROUP_OVERSUPPORTNUM,"Beyond the device supports for the largest number of user groups"},
            {EM_ErrorCode.NET_USER_OVERSUPPORTNUM,"Beyond the device supports for the largest number of users"},
            {EM_ErrorCode.NET_ERROR_GET_SIP_CFG,"Failed to get SIP configuration"},
            {EM_ErrorCode.NET_ERROR_SET_SIP_CFG,"Failed to set SIP configuration"},
            {EM_ErrorCode.NET_ERROR_GET_SIP_ABILITY,"Failed to get SIP capability"},
            {EM_ErrorCode.NET_ERROR_GET_WIFI_AP_CFG,"Failed to get 'WIFI ap' configuration"},
            {EM_ErrorCode.NET_ERROR_SET_WIFI_AP_CFG,"Failed to set 'WIFI ap' configuration"},
            {EM_ErrorCode.NET_ERROR_GET_DECODE_POLICY,"Failed to get decode policy"},
            {EM_ErrorCode.NET_ERROR_SET_DECODE_POLICY,"Failed to set decode policy"},
            {EM_ErrorCode.NET_ERROR_TALK_REJECT,"refuse talk"},
            {EM_ErrorCode.NET_ERROR_TALK_OPENED,"talk has opened by other client"},
            {EM_ErrorCode.NET_ERROR_TALK_RESOURCE_CONFLICIT,"resource conflict"},
            {EM_ErrorCode.NET_ERROR_TALK_UNSUPPORTED_ENCODE,"unsupported encode type"},
            {EM_ErrorCode.NET_ERROR_TALK_RIGHTLESS,"no right"},
            {EM_ErrorCode.NET_ERROR_TALK_FAILED,"request failed"},
            {EM_ErrorCode.NET_ERROR_GET_MACHINE_CFG,"Failed to get device relative config"},
            {EM_ErrorCode.NET_ERROR_SET_MACHINE_CFG,"Failed to set device relative config"},
            {EM_ErrorCode.NET_ERROR_GET_DATA_FAILED,"get data failed"},
            {EM_ErrorCode.NET_ERROR_MAC_VALIDATE_FAILED,"MAC validate failed"},
            {EM_ErrorCode.NET_ERROR_GET_INSTANCE,"Failed to get server instance"},
            {EM_ErrorCode.NET_ERROR_JSON_REQUEST,"Generated json string is error"},
            {EM_ErrorCode.NET_ERROR_JSON_RESPONSE,"The responding json string is error"},
            {EM_ErrorCode.NET_ERROR_VERSION_HIGHER,"The protocol version is lower than current version"},
            {EM_ErrorCode.NET_SPARE_NO_CAPACITY,"Hotspare disk operation failed. The capacity is low"},
            {EM_ErrorCode.NET_ERROR_SOURCE_IN_USE,"Display source is used by other output"},
            {EM_ErrorCode.NET_ERROR_REAVE,"advanced users grab low-level user resource"},
            {EM_ErrorCode.NET_ERROR_NETFORBID,"net forbid"},
            {EM_ErrorCode.NET_ERROR_GETCFG_MACFILTER,"get MAC filter configuration error"},
            {EM_ErrorCode.NET_ERROR_SETCFG_MACFILTER,"set MAC filter configuration error"},
            {EM_ErrorCode.NET_ERROR_GETCFG_IPMACFILTER,"get IP/MAC filter configuration error"},
            {EM_ErrorCode.NET_ERROR_SETCFG_IPMACFILTER,"set IP/MAC filter configuration error"},
            {EM_ErrorCode.NET_ERROR_OPERATION_OVERTIME,"operation over time"},
            {EM_ErrorCode.NET_ERROR_SENIOR_VALIDATE_FAILED,"senior validation failure"},
            {EM_ErrorCode.NET_ERROR_DEVICE_ID_NOT_EXIST,"device ID is not exist"},
            {EM_ErrorCode.NET_ERROR_UNSUPPORTED,"unsupport operation"},
            {EM_ErrorCode.NET_ERROR_PROXY_DLLLOAD,"proxy dll load error"},
            {EM_ErrorCode.NET_ERROR_PROXY_ILLEGAL_PARAM,"proxy user parameter is not legal"},
            {EM_ErrorCode.NET_ERROR_PROXY_INVALID_HANDLE,"handle invalid"},
            {EM_ErrorCode.NET_ERROR_PROXY_LOGIN_DEVICE_ERROR,"login device error"},
            {EM_ErrorCode.NET_ERROR_PROXY_START_SERVER_ERROR,"start proxy server error"},
            {EM_ErrorCode.NET_ERROR_SPEAK_FAILED,"request speak failed"},
            {EM_ErrorCode.NET_ERROR_NOT_SUPPORT_F6,"unsupport F6"},
            {EM_ErrorCode.NET_ERROR_CD_UNREADY,"CD is not ready"},
            {EM_ErrorCode.NET_ERROR_DIR_NOT_EXIST,"Directory does not exist"},
            {EM_ErrorCode.NET_ERROR_UNSUPPORTED_SPLIT_MODE,"The device does not support the segmentation model"},
            {EM_ErrorCode.NET_ERROR_OPEN_WND_PARAM,"Open the window parameter is illegal"},
            {EM_ErrorCode.NET_ERROR_LIMITED_WND_COUNT,"Open the window more than limit"},
            {EM_ErrorCode.NET_ERROR_UNMATCHED_REQUEST,"Request command with the current pattern don't match"},
            {EM_ErrorCode.NET_RENDER_ENABLELARGEPICADJUSTMENT_ERROR,"Render Library to enable high-definition image internal adjustment strategy error"},
            {EM_ErrorCode.NET_ERROR_UPGRADE_FAILED,"Upgrade equipment failure"},
            {EM_ErrorCode.NET_ERROR_NO_TARGET_DEVICE,"Can't find the target device"},
            {EM_ErrorCode.NET_ERROR_NO_VERIFY_DEVICE,"Can't find the verify device"},
            {EM_ErrorCode.NET_ERROR_CASCADE_RIGHTLESS,"No cascade permissions"},
            {EM_ErrorCode.NET_ERROR_LOW_PRIORITY,"low priority"},
            {EM_ErrorCode.NET_ERROR_REMOTE_REQUEST_TIMEOUT,"The remote device request timeout"},
            {EM_ErrorCode.NET_ERROR_LIMITED_INPUT_SOURCE,"Input source beyond maximum route restrictions"},
            {EM_ErrorCode.NET_ERROR_SET_LOG_PRINT_INFO,"Failed to set log print"},
            {EM_ErrorCode.NET_ERROR_PARAM_DWSIZE_ERROR,"'dwSize' is not initialized in input param"},
            {EM_ErrorCode.NET_ERROR_LIMITED_MONITORWALL_COUNT,"TV wall exceed limit"},
            {EM_ErrorCode.NET_ERROR_PART_PROCESS_FAILED,"Fail to execute part of the process"},
            {EM_ErrorCode.NET_ERROR_TARGET_NOT_SUPPORT,"Fail to transmit due to not supported by target"},
            {EM_ErrorCode.NET_ERROR_VISITE_FILE,"Access to the file failed"},
            {EM_ErrorCode.NET_ERROR_DEVICE_STATUS_BUSY,"Device busy"},
            {EM_ErrorCode.NET_USER_PWD_NOT_AUTHORIZED,"Fail to change the password"},
            {EM_ErrorCode.NET_USER_PWD_NOT_STRONG,"Password strength is not enough"},
            {EM_ErrorCode.NET_ERROR_NO_SUCH_CONFIG,"No corresponding setup"},
            {EM_ErrorCode.NET_ERROR_AUDIO_RECORD_FAILED,"Failed to record audio"},
            {EM_ErrorCode.NET_ERROR_SEND_DATA_FAILED,"Failed to send out data"},
            {EM_ErrorCode.NET_ERROR_OBSOLESCENT_INTERFACE,"Abandoned port"},
            {EM_ErrorCode.NET_ERROR_INSUFFICIENT_INTERAL_BUF,"Internal buffer is not sufficient"},
            {EM_ErrorCode.NET_ERROR_NEED_ENCRYPTION_PASSWORD,"verify password when changing device IP"},
            {EM_ErrorCode.NET_ERROR_NOSUPPORT_RECORD,"device not support the record"},
            {EM_ErrorCode.NET_ERROR_SERIALIZE_ERROR,"Failed to serialize data"},
            {EM_ErrorCode.NET_ERROR_DESERIALIZE_ERROR,"Failed to deserialize data"},
            {EM_ErrorCode.NET_ERROR_LOWRATEWPAN_ID_EXISTED,"the wireless id is already existed"},
            {EM_ErrorCode.NET_ERROR_LOWRATEWPAN_ID_LIMIT,"the wireless id limited"},
            {EM_ErrorCode.NET_ERROR_LOWRATEWPAN_ID_ABNORMAL,"add the wireless id abnormaly"},
            {EM_ErrorCode.NET_ERROR_ENCRYPT, "encrypt data fail"},
            {EM_ErrorCode.NET_ERROR_PWD_ILLEGAL, "new password illegal"},
            {EM_ErrorCode.NET_ERROR_DEVICE_ALREADY_INIT, "device is already init"},
            {EM_ErrorCode.NET_ERROR_SECURITY_CODE, "security code check out fail"},
            {EM_ErrorCode.NET_ERROR_SECURITY_CODE_TIMEOUT, "security code out of time"},
            {EM_ErrorCode.NET_ERROR_GET_PWD_SPECI, "get passwd specification fail"},
            {EM_ErrorCode.NET_ERROR_NO_AUTHORITY_OF_OPERATION, "no authority of operation"},
            {EM_ErrorCode.NET_ERROR_DECRYPT, "decrypt data fail"},
            {EM_ErrorCode.NET_ERROR_2D_CODE, "2D code check out fail"},
            {EM_ErrorCode.NET_ERROR_INVALID_REQUEST, "invalid request"},
            {EM_ErrorCode.NET_ERROR_PWD_RESET_DISABLE, "pwd reset disabled"},
            {EM_ErrorCode.NET_ERROR_PLAY_PRIVATE_DATA, "failed to display private data,such as rule box"},
            {EM_ErrorCode.NET_ERROR_ROBOT_OPERATE_FAILED, "robot operate failed"},
            {EM_ErrorCode.NET_ERROR_CHANNEL_ALREADY_OPENED, "channel has already been opened"},
            {EM_ErrorCode.ERR_INTERNAL_INVALID_CHANNEL,"invaild channel"},
            {EM_ErrorCode.ERR_INTERNAL_REOPEN_CHANNEL,"reopen channel failed"},
            {EM_ErrorCode.ERR_INTERNAL_SEND_DATA,"send data failed"},
            {EM_ErrorCode.ERR_INTERNAL_CREATE_SOCKET,"create socket failed"},
            {EM_ErrorCode.ERR_INTERNAL_LISTEN_FAILED,"Start listen failed"},
            {EM_ErrorCode.NET_ERROR_FACE_RECOGNITION_SERVER_GROUP_ID_EXCEED, "Target recognition server group id exceed " },
            {EM_ErrorCode.ERR_NOT_SUPPORT_HIGHLEVEL_SECURITY_LOGIN, "device not support high level security login" },
            {EM_ErrorCode.NET_ERROR_PHOTOSIZE_EXCEEDSLIMIT, "photosize exceeds limit"},
            {EM_ErrorCode.NET_ERROR_USERID_INVALID, "userid invalid"},
            {EM_ErrorCode.NET_ERROR_EXTRACTFEATURE_FAILED, "photo extract feature failed"},
            {EM_ErrorCode.NET_ERROR_PHOTO_EXIST, "photo exist"},
            {EM_ErrorCode.NET_ERROR_PHOTO_OVERFLOW, "photo over flow"},
            {EM_ErrorCode.NET_ERROR_PHOTO_FORMAT, "photo format error"},
            {EM_ErrorCode.NET_ERROR_INVALID_PARAM, "invalid param"},
            {EM_ErrorCode.NET_ERROR_INVALID_PASSWORD, "invalid password"},
            {EM_ErrorCode.NET_ERROR_INVALID_FINGERPRINT, "invalid infomation"},
            {EM_ErrorCode.NET_ERROR_INVALID_FACE, "invalid target"},
            {EM_ErrorCode.NET_ERROR_INVALID_CARD, "invalid card"},
            {EM_ErrorCode.NET_ERROR_INVALID_USER, "invalid user"},
            {EM_ErrorCode.NET_ERROR_GET_SUBSERVICE, "device get sub service fail"},
            {EM_ErrorCode.NET_ERROR_GET_METHOD, "device get method fail"},
            {EM_ErrorCode.NET_ERROR_GET_SUBCAPS, "device get sub caps fail"},
            {EM_ErrorCode.NET_ERROR_UPTO_INSERT_LIMIT, "up to insert limit"},
            {EM_ErrorCode.NET_ERROR_UPTO_MAX_INSERT_RATE, "up tp max insert rate"},
            {EM_ErrorCode.NET_ERROR_ERASE_FINGERPRINT, "erase infomation data fail"},
            {EM_ErrorCode.NET_ERROR_ERASE_FACE, "erase target data fail"},
            {EM_ErrorCode.NET_ERROR_ERASE_CARD, "erase card data fail"},
            {EM_ErrorCode.NET_ERROR_NO_RECORD, "no record"},
            {EM_ErrorCode.NET_ERROR_NOMORE_RECORDS, "no more records"},
            {EM_ErrorCode.NET_ERROR_RECORD_ALREADY_EXISTS, "record already exist"},
            {EM_ErrorCode.NET_ERROR_EXCEED_MAX_FINGERPRINT_PERUSER, "exceed max infomation per user"},
            {EM_ErrorCode.NET_ERROR_EXCEED_MAX_CARD_PERUSER, "exceed max card per user"},
            {EM_ErrorCode.NET_ERROR_EXCEED_ADMINISTRATOR_LIMIT, "exceed administrator limit"},
            {EM_ErrorCode.NET_ERROR_CARD_NUM_EXIST, "card num already exist"},
            {EM_ErrorCode.NET_ERROR_FINGERPRINT_EXIST, "infomation already exist"},
            {EM_ErrorCode.NET_ERROR_FINGERPRINT_DOWNLOAD_FAIL, "information Download Fail"},
            {EM_ErrorCode.NET_ERROR_DOOR_IN_NORMALLY_OPEN_STATUS, "The door is in a normally open status"},
            {EM_ErrorCode.NET_ERROR_DOOR_IN_NORMALLY_CLOSED_STATUS, "The door is in a normally closed status"},
            {EM_ErrorCode.NET_ERROR_DOOR_IN_INTERLOCK_STATUS, "The door is in an interlocking status"},
            {EM_ErrorCode.NET_ERROR_DO_NOT_EDIT, "Data Do Not Edit"},
            {EM_ErrorCode.NET_ERROR_BINDING, "Data bound"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_FEATURE_SIZE_ERROR, "The security code has exceeded its validity period"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_NO_FACE_DETECTED, "No target detected"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_MULTI_FACE_DETECTED, "Multi target detected, Can not extract eigenvalues"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_PICTURE_DECODING_ERROR, "Picture decoding error"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_LOW_PICTURE_QUALITY, "The picture quality is too low"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_NOT_RECOMMENDED, "Not recommended"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_FACE_FEATURE_ALREADY_EXIST, "target eigenvalue already exist"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_FACE_ANGLE_OVER_THRESHOLDS, "target angle over thresholds"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_FACE_RADIO_EXCEEDS_RANGE, "target radio exceeds range"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_FACE_OVER_EXPOSED, "target over exposed"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_FACE_UNDER_EXPOSED, "target under exposed"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_BRIGHTNESS_IMBALANCE, "target brightness imbalance"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_FACE_LOWER_CONFIDENCE, "target lower confidence level"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_FACE_LOW_ALIGN, "target low align score"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_FRAGMENTARY_FACE_DETECTED, "Fragmentary target detected"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_PUPIL_DISTANCE_NOT_ENOUGH, "Pupil distance in the photo is not enough"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_FACE_DATA_DOWNLOAD_FAILED, "target download failed"},
            {EM_ErrorCode.NET_ERROR_NORMAL_USER_NOTSUPPORT, "Ordinary users do not support delivery"},
            {EM_ErrorCode.NET_ERROR_CITIZENID_EXIST, "ID is already exist"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_FACE_FFE_FAILED, "The target can be detected"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_PHOTO_FEATURE_FAILED_FOR_FA, "The feature value extracted from the target photo is incorrect due to the inconsistency of target attributes such as masks, hats, sunglasses, etc."},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_FACE_DATA_PHOTO_INCOMPLETE, "Incomplete target photo"}
        };
 
        /// <summary>
        /// zh-cn language
        /// 中文错误码对应的错误信息
        /// </summary>
        private static Dictionary<EM_ErrorCode, string> zh_cn_String = new Dictionary<EM_ErrorCode, string>()
        {
            {EM_ErrorCode.NET_NOERROR,"没有错误"},
            {EM_ErrorCode.NET_ERROR,"未知错误"},
            {EM_ErrorCode.NET_SYSTEM_ERROR,"Windows系统出错"},
            {EM_ErrorCode.NET_NETWORK_ERROR,"网络错误,可能是因为网络超时"},
            {EM_ErrorCode.NET_DEV_VER_NOMATCH,"设备协议不匹配"},
            {EM_ErrorCode.NET_INVALID_HANDLE,"句柄无效"},
            {EM_ErrorCode.NET_OPEN_CHANNEL_ERROR,"打开通道失败"},
            {EM_ErrorCode.NET_CLOSE_CHANNEL_ERROR,"关闭通道失败"},
            {EM_ErrorCode.NET_ILLEGAL_PARAM,"用户参数不合法"},
            {EM_ErrorCode.NET_SDK_INIT_ERROR,"SDK初始化出错"},
            {EM_ErrorCode.NET_SDK_UNINIT_ERROR,"SDK清理出错"},
            {EM_ErrorCode.NET_RENDER_OPEN_ERROR,"申请render资源出错"},
            {EM_ErrorCode.NET_DEC_OPEN_ERROR,"打开解码库出错"},
            {EM_ErrorCode.NET_DEC_CLOSE_ERROR,"关闭解码库出错"},
            {EM_ErrorCode.NET_MULTIPLAY_NOCHANNEL,"多画面预览中检测到通道数为0"},
            {EM_ErrorCode.NET_TALK_INIT_ERROR,"录音库初始化失败"},
            {EM_ErrorCode.NET_TALK_NOT_INIT,"录音库未经初始化"},
            {EM_ErrorCode.NET_TALK_SENDDATA_ERROR,"发送音频数据出错"},
            {EM_ErrorCode.NET_REAL_ALREADY_SAVING,"实时数据已经处于保存状态"},
            {EM_ErrorCode.NET_NOT_SAVING,"未保存实时数据"},
            {EM_ErrorCode.NET_OPEN_FILE_ERROR,"打开文件出错"},
            {EM_ErrorCode.NET_PTZ_SET_TIMER_ERROR,"启动云台控制定时器失败"},
            {EM_ErrorCode.NET_RETURN_DATA_ERROR,"对返回数据的校验出错"},
            {EM_ErrorCode.NET_INSUFFICIENT_BUFFER,"没有足够的缓存"},
            {EM_ErrorCode.NET_NOT_SUPPORTED,"当前SDK未支持该功能"},
            {EM_ErrorCode.NET_NO_RECORD_FOUND,"查询不到录象"},
            {EM_ErrorCode.NET_NOT_AUTHORIZED,"无操作权限"},
            {EM_ErrorCode.NET_NOT_NOW,"暂时无法执行"},
            {EM_ErrorCode.NET_NO_TALK_CHANNEL,"未发现对讲通道"},
            {EM_ErrorCode.NET_NO_AUDIO,"未发现音频"},
            {EM_ErrorCode.NET_NO_INIT,"网络SDK未经初始化"},
            {EM_ErrorCode.NET_DOWNLOAD_END,"下载已结束"},
            {EM_ErrorCode.NET_EMPTY_LIST,"查询结果为空"},
            {EM_ErrorCode.NET_ERROR_GETCFG_SYSATTR,"获取系统属性配置失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_SERIAL,"获取序列号失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_GENERAL,"获取常规属性失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_DSPCAP,"获取DSP能力描述失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_NETCFG,"获取网络配置失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_CHANNAME,"获取通道名称失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_VIDEO,"获取视频属性失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_RECORD,"获取录象配置失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_PRONAME,"获取解码器协议名称失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_FUNCNAME,"获取232串口功能名称失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_485DECODER,"获取解码器属性失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_232COM,"获取232串口配置失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_ALARMIN,"获取外部报警输入配置失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_ALARMDET,"获取动态检测报警失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_SYSTIME,"获取设备时间失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_PREVIEW,"获取预览参数失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_AUTOMT,"获取自动维护配置失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_VIDEOMTRX,"获取视频矩阵配置失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_COVER,"获取区域遮挡配置失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_WATERMAKE,"获取图象水印配置失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_MULTICAST,"获取配置失败位置:组播端口按通道配置"},
            {EM_ErrorCode.NET_ERROR_SETCFG_GENERAL,"修改常规属性失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_NETCFG,"修改网络配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_CHANNAME,"修改通道名称失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_VIDEO,"修改视频属性失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_RECORD,"修改录象配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_485DECODER,"修改解码器属性失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_232COM,"修改232串口配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_ALARMIN,"修改外部输入报警配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_ALARMDET,"修改动态检测报警配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_SYSTIME,"修改设备时间失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_PREVIEW,"修改预览参数失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_AUTOMT,"修改自动维护配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_VIDEOMTRX,"修改视频矩阵配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_COVER,"修改区域遮挡配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_WATERMAKE,"修改图象水印配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_WLAN,"修改无线网络信息失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_WLANDEV,"选择无线网络设备失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_REGISTER,"修改主动注册参数配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_CAMERA,"修改摄像头属性配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_INFRARED,"修改红外报警配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_SOUNDALARM,"修改音频报警配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_STORAGE,"修改存储位置配置失败"},
            {EM_ErrorCode.NET_AUDIOENCODE_NOTINIT,"音频编码接口没有成功初始化"},
            {EM_ErrorCode.NET_DATA_TOOLONGH,"数据过长"},
            {EM_ErrorCode.NET_UNSUPPORTED,"设备不支持该操作"},
            {EM_ErrorCode.NET_DEVICE_BUSY,"设备资源不足"},
            {EM_ErrorCode.NET_SERVER_STARTED,"服务器已经启动"},
            {EM_ErrorCode.NET_SERVER_STOPPED,"服务器尚未成功启动"},
            {EM_ErrorCode.NET_LISTER_INCORRECT_SERIAL,"输入序列号有误"},
            {EM_ErrorCode.NET_QUERY_DISKINFO_FAILED,"获取硬盘信息失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_SESSION,"获取连接Session信息"},
            {EM_ErrorCode.NET_USER_FLASEPWD_TRYTIME,"输入密码错误超过限制次数"},
            {EM_ErrorCode.NET_LOGIN_ERROR_PASSWORD,"密码不正确"},
            {EM_ErrorCode.NET_LOGIN_ERROR_USER,"帐户不存在"},
            {EM_ErrorCode.NET_LOGIN_ERROR_TIMEOUT,"等待登录返回超时"},
            {EM_ErrorCode.NET_LOGIN_ERROR_RELOGGIN,"帐号已登录"},
            {EM_ErrorCode.NET_LOGIN_ERROR_LOCKED,"帐号已被锁定"},
            {EM_ErrorCode.NET_LOGIN_ERROR_BLACKLIST,"帐号已被列为禁用名单"},
            {EM_ErrorCode.NET_LOGIN_ERROR_BUSY,"资源不足,系统忙"},
            {EM_ErrorCode.NET_LOGIN_ERROR_CONNECT,"登录设备超时,请检查网络并重试"},
            {EM_ErrorCode.NET_LOGIN_ERROR_NETWORK,"网络连接失败"},
            {EM_ErrorCode.NET_LOGIN_ERROR_SUBCONNECT,"登录设备成功,但无法创建视频通道,请检查网络状况"},
            {EM_ErrorCode.NET_LOGIN_ERROR_MAXCONNECT,"超过最大连接数"},
            {EM_ErrorCode.NET_LOGIN_ERROR_PROTOCOL3_ONLY,"只支持3代协议"},
            {EM_ErrorCode.NET_LOGIN_ERROR_UKEY_LOST,"未插入U盾或U盾信息错误"},
            {EM_ErrorCode.NET_LOGIN_ERROR_NO_AUTHORIZED,"客户端IP地址没有登录权限"},
            {EM_ErrorCode.NET_LOGIN_ERROR_USER_OR_PASSOWRD,"账号或密码错误"},
            {EM_ErrorCode.NET_RENDER_SOUND_ON_ERROR,"Render库打开音频出错"},
            {EM_ErrorCode.NET_RENDER_SOUND_OFF_ERROR,"Render库关闭音频出错"},
            {EM_ErrorCode.NET_RENDER_SET_VOLUME_ERROR,"Render库控制音量出错"},
            {EM_ErrorCode.NET_RENDER_ADJUST_ERROR,"Render库设置画面参数出错"},
            {EM_ErrorCode.NET_RENDER_PAUSE_ERROR,"Render库暂停播放出错"},
            {EM_ErrorCode.NET_RENDER_SNAP_ERROR,"Render库抓图出错"},
            {EM_ErrorCode.NET_RENDER_STEP_ERROR,"Render库步进出错"},
            {EM_ErrorCode.NET_RENDER_FRAMERATE_ERROR,"Render库设置帧率出错"},
            {EM_ErrorCode.NET_RENDER_DISPLAYREGION_ERROR,"Render库设置显示区域出错"},
            {EM_ErrorCode.NET_RENDER_GETOSDTIME_ERROR,"Render库获取当前播放时间出错"},
            {EM_ErrorCode.NET_GROUP_EXIST,"组名已存在"},
            {EM_ErrorCode.NET_GROUP_NOEXIST,"组名不存在"},
            {EM_ErrorCode.NET_GROUP_RIGHTOVER,"组的权限超出权限列表范围"},
            {EM_ErrorCode.NET_GROUP_HAVEUSER,"组下有用户,不能删除"},
            {EM_ErrorCode.NET_GROUP_RIGHTUSE,"组的某个权限被用户使用,不能出除"},
            {EM_ErrorCode.NET_GROUP_SAMENAME,"新组名同已有组名重复"},
            {EM_ErrorCode.NET_USER_EXIST,"用户已存在"},
            {EM_ErrorCode.NET_USER_NOEXIST,"用户不存在"},
            {EM_ErrorCode.NET_USER_RIGHTOVER,"用户权限超出组权限"},
            {EM_ErrorCode.NET_USER_PWD,"保留帐号,不容许修改密码"},
            {EM_ErrorCode.NET_USER_FLASEPWD,"密码不正确"},
            {EM_ErrorCode.NET_USER_NOMATCHING,"密码不匹配"},
            {EM_ErrorCode.NET_USER_INUSE,"账号正在使用中"},
            {EM_ErrorCode.NET_ERROR_GETCFG_ETHERNET,"获取网卡配置失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_WLAN,"获取无线网络信息失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_WLANDEV,"获取无线网络设备失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_REGISTER,"获取主动注册参数失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_CAMERA,"获取摄像头属性失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_INFRARED,"获取红外报警配置失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_SOUNDALARM,"获取音频报警配置失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_STORAGE,"获取存储位置配置失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_MAIL,"获取邮件配置失败"},
            {EM_ErrorCode.NET_CONFIG_DEVBUSY,"暂时无法设置"},
            {EM_ErrorCode.NET_CONFIG_DATAILLEGAL,"配置数据不合法"},
            {EM_ErrorCode.NET_ERROR_GETCFG_DST,"获取夏令时配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_DST,"设置夏令时配置失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_VIDEO_OSD,"获取视频OSD叠加配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_VIDEO_OSD,"设置视频OSD叠加配置失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_GPRSCDMA,"获取CDMA\\GPRS网络配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_GPRSCDMA,"设置CDMA\\GPRS网络配置失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_IPFILTER,"获取IP过滤配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_IPFILTER,"设置IP过滤配置失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_TALKENCODE,"获取语音对讲编码配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_TALKENCODE,"设置语音对讲编码配置失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_RECORDLEN,"获取录像打包长度配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_RECORDLEN,"设置录像打包长度配置失败"},
            {EM_ErrorCode.NET_DONT_SUPPORT_SUBAREA,"不支持网络硬盘分区"},
            {EM_ErrorCode.NET_ERROR_GET_AUTOREGSERVER,"获取设备上主动注册服务器信息失败"},
            {EM_ErrorCode.NET_ERROR_CONTROL_AUTOREGISTER,"主动注册重定向注册错误"},
            {EM_ErrorCode.NET_ERROR_DISCONNECT_AUTOREGISTER,"断开主动注册服务器错误"},
            {EM_ErrorCode.NET_ERROR_GETCFG_MMS,"获取mms配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_MMS,"设置mms配置失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_SMSACTIVATION,"获取短信激活无线连接配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_SMSACTIVATION,"设置短信激活无线连接配置失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_DIALINACTIVATION,"获取拨号激活无线连接配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_DIALINACTIVATION,"设置拨号激活无线连接配置失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_VIDEOOUT,"查询视频输出参数配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_VIDEOOUT,"设置视频输出参数配置失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_OSDENABLE,"获取osd叠加使能配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_OSDENABLE,"设置osd叠加使能配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_ENCODERINFO,"设置数字通道前端编码接入配置失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_TVADJUST,"获取TV调节配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_TVADJUST,"设置TV调节配置失败"},
            {EM_ErrorCode.NET_ERROR_CONNECT_FAILED,"请求建立连接失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_BURNFILE,"请求刻录文件上传失败"},
            {EM_ErrorCode.NET_ERROR_SNIFFER_GETCFG,"获取抓包配置信息失败"},
            {EM_ErrorCode.NET_ERROR_SNIFFER_SETCFG,"设置抓包配置信息失败"},
            {EM_ErrorCode.NET_ERROR_DOWNLOADRATE_GETCFG,"查询下载限制信息失败"},
            {EM_ErrorCode.NET_ERROR_DOWNLOADRATE_SETCFG,"设置下载限制信息失败"},
            {EM_ErrorCode.NET_ERROR_SEARCH_TRANSCOM,"查询串口参数失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_POINT,"获取预制点信息错误"},
            {EM_ErrorCode.NET_ERROR_SETCFG_POINT,"设置预制点信息错误"},
            {EM_ErrorCode.NET_SDK_LOGOUT_ERROR,"SDK没有正常登出设备"},
            {EM_ErrorCode.NET_ERROR_GET_VEHICLE_CFG,"获取车载配置失败"},
            {EM_ErrorCode.NET_ERROR_SET_VEHICLE_CFG,"设置车载配置失败"},
            {EM_ErrorCode.NET_ERROR_GET_ATM_OVERLAY_CFG,"获取atm叠加配置失败"},
            {EM_ErrorCode.NET_ERROR_SET_ATM_OVERLAY_CFG,"设置atm叠加配置失败"},
            {EM_ErrorCode.NET_ERROR_GET_ATM_OVERLAY_ABILITY,"获取atm叠加能力失败"},
            {EM_ErrorCode.NET_ERROR_GET_DECODER_TOUR_CFG,"获取解码器解码轮巡配置失败"},
            {EM_ErrorCode.NET_ERROR_SET_DECODER_TOUR_CFG,"设置解码器解码轮巡配置失败"},
            {EM_ErrorCode.NET_ERROR_CTRL_DECODER_TOUR,"控制解码器解码轮巡失败"},
            {EM_ErrorCode.NET_GROUP_OVERSUPPORTNUM,"超出设备支持最大用户组数目"},
            {EM_ErrorCode.NET_USER_OVERSUPPORTNUM,"超出设备支持最大用户数目"},
            {EM_ErrorCode.NET_ERROR_GET_SIP_CFG,"获取SIP配置失败"},
            {EM_ErrorCode.NET_ERROR_SET_SIP_CFG,"设置SIP配置失败"},
            {EM_ErrorCode.NET_ERROR_GET_SIP_ABILITY,"获取SIP能力失败"},
            {EM_ErrorCode.NET_ERROR_GET_WIFI_AP_CFG,"获取WIFI ap配置失败"},
            {EM_ErrorCode.NET_ERROR_SET_WIFI_AP_CFG,"设置WIFI ap配置失败"},
            {EM_ErrorCode.NET_ERROR_GET_DECODE_POLICY,"获取解码策略配置失败"},
            {EM_ErrorCode.NET_ERROR_SET_DECODE_POLICY,"设置解码策略配置失败"},
            {EM_ErrorCode.NET_ERROR_TALK_REJECT,"拒绝对讲"},
            {EM_ErrorCode.NET_ERROR_TALK_OPENED,"对讲被其他客户端打开"},
            {EM_ErrorCode.NET_ERROR_TALK_RESOURCE_CONFLICIT,"资源冲突"},
            {EM_ErrorCode.NET_ERROR_TALK_UNSUPPORTED_ENCODE,"不支持的语音编码格式"},
            {EM_ErrorCode.NET_ERROR_TALK_RIGHTLESS,"无权限"},
            {EM_ErrorCode.NET_ERROR_TALK_FAILED,"请求对讲失败"},
            {EM_ErrorCode.NET_ERROR_GET_MACHINE_CFG,"获取机器相关配置失败"},
            {EM_ErrorCode.NET_ERROR_SET_MACHINE_CFG,"设置机器相关配置失败"},
            {EM_ErrorCode.NET_ERROR_GET_DATA_FAILED,"设备无法获取当前请求数据"},
            {EM_ErrorCode.NET_ERROR_MAC_VALIDATE_FAILED,"MAC地址验证失败 "},
            {EM_ErrorCode.NET_ERROR_GET_INSTANCE,"获取服务器实例失败"},
            {EM_ErrorCode.NET_ERROR_JSON_REQUEST,"生成的jason字符串错误"},
            {EM_ErrorCode.NET_ERROR_JSON_RESPONSE,"响应的jason字符串错误"},
            {EM_ErrorCode.NET_ERROR_VERSION_HIGHER,"协议版本低于当前使用的版本"},
            {EM_ErrorCode.NET_SPARE_NO_CAPACITY,"热备操作失败, 容量不足"},
            {EM_ErrorCode.NET_ERROR_SOURCE_IN_USE,"显示源被其他输出占用"},
            {EM_ErrorCode.NET_ERROR_REAVE,"高级用户抢占低级用户资源"},
            {EM_ErrorCode.NET_ERROR_NETFORBID,"禁止入网 "},
            {EM_ErrorCode.NET_ERROR_GETCFG_MACFILTER,"获取MAC过滤配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_MACFILTER,"设置MAC过滤配置失败"},
            {EM_ErrorCode.NET_ERROR_GETCFG_IPMACFILTER,"获取IP/MAC过滤配置失败"},
            {EM_ErrorCode.NET_ERROR_SETCFG_IPMACFILTER,"设置IP/MAC过滤配置失败"},
            {EM_ErrorCode.NET_ERROR_OPERATION_OVERTIME,"当前操作超时 "},
            {EM_ErrorCode.NET_ERROR_SENIOR_VALIDATE_FAILED,"高级校验失败"},
            {EM_ErrorCode.NET_ERROR_DEVICE_ID_NOT_EXIST,"设备ID不存在"},
            {EM_ErrorCode.NET_ERROR_UNSUPPORTED,"不支持当前操作"},
            {EM_ErrorCode.NET_ERROR_PROXY_DLLLOAD,"代理库加载失败"},
            {EM_ErrorCode.NET_ERROR_PROXY_ILLEGAL_PARAM,"代理用户参数不合法"},
            {EM_ErrorCode.NET_ERROR_PROXY_INVALID_HANDLE,"代理句柄无效"},
            {EM_ErrorCode.NET_ERROR_PROXY_LOGIN_DEVICE_ERROR,"代理登入前端设备失败"},
            {EM_ErrorCode.NET_ERROR_PROXY_START_SERVER_ERROR,"启动代理服务失败"},
            {EM_ErrorCode.NET_ERROR_SPEAK_FAILED,"请求喊话失败"},
            {EM_ErrorCode.NET_ERROR_NOT_SUPPORT_F6,"设备不支持此F6接口调用"},
            {EM_ErrorCode.NET_ERROR_CD_UNREADY,"光盘未就绪"},
            {EM_ErrorCode.NET_ERROR_DIR_NOT_EXIST,"目录不存在"},
            {EM_ErrorCode.NET_ERROR_UNSUPPORTED_SPLIT_MODE,"设备不支持的分割模式"},
            {EM_ErrorCode.NET_ERROR_OPEN_WND_PARAM,"开窗参数不合法"},
            {EM_ErrorCode.NET_ERROR_LIMITED_WND_COUNT,"开窗数量超过限制"},
            {EM_ErrorCode.NET_ERROR_UNMATCHED_REQUEST,"请求命令与当前模式不匹配"},
            {EM_ErrorCode.NET_RENDER_ENABLELARGEPICADJUSTMENT_ERROR,"Render库启用高清图像内部调整策略出错"},
            {EM_ErrorCode.NET_ERROR_UPGRADE_FAILED,"设备升级失败"},
            {EM_ErrorCode.NET_ERROR_NO_TARGET_DEVICE,"找不到目标设备"},
            {EM_ErrorCode.NET_ERROR_NO_VERIFY_DEVICE,"找不到验证设备"},
            {EM_ErrorCode.NET_ERROR_CASCADE_RIGHTLESS,"无级联权限"},
            {EM_ErrorCode.NET_ERROR_LOW_PRIORITY,"低优先级"},
            {EM_ErrorCode.NET_ERROR_REMOTE_REQUEST_TIMEOUT,"远程设备请求超时"},
            {EM_ErrorCode.NET_ERROR_LIMITED_INPUT_SOURCE,"输入源超出最大路数限制"},
            {EM_ErrorCode.NET_ERROR_SET_LOG_PRINT_INFO,"设置日志打印失败"},
            {EM_ErrorCode.NET_ERROR_PARAM_DWSIZE_ERROR,"入参的dwsize字段出错"},
            {EM_ErrorCode.NET_ERROR_LIMITED_MONITORWALL_COUNT,"电视墙数量超过上限"},
            {EM_ErrorCode.NET_ERROR_PART_PROCESS_FAILED,"部分过程执行失败"},
            {EM_ErrorCode.NET_ERROR_TARGET_NOT_SUPPORT,"该功能不支持转发"},
            {EM_ErrorCode.NET_ERROR_VISITE_FILE,"访问文件失败"},
            {EM_ErrorCode.NET_ERROR_DEVICE_STATUS_BUSY,"设备忙"},
            {EM_ErrorCode.NET_USER_PWD_NOT_AUTHORIZED,"修改密码无权限"},
            {EM_ErrorCode.NET_USER_PWD_NOT_STRONG,"密码强度不够"},
            {EM_ErrorCode.NET_ERROR_NO_SUCH_CONFIG,"没有对应的配置"},
            {EM_ErrorCode.NET_ERROR_AUDIO_RECORD_FAILED,"录音失败"},
            {EM_ErrorCode.NET_ERROR_SEND_DATA_FAILED,"数据发送失败"},
            {EM_ErrorCode.NET_ERROR_OBSOLESCENT_INTERFACE,"废弃接口"},
            {EM_ErrorCode.NET_ERROR_INSUFFICIENT_INTERAL_BUF,"内部缓冲不足"},
            {EM_ErrorCode.NET_ERROR_NEED_ENCRYPTION_PASSWORD,"修改设备ip时,需要校验密码"},
            {EM_ErrorCode.NET_ERROR_NOSUPPORT_RECORD,"设备不支持此记录集"},
            {EM_ErrorCode.NET_ERROR_SERIALIZE_ERROR,"数据序列化错误"},
            {EM_ErrorCode.NET_ERROR_DESERIALIZE_ERROR,"数据反序列化错误"},
            {EM_ErrorCode.NET_ERROR_LOWRATEWPAN_ID_EXISTED,"该无线ID已存在"},
            {EM_ErrorCode.NET_ERROR_LOWRATEWPAN_ID_LIMIT,"无线ID数量已超限"},
            {EM_ErrorCode.NET_ERROR_LOWRATEWPAN_ID_ABNORMAL,"无线异常添加"},
            {EM_ErrorCode.NET_ERROR_ENCRYPT, "加密数据失败"},
            {EM_ErrorCode.NET_ERROR_PWD_ILLEGAL, "新密码不合规范"},
            {EM_ErrorCode.NET_ERROR_DEVICE_ALREADY_INIT, "设备已经初始化"},
            {EM_ErrorCode.NET_ERROR_SECURITY_CODE, "安全码错误"},
            {EM_ErrorCode.NET_ERROR_SECURITY_CODE_TIMEOUT, "安全码超出有效期"},
            {EM_ErrorCode.NET_ERROR_GET_PWD_SPECI, "获取密码规范失败"},
            {EM_ErrorCode.NET_ERROR_NO_AUTHORITY_OF_OPERATION, "无权限进行该操作"},
            {EM_ErrorCode.NET_ERROR_DECRYPT, "解密数据失败"},
            {EM_ErrorCode.NET_ERROR_2D_CODE, "2D code校验失败"},
            {EM_ErrorCode.NET_ERROR_INVALID_REQUEST, "非法的RPC请求"},
            {EM_ErrorCode.NET_ERROR_PWD_RESET_DISABLE, "密码重置功能已关闭"},
            {EM_ErrorCode.NET_ERROR_PLAY_PRIVATE_DATA, "显示私有数据,比如规则框等失败"},
            {EM_ErrorCode.NET_ERROR_ROBOT_OPERATE_FAILED, "机器人操作失败"},
            {EM_ErrorCode.NET_ERROR_CHANNEL_ALREADY_OPENED, "通道已经打开"},
 
            {EM_ErrorCode.ERR_INTERNAL_INVALID_CHANNEL,"错误的通道号"},
            {EM_ErrorCode.ERR_INTERNAL_REOPEN_CHANNEL,"打开重复通道"},
            {EM_ErrorCode.ERR_INTERNAL_SEND_DATA,"发送消息失败"},
            {EM_ErrorCode.ERR_INTERNAL_CREATE_SOCKET,"创建socket失败"},
            {EM_ErrorCode.ERR_INTERNAL_LISTEN_FAILED,"启动监听失败"},
            {EM_ErrorCode.NET_ERROR_FACE_RECOGNITION_SERVER_GROUP_ID_EXCEED, "组ID超过最大值" },
            {EM_ErrorCode.ERR_NOT_SUPPORT_HIGHLEVEL_SECURITY_LOGIN, "设备不支持高安全等级登录" },
            {EM_ErrorCode.NET_ERROR_PHOTOSIZE_EXCEEDSLIMIT, "图片大小超限"},
            {EM_ErrorCode.NET_ERROR_USERID_INVALID, "用户ID不存在"},
            {EM_ErrorCode.NET_ERROR_EXTRACTFEATURE_FAILED, "照片特征值提取失败"},
            {EM_ErrorCode.NET_ERROR_PHOTO_EXIST, "照片已存在"},
            {EM_ErrorCode.NET_ERROR_PHOTO_OVERFLOW, "照片数量超过上限"},
            {EM_ErrorCode.NET_ERROR_PHOTO_FORMAT, "图片格式错误"},
            {EM_ErrorCode.NET_ERROR_INVALID_PARAM, "参数无效"},
            {EM_ErrorCode.NET_ERROR_INVALID_PASSWORD, "密码无效"},
            {EM_ErrorCode.NET_ERROR_INVALID_FINGERPRINT, "信息无效"},
            {EM_ErrorCode.NET_ERROR_INVALID_FACE, "目标无效"},
            {EM_ErrorCode.NET_ERROR_INVALID_CARD, "卡无效"},
            {EM_ErrorCode.NET_ERROR_INVALID_USER, "用户无效"},
            {EM_ErrorCode.NET_ERROR_GET_SUBSERVICE, "能力集子服务获取失败"},
            {EM_ErrorCode.NET_ERROR_GET_METHOD, "获取组件的方法集失败"},
            {EM_ErrorCode.NET_ERROR_GET_SUBCAPS, "获取资源实体能力集失败"},
            {EM_ErrorCode.NET_ERROR_UPTO_INSERT_LIMIT, "已达插入上限"},
            {EM_ErrorCode.NET_ERROR_UPTO_MAX_INSERT_RATE, "已达最大插入速度"},
            {EM_ErrorCode.NET_ERROR_ERASE_FINGERPRINT, "清除信息数据失败"},
            {EM_ErrorCode.NET_ERROR_ERASE_FACE, "清除目标数据失败"},
            {EM_ErrorCode.NET_ERROR_ERASE_CARD, "清除卡数据失败"},
            {EM_ErrorCode.NET_ERROR_NO_RECORD, "没有记录"},
            {EM_ErrorCode.NET_ERROR_NOMORE_RECORDS, "查找到最后,没有更多记录"},
            {EM_ErrorCode.NET_ERROR_RECORD_ALREADY_EXISTS, "下发卡或信息时,数据重复"},
            {EM_ErrorCode.NET_ERROR_EXCEED_MAX_FINGERPRINT_PERUSER, "超过个人最大信息记录数"},
            {EM_ErrorCode.NET_ERROR_EXCEED_MAX_CARD_PERUSER, "超过个人最大卡片记录数"},
            {EM_ErrorCode.NET_ERROR_EXCEED_ADMINISTRATOR_LIMIT, "超过门禁管理员个数限制"},
            {EM_ErrorCode.NET_ERROR_CARD_NUM_EXIST, "卡号已存在"},
            {EM_ErrorCode.NET_ERROR_FINGERPRINT_EXIST, "信息已存在"},
            {EM_ErrorCode.NET_ERROR_FINGERPRINT_DOWNLOAD_FAIL, "信息通过URL下载方式下载失败"},
            {EM_ErrorCode.NET_ERROR_DOOR_IN_NORMALLY_OPEN_STATUS, "门处于常开状态"},
            {EM_ErrorCode.NET_ERROR_DOOR_IN_NORMALLY_CLOSED_STATUS, "门处于常闭状态"},
            {EM_ErrorCode.NET_ERROR_DOOR_IN_INTERLOCK_STATUS, "门处于互锁状态"},
            {EM_ErrorCode.NET_ERROR_DO_NOT_EDIT, "数据不允许编辑"},
            {EM_ErrorCode.NET_ERROR_BINDING, "数据被绑定"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_FEATURE_SIZE_ERROR, "特征值长度错误"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_NO_FACE_DETECTED, "图片中检测到0个目标"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_MULTI_FACE_DETECTED, "图片中检测到多个目标,无法返回特征"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_PICTURE_DECODING_ERROR, "图片解码错误"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_LOW_PICTURE_QUALITY, "图片质量太低"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_NOT_RECOMMENDED, "结果不推荐使用"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_FACE_FEATURE_ALREADY_EXIST, "目标特征已存在"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_FACE_ANGLE_OVER_THRESHOLDS, "目标角度超过配置阈值"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_FACE_RADIO_EXCEEDS_RANGE, "目标占比超出范围"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_FACE_OVER_EXPOSED, "目标过爆"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_FACE_UNDER_EXPOSED, "目标欠爆"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_BRIGHTNESS_IMBALANCE, "目标亮度不均衡"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_FACE_LOWER_CONFIDENCE, "目标的置信度低"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_FACE_LOW_ALIGN, "目标对齐分数低"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_FRAGMENTARY_FACE_DETECTED, "目标存在遮挡、残缺不全"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_PUPIL_DISTANCE_NOT_ENOUGH, "目标瞳距小于阈值"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_FACE_DATA_DOWNLOAD_FAILED, "目标数据下载失败"},
            {EM_ErrorCode.NET_ERROR_NORMAL_USER_NOTSUPPORT, "普通用户不支持下发"},
            {EM_ErrorCode.NET_ERROR_CITIZENID_EXIST, "证件号已存在"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_FACE_FFE_FAILED, "目标可检测,但特征值提取失败(算法场景)"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_PHOTO_FEATURE_FAILED_FOR_FA, "目标照片因口罩,帽子,墨镜等目标属性不符合而提取特征值错误"},
            {EM_ErrorCode.NET_ERROR_FACEMANAGER_FACE_DATA_PHOTO_INCOMPLETE, "目标照片不完整"}
        };
        #endregion //<< constant >>
        
 
        #region << C# SDK calls >>
 
        #region << init and login >>
 
        /// <summary>
        /// set throw error message
        /// 设置接口抛异常
        /// </summary>
        /// <param name="isThrow">throw expection or not 是否抛异常</param>
        public static void SetThrowErrorMessage(bool isThrow)
        {
            m_IsThrowErrorMessage = isThrow;
        }
 
        /// <summary>
        /// error code convert to error message 
        /// 错误码转成错误信息
        /// </summary>
        /// <param name="errorCode">SDK error code SDK错误码</param>
        /// <returns>error message description 错误信息描述</returns>
        private static string GetLastErrorMessage(EM_ErrorCode errorCode)
        {
            string result = string.Empty;
            switch (System.Globalization.CultureInfo.CurrentCulture.LCID)
            {
                case 0x00804:
                    zh_cn_String.TryGetValue(errorCode, out result);
                    break;
                default:
                    en_us_String.TryGetValue(errorCode, out result);
                    break;
            }
            if (null == result)
            {
                result = errorCode.ToString("X");
            }
            return result;
        }
 
        /// <summary>
        /// judge the SDK function is failed or successful
        /// 判断SDK接口函数调用是否成功
        /// </summary>
        /// <typeparam name="T">value type 接口函数返回值类型</typeparam>
        /// <param name="value">the value is SDK function returns value,the value must be value type 接口函数返回值</param>
        private static void NetGetLastError<T>(T value)
            where T : struct
        {
            object temp = value;
            bool isGetLastError = false;
            if (value is IntPtr)
            {
                IntPtr tempValue = (IntPtr)temp;
                if (IntPtr.Zero == tempValue)
                {
                    isGetLastError = true;
                }
            }
            else if (value is int)
            {
                int tempValue = (int)temp;
                if (0 > tempValue)
                {
                    isGetLastError = true;
                }
            }
            else if (value is bool)
            {
                bool tempValue = (bool)temp;
                if (false == tempValue)
                {
                    isGetLastError = true;
                }
            }
            else
            {
                return;
            }
            if (isGetLastError)
            {
                if (!m_IsThrowErrorMessage)
                {
                    return;
                }
                int error = OriginalSDK.CLIENT_GetLastError();
                if (0 != error)
                {
 
                    string errorMessage = GetLastErrorMessage((EM_ErrorCode)error);
                    throw new NETClientExcetion(error, errorMessage);
 
                }
            }
        }
 
        /// <summary>
        /// get last error message
        /// 获取错误信息
        /// </summary>
        /// <returns>error message 错误信息</returns>
        public static string GetLastError()
        {
            string reslut = null;
            int error = OriginalSDK.CLIENT_GetLastError();
            if (0 != error)
            {
                reslut = GetLastErrorMessage((EM_ErrorCode)error);
            }
            return reslut;
        }
 
        /// <summary>
        /// initialize SDK,can only be called once.Must be called before others SDK function,otherwise others SDK function will fail.
        /// 初始化SDK,只能被调用一次,必须在别的SDK接口函数调用之前调用。
        /// </summary>
        /// <param name="cbDisConnect">disconnect the callback function, see the delegate 断线回调函数</param>
        /// <param name="dwUser">user data, there is no data, please use IntPtr.Zero 用户数据</param>
        /// <param name="initParam">initialization parameter,can input null SDK初始化参数</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool Init(fDisConnectCallBack cbDisConnect, IntPtr dwUser, NETSDK_INIT_PARAM? stuInitParam)
        {
            bool result = false;
            IntPtr lpInitParam = IntPtr.Zero;
            try
            {
                if (null != stuInitParam)
                {
                    lpInitParam = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NETSDK_INIT_PARAM)));
                    Marshal.StructureToPtr(stuInitParam, lpInitParam, true);
                }
                result = OriginalSDK.CLIENT_InitEx(cbDisConnect, dwUser, lpInitParam);
                NetGetLastError(result);
            }
            finally
            {
                Marshal.FreeHGlobal(lpInitParam);
            }
            return result;
        }
 
        /// <summary>
        /// initialize SDK (with default Disconnect Callback and Reconnected Callback),
        /// can only be called once.Must be called before others SDK function,otherwise others SDK function will fail.
        /// 初始化SDK(使用默认的断线重连和重连恢复回调函数),
        /// 只能被调用一次,必须在别的SDK接口函数调用之前调用。
        /// </summary>
        /// <returns></returns>
        public static bool InitWithDefaultSetting(fDisConnectCallBack cbDisConnect, fHaveReConnectCallBack cbReconnect,
                                                  IntPtr dwUser, NETSDK_INIT_PARAM? stuInitParam)
        {
            bool result = false;
            IntPtr lpInitParam = IntPtr.Zero;
            IntPtr pNetParam = IntPtr.Zero;
 
            try
            {
                if (null != stuInitParam)
                {
                    lpInitParam = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NETSDK_INIT_PARAM)));
                    Marshal.StructureToPtr(stuInitParam, lpInitParam, true);
                }
                // init SDK and set disconnect callback (初始化 SDK)
                result = OriginalSDK.CLIENT_InitEx(cbDisConnect, dwUser, lpInitParam);
                NetGetLastError(result);
                if (!result) return false;
 
                // Timeout of login 登录时尝试建立连接的超时时间
                // Tiemout of sub-connect 设置子连接的超时时间
                NET_PARAM netParam = new NET_PARAM();
                netParam.nConnectTime = 5000;               // 5s
                netParam.nGetConnInfoTime = 3000;           // 3s
                pNetParam = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_PARAM)));
                Marshal.StructureToPtr(netParam, pNetParam, true);
                OriginalSDK.CLIENT_SetNetworkParam(pNetParam);
 
                // set reconnect callback 设置断线重连回调接口
                OriginalSDK.CLIENT_SetAutoReconnect(cbReconnect, IntPtr.Zero);
 
                // set reconnect time 设置重连时间,可选
                // Set timeout and number of attempts 设置登录超时时间和尝试次数,可选
                int waitTime = 5000;                        // 5s
                int tryTimes = 3;                           // 3 times
                OriginalSDK.CLIENT_SetConnectTime(waitTime, tryTimes);
            }
            finally
            {
                Marshal.FreeHGlobal(lpInitParam);
                Marshal.FreeHGlobal(pNetParam);
            }
            return result;
        }
 
        /// <summary>
        ///  empty SDK, release occupied resource,call after all SDK functions
        ///  清空SDK,释放资源
        /// </summary>
        public static void Cleanup()
        {
            OriginalSDK.CLIENT_Cleanup();
        }
 
        /// <summary>
        /// login to the device
        /// 登陆设备
        /// </summary>
        /// <param name="pchDVRIP">device IP 设备IP</param>
        /// <param name="wDVRPort">device port 设备端口</param>
        /// <param name="pchUserName">username 用户名</param>
        /// <param name="pchPassword">password 密码</param>
        /// <param name="emSpecCap">device supported capacity,when the value is EM_LOGIN_SPAC_CAP_TYPE.SERVER_CONN means active listen mode user login(mobile dvr login) 登陆方式</param>
        /// <param name="pCapParam">nSpecCap compensation parameter,nSpecCap = EM_LOGIN_SPAC_CAP_TYPE.SERVER_CONN,pCapParam fill in device serial number string(mobile dvr login) emSpecCap参数,只有当 EM_LOGIN_SPAC_CAP_TYPE.SERVER_CONN有效</param>
        /// <param name="deviceInfo">device information,for output parmaeter 输出的设备信息</param>
        /// <returns>failed return 0,successful return LoginID,after successful login, device Operation may be via this this value(device handle)corresponding to corresponding device.失败返回0,成功返回大于O的值</returns>
        public static IntPtr Login(string pchDVRIP, ushort wDVRPort, string pchUserName, string pchPassword, EM_LOGIN_SPAC_CAP_TYPE emSpecCap, IntPtr pCapParam, ref NET_DEVICEINFO_Ex deviceInfo)
        {
            IntPtr result = IntPtr.Zero;
            int error = 0;
            result = OriginalSDK.CLIENT_LoginEx2(pchDVRIP, wDVRPort, pchUserName, pchPassword, emSpecCap, pCapParam, ref deviceInfo, ref error);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// login device with high level security
        /// 高安全级别登陆
        /// </summary>
        /// <param name="pchDVRIP">device IP 设备IP</param>
        /// <param name="wDVRPort">device port 设备端口</param>
        /// <param name="pchUserName">username 用户名</param>
        /// <param name="pchPassword">password 密码</param>
        /// <param name="emSpecCap">device supported capacity,when the value is EM_LOGIN_SPAC_CAP_TYPE.SERVER_CONN means active listen mode user login(mobile dvr login) 登陆方式</param>
        /// <param name="pCapParam">nSpecCap compensation parameter,nSpecCap = EM_LOGIN_SPAC_CAP_TYPE.SERVER_CONN,pCapParam fill in device serial number string(mobile dvr login) emSpecCap参数,只有当 EM_LOGIN_SPAC_CAP_TYPE.SERVER_CONN有效</param>
        /// <param name="deviceInfo">device information,for output parmaeter 输出的设备信息</param>
        /// <returns>failed return 0,successful return LoginID,after successful login, device Operation may be via this this value(device handle)corresponding to corresponding device.失败返回0,成功返回大于O的值</returns>
        public static IntPtr LoginWithHighLevelSecurity(string pchDVRIP, ushort wDVRPort, string pchUserName, string pchPassword, EM_LOGIN_SPAC_CAP_TYPE emSpecCap, IntPtr pCapParam, ref NET_DEVICEINFO_Ex deviceInfo)
        {
            IntPtr result = IntPtr.Zero;
            NET_IN_LOGIN_WITH_HIGHLEVEL_SECURITY stuInParam = new NET_IN_LOGIN_WITH_HIGHLEVEL_SECURITY();
            stuInParam.dwSize = (uint)Marshal.SizeOf(stuInParam);
            stuInParam.szIP = pchDVRIP;
            stuInParam.nPort = wDVRPort;
            stuInParam.szUserName = pchUserName;
            stuInParam.szPassword = pchPassword;
            stuInParam.emSpecCap = emSpecCap;
            stuInParam.pCapParam = pCapParam;
            NET_OUT_LOGIN_WITH_HIGHLEVEL_SECURITY stuOutParam = new NET_OUT_LOGIN_WITH_HIGHLEVEL_SECURITY();
            stuOutParam.dwSize = (uint)Marshal.SizeOf(stuOutParam);
            result = OriginalSDK.CLIENT_LoginWithHighLevelSecurity(ref stuInParam, ref stuOutParam);
            deviceInfo = stuOutParam.stuDeviceInfo;
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// log off device
        /// 登出设备
        /// </summary>
        /// <param name="lLoginID">user LoginID:Login's returns value,登陆ID,Login返回值</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool Logout(IntPtr lLoginID)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_Logout(lLoginID);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// set re-connection callback function after disconnection. Internal SDK  auto connect again after disconnection 
        /// 设置自动重连设备
        /// </summary>
        /// <param name="cbAutoConnect">re-connection callback function 重连回调函数</param>
        /// <param name="dwUser">user data, there is no data, please use IntPtr.Zero 用户数据</param>
        public static void SetAutoReconnect(fHaveReConnectCallBack cbAutoConnect, IntPtr dwUser)
        {
            OriginalSDK.CLIENT_SetAutoReconnect(cbAutoConnect, dwUser);
        }
 
        /// <summary>
        /// set log in network environment
        /// 设置登陆设备的网络参数
        /// </summary>
        /// <param name="netParam">network environment 网络参数</param>
        public static void SetNetworkParam(NET_PARAM? netParam)
        {
            if (null == netParam)
            {
                return;
            }
            IntPtr lpNetParam = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_PARAM)));
            Marshal.StructureToPtr(netParam, lpNetParam, true);
            OriginalSDK.CLIENT_SetNetworkParam(lpNetParam);
            Marshal.FreeHGlobal(lpNetParam);
        }
        #endregion
 
        #region << real-time monitoring >>
        /// <summary>
        /// start real-time monitor.just only support 32bit
        /// 开始实时预览.只支持32位
        /// </summary>
        /// <param name="lLoginID">user LoginID:Login's returns value 登陆ID,Login返回值</param>
        /// <param name="nChannelID"><para>real time monitor channel NO.(from 0). 通道号</para>
        ///                          <para>if rType is RType_Multiplay, nChannelID is reserved.</para>
        ///                          <para>when rType is RType_Multiplay_1 ~ RType_Multiplay_16, nChannelID determines the preview picture. </para>
        ///                          <para>ex. when RType_Multiplay_4, nChannelID is 4 or 5 or 6 or 7 will display fifth to seventh channels in the four picture preview</para> </param>
        /// <param name="hWnd">display window handle. When value is 0(IntPtr.Zero), data are not decoded or displayed 显示窗口句柄</param>
        /// <param name="rType">realplay type 预览类型</param>
        /// <param name="cbRealData">real data callback 预览数据回调<seealso cref="SetRealDataCallBack"/></param>
        /// <param name="cbDisconnect">video monitor disconnect callback function 预览断线回调</param>
        /// <param name="dwUser">user defined data, used in callback 用户数据</param>
        /// <param name="dwWaitTime">waiting time 等待时间</param>
        /// <returns>failed return 0, successful return the real time monitorID(real time monitor handle),as parameter of related function. 失败返回0,成功返回大于0的值</returns>
        public static IntPtr StartRealPlay(IntPtr lLoginID, int nChannelID, IntPtr hWnd, EM_RealPlayType rType, fRealDataCallBackEx cbRealData, fRealPlayDisConnectCallBack cbDisconnect, IntPtr dwUser, uint dwWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_StartRealPlay(lLoginID, nChannelID, hWnd, rType, cbRealData, cbDisconnect, dwUser, dwWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// start real-time monitor.support 32bit and 64bit
        /// 开始实时预览.支持32位和64位
        /// </summary>
        /// <param name="lLoginID">user LoginID:Login's returns value 登陆ID,Login返回值</param>
        /// <param name="nChannelID">real time monitor channel NO.(from 0). 通道号</param>
        /// <param name="hWnd">display window handle. When value is 0(IntPtr.Zero), data are not decoded or displayed 显示窗口句柄</param>
        /// <param name="rType">realplay type 预览类型</param>
        /// <returns>failed return 0, successful return the real time monitorID(real time monitor handle),as parameter of related function. 失败返回0,成功返回大于0的值</returns>
        public static IntPtr RealPlay(IntPtr lLoginID, int nChannelID, IntPtr hWnd, EM_RealPlayType rType = EM_RealPlayType.EM_A_RType_Realplay)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_RealPlayEx(lLoginID, nChannelID, hWnd, rType);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// stop real time monitoring
        /// 关闭实时预览
        /// </summary>
        /// <param name="lRealHandle">monitor handle StartRealPlay returns value 预览ID StartRealPlay返回值</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool StopRealPlay(IntPtr lRealHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopRealPlayEx(lRealHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// set real-time monitor data callback 
        /// 设置实时预览数据回调
        /// </summary>
        /// <param name="lRealHandle">monitor handle 预览句柄</param>
        /// <param name="cbRealData">callback function 回调函数</param>
        /// <param name="dwUser">user data, there is no data, please use IntPtr.Zero 用户数据</param>
        /// <param name="dwFlag">by bit, can combine, when it is 0x1f, callback the five types, 回调数据类型as:
        ///                      <para>0x00000001 is equivalent with original data</para>
        ///                      <para>0x00000002 is MPEG4/H264 standard data</para>
        ///                      <para>0x00000004 YUV data</para>
        ///                      <para>0x00000008 PCM data</para>
        ///                      <para>0x00000010 original audio data</para>
        ///                      <para>0x0000001f above five data type</para></param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool SetRealDataCallBack(IntPtr lRealHandle, fRealDataCallBackEx2 cbRealData, IntPtr dwUser, EM_REALDATA_FLAG dwFlag)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetRealDataCallBackEx2(lRealHandle, cbRealData, dwUser, (uint)dwFlag);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// set real-time monitor data callback 
        /// 设置实时预览数据回调
        /// </summary>
        /// <param name="lRealHandle">monitor handle 预览句柄</param>
        /// <param name="cbRealData">callback function 回调函数</param>
        /// <param name="dwUser">user data, there is no data, please use IntPtr.Zero 用户数据</param>
        /// <param name="dwFlag">by bit, can combine, when it is 0x1f, callback the five types, 回调数据类型as:
        ///                      <para>0x00000001 is equivalent with original data</para>
        ///                      <para>0x00000002 is MPEG4/H264 standard data</para>
        ///                      <para>0x00000004 YUV data</para>
        ///                      <para>0x00000008 PCM data</para>
        ///                      <para>0x00000010 original audio data</para>
        ///                      <para>0x0000001f above five data type</para></param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool SetRealDataCallBack(IntPtr lRealHandle, fRealDataCallBackEx cbRealData, IntPtr dwUser, EM_REALDATA_FLAG dwFlag)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetRealDataCallBackEx(lRealHandle, cbRealData, dwUser, (uint)dwFlag);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// set real-time monitor data callback 
        /// 设置回放YUC数据回调
        /// </summary>
        /// <param name="lPlayHandle">play back handle 回放句柄</param>
        /// <param name="cYUVData">callback function 回调函数</param>
        /// <param name="dwUser">user data, there is no data, please use IntPtr.Zero 用户数据</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool SetPlaybackYUVCallBack(IntPtr lPlayHandle, fYUVDataCallBack cYUVData, IntPtr dwUser)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetPlaybackYUVCallBack(lPlayHandle, cYUVData, dwUser);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// save data to file
        /// 保存实时预览数据到文件
        /// </summary>
        /// <param name="lRealHandle">monitor handle 预览句柄</param>
        /// <param name="pchFileName">save path 保存文件路径</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool SaveRealData(IntPtr lRealHandle, string pchFileName)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SaveRealData(lRealHandle, pchFileName);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// stop saving data to file
        /// 停止保存数据到文件
        /// </summary>
        /// <param name="lRealHandle">monitor handle 预览句柄</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool StopSaveRealData(IntPtr lRealHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopSaveRealData(lRealHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// set snapshot callback function
        /// 设置远程抓图回调
        /// </summary>
        /// <param name="OnSnapRevMessage">snapshot data callback function 抓图数据回调</param>
        /// <param name="dwUser">user data, there is no data, please use IntPtr.Zero 用户数据</param>
        public static void SetSnapRevCallBack(fSnapRevCallBack OnSnapRevMessage, IntPtr dwUser)
        {
            OriginalSDK.CLIENT_SetSnapRevCallBack(OnSnapRevMessage, dwUser);
        }
 
        /// <summary>
        /// snapshot request
        /// 远程抓图请求
        /// </summary>
        /// <param name="lLoginID">user LoginID:Login's return value 登陆ID,Login返回值</param>
        /// <param name="par">Snapshot parameter(structure) 抓图参数</param>
        /// <param name="reserved">reserved 保留参数</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool SnapPictureEx(IntPtr lLoginID, NET_SNAP_PARAMS par, IntPtr reserved)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SnapPictureEx(lLoginID, ref par, reserved);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// snap picture to file
        /// 远程抓图到文件
        /// </summary>
        /// <param name="lLoginID">user LoginID:Login's return value 登陆ID,Login返回值</param>
        /// <param name="inParam">snap picture to file in paramter 抓图输入参数</param>
        /// <param name="outParam">snap picture to file out paramter 抓图输出参数</param>
        /// <param name="nWaitTime">waite time 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool SnapPictureToFile(IntPtr lLoginID, ref NET_IN_SNAP_PIC_TO_FILE_PARAM inParam, ref NET_OUT_SNAP_PIC_TO_FILE_PARAM outParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SnapPictureToFile(lLoginID, ref inParam, ref outParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// playback by time, support playback by direction and device must support direction
        /// 按时间回放,支持倒放,但设备要支持
        /// </summary>
        /// <param name="lLoginID">user LoginID:Login's return value 登陆ID,Login返回值</param>
        /// <param name="nChannelID">channel number 通道号</param>
        /// <param name="pstNetIn">record play back parameter in 录像回放输入参数</param>
        /// <param name="pstNetOut">record play back parameter out 录像回放输出参数</param>
        /// <returns>failed return 0, successful return the playback ID(playback handle),as parameter of related function. 失败返回0,成功返回大于0的值</returns>
        public static IntPtr PlayBackByTime(IntPtr lLoginID, int nChannelID, NET_IN_PLAY_BACK_BY_TIME_INFO pstNetIn, ref NET_OUT_PLAY_BACK_BY_TIME_INFO pstNetOut)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_PlayBackByTimeEx2(lLoginID, nChannelID, ref pstNetIn, ref pstNetOut);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Query video files
        /// 查询录像文件
        /// </summary>
        /// <param name="lLoginID">Device handles user login 登陆ID,Login返回值</param>
        /// <param name="nChannelId">channelID 通道号</param>
        /// <param name="nRecordFileType">Video file types 查询录像文件类型</param>
        /// <param name="tmStart">Recording start time 查询开始时间</param>
        /// <param name="tmEnd">Recording end time 查询结束时间</param>
        /// <param name="pchCardid">card number,Only for card number query effectively,In other cases you can fill NULL 卡号</param>
        /// <param name="nriFileinfo">Return to video file information,Is an array of structures NET_RECORDFILE_INFO[Video file information for the specified bar] 查询到文件信息</param>
        /// <param name="maxlen">nriFileinfoThe maximum length of the buffer;[Unit of byte,Dimensional structure of an array of size number*sizeof(NET_RECORDFILE_INFO),Victoria is the size of the array is equal to 1,Recommend less than 200] 最大查询长度</param>
        /// <param name="filecount">The number of documents returned,Maximum output parameters are only found in video recording until the buffer is full,查询到的文件个数</param>
        /// <param name="waittime">Waiting Time 等待时间</param>
        /// <param name="bTime">Whether by time(Currently use false) 是否通过时间,这里用FALSE</param>
        /// <returns>true:success;false:failure 失败返回false 成功返回true</returns>
        public static bool QueryRecordFile(IntPtr lLoginID, int nChannelId, EM_QUERY_RECORD_TYPE nRecordFileType, DateTime tmStart, DateTime tmEnd, string pchCardid, ref NET_RECORDFILE_INFO[] nriFileinfo, ref int filecount, int waittime, bool bTime)
        {
            bool returnValue = false;
            filecount = 0;
            IntPtr pBoxInfo = IntPtr.Zero;
            int maxlen = Marshal.SizeOf(typeof(NET_RECORDFILE_INFO)) * nriFileinfo.Length;
            try
            {
                NET_TIME timeStart = NET_TIME.FromDateTime(tmStart);
                NET_TIME timeEnd = NET_TIME.FromDateTime(tmEnd);
                pBoxInfo = Marshal.AllocHGlobal(maxlen);//Allocation of fixed specified the size of the memory space
                int fileCountMin = 0;
                if (pBoxInfo != IntPtr.Zero)
                {
                    returnValue = OriginalSDK.CLIENT_QueryRecordFile(lLoginID, nChannelId, (int)nRecordFileType, ref timeStart, ref timeEnd, pchCardid, pBoxInfo, maxlen, ref filecount, waittime, bTime);
                    NetGetLastError(returnValue);
                    fileCountMin = (filecount <= nriFileinfo.Length ? filecount : nriFileinfo.Length);
                    for (int dwLoop = 0; dwLoop < fileCountMin; dwLoop++)
                    {
                        // specify the memory space of the data is copied to the purpose in the array in the specified format
                        nriFileinfo[dwLoop] = (NET_RECORDFILE_INFO)Marshal.PtrToStructure(IntPtr.Add(pBoxInfo, Marshal.SizeOf(typeof(NET_RECORDFILE_INFO)) * dwLoop), typeof(NET_RECORDFILE_INFO));
                    }
                }
            }
            finally
            {
                Marshal.FreeHGlobal(pBoxInfo);//Release the fixed memory allocation
                pBoxInfo = IntPtr.Zero;
            }
            return returnValue;
        }
 
 
        /// <summary>
        /// Whether there is a video status mask on each day in a month
        /// 某月内的各天是否存在录像的状态
        /// </summary>
        /// <param name="lLoginID">Lonin return value 登陆ID</param>
        /// <param name="nChannelId">channel value 通道ID</param>
        /// <param name="nRecordFileType">record file type 录像类型 EM_QUERY_RECORD_TYPE </param>
        /// <param name="tmMonth">month 月份</param>
        /// <param name="pchCardid">card id 输入卡号, nRecordFileType == EM_RECORD_TYPE_CARD,pchCardid输入卡号; nRecordFileType == EM_RECORD_TYPE_FIELD,pchCardid输入自定义字段</param>
        /// <param name="pRecordStatus">recorde status in some month 某月的各天是否存在录像的状态信息</param>
        /// <param name="waittime">waittime 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool QueryRecordStatus(IntPtr lLoginID, int nChannelId, EM_QUERY_RECORD_TYPE nRecordFileType, DateTime tmMonth, string pchCardid, ref NET_RECORD_STATUS pRecordStatus, int waittime = 1000)
        {
            bool returnValue = false;
            NET_TIME timeMonth = NET_TIME.FromDateTime(tmMonth);
            returnValue = OriginalSDK.CLIENT_QueryRecordStatus(lLoginID, nChannelId, (int)nRecordFileType, ref timeMonth, pchCardid, ref pRecordStatus, waittime);
            NetGetLastError(returnValue);
            return returnValue;
        }
 
        /// <summary>
        /// get current osd time.
        /// 获取当前OSD时间
        /// </summary>
        /// <param name="lPlayHandle">PlayBackByTime returns value PlayBackByTime返回值</param>
        /// <param name="lpOsdTime">return osd time 返回OSD时间</param>
        /// <param name="lpStartTime">start time 开始时间</param>
        /// <param name="lpEndTime">end time 结束时间</param>
        /// <returns>true:success;false:failure 失败返回false 成功返回true</returns>
        public static bool GetPlayBackOsdTime(IntPtr lPlayHandle, ref NET_TIME lpOsdTime, ref NET_TIME lpStartTime, ref NET_TIME lpEndTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetPlayBackOsdTime(lPlayHandle, ref lpOsdTime, ref lpStartTime, ref lpEndTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        ///  capture a picture
        ///  本地抓图
        /// </summary>
        /// <param name="hPlayHandle">real handle or palyback handle 实时预览或回放的句柄
        ///                            <para>StartRealPlay returns value StartRealPlay返回值</para>
        ///                            <para>PlayBackByTime returns value PlayBackByTime返回值</para></param>
        /// <param name="pchPicFileName">picture's saving name 保存的文件路径</param>
        /// <param name="eFormat">picture type 图片类型</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool CapturePicture(IntPtr hPlayHandle, string pchPicFileName, EM_NET_CAPTURE_FORMATS eFormat)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_CapturePictureEx(hPlayHandle, pchPicFileName, eFormat);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// download video by time
        /// 按时间下载录像
        /// </summary>
        /// <param name="lLoginID">user LoginID:Login's return value 登陆ID,Login返回值</param>
        /// <param name="nChannelId">channel number 通道号</param>
        /// <param name="nRecordFileType">file type 录像文件类型</param>
        /// <param name="tmStart">start time 开始时间</param>
        /// <param name="tmEnd">end time 结束时间</param>
        /// <param name="sSavedFileName">save file name 保存录像的文件名</param>
        /// <param name="cbTimeDownLoadPos">download by time's pos callback 下载的时间回调</param>
        /// <param name="dwUserData">cbTimeDownLoadPos's user data, there is no data, please use IntPtr.Zero 用户数据</param>
        /// <param name="fDownLoadDataCallBack">video data's callback 下载数据回调</param>
        /// <param name="dwDataUser">fDownLoadDataCallBack's user data, there is no data, please use IntPtr.Zero 用户数据</param>
        /// <param name="pReserved">Reserved 保留参数</param>
        /// <returns>failed return 0, successful return downloadsID,</returns>
        public static IntPtr DownloadByTime(IntPtr lLoginID, int nChannelId, EM_QUERY_RECORD_TYPE nRecordFileType, DateTime tmStart, DateTime tmEnd, string sSavedFileName,
                                                     fTimeDownLoadPosCallBack cbTimeDownLoadPos, IntPtr dwUserData,
                                                     fDataCallBack fDownLoadDataCallBack, IntPtr dwDataUser, IntPtr pReserved)
        {
            IntPtr result = IntPtr.Zero;
            NET_TIME startTime = NET_TIME.FromDateTime(tmStart);
            NET_TIME endTime = NET_TIME.FromDateTime(tmEnd);
            result = OriginalSDK.CLIENT_DownloadByTimeEx(lLoginID, nChannelId, (int)nRecordFileType, ref startTime, ref endTime, sSavedFileName,
                                                     cbTimeDownLoadPos, dwUserData, fDownLoadDataCallBack, dwDataUser, pReserved);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// stop downloads
        /// 停止下载
        /// </summary>
        /// <param name="lFileHandle">downloadsID DownloadByTime returns value 下载ID DownloadByTime返回值</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool StopDownload(IntPtr lFileHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopDownload(lFileHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// download the video to get the current position,Can be used to display the download progress does not require real-time interface,Similar to the callback function to download
        /// 当前下载进度
        /// </summary>
        /// <param name="lFileHandle">download handle 下载句柄</param>
        /// <param name="nTotalSize">total download size(KB) 总下载大小</param>
        /// <param name="nDownLoadSize">the size have download(KB) 已经下载的大小</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool GetDownloadPos(IntPtr lFileHandle, ref int nTotalSize, ref int nDownLoadSize)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetDownloadPos(lFileHandle, ref nTotalSize, ref nDownLoadSize);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 私有云台控制,param4由用户申请释放内存,内存大小参照 EM_A_EXTPTZ_ControlType 对应的结构体
        /// Private PTZ control,user malloc param4's memory,please refer to corresponding structure of EM_A_EXTPTZ_ControlType
        /// </summary>
        public static bool DHPTZControl(IntPtr lLoginID, int nChannelID, uint dwPTZCommand, byte param1, byte param2, byte param3, bool dwStop, IntPtr param4)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DHPTZControl(lLoginID, nChannelID, dwPTZCommand, param1, param2, param3, dwStop, param4);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// PTZ control 
        /// PTZ控制接口
        /// </summary>
        /// <param name="lLoginID">user LoginID:Login's returns value 登陆ID,Login返回值</param>
        /// <param name="nChannelID">channel number 通道号</param>
        /// <param name="dwPTZCommand">PTZ control commands 控制命令</param>
        /// <param name="lParam1">Parameter1 details refer to EM_A_EXTPTZ_ControlType 控制命令的参数1</param>
        /// <param name="lParam2">Parameter2 details refer to EM_A_EXTPTZ_ControlType 控制命令的参数2</param>
        /// <param name="lParam3">Parameter3 details refer to EM_A_EXTPTZ_ControlType 控制命令的参数3</param>
        /// <param name="dwStop">stop or not, effective to PTZ eight-directions operation and lens operation. During other operation, this parameter should fill in false  是否停止</param>
        /// <param name="param4"><para>support PTZ control extensive command,support these commands: 控制命令的参数4</para> 
        ///                      <para>EM_A_EXTPTZ_ControlType.MOVE_ABSOLUTELY:Absolute motion control commands,param4 corresponding struct NET_PTZ_CONTROL_ABSOLUTELY</para>
        ///                      <para>EM_A_EXTPTZ_ControlType.MOVE_CONTINUOUSLY:Continuous motion control commands,param4 corresponding struct NET_PTZ_CONTROL_CONTINUOUSLY</para>
        ///                      <para>EM_A_EXTPTZ_ControlType.GOTOPRESET:PTZ control command, at a certain speed to preset locus,parm4 corresponding struct NET_PTZ_CONTROL_GOTOPRESET</para>
        ///                      <para>EM_A_EXTPTZ_ControlType.SET_VIEW_RANGE:Set to horizon(param4 corresponding struct NET_PTZ_VIEW_RANGE_INFO</para>
        ///                      <para>EM_A_EXTPTZ_ControlType.FOCUS_ABSOLUTELY:Absolute focus(param4 corresponding struct NET_PTZ_FOCUS_ABSOLUTELY</para>
        ///                      <para>EM_A_EXTPTZ_ControlType.HORSECTORSCAN:Level fan sweep(param4 corresponding NET_PTZ_CONTROL_SECTORSCAN,param1、param2、param3 is invalid</para>
        ///                      <para>EM_A_EXTPTZ_ControlType.VERSECTORSCAN:Vertical sweep fan(param4 corresponding NET_PTZ_CONTROL_SECTORSCAN,param1、param2、param3 is invalid</para>
        ///                      <para>EM_A_EXTPTZ_ControlType.SET_FISHEYE_EPTZ:Control fish eye PTZ,param4corresponding to structure NET_PTZ_CONTROL_SET_FISHEYE_EPTZ</para>
        ///                      <para>EM_A_EXTPTZ_ControlType.SET_TRACK_START/SET_TRACK_STOP:param4 corresponding to structure NET_PTZ_CONTROL_SET_TRACK_CONTROL,dwStop set as FALSE,param1、param2、param3  is invalid</para></param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool PTZControl(IntPtr lLoginID, int nChannelID, uint dwPTZCommand, int lParam1, int lParam2, int lParam3, bool dwStop, IntPtr param4)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DHPTZControlEx2(lLoginID, nChannelID, dwPTZCommand, lParam1, lParam2, lParam3, dwStop, param4);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// PTZ边界限制下发
        /// </summary>
        /// <param name="lLoginID">登陆ID,Login返回值</param>
        /// <param name="pstInParam">扫描配置入参</param>
        /// <param name="pstOutParam">扫描配置出参</param>
        /// <param name="dwWaitTime">超时时间</param>
        /// <returns></returns>
        public static bool PTZSetPanGroupLimit(IntPtr lLoginID, ref NET_IN_PAN_GROUP_LIMIT_INFO pstInParam, ref NET_OUT_PAN_GROUP_LIMIT_INFO pstOutParam, uint dwWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_PTZSetPanGroupLimit(lLoginID, ref pstInParam, ref pstOutParam, dwWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// PTZ边界限制组(添加/删除)
        /// </summary>
        /// <param name="lLoginID">登陆ID,Login返回值</param>
        /// <param name="pstInParam">入参</param>
        /// <param name="pstOutParam">出参</param>
        /// <param name="dwWaitTime">超时时间</param>
        /// <returns></returns>
        public static bool PTZSetPanGroup(IntPtr lLoginID, ref NET_IN_SET_PAN_GROUP_PARAM pstInParam, ref NET_OUT_SET_PAN_GROUP_PARAM pstOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_PTZSetPanGroup(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
 
        }
 
        /// <summary>
        /// 获取PTZ边界限制组信息
        /// </summary>
        /// <param name="lLoginID">登陆ID,Login返回值</param>
        /// <param name="pInParam">入参</param>
        /// <param name="pOutParam">出参</param>
        /// <param name="nWaitTime">超时时间</param>
        /// <returns></returns>
        public static bool PTZGetPanGroup(IntPtr lLoginID, ref NET_IN_GET_PAN_GROUP_PARAM pInParam, ref NET_OUT_GET_PAN_GROUP_PARAM pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_PTZGetPanGroup(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// open audio
        /// 打开声音
        /// </summary>
        /// <param name="lPlayHandle">real handle or palyback handle 实时预览或回放的句柄
        ///                            <para>StartRealPlay returns value StartRealPlay返回值</para>
        ///                            <para>PlayBackByTime returns value PlayBackByTime返回值</para></param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool OpenSound(IntPtr lPlayHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_OpenSound(lPlayHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// stop audio
        /// 关闭声音
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool CloseSound()
        {
            bool result = false;
            result = OriginalSDK.CLIENT_CloseSound();
            NetGetLastError(result);
            return result;
        }
        #endregion
 
 
        /// <summary>
        /// control playback operation.
        /// 二维字符串数组拼接设置
        /// </summary>
        /// <param name="index"> 在二维数组中的下标 </param>
        /// <param name="maxLen"> 需要替换的数据长度 </param>
        /// <param name="src"> 需要替换的原数据 </param>
        /// <param name="dst"> 原数据 (注:元数据内存由用户自行申请) </param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static void MultiArraySet(int index, int maxLen, string src, ref string dst)
        {
            byte[] srcArray = System.Text.Encoding.Default.GetBytes(src);
            byte[] dstArray = System.Text.Encoding.Default.GetBytes(dst);
            srcArray.CopyTo(dstArray, index * maxLen);
            dst = System.Text.Encoding.Default.GetString(dstArray);
        }
 
        /// <summary>
        /// control playback operation.
        /// 二维字符串数组读取
        /// </summary>
        /// <param name="index"> 在二维数组中的下标 </param>
        /// <param name="maxLen"> 需要读取的数据长度 </param>
        /// <param name="dst"> 读取结果 </param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static string MultiArrayGet(int index, int maxLen, string dst)
        {
            byte[] dstArray = System.Text.Encoding.Default.GetBytes(dst);
            return System.Text.Encoding.Default.GetString(dstArray, index * maxLen, maxLen);
        }
 
        /// <summary>
        /// control playback operation.
        /// 控制回放
        /// </summary>
        /// <param name="lPlayHandle">lPlayHandle:palyback handle 回放句柄</param>
        /// <param name="type">control type 控制类型</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool PlayBackControl(IntPtr lPlayHandle, PlayBackType type)
        {
            bool result = false;
            switch (type)
            {
                case PlayBackType.Play:
                    result = OriginalSDK.CLIENT_PausePlayBack(lPlayHandle, false);
                    NetGetLastError(result);
                    break;
                case PlayBackType.Pause:
                    result = OriginalSDK.CLIENT_PausePlayBack(lPlayHandle, true);
                    NetGetLastError(result);
                    break;
                case PlayBackType.Stop:
                    result = OriginalSDK.CLIENT_StopPlayBack(lPlayHandle);
                    NetGetLastError(result);
                    break;
                case PlayBackType.Fast:
                    result = OriginalSDK.CLIENT_FastPlayBack(lPlayHandle);
                    NetGetLastError(result);
                    break;
                case PlayBackType.Slow:
                    result = OriginalSDK.CLIENT_SlowPlayBack(lPlayHandle);
                    NetGetLastError(result);
                    break;
                case PlayBackType.Normal:
                    result = OriginalSDK.CLIENT_NormalPlayBack(lPlayHandle);
                    NetGetLastError(result);
                    break;
                default:
                    break;
            }
            return result;
        }
 
        /// <summary>
        /// set user work mode
        /// 设置用户工作模式
        /// </summary>
        /// <param name="lLoginID">loginID,login returns value 登陆ID</param>
        /// <param name="emType">user work mode 工作模式类型</param>
        /// <param name="pValue">support these type:对应的结构体
        ///                     <para>EM_USEDEV_MODE.TALK_ENCODE_TYPE:corresponding structure NET_DEV_TALKDECODE_INFO</para>
        ///                     <para>EM_USEDEV_MODE.ALARM_LISTEN_MODE:value type int(0-16)</para>
        ///                     <para>EM_USEDEV_MODE.CONFIG_AUTHORITY_MODE:value type int(0/1)</para>
        ///                     <para>EM_USEDEV_MODE.TALK_TALK_CHANNEL:value type int(channel number)</para>
        ///                     <para>EM_USEDEV_MODE.TALK_SPEAK_PARAM:corresponding structure NET_SPEAK_PARAM</para>
        ///                     <para>EM_USEDEV_MODE.TALK_TRANSFER_MODE:corresponding structure NET_TALK_TRANSFER_PARAM</para>
        ///                     <para>EM_USEDEV_MODE.PLAYBACK_REALTIME_MODE:value type int(0/1)</para>
        ///                     <para>EM_USEDEV_MODE.RECORD_STREAM_TYPE:value type int(0/1/2)</para>
        ///                     <para>EM_USEDEV_MODE.RECORD_TYPE:see to EM_RECORD_TYPE</para>
        ///                     <para>EM_USEDEV_MODE.TALK_VT_PARAM:corresponding structure NET_VT_TALK_PARAM</para>
        ///                     <para>EM_USEDEV_MODE.TARGET_DEV_ID:value type int (0 or other)</para></param>
        /// <returns>failed return false, successful return true  失败返回false 成功返回true</returns>
        public static bool SetDeviceMode(IntPtr lLoginID, EM_USEDEV_MODE emType, IntPtr pValue)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetDeviceMode(lLoginID, emType, pValue);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 设置报警回调函数
        /// Set alarm callback function
        /// </summary>
        public static void SetDVRMessCallBack(fMessCallBack cbMessage, IntPtr dwUser)
        {
            OriginalSDK.CLIENT_SetDVRMessCallBack(cbMessage, dwUser);
        }
 
        /// <summary>
        /// set alarm callback function 
        /// 设置报警回调
        /// </summary>
        /// <param name="cbMessage">alarm callback 报警回调</param>
        /// <param name="dwUser">user data 用户数据</param>
        public static void SetDVRMessCallBackEx1(fMessCallBackEx cbMessage, IntPtr dwUser)
        {
            OriginalSDK.CLIENT_SetDVRMessCallBackEx1(cbMessage, dwUser);
        }
 
        /// <summary>
        /// subscribe alarm
        /// 订阅报警
        /// </summary>
        /// <param name="lLoginID">loginID:login returns value 登陆ID</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool StartListen(IntPtr lLoginID)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StartListenEx(lLoginID);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// unsubscribe alarm
        /// 取消订阅报警
        /// </summary>
        /// <param name="lLoginID">loginID:login returns value 登陆ID</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool StopListen(IntPtr lLoginID)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopListen(lLoginID);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// subscribe event
        /// 订阅事件
        /// </summary>
        /// <param name="lLoginID">loginID:login returns value 登陆ID</param>
        /// <param name="nChannelID">channel id 通道号</param>
        /// <param name="dwAlarmType">event type see EM_EVENT_IVS_TYPE 事件类型</param>
        /// <param name="bNeedPicFile">subscribe image file or not,ture-yes,return intelligent image info during callback function,false not return intelligent image info during callback function 是否需要图片</param>
        /// <param name="cbAnalyzerData">intelligent data analysis callback 事件回调函数</param>
        /// <param name="dwUser">user data 用户数据</param>
        /// <param name="reserved">reserved 保留参数</param>
        /// <returns>failed return 0, successful return the analyzerHandle</returns>
        public static IntPtr RealLoadPicture(IntPtr lLoginID, int nChannelID, uint dwAlarmType, bool bNeedPicFile, fAnalyzerDataCallBack cbAnalyzerData, IntPtr dwUser, IntPtr reserved)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_RealLoadPictureEx(lLoginID, nChannelID, dwAlarmType, bNeedPicFile, cbAnalyzerData, dwUser, reserved);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// unsubscribe event
        /// 取消订阅事件
        /// </summary>
        /// <param name="lAnalyzerHandle">analyzerHandle:RealLoadPicture returns value RealLoadPicture返回值</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool StopLoadPic(IntPtr lAnalyzerHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopLoadPic(lAnalyzerHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// query system information
        /// 查询系统信息
        /// </summary>
        /// <param name="lLoginID">Login returns value 登陆ID</param>
        /// <param name="nSystemType">query type 查询类型</param>
        /// <param name="pSysInfoBuffer">information buffer 类型对应的数据信息</param>
        /// <param name="maxlen">buffer max len 最大长度</param>
        /// <param name="nSysInfolen">return information len 返回的信息大小</param>
        /// <param name="waittime">wait time 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        private static bool QuerySystemInfo(IntPtr lLoginID, EM_SYS_ABILITY nSystemType, IntPtr pSysInfoBuffer, int maxlen, ref int nSysInfolen, int waittime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_QuerySystemInfo(lLoginID, (int)nSystemType, pSysInfoBuffer, maxlen, ref nSysInfolen, waittime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// query system information
        /// 查询系统信息
        /// </summary>
        /// <param name="lLoginID">Login returns value 登陆ID</param>
        /// <param name="nSystemType">query type 查询类型</param>
        /// <param name="obj">return information object 返回信息对像</param>
        /// <param name="waittime">wait time 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool QuerySystemInfo(IntPtr lLoginID, EM_SYS_ABILITY nSystemType, ref object obj, int waittime)
        {
            bool result = false;
            IntPtr pBuf = IntPtr.Zero;
            Type type = obj.GetType();
            int len = Marshal.SizeOf(obj);
            int nSysInfolen = 0;
            try
            {
                pBuf = Marshal.AllocHGlobal(len);
                Marshal.StructureToPtr(obj, pBuf, true);
                result = QuerySystemInfo(lLoginID, nSystemType, pBuf, len, ref nSysInfolen, waittime);
                obj = Marshal.PtrToStructure(pBuf, type);
            }
            finally
            {
                Marshal.FreeHGlobal(pBuf);
            }
            return result;
        }
 
        /// <summary>
        /// query device log
        /// 查询设备日志
        /// </summary>
        /// <param name="lLoginID">Login returns value 登陆ID</param>
        /// <param name="pQueryParam">query param 查询参数</param>
        /// <param name="pLogBuffer">log buffer 日志数据缓存</param>
        /// <param name="nLogBufferLen">buffer len 缓存大小</param>
        /// <param name="pRecLogNum">return log number 返回日志的个数</param>
        /// <param name="waittime">wait time 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool QueryDeviceLog(IntPtr lLoginID, ref NET_QUERY_DEVICE_LOG_PARAM pQueryParam, IntPtr pLogBuffer, int nLogBufferLen, ref int pRecLogNum, int waittime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_QueryDeviceLog(lLoginID, ref pQueryParam, pLogBuffer, nLogBufferLen, ref pRecLogNum, waittime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// start talk
        /// 开始对讲
        /// </summary>
        /// <param name="lLoginID">Login returns value 登陆ID</param>
        /// <param name="pfcb">audio data callback 语音回调函数</param>
        /// <param name="dwUser">user data 用户数据</param>
        /// <returns>failed return zero, successful return non-zero(talk handle) 失败返回0,成功返回大于0的值</returns>
        public static IntPtr StartTalk(IntPtr lLoginID, fAudioDataCallBack pfcb, IntPtr dwUser)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_StartTalkEx(lLoginID, pfcb, dwUser);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// stop talk
        /// 关闭对讲
        /// </summary>
        /// <param name="lTalkHandle">StartTalk returns value StartTalk返回值</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool StopTalk(IntPtr lTalkHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopTalkEx(lTalkHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// start record
        /// 开始录音
        /// </summary>
        /// <param name="lLoginID">Login returns value 登陆ID</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool RecordStart(IntPtr lLoginID)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_RecordStartEx(lLoginID);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// stop record
        /// 关闭录音
        /// </summary>
        /// <param name="lLoginID">Login returns value 登陆ID</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool RecordStop(IntPtr lLoginID)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_RecordStopEx(lLoginID);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// send data 
        /// 发送数据
        /// </summary>
        /// <param name="lTalkHandle">StartTalk returns value StartTalk返回值</param>
        /// <param name="pSendBuf">send buffer 发送数据缓存</param>
        /// <param name="dwBufSize">buffer size 缓存大小</param>
        /// <returns>failed return zero, successful return non-zero</returns>
        public static int TalkSendData(IntPtr lTalkHandle, IntPtr pSendBuf, uint dwBufSize)
        {
            int result = 0;
            result = OriginalSDK.CLIENT_TalkSendData(lTalkHandle, pSendBuf, dwBufSize);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// audio decode
        /// 语音解码
        /// </summary>
        /// <param name="pAudioDataBuf">audio buffer 语音缓存</param>
        /// <param name="dwBufSize">buffer size 缓存大小</param>
        public static void AudioDec(IntPtr pAudioDataBuf, uint dwBufSize)
        {
            OriginalSDK.CLIENT_AudioDec(pAudioDataBuf, dwBufSize);
        }
 
        /// <summary>
        /// Device control,user malloc param's memory,please refer to the corresponding structure of type
        /// 设备控制
        /// </summary>
        /// <param name="lLoginID">loginID:login returns value 登陆ID</param>
        /// <param name="type">CtrlType 控制类型</param>
        /// <param name="param">pointer to control param 控制类型对应的信息指针地址</param>
        /// <param name="waittime">wait time 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool ControlDevice(IntPtr lLoginID, EM_CtrlType type, IntPtr param, int waittime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_ControlDevice(lLoginID, type, param, waittime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Device control,user malloc param's memory,please refer to the corresponding structure of type
        /// 设备控制Ex
        /// </summary>
        /// <param name="lLoginID">loginID:login returns value 登陆ID</param>
        /// <param name="type">CtrlType 控制类型</param>
        /// <param name="pInBuf">pointer to control in param 控制类型对应的信息入参指针地址</param>
        /// <param name="pOutBuf">pointer to control out param 控制类型对应的信息出参指针地址</param>
        /// <param name="nWaitTime">wait time 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool ControlDeviceEx(IntPtr lLoginID, EM_CtrlType emType, IntPtr pInBuf, IntPtr pOutBuf, int nWaitTime = 1000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_ControlDeviceEx(lLoginID, emType, pInBuf, pOutBuf, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// query device state
        /// 查询设备状态
        /// </summary>
        /// <param name="lLoginID">loginID:login returns value 登陆ID</param>
        /// <param name="nType">query type 查询类型</param>
        /// <param name="obj">return information object 返回信息对像</param>
        /// <param name="typeName">query struct type 查询结构体的类型</param>
        /// <param name="waittime">waittime 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool QueryDevState(IntPtr lLoginID, int nType, ref object obj, Type typeName, int waittime)
        {
            bool result = false;
            int pRetLen = 0;
            int nBufLen = 0;
            IntPtr pBuf = IntPtr.Zero;
            try
            {
                nBufLen = Marshal.SizeOf(typeName);
                pBuf = Marshal.AllocHGlobal(Marshal.SizeOf(typeName));
                Marshal.StructureToPtr(obj, pBuf, true);
                result = OriginalSDK.CLIENT_QueryDevState(lLoginID, nType, pBuf, nBufLen, ref pRetLen, waittime);
                NetGetLastError(result);
                obj = Marshal.PtrToStructure(pBuf, typeName);
            }
            finally
            {
                Marshal.FreeHGlobal(pBuf);
                nBufLen = 0;
            }
            return result;
        }
 
        public static bool QueryDevState(IntPtr lLoginID, EM_DEVICE_STATE nType, ref object obj, Type typeName, int waittime)
        {
            bool result = false;
            int pRetLen = 0;
            int nBufLen = 0;
            IntPtr pBuf = IntPtr.Zero;
            try
            {
                nBufLen = Marshal.SizeOf(typeName);
                pBuf = Marshal.AllocHGlobal(Marshal.SizeOf(typeName));
                Marshal.StructureToPtr(obj, pBuf, true);
                result = OriginalSDK.CLIENT_QueryDevState(lLoginID, (int)nType, pBuf, nBufLen, ref pRetLen, waittime);
                NetGetLastError(result);
                obj = Marshal.PtrToStructure(pBuf, typeName);
            }
            finally
            {
                Marshal.FreeHGlobal(pBuf);
                nBufLen = 0;
            }
            return result;
        }
 
        /// <summary>
        /// query device state
        /// 查询设备状态
        /// </summary>
        /// <param name="lLoginID">loginID:login returns value 登陆ID</param>
        /// <param name="nType">query type 查询类型</param>
        /// <param name="obj">return information object 返回信息对像</param>
        /// <param name="typeName">query struct type 查询结构体的类型</param>
        /// <param name="waittime">waittime 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool QueryDevState(IntPtr lLoginID, int nType, ref object[] objs, Type typeName, int waittime)
        {
            bool result = false;
            int pRetLen = 0;
            int nBufLen = 0;
            IntPtr pBuf = IntPtr.Zero;
            int nQueryNum = objs.Length;
            try
            {
                nBufLen = Marshal.SizeOf(typeName) * nQueryNum;
                pBuf = Marshal.AllocHGlobal(nBufLen);
                for (int index = 0; index < nQueryNum; index++)
                {
                    IntPtr pIndexBuf = IntPtr.Add(pBuf, index * Marshal.SizeOf(typeName));
                    if (objs[index] != null && objs[index].GetType() == typeName)
                    {
                        Marshal.StructureToPtr(objs[index], pIndexBuf, true);
                    }
                    else
                    {
                        for (int i = 0; i < Marshal.SizeOf(typeName); i++)
                        {
                            Marshal.WriteByte(pIndexBuf, i, 0);
                        }
                    }
                }
 
                result = OriginalSDK.CLIENT_QueryDevState(lLoginID, nType, pBuf, nBufLen, ref pRetLen, waittime);
                NetGetLastError(result);
                if (result)
                {
                    int nRetNum = pRetLen / Marshal.SizeOf(typeName);
                    objs = new object[nRetNum];
                    for (int i = 0; i < nRetNum; i++)
                    {
                        objs[i] = Marshal.PtrToStructure(IntPtr.Add(pBuf, i * Marshal.SizeOf(typeName)), typeName);
                    }
                }
 
            }
            finally
            {
                Marshal.FreeHGlobal(pBuf);
                nBufLen = 0;
            }
            return result;
        }
 
        public static bool QueryDevState(IntPtr lLoginID, int nType, ref byte[] byStates, int waittime)
        {
            bool result = false;
            int pRetLen = 0;
            int nBufLen = 1024 * 1024;
            IntPtr pBuf = IntPtr.Zero;
            try
            {
                pBuf = Marshal.AllocHGlobal(nBufLen);
                result = OriginalSDK.CLIENT_QueryDevState(lLoginID, nType, pBuf, nBufLen, ref pRetLen, waittime);
                NetGetLastError(result);
                if (pRetLen == 0)
                {
                    byStates = new byte[0];
                }
                else
                {
                    byStates = new byte[pRetLen];
                    for (int i = 0; i < byStates.Length; i++)
                    {
                        byStates[i] = Marshal.ReadByte(IntPtr.Add(pBuf, i));
                    }
                }
            }
            finally
            {
                Marshal.FreeHGlobal(pBuf);
                nBufLen = 0;
            }
            return result;
        }
 
        /// <summary>
        /// New Search system capacity information
        /// 查询系统能力信息
        /// </summary>
        /// <param name="lLoginID">CLIENT_Login's return value 登陆ID</param>
        /// <param name="lChannel">Channel id 通道号</param>
        /// <param name="strCommand">Command string 查询命令</param>
        /// <param name="obj">Object correspondence to the Command 返回的数据</param>
        /// <param name="typeName">obj's type 查询命令对应结构体的类型</param>
        /// <param name="waittime">Wait timeout,The default setting is 1000 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool QueryNewSystemInfo(IntPtr lLoginID, Int32 lChannel, string strCommand, ref object obj, Type typeName, int waittime)
        {
            bool returnValue = false;
            IntPtr pInBuf = IntPtr.Zero;
            IntPtr pOutBuf = IntPtr.Zero;
            IntPtr pRetLen = IntPtr.Zero;
 
            UInt32 nRetLen = 0;
            UInt32 nBufSize = 1024 * 1024;
            UInt32 nError = 0;
 
            try
            {
                pInBuf = Marshal.AllocHGlobal((int)nBufSize);//Allocation of fixed specified the size of the memory space
                pOutBuf = Marshal.AllocHGlobal(Marshal.SizeOf(typeName));
                if (obj.GetType() == typeName)                            //if obj is boxinged type of typeName, some param(ex. dwsize) need trans to unmanaged memory
                {
                    Marshal.StructureToPtr(obj, pOutBuf, true);
                }
                else
                {
                    for (int i = 0; i < Marshal.SizeOf(typeName); i++)
                    {
                        Marshal.WriteByte(pOutBuf, i, 0);
                    }
                }
                pRetLen = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(UInt32)));
 
                if (pInBuf != IntPtr.Zero && pOutBuf != IntPtr.Zero)
                {
                    returnValue = OriginalSDK.CLIENT_QueryNewSystemInfo(lLoginID, strCommand, lChannel, pInBuf,
                                                         nBufSize, ref nError, waittime);
                    NetGetLastError(returnValue);
                    if (returnValue == true)
                    {
                        returnValue = OriginalSDK.CLIENT_ParseData(strCommand, pInBuf, pOutBuf, (UInt32)Marshal.SizeOf(typeName), pRetLen);
                        nRetLen = (UInt32)Marshal.PtrToStructure(pRetLen, typeof(UInt32));
                        obj = Marshal.PtrToStructure(pOutBuf, typeName);
                    }
                }
                NetGetLastError(returnValue);
            }
 
            finally
            {
                Marshal.FreeHGlobal(pInBuf);//Release fixed memory allocation
                Marshal.FreeHGlobal(pOutBuf);//Release fixed memory allocation
                Marshal.FreeHGlobal(pRetLen);//Release fixed memory allocation
                pInBuf = IntPtr.Zero;
                pOutBuf = IntPtr.Zero;
                pRetLen = IntPtr.Zero;
            }
            return returnValue;
        }
 
        /// <summary>
        /// New Search system capacity information
        /// 查询系统能力信息(带额外信息)
        /// </summary>
        /// <param name="lLoginID">CLIENT_Login's return value 登陆ID</param>
        /// <param name="lChannel">Channel id 通道号</param>
        /// <param name="strCommand">Command string 查询命令</param>
        /// <param name="obj">Object correspondence to the Command 返回的数据</param>
        /// <param name="typeName">obj's type 查询命令对应结构体的类型</param>
        /// <param name="waittime">Wait timeout,The default setting is 1000 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool QueryNewSystemInfoEx(IntPtr lLoginID, Int32 lChannel, string strCommand,
                                                ref object obj, Type typeName, Object extendInfo, Type extendInfoType, int waittime)
        {
            bool returnValue = false;
            IntPtr pInBuf = IntPtr.Zero;
            IntPtr pOutBuf = IntPtr.Zero;
            IntPtr pRetLen = IntPtr.Zero;
 
            UInt32 nRetLen = 0;
            UInt32 nBufSize = 1024 * 1024;
            UInt32 nError = 0;
 
            IntPtr pExtendInfo = IntPtr.Zero;
 
            try
            {
                if (extendInfo != null && extendInfoType != null)
                {
                    pExtendInfo = Marshal.AllocHGlobal(Marshal.SizeOf(extendInfoType));
                    Marshal.StructureToPtr(extendInfo, pExtendInfo, true);
                }
 
                pInBuf = Marshal.AllocHGlobal((int)nBufSize);   // Allocation of fixed specified the size of the memory space
                pOutBuf = Marshal.AllocHGlobal(Marshal.SizeOf(typeName));
 
                pRetLen = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(UInt32)));
 
                if (pInBuf != IntPtr.Zero && pOutBuf != IntPtr.Zero)
                {
                    returnValue = OriginalSDK.CLIENT_QueryNewSystemInfoEx(lLoginID, strCommand, lChannel, pInBuf,
                                                         nBufSize, ref nError, pExtendInfo, waittime);
                    NetGetLastError(returnValue);
                    if (returnValue == true)
                    {
                        returnValue = OriginalSDK.CLIENT_ParseData(strCommand, pInBuf, pOutBuf, (UInt32)Marshal.SizeOf(typeName), pRetLen);
                        nRetLen = (UInt32)Marshal.PtrToStructure(pRetLen, typeof(UInt32));
                        obj = Marshal.PtrToStructure(pOutBuf, typeName);
                    }
                }
                NetGetLastError(returnValue);
            }
 
            finally
            {
                Marshal.FreeHGlobal(pExtendInfo);
                Marshal.FreeHGlobal(pInBuf);//Release fixed memory allocation
                Marshal.FreeHGlobal(pOutBuf);//Release fixed memory allocation
                Marshal.FreeHGlobal(pRetLen);//Release fixed memory allocation
 
                pExtendInfo = IntPtr.Zero;
                pInBuf = IntPtr.Zero;
                pOutBuf = IntPtr.Zero;
                pRetLen = IntPtr.Zero;
            }
            return returnValue;
        }
 
 
 
        /// <summary>
        /// start search record by search filter
        /// 打开查找录像文件
        /// </summary>
        /// <param name="lLoginID">Lonin return value 登陆ID</param>
        /// <param name="emRecordType">Record Type 录像类型</param>
        /// <param name="oCondition">search condition 查找条件</param>
        /// <param name="tyCondition">type of condition struct 查找条件对应结构体的类型</param>
        /// <param name="lFindID">lFindeHandle 返回的查找ID</param>
        /// <param name="waittime">Wait timeout, million second 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool FindRecord(IntPtr lLoginID, EM_NET_RECORD_TYPE emRecordType, object oCondition, Type tyCondition, ref IntPtr lFindID, int waittime)
        {
            bool result = false;
            IntPtr pCondition = IntPtr.Zero;
            NET_IN_FIND_RECORD_PARAM stuInParam = new NET_IN_FIND_RECORD_PARAM();
            NET_OUT_FIND_RECORD_PARAM stuOutParam = new NET_OUT_FIND_RECORD_PARAM();
            stuInParam.dwSize = (uint)Marshal.SizeOf(stuInParam);
            stuInParam.emType = emRecordType;
            try
            {
                if (oCondition == null || tyCondition == null)
                {
                    stuInParam.pQueryCondition = IntPtr.Zero;
                }
                else
                {
                    pCondition = Marshal.AllocHGlobal(Marshal.SizeOf(tyCondition));
                    Marshal.StructureToPtr(oCondition, pCondition, true);
                    stuInParam.pQueryCondition = pCondition;
                }
                stuOutParam.dwSize = (uint)Marshal.SizeOf(stuOutParam);
                result = OriginalSDK.CLIENT_FindRecord(lLoginID, ref stuInParam, ref stuOutParam, waittime);
                NetGetLastError(result);
                lFindID = stuOutParam.lFindeHandle;
            }
            finally
            {
                Marshal.FreeHGlobal(pCondition);
            }
            return result;
        }
 
        /// <summary>
        /// search record :nFilecount: need search items,  return value as media file items  return value
        /// 查找录像文件
        /// </summary>
        /// <param name="lFindeHandle">FindRecord's return value FindRecord返回值</param>
        /// <param name="nMaxNum">max number of search 最大的个数</param>
        /// <param name="nRetNum">return number 返回的个数</param>
        /// <param name="ls">list of Record 返回的录像列表</param>
        /// <param name="tyRecord">typeof Record 查找录像对应的结构的类型</param>
        /// <param name="waittime">Wait timeout, million second 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static int FindNextRecord(IntPtr lFindeHandle, int nMaxNum, ref int nRetNum, ref List<object> ls, Type tyRecord, int waittime)
        {
            int result = 0;
            IntPtr pRecordList = IntPtr.Zero;
            try
            {
                NET_IN_FIND_NEXT_RECORD_PARAM stuInParam = new NET_IN_FIND_NEXT_RECORD_PARAM();
                stuInParam.dwSize = (uint)Marshal.SizeOf(stuInParam);
                stuInParam.lFindeHandle = lFindeHandle;
                stuInParam.nFileCount = nMaxNum;
 
                NET_OUT_FIND_NEXT_RECORD_PARAM stuOutParam = new NET_OUT_FIND_NEXT_RECORD_PARAM();
                stuOutParam.dwSize = (uint)Marshal.SizeOf(stuOutParam);
                stuOutParam.nMaxRecordNum = nMaxNum;
 
                pRecordList = Marshal.AllocHGlobal(Marshal.SizeOf(tyRecord) * nMaxNum);
                for (int i = 0; i < nMaxNum; i++)
                {
                    Marshal.StructureToPtr(ls[i], IntPtr.Add(pRecordList, Marshal.SizeOf(tyRecord) * i), true);
                }
                stuOutParam.pRecordList = pRecordList;
 
                result = OriginalSDK.CLIENT_FindNextRecord(ref stuInParam, ref stuOutParam, waittime);
 
                if (result >= 0)
                {
                    nRetNum = stuOutParam.nRetRecordNum;
                    ls.Clear();
                    for (int i = 0; i < nRetNum; i++)
                    {
                        ls.Add(Marshal.PtrToStructure(IntPtr.Add(pRecordList, Marshal.SizeOf(tyRecord) * i), tyRecord));
                    }
                }
                else
                {
                    NetGetLastError(result);
                }
            }
            finally
            {
                Marshal.FreeHGlobal(pRecordList);
            }
 
            return result;
        }
 
        /// <summary>
        /// end record search
        /// 关闭查找
        /// </summary>
        /// <param name="lFindHandle">FindRecord's return value FindRecord返回值</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool FindRecordClose(IntPtr lFindHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_FindRecordClose(lFindHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// search records' count
        /// 查找录像的个数
        /// </summary>
        /// <param name="lFindHandle">FindRecord's return value FindRecord返回值</param>
        /// <param name="nRecordCount">records' count 录像的个数</param>
        /// <param name="waittime">Wait timeout, million second 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool QueryRecordCount(IntPtr lFindHandle, ref int nRecordCount, int waittime)
        {
            bool result = false;
            NET_IN_QUEYT_RECORD_COUNT_PARAM stuInParam = new NET_IN_QUEYT_RECORD_COUNT_PARAM();
            stuInParam.dwSize = (uint)Marshal.SizeOf(stuInParam);
            stuInParam.lFindeHandle = lFindHandle;
            NET_OUT_QUEYT_RECORD_COUNT_PARAM stuOutParam = new NET_OUT_QUEYT_RECORD_COUNT_PARAM();
            stuOutParam.dwSize = (uint)Marshal.SizeOf(stuOutParam);
 
            result = OriginalSDK.CLIENT_QueryRecordCount(ref stuInParam, ref stuOutParam, waittime);
            nRecordCount = stuOutParam.nRecordCount;
            NetGetLastError(result);
            return result;
        }
 
        #region <<Number State>>
        /// <summary>
        /// start find number state
        /// 打开查找数字统计状态
        /// </summary>
        /// <param name="lLoginID">CLIENT_Login's return value 登陆ID</param>
        /// <param name="pstInParam">In Param 输入参数</param>
        /// <param name="pstOutParam">Out Param, dwsize need assign too 输出参数</param>
        /// <returns>Find Handle 返回查找名柄</returns>
        public static IntPtr StartFindNumberStat(IntPtr lLoginID, ref NET_IN_FINDNUMBERSTAT pstInParam, ref NET_OUT_FINDNUMBERSTAT pstOutParam)
        {
            IntPtr pRet = IntPtr.Zero;
            pRet = OriginalSDK.CLIENT_StartFindNumberStat(lLoginID, ref pstInParam, ref pstOutParam);
            NetGetLastError(pRet);
            return pRet;
        }
 
        /// <summary>
        /// do find number state
        /// 查找数字统计状态
        /// </summary>
        /// <param name="lFindHandle">StartFindNumberStat return value StartFindNumberStat返回值</param>
        /// <param name="pstInParam">in param 输入参数</param>
        /// <param name="pNumberStats">number stats' array. 数字统计状态的数组</param>
        /// <returns>larger than 0: success. small than 0: fail 大于0成功,小于0失败</returns>
        public static int DoFindNumberStat(IntPtr lFindHandle, ref NET_IN_DOFINDNUMBERSTAT pstInParam, ref NET_NUMBERSTAT[] pNumberStats)
        {
            int nRet = 0;
            uint nMaxCount = pstInParam.nCount;
            IntPtr pBuffer = IntPtr.Zero;
            NET_OUT_DOFINDNUMBERSTAT stuOutParam = new NET_OUT_DOFINDNUMBERSTAT();
            int nUnitBufferSize = Marshal.SizeOf(typeof(NET_NUMBERSTAT));
            try
            {
                pBuffer = Marshal.AllocHGlobal(nUnitBufferSize * (int)nMaxCount);
                stuOutParam.dwSize = (uint)Marshal.SizeOf(stuOutParam);
                stuOutParam.pstuNumberStat = pBuffer;
                stuOutParam.nBufferLen = (int)nMaxCount * nUnitBufferSize;
                stuOutParam.nCount = (int)pstInParam.nCount;
 
                for (int i = 0; i < nMaxCount; i++)
                {
                    NET_NUMBERSTAT item = new NET_NUMBERSTAT();
                    item.dwSize = (uint)Marshal.SizeOf(item);
                    Marshal.StructureToPtr(item, IntPtr.Add(pBuffer, i * nUnitBufferSize), true);
                }
 
                nRet = OriginalSDK.CLIENT_DoFindNumberStat(lFindHandle, ref pstInParam, ref stuOutParam);
 
                NetGetLastError(nRet);
 
                if (nRet > 0)
                {
                    pNumberStats = new NET_NUMBERSTAT[stuOutParam.nCount];
                    for (int i = 0; i < stuOutParam.nCount; i++)
                    {
                        pNumberStats[i] = (NET_NUMBERSTAT)Marshal.PtrToStructure(IntPtr.Add(pBuffer, i * nUnitBufferSize), typeof(NET_NUMBERSTAT));
                    }
                }
            }
 
            finally
            {
                Marshal.FreeHGlobal(pBuffer);
                pBuffer = IntPtr.Zero;
            }
 
            return nRet;
        }
 
        /// <summary>
        /// stop find number state
        /// 关闭查找数字统计状态
        /// </summary>
        /// <param name="lFindHandle">StartFindNumberStat return value StartFindNumberStat返回值</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool StopFindNumberStat(IntPtr lFindHandle)
        {
            bool bRet = false;
            bRet = OriginalSDK.CLIENT_StopFindNumberStat(lFindHandle);
            NetGetLastError(bRet);
            return bRet;
        }
 
        /// <summary>
        /// subscribe video statistical summary
        /// 订阅视频统计摘要信息
        /// </summary>
        /// <param name="lLoginID">CLIENT_Login's return value 登陆ID</param>
        /// <param name="pInParam">in param 输入参数</param>
        /// <param name="pOutParam">out param, not useful, dwsize need assign too 输出参数</param>
        /// <param name="nWaitTime">Wait timeout, million second 等待时间</param>
        /// <returns>Attach Handle 订阅句柄</returns>
        public static IntPtr AttachVideoStatSummary(IntPtr lLoginID, ref NET_IN_ATTACH_VIDEOSTAT_SUM pInParam, ref NET_OUT_ATTACH_VIDEOSTAT_SUM pOutParam, int nWaitTime)
        {
            IntPtr pRet = IntPtr.Zero;
            pRet = OriginalSDK.CLIENT_AttachVideoStatSummary(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(pRet);
            return pRet;
        }
 
        /// <summary>
        /// unsubscribe video statistical summary
        /// 取消订阅视频统计摘要信息
        /// </summary>
        /// <param name="lAttachHandle">AttachVideoStatSummary returns value AttachVideoStatSummary返回值</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool DetachVideoStatSummary(IntPtr lAttachHandle)
        {
            bool bRet = false;
            bRet = OriginalSDK.CLIENT_DetachVideoStatSummary(lAttachHandle);
            NetGetLastError(bRet);
            return bRet;
        }
        #endregion
 
        #region <<Trans Com>>
        /// <summary>
        /// create transparent serial channel, change front-end device serial to transparent channel status
        /// 创建透明串口通道
        /// </summary>
        /// <param name="lLoginID">Login return value 登陆ID</param>
        /// <param name="TransComType">lower 2 bytes are serial type, 0:serial(232), 1:485 port; higher 2 bytes are channel number, start from 0  TransComType高2个字节表示串口序号,低2个字节表示串口类型</param>
        /// <param name="baudrate">serial baud rate,1~8 as 1200,2400,4800,9600,19200,38400,57600,115200 respectively 串口波特率</param>
        /// <param name="databits">serial data digit 4~8 represent 4~8 digits 串口数据位< /param>
        /// <param name="stopbits">serial stop digit 1 represent 1 digit, 2 represent 1-5 digit(s), 3 represent 2 digits 串口停止位</param>
        /// <param name="parity">serial inspection digit,1:odd,2:even,3: none  串口检测数据</param>
        /// <param name="cbTransCom">serial data callback, recall info sent from front-end device 串口数据回调</param>
        /// <param name="dwUser">user data 用户数据</param>
        /// <returns>successful return to transparent serial ID,failed return to 0. 失败返回0,成功返回大于0的值</returns>
        public static IntPtr CreateTransComChannel(IntPtr lLoginID, int TransComType, uint baudrate, uint databits, uint stopbits, uint parity, fTransComCallBack cbTransCom, IntPtr dwUser)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_CreateTransComChannel(lLoginID, TransComType, baudrate, databits, stopbits, parity, cbTransCom, dwUser);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// send transparent serial data, as sent data to front end data
        /// 透明串口发送数据
        /// </summary>
        /// <param name="lTransComChannel">transparent serial ID, interface CreateTransComChannel value  CreateTransComChannel返回值</param>
        /// <param name="byDatas">transparent serial data to send 发送的数据</param>
        /// <returns>successful return to TRUE,failed return to FALSE. 失败返回false 成功返回true</returns>
        public static bool SendTransComData(IntPtr lTransComChannel, byte[] byDatas)
        {
            bool result = false;
            IntPtr pBuffer = IntPtr.Zero;
            uint dwLength = (uint)byDatas.Length;
            try
            {
                pBuffer = Marshal.AllocHGlobal(byDatas.Length);
                for (int i = 0; i < dwLength; i++)
                {
                    Marshal.WriteByte(pBuffer, i, byDatas[i]);
                }
                result = OriginalSDK.CLIENT_SendTransComData(lTransComChannel, pBuffer, (uint)byDatas.Length);
            }
            finally
            {
                Marshal.FreeHGlobal(pBuffer);
            }
 
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// close transparent channel
        /// 关闭透明串口通道
        /// </summary>
        /// <param name="lTransComChannel">transparent serial ID, interface CreateTransComChannel return value CreateTransComChannel返回值</param>
        /// <returns>successful return to TRUE,failed return to FALSE 失败返回false 成功返回true</returns>
        public static bool DestroyTransComChannel(IntPtr lTransComChannel)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DestroyTransComChannel(lTransComChannel);
            NetGetLastError(result);
            return result;
        }
        #endregion <<Trans Com>>
 
        #region <<Security>>
        /// <summary>
        /// Set Security Key
        /// 设置安全密钥
        /// </summary>
        /// <param name="lPlayHandle">Play Handle 播放名柄</param>
        /// <param name="szKey">Security Key 安全密钥</param>
        /// <returns>failed return false, successful return true  失败返回false 成功返回true</returns>
        public static bool NetSetSecurityKey(IntPtr lPlayHandle, string szKey)
        {
            bool result = OriginalSDK.CLIENT_SetSecurityKey(lPlayHandle, szKey, (uint)szKey.Length);
            NetGetLastError(result);
            return result;
        }
 
        #endregion
 
        #region <<Monitor Wall>>
        public static bool QueryMatrixCardInfo(IntPtr lLoginID, ref NET_MATRIX_CARD_LIST pstuCardList, int nWaitTime)
        {
            bool result = OriginalSDK.CLIENT_QueryMatrixCardInfo(lLoginID, ref pstuCardList, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool GetSplitCaps(IntPtr lLoginId, int nChannel, ref NET_SPLIT_CAPS stuCaps, int nWaitTime)
        {
            bool result = OriginalSDK.CLIENT_GetSplitCaps(lLoginId, nChannel, ref stuCaps, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool GetSplitMode(IntPtr lLoginID, int nChannel, ref NET_SPLIT_MODE_INFO stuSplitInfo, int nWaitTime)
        {
            bool result = OriginalSDK.CLIENT_GetSplitMode(lLoginID, nChannel, ref stuSplitInfo, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool SetSplitMode(IntPtr lLoginID, int nChannel, ref NET_SPLIT_MODE_INFO stuSplitInfo, int nWaitTime)
        {
            bool result = OriginalSDK.CLIENT_SetSplitMode(lLoginID, nChannel, ref stuSplitInfo, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool OpenSplitWindow(IntPtr lLoginID, ref NET_IN_SPLIT_OPEN_WINDOW pInParam, ref NET_OUT_SPLIT_OPEN_WINDOW pOutParam, int nWaitTime)
        {
            bool result = OriginalSDK.CLIENT_OpenSplitWindow(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 设置显示源(pInparam, pOutParam内存由用户申请释放)
        /// set display source,user malloc and free (pInParam's and pOutParam's)memory
        /// </summary>
        public static bool MatrixSetCameras(IntPtr lLoginID, ref NET_IN_MATRIX_SET_CAMERAS pInParam, ref NET_OUT_MATRIX_SET_CAMERAS pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_MatrixSetCameras(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        // get all valid display source, return length is stuCameras.Length
        public static bool MatrixGetCameras(IntPtr lLoginID, out NET_MATRIX_CAMERA_INFO[] stuCameras, int nMaxCameraCount, int nWaitTime)
        {
            bool result = false;
            stuCameras = new NET_MATRIX_CAMERA_INFO[nMaxCameraCount];
            NET_IN_MATRIX_GET_CAMERAS stuInParam = new NET_IN_MATRIX_GET_CAMERAS();
            stuInParam.dwSize = (uint)Marshal.SizeOf(stuInParam.GetType());
            NET_OUT_MATRIX_GET_CAMERAS stuOutParam = new NET_OUT_MATRIX_GET_CAMERAS();
            stuOutParam.dwSize = (uint)Marshal.SizeOf(stuOutParam.GetType());
            try
            {
                int nBuflen = Marshal.SizeOf(typeof(NET_MATRIX_CAMERA_INFO)) * nMaxCameraCount;
                stuOutParam.pstuCameras = Marshal.AllocHGlobal(nBuflen);//开辟内存
                for (int i = 0; i < nMaxCameraCount; i++)
                {
                    stuCameras[i].dwSize = (uint)Marshal.SizeOf(stuCameras[i].GetType());
                    stuCameras[i].stuRemoteDevice.dwSize = (uint)Marshal.SizeOf(stuCameras[i].stuRemoteDevice.GetType());
                    IntPtr pstuCamTemp = IntPtr.Add(stuOutParam.pstuCameras, Marshal.SizeOf(typeof(NET_MATRIX_CAMERA_INFO)) * i);
                    Marshal.StructureToPtr(stuCameras[i], pstuCamTemp, true);
                }
                stuOutParam.nMaxCameraCount = nMaxCameraCount;
                result = OriginalSDK.CLIENT_MatrixGetCameras(lLoginID, ref stuInParam, ref stuOutParam, nWaitTime);
                NetGetLastError(result);
                if (result)
                {
                    int nRetCount = Math.Min(stuOutParam.nMaxCameraCount, stuOutParam.nRetCameraCount);
                    stuCameras = new NET_MATRIX_CAMERA_INFO[nRetCount];
                    for (int i = 0; i < nRetCount; i++)
                    {
                        IntPtr pstuCamTemp = IntPtr.Add(stuOutParam.pstuCameras, Marshal.SizeOf(typeof(NET_MATRIX_CAMERA_INFO)) * i);
                        stuCameras[i] = (NET_MATRIX_CAMERA_INFO)Marshal.PtrToStructure(pstuCamTemp, typeof(NET_MATRIX_CAMERA_INFO));
                    }
                }
            }
            finally
            {
                Marshal.FreeHGlobal(stuOutParam.pstuCameras);
            }
            return result;
        }
 
        public static bool SetSplitSource(IntPtr lLoginID, int nChannel, int nWindow, NET_SPLIT_SOURCE[] stuSplitSrcs, int nWaitTime)
        {
            bool result = false;
            IntPtr pstuSplitSrc = IntPtr.Zero;
            try
            {
                pstuSplitSrc = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_SPLIT_SOURCE)) * stuSplitSrcs.Length);
                for (int i = 0; i < stuSplitSrcs.Length; i++)
                {
                    IntPtr pstuSplitSrcTemp = IntPtr.Add(pstuSplitSrc, Marshal.SizeOf(typeof(NET_SPLIT_SOURCE)) * i);
                    Marshal.StructureToPtr(stuSplitSrcs[i], pstuSplitSrcTemp, true);
                }
                result = OriginalSDK.CLIENT_SetSplitSource(lLoginID, nChannel, nWindow, pstuSplitSrc, stuSplitSrcs.Length, nWaitTime);
            }
            finally
            {
                Marshal.FreeHGlobal(pstuSplitSrc);
            }
            NetGetLastError(result);
            return result;
        }
 
        public static bool SetSplitSourceEx(IntPtr lLoginID, NET_IN_SET_SPLIT_SOURCE inParam, ref NET_OUT_SET_SPLIT_SOURCE outParam, int nWaitTime)
        {
            bool result = OriginalSDK.CLIENT_SetSplitSourceEx(lLoginID, ref inParam, ref outParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
        #endregion
 
 
 
        #region <<config>>
 
        public static bool GetNewDevConfig(IntPtr lLoginID, Int32 lChannel, string strCommand, ref object obj, Type typeName, int waittime, IntPtr pReserved = new IntPtr())
        {
            bool returnValue = false;
            IntPtr pInBuf = IntPtr.Zero;
            IntPtr pOutBuf = IntPtr.Zero;
            IntPtr pLastBuf = IntPtr.Zero;
 
            UInt32 nBufSize = 1024 * 1024;
            int nError = 0;
 
            try
            {
                pInBuf = Marshal.AllocHGlobal((int)nBufSize);//Allocation of fixed specified the size of the memory space
                for (int i = 0; i < nBufSize; i++)
                {
                    Marshal.WriteByte(pInBuf, i, 0);
                }
                pOutBuf = Marshal.AllocHGlobal(Marshal.SizeOf(typeName));
                if (obj.GetType() == typeName)                            //if obj is boxinged type of typeName, some param(ex. dwsize) need trans to unmanaged memory
                {
                    Marshal.StructureToPtr(obj, pOutBuf, true);
                }
                else
                {
                    for (int i = 0; i < Marshal.SizeOf(typeName); i++)
                    {
                        Marshal.WriteByte(pOutBuf, i, 0);
                    }
                }
                pLastBuf = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(uint)));
                if (pInBuf != IntPtr.Zero && pOutBuf != IntPtr.Zero)
                {
                    returnValue = OriginalSDK.CLIENT_GetNewDevConfig(lLoginID, strCommand, lChannel, pInBuf,
                                                         nBufSize, out nError, waittime, pReserved);
                    if (returnValue == true)
                    {
                        returnValue = OriginalSDK.CLIENT_ParseData(strCommand, pInBuf, pOutBuf, (UInt32)Marshal.SizeOf(typeName), pLastBuf);
 
                        obj = Marshal.PtrToStructure(pOutBuf, typeName);
                    }
                }
            }
            finally
            {
                Marshal.FreeHGlobal(pInBuf);//Release fixed memory allocation
                Marshal.FreeHGlobal(pOutBuf);//Release fixed memory allocation
                Marshal.FreeHGlobal(pLastBuf);//Release fixed memory allocation
 
                pInBuf = IntPtr.Zero;
                pOutBuf = IntPtr.Zero;
                pLastBuf = IntPtr.Zero;
 
            }
            NetGetLastError(returnValue);
            return returnValue;
        }
 
        //get 
        public static bool GetNewDevConfig(IntPtr lLoginID, Int32 lChannel, string strCommand, ref object[] objs, Type typeName, int waittime, IntPtr pReserved = new IntPtr())
        {
            bool returnValue = false;
            IntPtr pInBuf = IntPtr.Zero;
            IntPtr pOutBuf = IntPtr.Zero;
            IntPtr pRetBytes = IntPtr.Zero;//pointer to int
            UInt32 nInBufSize = 1024 * 1024;
            int nOutBufSize = Marshal.SizeOf(typeName) * objs.Length;
            int nError = 0;
 
            try
            {
                pInBuf = Marshal.AllocHGlobal((int)nInBufSize);//Allocation of fixed specified the size of the memory space
                for (int i = 0; i < nInBufSize; i++)
                {
                    Marshal.WriteByte(pInBuf, i, 0);
                }
 
                pOutBuf = Marshal.AllocHGlobal(nOutBufSize);
                for (int index = 0; index < objs.Length; index++)
                {
                    IntPtr pOutBufOfIndex = pOutBuf + index * Marshal.SizeOf(typeName);
                    if (objs[index].GetType() == typeName)                            //if obj is boxinged type of typeName, some param(ex. dwsize) need trans to unmanaged memory
                    {
                        Marshal.StructureToPtr(objs[index], pOutBufOfIndex, true);
                    }
                    else
                    {
                        for (int i = 0; i < Marshal.SizeOf(typeName); i++)
                        {
                            Marshal.WriteByte(pOutBufOfIndex, i, 0);
                        }
                    }
                }
 
                pRetBytes = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(int)));
                Marshal.WriteInt32(pRetBytes, 0);
 
                if (pInBuf != IntPtr.Zero && pOutBuf != IntPtr.Zero)
                {
                    returnValue = OriginalSDK.CLIENT_GetNewDevConfig(lLoginID, strCommand, lChannel, pInBuf,
                                                         nInBufSize, out nError, waittime, pReserved);
 
                    if (returnValue == true)
                    {
                        returnValue = OriginalSDK.CLIENT_ParseData(strCommand, pInBuf, pOutBuf, (uint)nOutBufSize, pRetBytes);
                        if (returnValue)
                        {
                            int nRetStu = Marshal.ReadInt32(pRetBytes) / Marshal.SizeOf(typeName);
                            objs = new object[nRetStu];
                            for (int i = 0; i < nRetStu; i++)
                            {
                                objs[i] = Marshal.PtrToStructure(IntPtr.Add(pOutBuf, i * Marshal.SizeOf(typeName)), typeName);
                            }
                        }
                    }
                }
            }
 
            finally
            {
                Marshal.FreeHGlobal(pInBuf);//Release fixed memory allocation
                Marshal.FreeHGlobal(pOutBuf);//Release fixed memory allocation
                Marshal.FreeHGlobal(pRetBytes);
                pInBuf = IntPtr.Zero;
                pOutBuf = IntPtr.Zero;
                pRetBytes = IntPtr.Zero;
            }
            NetGetLastError(returnValue);
            return returnValue;
        }
 
        /// <summary>
        /// new version--Set the device information for internal use command function
        /// </summary>
        /// <param name="lLoginID">Equipment User LoginID:CLIENT_Login return value</param>
        /// <param name="lChannel">Channel number</param>
        /// <param name="dwCommand">Preparation of command</param>
        /// <param name="obj">objectObject</param>
        /// <param name="typeName">Type Name</param>
        /// <param name="waittime">Wait Time</param>
        /// <returns>true:success;false:failure</returns>
        public static bool SetNewDevConfig(IntPtr lLoginID, int lChannel, string strCommand, object obj, Type typeName, int waittime)
        {
            bool returnValue = false;
            IntPtr pInBuf = IntPtr.Zero;
            IntPtr pOutBuf = IntPtr.Zero;
 
            UInt32 nBufSize = 1024 * 1024;
            int nRestart = 0;
            int nError = 0;
 
            try
            {
                pInBuf = Marshal.AllocHGlobal(Marshal.SizeOf(typeName));
                for (int i = 0; i < Marshal.SizeOf(typeName); i++)
                {
                    Marshal.WriteByte(pInBuf, i, 0);
                }
                pOutBuf = Marshal.AllocHGlobal((int)nBufSize);
 
                for (int i = 0; i < nBufSize; i++)
                {
                    Marshal.WriteByte(pOutBuf, i, 0);
                }
 
                Marshal.StructureToPtr(obj, pInBuf, true);
                returnValue = OriginalSDK.CLIENT_PacketData(strCommand, pInBuf, (UInt32)Marshal.SizeOf(typeName), pOutBuf, nBufSize);
 
                if (returnValue)
                {
                    returnValue = OriginalSDK.CLIENT_SetNewDevConfig(lLoginID, strCommand, lChannel, pOutBuf,
                                     nBufSize, ref nError, ref nRestart, waittime);
                }
            }
 
            finally
            {
                Marshal.FreeHGlobal(pInBuf);//Release fixed memory allocation
                Marshal.FreeHGlobal(pOutBuf);//Release fixed memory allocation
                pInBuf = IntPtr.Zero;
                pOutBuf = IntPtr.Zero;
            }
            NetGetLastError(returnValue);
            return returnValue;
        }
 
        public static bool PacketData(string szCommand, IntPtr lpInBuffer, uint dwInBufferSize, IntPtr szOutBuffer, uint dwOutFufferSize)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_PacketData(szCommand, lpInBuffer, dwInBufferSize, szOutBuffer, dwOutFufferSize);
            NetGetLastError(result);
            return result;
        }
 
        public static bool SetNewDevConfigs(IntPtr lLoginID, int lChannel, string strCommand, object[] objs, Type typeName, int waittime)
        {
            bool returnValue = false;
            IntPtr pInBuf = IntPtr.Zero;
            IntPtr pOutBuf = IntPtr.Zero;
 
            UInt32 nBufSize = (uint)(1024 * 1024 * objs.Length);
            int nRestart = 0;
            int nError = 0;
 
            try
            {
                pInBuf = Marshal.AllocHGlobal(Marshal.SizeOf(typeName) * objs.Length);
                for (int index = 0; index < objs.Length; index++)
                {
                    IntPtr pInBufTemp = IntPtr.Add(pInBuf, index * Marshal.SizeOf(typeName));
                    for (int i = 0; i < Marshal.SizeOf(typeName); i++)
                    {
                        Marshal.WriteByte(pInBufTemp, i, 0);
                    }
                    Marshal.StructureToPtr(objs[index], pInBufTemp, true);
                }
 
 
 
                pOutBuf = Marshal.AllocHGlobal((int)nBufSize);
 
                for (int i = 0; i < nBufSize; i++)
                {
                    Marshal.WriteByte(pOutBuf, i, 0);
                }
                returnValue = OriginalSDK.CLIENT_PacketData(strCommand, pInBuf, (UInt32)(Marshal.SizeOf(typeName) * objs.Length), pOutBuf, nBufSize);
 
                if (returnValue)
                {
                    returnValue = OriginalSDK.CLIENT_SetNewDevConfig(lLoginID, strCommand, lChannel, pOutBuf,
                                     nBufSize, ref nError, ref nRestart, waittime);
                }
            }
 
            finally
            {
                Marshal.FreeHGlobal(pInBuf);//Release fixed memory allocation
                Marshal.FreeHGlobal(pOutBuf);//Release fixed memory allocation
                pInBuf = IntPtr.Zero;
                pOutBuf = IntPtr.Zero;
            }
            NetGetLastError(returnValue);
            return returnValue;
        }
 
        public static bool GetOperateConfig(IntPtr lLoginID, EM_CFG_OPERATE_TYPE cfg_type, int lChannel, ref object obj, Type typeName, int waittime)
        {
            bool result = false;
            IntPtr outPtr = IntPtr.Zero;
            try
            {
                outPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeName));
                Marshal.StructureToPtr(obj, outPtr, true);
                result = OriginalSDK.CLIENT_GetConfig(lLoginID, (int)cfg_type, lChannel, outPtr, (uint)Marshal.SizeOf(typeName), waittime, IntPtr.Zero);
                NetGetLastError(result);
                obj = Marshal.PtrToStructure(outPtr, typeName);
            }
            finally
            {
                Marshal.FreeHGlobal(outPtr);
            }
            return result;
        }
 
        public static bool SetOperateConfig(IntPtr lLoginID, EM_CFG_OPERATE_TYPE cfg_type, int lChannel, object obj, Type typeName, int waittime)
        {
            bool result = false;
            IntPtr inPtr = IntPtr.Zero;
            try
            {
                inPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeName));
                Marshal.StructureToPtr(obj, inPtr, true);
                result = OriginalSDK.CLIENT_SetConfig(lLoginID, (int)cfg_type, lChannel, inPtr, (uint)Marshal.SizeOf(typeName), waittime, IntPtr.Zero, IntPtr.Zero);
                NetGetLastError(result);
            }
            finally
            {
                Marshal.FreeHGlobal(inPtr);
            }
            return result;
        }
        /// <summary>
        /// 考勤机 - 读取设置
        /// </summary>
        /// <param name="lLoginID"></param>
        /// <param name="lChannel"></param>
        /// <param name="obj"></param>
        /// <param name="typeName"></param>
        /// <param name="waittime"></param>
        /// <returns></returns>
        public static bool GetAttendanceConfig(IntPtr lLoginID, int lChannel, ref object obj, Type typeName, int waittime)
        {
            bool result = false;
            IntPtr outPtr = IntPtr.Zero;
            try
            {
                outPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeName));
                Marshal.StructureToPtr(obj, outPtr, true);
                result = OriginalSDK.CLIENT_GetConfig(lLoginID, (int)EM_CFG_OPERATE_TYPE.ACCESSCTL_KEYBINDINGINFOCFG, lChannel, outPtr, (uint)Marshal.SizeOf(typeName), waittime, IntPtr.Zero);
                NetGetLastError(!result);
                obj = Marshal.PtrToStructure(outPtr, typeName);
            }
            finally
            {
                Marshal.FreeHGlobal(outPtr);
            }
            return result;
        }
 
        /// <summary>
        /// 考勤机 - 设置配置
        /// </summary>
        /// <param name="lLoginID"></param>
        /// <param name="lChannel"></param>
        /// <param name="obj"></param>
        /// <param name="typeName"></param>
        /// <param name="waittime"></param>
        /// <returns></returns>
        public static bool SetAttendanceConfig(IntPtr lLoginID, int lChannel, object obj, Type typeName, int waittime)
        {
            bool result = false;
            IntPtr inPtr = IntPtr.Zero;
            try
            {
                inPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeName));
                Marshal.StructureToPtr(obj, inPtr, true);
                result = OriginalSDK.CLIENT_SetConfig(lLoginID, (int)EM_CFG_OPERATE_TYPE.ACCESSCTL_KEYBINDINGINFOCFG, lChannel, inPtr, (uint)Marshal.SizeOf(typeName), waittime, IntPtr.Zero, IntPtr.Zero);
                NetGetLastError(result);
            }
            finally
            {
                Marshal.FreeHGlobal(inPtr);
            }
            return result;
        }
 
        #endregion
 
        #region <<Access Control>>
        /// <summary>
        /// Query device time
        /// </summary>
        /// <param name="lLoginID">CLIENT_Login's return value</param>
        /// <param name="DeviceTime">[out] Device Time</param>
        /// <param name="waittime">Wait timeout, million second</param>
        /// <returns>failed return false, successful return true</returns>
        public static bool QueryDeviceTime(IntPtr lLoginID, ref NET_TIME pDeviceTime, int waittime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_QueryDeviceTime(lLoginID, ref pDeviceTime, waittime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Set device time 
        /// </summary>
        /// <param name="lLoginID">CLIENT_Login's return value</param>
        /// <param name="DeviceTime">deivce time</param>
        /// <returns>failed return false, successful return true</returns>
        public static bool SetupDeviceTime(IntPtr lLoginID, NET_TIME DeviceTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetupDeviceTime(lLoginID, ref DeviceTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// remove anti-submarine alarm
        /// </summary>
        /// <param name="lLoginID">CLIENT_Login's return value</param>
        /// <param name="pInParam">remove anti-submarine alarm input parameter</param>
        /// <param name="pOutParam">remove anti-submarine alarm output parameter</param>
        /// <param name="nWaitTime">Wait timeout, million second</param>
        /// <returns>failed return false, successful return true</returns>
        public static bool ClearRepeatEnter(IntPtr lLoginID, ref NET_IN_CLEAR_REPEAT_ENTER pInParam, ref NET_OUT_CLEAR_REPEAT_ENTER pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_ClearRepeatEnter(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool FaceInfoOpreate(IntPtr lLoginID, EM_FACEINFO_OPREATE_TYPE emType, IntPtr pInParam, IntPtr pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_FaceInfoOpreate(lLoginID, emType, pInParam, pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static IntPtr StartFindFaceInfo(IntPtr lLoginID, NET_IN_FACEINFO_START_FIND inParam, ref NET_OUT_FACEINFO_START_FIND outParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_StartFindFaceInfo(lLoginID, ref inParam, ref outParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool DoFindFaceInfo(IntPtr lFindHandle, NET_IN_FACEINFO_DO_FIND inParam, ref NET_OUT_FACEINFO_DO_FIND outParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DoFindFaceInfo(lFindHandle, ref inParam, ref outParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool StopFindFaceInfo(IntPtr lFindHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopFindFaceInfo(lFindHandle);
            NetGetLastError(result);
            return result;
        }
 
        #endregion
 
        #region <<access control V2>>
 
        public static bool InsertOperateAccessUserService(IntPtr lLoginID, NET_ACCESS_USER_INFO[] stInParam, out NET_EM_FAILCODE[] stOutParam, int nWaitTime)
        {
            bool bRet = false;
            int stuCount = stInParam.Length;
            IntPtr pInBuf = IntPtr.Zero;
            IntPtr pOutBuf = IntPtr.Zero;
            IntPtr pInArrayBuf = IntPtr.Zero;
            IntPtr pOutArrayBuf = IntPtr.Zero;
            NET_IN_ACCESS_USER_SERVICE_INSERT stuInInfo = new NET_IN_ACCESS_USER_SERVICE_INSERT();
            NET_OUT_ACCESS_USER_SERVICE_INSERT stuOutInfo = new NET_OUT_ACCESS_USER_SERVICE_INSERT();
 
            try
            {
                pInBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuInInfo));
                pOutBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuOutInfo));
                pInArrayBuf = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_ACCESS_USER_INFO)) * stuCount);
                pOutArrayBuf = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_EM_FAILCODE)) * stuCount);
 
                for (int i = 0; i < stuCount; i++)
                {
                    IntPtr pDst = IntPtr.Add(pInArrayBuf, Marshal.SizeOf(typeof(NET_ACCESS_USER_INFO)) * i);
                    Marshal.StructureToPtr(stInParam[i], pDst, true);
                }
 
                stuInInfo.dwSize = (uint)Marshal.SizeOf(stuInInfo);
                stuInInfo.nInfoNum = stuCount;
                stuInInfo.pUserInfo = pInArrayBuf;
 
                stuOutInfo.dwSize = (uint)Marshal.SizeOf(stuOutInfo);
                stuOutInfo.nMaxRetNum = stuCount;
                stuOutInfo.pFailCode = pOutArrayBuf;
 
 
                Marshal.StructureToPtr(stuInInfo, pInBuf, true);
                Marshal.StructureToPtr(stuOutInfo, pOutBuf, true);
                bRet = OriginalSDK.CLIENT_OperateAccessUserService(lLoginID, EM_ACCESS_CTL_USER_SERVICE.INSERT, pInBuf, pOutBuf, nWaitTime);
                stuOutInfo = (NET_OUT_ACCESS_USER_SERVICE_INSERT)Marshal.PtrToStructure(pOutBuf, typeof(NET_OUT_ACCESS_USER_SERVICE_INSERT));
                stOutParam = new NET_EM_FAILCODE[stuOutInfo.nMaxRetNum];
                for (int i = 0; i < stuOutInfo.nMaxRetNum; i++)
                {
                    IntPtr pDst = IntPtr.Add(pOutArrayBuf, Marshal.SizeOf(typeof(NET_EM_FAILCODE)) * i);
                    stOutParam[i] = (NET_EM_FAILCODE)Marshal.PtrToStructure(pDst, typeof(NET_EM_FAILCODE));
                }
 
                NetGetLastError(bRet);
                return bRet;
            }
            finally
            {
                Marshal.FreeHGlobal(pInBuf);
                Marshal.FreeHGlobal(pOutBuf);
                Marshal.FreeHGlobal(pInArrayBuf);
                Marshal.FreeHGlobal(pOutArrayBuf);
            }
        }
 
        public static bool InsertOperateAccessCardService(IntPtr lLoginID, NET_ACCESS_CARD_INFO[] stInParam, out NET_EM_FAILCODE[] stOutParam, int nWaitTime)
        {
            bool bRet = false;
            int stuCount = stInParam.Length;
            IntPtr pInBuf = IntPtr.Zero;
            IntPtr pOutBuf = IntPtr.Zero;
            IntPtr pInArrayBuf = IntPtr.Zero;
            IntPtr pOutArrayBuf = IntPtr.Zero;
            NET_IN_ACCESS_CARD_SERVICE_INSERT stuInInfo = new NET_IN_ACCESS_CARD_SERVICE_INSERT();
            NET_OUT_ACCESS_CARD_SERVICE_INSERT stuOutInfo = new NET_OUT_ACCESS_CARD_SERVICE_INSERT();
 
            try
            {
                pInBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuInInfo));
                pOutBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuOutInfo));
                pInArrayBuf = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_ACCESS_CARD_INFO)) * stuCount);
                pOutArrayBuf = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_EM_FAILCODE)) * stuCount);
 
                for (int i = 0; i < stuCount; i++)
                {
                    IntPtr pDst = IntPtr.Add(pInArrayBuf, Marshal.SizeOf(typeof(NET_ACCESS_CARD_INFO)) * i);
                    Marshal.StructureToPtr(stInParam[i], pDst, true);
                }
 
                stuInInfo.dwSize = (uint)Marshal.SizeOf(stuInInfo);
                stuInInfo.nInfoNum = stuCount;
                stuInInfo.pCardInfo = pInArrayBuf;
 
                stuOutInfo.dwSize = (uint)Marshal.SizeOf(stuOutInfo);
                stuOutInfo.nMaxRetNum = stuCount;
                stuOutInfo.pFailCode = pOutArrayBuf;
 
 
                Marshal.StructureToPtr(stuInInfo, pInBuf, true);
                Marshal.StructureToPtr(stuOutInfo, pOutBuf, true);
                bRet = OriginalSDK.CLIENT_OperateAccessCardService(lLoginID, EM_ACCESS_CTL_CARD_SERVICE.INSERT, pInBuf, pOutBuf, nWaitTime);
                stuOutInfo = (NET_OUT_ACCESS_CARD_SERVICE_INSERT)Marshal.PtrToStructure(pOutBuf, typeof(NET_OUT_ACCESS_CARD_SERVICE_INSERT));
                stOutParam = new NET_EM_FAILCODE[stuOutInfo.nMaxRetNum];
                for (int i = 0; i < stuOutInfo.nMaxRetNum; i++)
                {
                    IntPtr pDst = IntPtr.Add(pOutArrayBuf, Marshal.SizeOf(typeof(NET_EM_FAILCODE)) * i);
                    stOutParam[i] = (NET_EM_FAILCODE)Marshal.PtrToStructure(pDst, typeof(NET_EM_FAILCODE));
                }
 
                NetGetLastError(bRet);
                return bRet;
            }
            finally
            {
                Marshal.FreeHGlobal(pInBuf);
                Marshal.FreeHGlobal(pOutBuf);
                Marshal.FreeHGlobal(pInArrayBuf);
                Marshal.FreeHGlobal(pOutArrayBuf);
            }
        }
 
        public static bool InsertOperateAccessFingerprintService(IntPtr lLoginID, NET_ACCESS_FINGERPRINT_INFO[] stInParam, out NET_EM_FAILCODE[] stOutParam, int nWaitTime)
        {
            bool bRet = false;
            int stuCount = stInParam.Length;
            IntPtr pInBuf = IntPtr.Zero;
            IntPtr pOutBuf = IntPtr.Zero;
            IntPtr pInArrayBuf = IntPtr.Zero;
            IntPtr pOutArrayBuf = IntPtr.Zero;
            NET_IN_ACCESS_FINGERPRINT_SERVICE_INSERT stuInInfo = new NET_IN_ACCESS_FINGERPRINT_SERVICE_INSERT();
            NET_OUT_ACCESS_FINGERPRINT_SERVICE_INSERT stuOutInfo = new NET_OUT_ACCESS_FINGERPRINT_SERVICE_INSERT();
 
            try
            {
                pInBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuInInfo));
                pOutBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuOutInfo));
                pInArrayBuf = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_ACCESS_FINGERPRINT_INFO)) * stuCount);
                pOutArrayBuf = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_EM_FAILCODE)) * stuCount);
 
                for (int i = 0; i < stuCount; i++)
                {
                    IntPtr pDst = IntPtr.Add(pInArrayBuf, Marshal.SizeOf(typeof(NET_ACCESS_FINGERPRINT_INFO)) * i);
                    Marshal.StructureToPtr(stInParam[i], pDst, true);
                }
 
                stuInInfo.dwSize = (uint)Marshal.SizeOf(stuInInfo);
                stuInInfo.nFpNum = stuCount;
                stuInInfo.pFingerPrintInfo = pInArrayBuf;
 
                stuOutInfo.dwSize = (uint)Marshal.SizeOf(stuOutInfo);
                stuOutInfo.nMaxRetNum = stuCount;
                stuOutInfo.pFailCode = pOutArrayBuf;
 
 
                Marshal.StructureToPtr(stuInInfo, pInBuf, true);
                Marshal.StructureToPtr(stuOutInfo, pOutBuf, true);
                bRet = OriginalSDK.CLIENT_OperateAccessFingerprintService(lLoginID, EM_ACCESS_CTL_FINGERPRINT_SERVICE.INSERT, pInBuf, pOutBuf, nWaitTime);
                stuOutInfo = (NET_OUT_ACCESS_FINGERPRINT_SERVICE_INSERT)Marshal.PtrToStructure(pOutBuf, typeof(NET_OUT_ACCESS_FINGERPRINT_SERVICE_INSERT));
                stOutParam = new NET_EM_FAILCODE[stuOutInfo.nMaxRetNum];
                for (int i = 0; i < stuOutInfo.nMaxRetNum; i++)
                {
                    IntPtr pDst = IntPtr.Add(pOutArrayBuf, Marshal.SizeOf(typeof(NET_EM_FAILCODE)) * i);
                    stOutParam[i] = (NET_EM_FAILCODE)Marshal.PtrToStructure(pDst, typeof(NET_EM_FAILCODE));
                }
 
                NetGetLastError(bRet);
                return bRet;
            }
            finally
            {
                Marshal.FreeHGlobal(pInBuf);
                Marshal.FreeHGlobal(pOutBuf);
                Marshal.FreeHGlobal(pInArrayBuf);
                Marshal.FreeHGlobal(pOutArrayBuf);
            }
        }
 
        public static bool GetOperateAccessUserService(IntPtr lLoginID, string[] userid, out NET_ACCESS_USER_INFO[] stOutParam1, out NET_EM_FAILCODE[] stOutParam2, int nWaitTime)
        {
            bool bRet = false;
            int stuCount = userid.Length;
            IntPtr pInBuf = IntPtr.Zero;
            IntPtr pOutBuf = IntPtr.Zero;
            IntPtr pOutInfoArrayBuf = IntPtr.Zero;
            IntPtr pOutErrorArrayBuf = IntPtr.Zero;
            NET_IN_ACCESS_USER_SERVICE_GET stuInInfo = new NET_IN_ACCESS_USER_SERVICE_GET();
 
            NET_OUT_ACCESS_USER_SERVICE_GET stuOutInfo = new NET_OUT_ACCESS_USER_SERVICE_GET();
 
            try
            {
                int userInfoLen = Marshal.SizeOf(typeof(NET_ACCESS_USER_INFO));
                pInBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuInInfo));
                pOutBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuOutInfo));
                pOutInfoArrayBuf = Marshal.AllocHGlobal(userInfoLen * stuCount);
                pOutErrorArrayBuf = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_EM_FAILCODE)) * stuCount);
                NET_ACCESS_USER_INFO userInfo = new NET_ACCESS_USER_INFO();
                for (int i = 0; i < stuCount; i++)
                {
                    Marshal.StructureToPtr(userInfo, IntPtr.Add(pOutInfoArrayBuf, userInfoLen * i), true);
                }
 
                stuInInfo.dwSize = (uint)Marshal.SizeOf(stuInInfo);
                stuInInfo.szUserID = new NET_STRING_32_USER_ID[100];
                stuInInfo.nUserNum = stuCount;
                for (int i = 0; i < Math.Min(stuCount, stuInInfo.szUserID.Length); i++)
                {
                    stuInInfo.szUserID[i].szUserID = userid[i];
                }
 
                stuOutInfo.dwSize = (uint)Marshal.SizeOf(stuOutInfo);
                stuOutInfo.nMaxRetNum = stuCount;
                stuOutInfo.pFailCode = pOutErrorArrayBuf;
                stuOutInfo.pUserInfo = pOutInfoArrayBuf;
 
                Marshal.StructureToPtr(stuInInfo, pInBuf, true);
                Marshal.StructureToPtr(stuOutInfo, pOutBuf, true);
                bRet = OriginalSDK.CLIENT_OperateAccessUserService(lLoginID, EM_ACCESS_CTL_USER_SERVICE.GET, pInBuf, pOutBuf, nWaitTime);
                stuOutInfo = (NET_OUT_ACCESS_USER_SERVICE_GET)Marshal.PtrToStructure(pOutBuf, typeof(NET_OUT_ACCESS_USER_SERVICE_GET));
 
                stOutParam1 = new NET_ACCESS_USER_INFO[stuOutInfo.nMaxRetNum];
                for (int i = 0; i < stuCount; i++)
                {
                    IntPtr pDst = IntPtr.Add(pOutInfoArrayBuf, userInfoLen * i);
                    stOutParam1[i] = (NET_ACCESS_USER_INFO)Marshal.PtrToStructure(pDst, typeof(NET_ACCESS_USER_INFO));
                }
                stOutParam2 = new NET_EM_FAILCODE[stuOutInfo.nMaxRetNum];
                for (int i = 0; i < stuOutInfo.nMaxRetNum; i++)
                {
                    IntPtr pDst = IntPtr.Add(pOutErrorArrayBuf, Marshal.SizeOf(typeof(NET_EM_FAILCODE)) * i);
                    stOutParam2[i] = (NET_EM_FAILCODE)Marshal.PtrToStructure(pDst, typeof(NET_EM_FAILCODE));
                }
 
                NetGetLastError(bRet);
                return bRet;
            }
            finally
            {
                Marshal.FreeHGlobal(pInBuf);
                Marshal.FreeHGlobal(pOutBuf);
                Marshal.FreeHGlobal(pOutInfoArrayBuf);
                Marshal.FreeHGlobal(pOutErrorArrayBuf);
            }
        }
 
        public static bool GetOperateAccessCardService(IntPtr lLoginID, string[] Cardid, out NET_ACCESS_CARD_INFO[] stOutParam1, out NET_EM_FAILCODE[] stOutParam2, int nWaitTime)
        {
            bool bRet = false;
            int stuCount = Cardid.Length;
            IntPtr pInBuf = IntPtr.Zero;
            IntPtr pOutBuf = IntPtr.Zero;
            IntPtr pOutInfoArrayBuf = IntPtr.Zero;
            IntPtr pOutErrorArrayBuf = IntPtr.Zero;
            NET_IN_ACCESS_CARD_SERVICE_GET stuInInfo = new NET_IN_ACCESS_CARD_SERVICE_GET();
            NET_OUT_ACCESS_CARD_SERVICE_GET stuOutInfo = new NET_OUT_ACCESS_CARD_SERVICE_GET();
 
            try
            {
                pInBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuInInfo));
                pOutBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuOutInfo));
                pOutInfoArrayBuf = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_ACCESS_CARD_INFO)) * stuCount);
                pOutErrorArrayBuf = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_EM_FAILCODE)) * stuCount);
 
 
 
                stuInInfo.dwSize = (uint)Marshal.SizeOf(stuInInfo);
                stuInInfo.szCardNo = new NET_STRING_32_CARD_NO[100];
                stuInInfo.nCardNum = stuCount;
                for (int i = 0; i < Math.Min(stuCount, stuInInfo.szCardNo.Length); i++)
                {
                    stuInInfo.szCardNo[i].szCardNo = Cardid[i];
                }
 
                stuOutInfo.dwSize = (uint)Marshal.SizeOf(stuOutInfo);
                stuOutInfo.nMaxRetNum = stuCount;
                stuOutInfo.pFailCode = pOutErrorArrayBuf;
                stuOutInfo.pCardInfo = pOutInfoArrayBuf;
 
                Marshal.StructureToPtr(stuInInfo, pInBuf, true);
                Marshal.StructureToPtr(stuOutInfo, pOutBuf, true);
                bRet = OriginalSDK.CLIENT_OperateAccessCardService(lLoginID, EM_ACCESS_CTL_CARD_SERVICE.GET, pInBuf, pOutBuf, nWaitTime);
                stuOutInfo = (NET_OUT_ACCESS_CARD_SERVICE_GET)Marshal.PtrToStructure(pOutBuf, typeof(NET_OUT_ACCESS_CARD_SERVICE_GET));
 
                stOutParam1 = new NET_ACCESS_CARD_INFO[stuOutInfo.nMaxRetNum];
                for (int i = 0; i < stuCount; i++)
                {
                    IntPtr pDst = IntPtr.Add(pOutInfoArrayBuf, Marshal.SizeOf(typeof(NET_ACCESS_CARD_INFO)) * i);
                    stOutParam1[i] = (NET_ACCESS_CARD_INFO)Marshal.PtrToStructure(pDst, typeof(NET_ACCESS_CARD_INFO));
                }
                stOutParam2 = new NET_EM_FAILCODE[stuOutInfo.nMaxRetNum];
                for (int i = 0; i < stuOutInfo.nMaxRetNum; i++)
                {
                    IntPtr pDst = IntPtr.Add(pOutErrorArrayBuf, Marshal.SizeOf(typeof(NET_EM_FAILCODE)) * i);
                    stOutParam2[i] = (NET_EM_FAILCODE)Marshal.PtrToStructure(pDst, typeof(NET_EM_FAILCODE));
                }
 
                NetGetLastError(bRet);
                return bRet;
            }
            finally
            {
                Marshal.FreeHGlobal(pInBuf);
                Marshal.FreeHGlobal(pOutBuf);
                Marshal.FreeHGlobal(pOutInfoArrayBuf);
                Marshal.FreeHGlobal(pOutErrorArrayBuf);
            }
        }
 
        public static bool GetOperateAccessFingerprintService(IntPtr lLoginID, string userid, IntPtr pFingerprintData, int dataLen, out NET_ACCESS_FINGERPRINT_INFO stOutParam1, int nWaitTime)
        {
            bool bRet = false;
            IntPtr pInBuf = IntPtr.Zero;
            IntPtr pOutBuf = IntPtr.Zero;
 
            NET_IN_ACCESS_FINGERPRINT_SERVICE_GET stuInInfo = new NET_IN_ACCESS_FINGERPRINT_SERVICE_GET();
 
            NET_OUT_ACCESS_FINGERPRINT_SERVICE_GET stuOutInfo = new NET_OUT_ACCESS_FINGERPRINT_SERVICE_GET();
 
            try
            {
                pInBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuInInfo));
                pOutBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuOutInfo));
 
                stuInInfo.dwSize = (uint)Marshal.SizeOf(stuInInfo);
                stuInInfo.szUserID = userid;
                stuOutInfo.dwSize = (uint)Marshal.SizeOf(stuOutInfo);
                stuOutInfo.nMaxFingerDataLength = dataLen;
                stuOutInfo.pbyFingerData = pFingerprintData;
 
                Marshal.StructureToPtr(stuInInfo, pInBuf, true);
                Marshal.StructureToPtr(stuOutInfo, pOutBuf, true);
                bRet = OriginalSDK.CLIENT_OperateAccessFingerprintService(lLoginID, EM_ACCESS_CTL_FINGERPRINT_SERVICE.GET, pInBuf, pOutBuf, nWaitTime);
                stuOutInfo = (NET_OUT_ACCESS_FINGERPRINT_SERVICE_GET)Marshal.PtrToStructure(pOutBuf, typeof(NET_OUT_ACCESS_FINGERPRINT_SERVICE_GET));
                stOutParam1 = new NET_ACCESS_FINGERPRINT_INFO();
                stOutParam1.szUserID = userid;
                stOutParam1.nDuressIndex = stuOutInfo.nDuressIndex;
                stOutParam1.nPacketLen = stuOutInfo.nSinglePacketLength;
                stOutParam1.nPacketNum = stuOutInfo.nRetFingerPrintCount;
                stOutParam1.szFingerPrintInfo = stuOutInfo.pbyFingerData;
 
                return bRet;
            }
            finally
            {
                Marshal.FreeHGlobal(pInBuf);
                Marshal.FreeHGlobal(pOutBuf);
            }
 
        }
 
        public static bool RemoveOperateAccessUserService(IntPtr lLoginID, string[] userid, out NET_EM_FAILCODE[] stOutParam, int nWaitTime)
        {
            bool bRet = false;
            int stuCount = userid.Length;
            IntPtr pInBuf = IntPtr.Zero;
            IntPtr pOutBuf = IntPtr.Zero;
            IntPtr pOutArrayBuf = IntPtr.Zero;
            NET_IN_ACCESS_USER_SERVICE_REMOVE stuInInfo = new NET_IN_ACCESS_USER_SERVICE_REMOVE();
            NET_OUT_ACCESS_USER_SERVICE_REMOVE stuOutInfo = new NET_OUT_ACCESS_USER_SERVICE_REMOVE();
 
            try
            {
                pInBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuInInfo));
                pOutBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuOutInfo));
                pOutArrayBuf = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_EM_FAILCODE)) * stuCount);
 
                stuInInfo.dwSize = (uint)Marshal.SizeOf(stuInInfo);
                stuInInfo.szUserID = new NET_STRING_32_USER_ID[100];
                stuInInfo.nUserNum = stuCount;
                for (int i = 0; i < Math.Min(stuCount, stuInInfo.szUserID.Length); i++)
                {
                    stuInInfo.szUserID[i].szUserID = userid[i];
                }
 
                stuOutInfo.dwSize = (uint)Marshal.SizeOf(stuOutInfo);
                stuOutInfo.nMaxRetNum = stuCount;
                stuOutInfo.pFailCode = pOutArrayBuf;
 
 
                Marshal.StructureToPtr(stuInInfo, pInBuf, true);
                Marshal.StructureToPtr(stuOutInfo, pOutBuf, true);
                bRet = OriginalSDK.CLIENT_OperateAccessUserService(lLoginID, EM_ACCESS_CTL_USER_SERVICE.REMOVE, pInBuf, pOutBuf, nWaitTime);
                stuOutInfo = (NET_OUT_ACCESS_USER_SERVICE_REMOVE)Marshal.PtrToStructure(pOutBuf, typeof(NET_OUT_ACCESS_USER_SERVICE_REMOVE));
                stOutParam = new NET_EM_FAILCODE[stuOutInfo.nMaxRetNum];
                for (int i = 0; i < stuOutInfo.nMaxRetNum; i++)
                {
                    IntPtr pDst = IntPtr.Add(pOutArrayBuf, Marshal.SizeOf(typeof(NET_EM_FAILCODE)) * i);
                    stOutParam[i] = (NET_EM_FAILCODE)Marshal.PtrToStructure(pDst, typeof(NET_EM_FAILCODE));
                }
 
                NetGetLastError(bRet);
                return bRet;
            }
            finally
            {
                Marshal.FreeHGlobal(pInBuf);
                Marshal.FreeHGlobal(pOutBuf);
                Marshal.FreeHGlobal(pOutArrayBuf);
            }
        }
 
        public static bool RemoveOperateAccessCardService(IntPtr lLoginID, string[] Cardid, out NET_EM_FAILCODE[] stOutParam, int nWaitTime)
        {
            bool bRet = false;
            int stuCount = Cardid.Length;
            IntPtr pInBuf = IntPtr.Zero;
            IntPtr pOutBuf = IntPtr.Zero;
            IntPtr pOutArrayBuf = IntPtr.Zero;
            NET_IN_ACCESS_CARD_SERVICE_REMOVE stuInInfo = new NET_IN_ACCESS_CARD_SERVICE_REMOVE();
            NET_OUT_ACCESS_CARD_SERVICE_REMOVE stuOutInfo = new NET_OUT_ACCESS_CARD_SERVICE_REMOVE();
 
            try
            {
                pInBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuInInfo));
                pOutBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuOutInfo));
                pOutArrayBuf = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_EM_FAILCODE)) * stuCount);
 
                stuInInfo.dwSize = (uint)Marshal.SizeOf(stuInInfo);
                stuInInfo.szCardNo = new NET_STRING_32_CARD_NO[100];
                stuInInfo.nCardNum = stuCount;
                for (int i = 0; i < Math.Min(stuCount, stuInInfo.szCardNo.Length); i++)
                {
                    stuInInfo.szCardNo[i].szCardNo = Cardid[i];
                }
 
                stuOutInfo.dwSize = (uint)Marshal.SizeOf(stuOutInfo);
                stuOutInfo.nMaxRetNum = stuCount;
                stuOutInfo.pFailCode = pOutArrayBuf;
 
 
                Marshal.StructureToPtr(stuInInfo, pInBuf, true);
                Marshal.StructureToPtr(stuOutInfo, pOutBuf, true);
                bRet = OriginalSDK.CLIENT_OperateAccessCardService(lLoginID, EM_ACCESS_CTL_CARD_SERVICE.REMOVE, pInBuf, pOutBuf, nWaitTime);
                stuOutInfo = (NET_OUT_ACCESS_CARD_SERVICE_REMOVE)Marshal.PtrToStructure(pOutBuf, typeof(NET_OUT_ACCESS_CARD_SERVICE_REMOVE));
                stOutParam = new NET_EM_FAILCODE[stuOutInfo.nMaxRetNum];
                for (int i = 0; i < stuOutInfo.nMaxRetNum; i++)
                {
                    IntPtr pDst = IntPtr.Add(pOutArrayBuf, Marshal.SizeOf(typeof(NET_EM_FAILCODE)) * i);
                    stOutParam[i] = (NET_EM_FAILCODE)Marshal.PtrToStructure(pDst, typeof(NET_EM_FAILCODE));
                }
 
                NetGetLastError(bRet);
                return bRet;
            }
            finally
            {
                Marshal.FreeHGlobal(pInBuf);
                Marshal.FreeHGlobal(pOutBuf);
                Marshal.FreeHGlobal(pOutArrayBuf);
            }
        }
 
        public static bool RemoveOperateAccessFingerprintService(IntPtr lLoginID, string[] userid, out NET_EM_FAILCODE[] stOutParam, int nWaitTime)
        {
            bool bRet = false;
            int stuCount = userid.Length;
            IntPtr pInBuf = IntPtr.Zero;
            IntPtr pOutBuf = IntPtr.Zero;
            IntPtr pOutArrayBuf = IntPtr.Zero;
            NET_IN_ACCESS_FINGERPRINT_SERVICE_REMOVE stuInInfo = new NET_IN_ACCESS_FINGERPRINT_SERVICE_REMOVE();
            NET_OUT_ACCESS_FINGERPRINT_SERVICE_REMOVE stuOutInfo = new NET_OUT_ACCESS_FINGERPRINT_SERVICE_REMOVE();
 
            try
            {
                pInBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuInInfo));
                pOutBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuOutInfo));
                pOutArrayBuf = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_EM_FAILCODE)) * stuCount);
 
                stuInInfo.dwSize = (uint)Marshal.SizeOf(stuInInfo);
                stuInInfo.szUserID = new NET_STRING_32_USER_ID[100];
                stuInInfo.nUserNum = stuCount;
                for (int i = 0; i < Math.Min(stuCount, stuInInfo.szUserID.Length); i++)
                {
                    stuInInfo.szUserID[i].szUserID = userid[i];
                }
 
                stuOutInfo.dwSize = (uint)Marshal.SizeOf(stuOutInfo);
                stuOutInfo.nMaxRetNum = stuCount;
                stuOutInfo.pFailCode = pOutArrayBuf;
 
 
                Marshal.StructureToPtr(stuInInfo, pInBuf, true);
                Marshal.StructureToPtr(stuOutInfo, pOutBuf, true);
                bRet = OriginalSDK.CLIENT_OperateAccessFingerprintService(lLoginID, EM_ACCESS_CTL_FINGERPRINT_SERVICE.REMOVE, pInBuf, pOutBuf, nWaitTime);
                stuOutInfo = (NET_OUT_ACCESS_FINGERPRINT_SERVICE_REMOVE)Marshal.PtrToStructure(pOutBuf, typeof(NET_OUT_ACCESS_FINGERPRINT_SERVICE_REMOVE));
                stOutParam = new NET_EM_FAILCODE[stuOutInfo.nMaxRetNum];
                for (int i = 0; i < stuOutInfo.nMaxRetNum; i++)
                {
                    IntPtr pDst = IntPtr.Add(pOutArrayBuf, Marshal.SizeOf(typeof(NET_EM_FAILCODE)) * i);
                    stOutParam[i] = (NET_EM_FAILCODE)Marshal.PtrToStructure(pDst, typeof(NET_EM_FAILCODE));
                }
 
                NetGetLastError(bRet);
                return bRet;
            }
            finally
            {
                Marshal.FreeHGlobal(pInBuf);
                Marshal.FreeHGlobal(pOutBuf);
                Marshal.FreeHGlobal(pOutArrayBuf);
            }
        }
 
        public static bool ClearOperateAccessUserService(IntPtr lLoginID, int nWaitTime)
        {
            bool bRet = false;
            IntPtr pInBuf = IntPtr.Zero;
            IntPtr pOutBuf = IntPtr.Zero;
            NET_IN_ACCESS_USER_SERVICE_CLEAR stuInInfo = new NET_IN_ACCESS_USER_SERVICE_CLEAR();
            NET_OUT_ACCESS_USER_SERVICE_CLEAR stuOutInfo = new NET_OUT_ACCESS_USER_SERVICE_CLEAR();
 
            try
            {
                pInBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuInInfo));
                pOutBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuOutInfo));
 
 
                stuInInfo.dwSize = (uint)Marshal.SizeOf(stuInInfo);
                stuOutInfo.dwSize = (uint)Marshal.SizeOf(stuOutInfo);
 
 
                Marshal.StructureToPtr(stuInInfo, pInBuf, true);
                Marshal.StructureToPtr(stuOutInfo, pOutBuf, true);
                bRet = OriginalSDK.CLIENT_OperateAccessUserService(lLoginID, EM_ACCESS_CTL_USER_SERVICE.CLEAR, pInBuf, pOutBuf, nWaitTime);
 
                NetGetLastError(bRet);
                return bRet;
            }
            finally
            {
                Marshal.FreeHGlobal(pInBuf);
                Marshal.FreeHGlobal(pOutBuf);
            }
        }
 
        public static bool ClearOperateAccessCardService(IntPtr lLoginID, int nWaitTime)
        {
            bool bRet = false;
            IntPtr pInBuf = IntPtr.Zero;
            IntPtr pOutBuf = IntPtr.Zero;
            NET_IN_ACCESS_CARD_SERVICE_CLEAR stuInInfo = new NET_IN_ACCESS_CARD_SERVICE_CLEAR();
            NET_OUT_ACCESS_CARD_SERVICE_CLEAR stuOutInfo = new NET_OUT_ACCESS_CARD_SERVICE_CLEAR();
 
            try
            {
                pInBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuInInfo));
                pOutBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuOutInfo));
 
 
                stuInInfo.dwSize = (uint)Marshal.SizeOf(stuInInfo);
                stuOutInfo.dwSize = (uint)Marshal.SizeOf(stuOutInfo);
 
 
                Marshal.StructureToPtr(stuInInfo, pInBuf, true);
                Marshal.StructureToPtr(stuOutInfo, pOutBuf, true);
                bRet = OriginalSDK.CLIENT_OperateAccessCardService(lLoginID, EM_ACCESS_CTL_CARD_SERVICE.CLEAR, pInBuf, pOutBuf, nWaitTime);
 
                NetGetLastError(bRet);
                return bRet;
            }
            finally
            {
                Marshal.FreeHGlobal(pInBuf);
                Marshal.FreeHGlobal(pOutBuf);
            }
        }
 
        public static bool ClearOperateAccessFingerprintService(IntPtr lLoginID, int nWaitTime)
        {
            bool bRet = false;
            IntPtr pInBuf = IntPtr.Zero;
            IntPtr pOutBuf = IntPtr.Zero;
            NET_IN_ACCESS_FINGERPRINT_SERVICE_CLEAR stuInInfo = new NET_IN_ACCESS_FINGERPRINT_SERVICE_CLEAR();
            NET_OUT_ACCESS_FINGERPRINT_SERVICE_CLEAR stuOutInfo = new NET_OUT_ACCESS_FINGERPRINT_SERVICE_CLEAR();
 
            try
            {
                pInBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuInInfo));
                pOutBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuOutInfo));
 
 
                stuInInfo.dwSize = (uint)Marshal.SizeOf(stuInInfo);
                stuOutInfo.dwSize = (uint)Marshal.SizeOf(stuOutInfo);
 
 
                Marshal.StructureToPtr(stuInInfo, pInBuf, true);
                Marshal.StructureToPtr(stuOutInfo, pOutBuf, true);
                bRet = OriginalSDK.CLIENT_OperateAccessFingerprintService(lLoginID, EM_ACCESS_CTL_FINGERPRINT_SERVICE.CLEAR, pInBuf, pOutBuf, nWaitTime);
 
                NetGetLastError(bRet);
                return bRet;
            }
            finally
            {
                Marshal.FreeHGlobal(pInBuf);
                Marshal.FreeHGlobal(pOutBuf);
            }
        }
 
        public static bool UpdateOperateAccessCardService(IntPtr lLoginID, NET_ACCESS_CARD_INFO[] stInParam, out NET_EM_FAILCODE[] stOutParam, int nWaitTime)
        {
            bool bRet = false;
            int stuCount = stInParam.Length;
            IntPtr pInBuf = IntPtr.Zero;
            IntPtr pOutBuf = IntPtr.Zero;
            IntPtr pInArrayBuf = IntPtr.Zero;
            IntPtr pOutArrayBuf = IntPtr.Zero;
            NET_IN_ACCESS_CARD_SERVICE_UPDATE stuInInfo = new NET_IN_ACCESS_CARD_SERVICE_UPDATE();
            NET_OUT_ACCESS_CARD_SERVICE_UPDATE stuOutInfo = new NET_OUT_ACCESS_CARD_SERVICE_UPDATE();
 
            try
            {
                pInBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuInInfo));
                pOutBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuOutInfo));
                pInArrayBuf = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_ACCESS_CARD_INFO)) * stuCount);
                pOutArrayBuf = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_EM_FAILCODE)) * stuCount);
 
                for (int i = 0; i < stuCount; i++)
                {
                    IntPtr pDst = IntPtr.Add(pInArrayBuf, Marshal.SizeOf(typeof(NET_ACCESS_CARD_INFO)) * i);
                    Marshal.StructureToPtr(stInParam[i], pDst, true);
                }
 
                stuInInfo.dwSize = (uint)Marshal.SizeOf(stuInInfo);
                stuInInfo.nInfoNum = stuCount;
                stuInInfo.pCardInfo = pInArrayBuf;
 
                stuOutInfo.dwSize = (uint)Marshal.SizeOf(stuOutInfo);
                stuOutInfo.nMaxRetNum = stuCount;
                stuOutInfo.pFailCode = pOutArrayBuf;
 
 
                Marshal.StructureToPtr(stuInInfo, pInBuf, true);
                Marshal.StructureToPtr(stuOutInfo, pOutBuf, true);
                bRet = OriginalSDK.CLIENT_OperateAccessCardService(lLoginID, EM_ACCESS_CTL_CARD_SERVICE.UPDATE, pInBuf, pOutBuf, nWaitTime);
                stuOutInfo = (NET_OUT_ACCESS_CARD_SERVICE_UPDATE)Marshal.PtrToStructure(pOutBuf, typeof(NET_OUT_ACCESS_CARD_SERVICE_UPDATE));
                stOutParam = new NET_EM_FAILCODE[stuOutInfo.nMaxRetNum];
                for (int i = 0; i < stuOutInfo.nMaxRetNum; i++)
                {
                    IntPtr pDst = IntPtr.Add(pOutArrayBuf, Marshal.SizeOf(typeof(NET_EM_FAILCODE)) * i);
                    stOutParam[i] = (NET_EM_FAILCODE)Marshal.PtrToStructure(pDst, typeof(NET_EM_FAILCODE));
                }
 
                NetGetLastError(bRet);
                return bRet;
            }
            finally
            {
                Marshal.FreeHGlobal(pInBuf);
                Marshal.FreeHGlobal(pOutBuf);
                Marshal.FreeHGlobal(pInArrayBuf);
                Marshal.FreeHGlobal(pOutArrayBuf);
            }
        }
 
        public static bool UpdateOperateAccessFingerprintService(IntPtr lLoginID, NET_ACCESS_FINGERPRINT_INFO[] stInParam, out NET_EM_FAILCODE[] stOutParam, int nWaitTime)
        {
            bool bRet = false;
            int stuCount = stInParam.Length;
            IntPtr pInBuf = IntPtr.Zero;
            IntPtr pOutBuf = IntPtr.Zero;
            IntPtr pInArrayBuf = IntPtr.Zero;
            IntPtr pOutArrayBuf = IntPtr.Zero;
            NET_IN_ACCESS_FINGERPRINT_SERVICE_UPDATE stuInInfo = new NET_IN_ACCESS_FINGERPRINT_SERVICE_UPDATE();
            NET_OUT_ACCESS_FINGERPRINT_SERVICE_UPDATE stuOutInfo = new NET_OUT_ACCESS_FINGERPRINT_SERVICE_UPDATE();
 
            try
            {
                pInBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuInInfo));
                pOutBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuOutInfo));
                pInArrayBuf = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_ACCESS_FINGERPRINT_INFO)) * stuCount);
                pOutArrayBuf = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_EM_FAILCODE)) * stuCount);
 
                for (int i = 0; i < stuCount; i++)
                {
                    IntPtr pDst = IntPtr.Add(pInArrayBuf, Marshal.SizeOf(typeof(NET_ACCESS_FINGERPRINT_INFO)) * i);
                    Marshal.StructureToPtr(stInParam[i], pDst, true);
                }
 
                stuInInfo.dwSize = (uint)Marshal.SizeOf(stuInInfo);
                stuInInfo.nFpNum = stuCount;
                stuInInfo.pFingerPrintInfo = pInArrayBuf;
 
                stuOutInfo.dwSize = (uint)Marshal.SizeOf(stuOutInfo);
                stuOutInfo.nMaxRetNum = stuCount;
                stuOutInfo.pFailCode = pOutArrayBuf;
 
 
                Marshal.StructureToPtr(stuInInfo, pInBuf, true);
                Marshal.StructureToPtr(stuOutInfo, pOutBuf, true);
                bRet = OriginalSDK.CLIENT_OperateAccessFingerprintService(lLoginID, EM_ACCESS_CTL_FINGERPRINT_SERVICE.UPDATE, pInBuf, pOutBuf, nWaitTime);
                stuOutInfo = (NET_OUT_ACCESS_FINGERPRINT_SERVICE_UPDATE)Marshal.PtrToStructure(pOutBuf, typeof(NET_OUT_ACCESS_FINGERPRINT_SERVICE_UPDATE));
                stOutParam = new NET_EM_FAILCODE[stuOutInfo.nMaxRetNum];
                for (int i = 0; i < stuOutInfo.nMaxRetNum; i++)
                {
                    IntPtr pDst = IntPtr.Add(pOutArrayBuf, Marshal.SizeOf(typeof(NET_EM_FAILCODE)) * i);
                    stOutParam[i] = (NET_EM_FAILCODE)Marshal.PtrToStructure(pDst, typeof(NET_EM_FAILCODE));
                }
 
                NetGetLastError(bRet);
                return bRet;
            }
            finally
            {
                Marshal.FreeHGlobal(pInBuf);
                Marshal.FreeHGlobal(pOutBuf);
                Marshal.FreeHGlobal(pInArrayBuf);
                Marshal.FreeHGlobal(pOutArrayBuf);
            }
        }
 
 
        #endregion //access control
 
        #region <<Face Module>>
        public static bool OperateFaceRecognitionDB(IntPtr lLoginID, ref NET_IN_OPERATE_FACERECONGNITIONDB pstInParam, ref NET_OUT_OPERATE_FACERECONGNITIONDB pstOutParam, Int32 nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_OperateFaceRecognitionDB(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Search according to the condition
        /// </summary>
        /// <param name="lLoginID">CLIENT_Login's return value</param>
        /// <param name="emType">find type</param>
        /// <param name="oQueryCondition">search condition</param>
        /// <param name="tyCondition">type of condition struct</param>
        /// <param name="lFindID"></param>
        /// <param name="waittime">Wait timeout, million second</param>
        /// <returns>lFindeHandle</returns>
        public static IntPtr FindFile(IntPtr lLoginID, EM_FILE_QUERY_TYPE emType, object oQueryCondition, Type tyCondition, int waittime)
        {
            IntPtr result = IntPtr.Zero;
            IntPtr pCondition = IntPtr.Zero;
            try
            {
                if (oQueryCondition == null || tyCondition == null)
                {
                    pCondition = IntPtr.Zero;
                }
                else
                {
                    int nBufLen = Marshal.SizeOf(tyCondition);
                    int n1 = Marshal.SizeOf(oQueryCondition);
                    pCondition = Marshal.AllocHGlobal(nBufLen);
                    Marshal.StructureToPtr(oQueryCondition, pCondition, true);
                }
                result = OriginalSDK.CLIENT_FindFileEx(lLoginID, emType, pCondition, IntPtr.Zero, waittime);
                NetGetLastError(result);
            }
            finally
            {
                Marshal.FreeHGlobal(pCondition);
            }
            return result;
        }
 
        public static int FindNextFile(IntPtr lFindHandle, int nFilecount, List<object> lsOMediaFileInfo, Type tyFile, int waittime)
        {
 
            int result = 0;
            IntPtr pMediaFileInfo = IntPtr.Zero;
            int singleBufLen = Marshal.SizeOf(tyFile);
            int maxBufLen = singleBufLen * nFilecount;
 
            try
            {
                pMediaFileInfo = Marshal.AllocHGlobal(maxBufLen);
                for (int i = 0; i < nFilecount; i++)
                {
                    Marshal.StructureToPtr(lsOMediaFileInfo[i], IntPtr.Add(pMediaFileInfo, i * singleBufLen), true);
                }
                result = OriginalSDK.CLIENT_FindNextFileEx(lFindHandle, nFilecount, pMediaFileInfo, maxBufLen, IntPtr.Zero, waittime);
                if (result >= 0)
                {
                    for (int i = 0; i < result; i++)
                    {
                        lsOMediaFileInfo[i] = Marshal.PtrToStructure(IntPtr.Add(pMediaFileInfo, i * singleBufLen), tyFile);
                    }
                }
                else
                {
                    NetGetLastError(result);
                }
            }
            finally
            {
                Marshal.FreeHGlobal(pMediaFileInfo);
            }
            return result;
        }
 
        public static bool FindClose(IntPtr lFindHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_FindCloseEx(lFindHandle);
            NetGetLastError(result);
            return result;
        }
 
        public static bool DetectFace(IntPtr lLoginID, ref NET_IN_DETECT_FACE pstInParam, ref NET_OUT_DETECT_FACE pstOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DetectFace(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
 
            NetGetLastError(result);
            return result;
        }
 
        public static IntPtr AttachFaceFindState(IntPtr lLoginID, ref NET_IN_FACE_FIND_STATE pstInParam, ref NET_OUT_FACE_FIND_STATE pstOutParam, Int32 nWaitTime)
        {
            IntPtr nHanddle = IntPtr.Zero;
            nHanddle = OriginalSDK.CLIENT_AttachFaceFindState(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(nHanddle);
            return nHanddle;
        }
 
        public static bool DetachFaceFindState(IntPtr lAttachHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DetachFaceFindState(lAttachHandle);
            NetGetLastError(result);
            return result;
        }
 
        public static bool StartFindFaceRecognition(IntPtr lLoginID, ref NET_IN_STARTFIND_FACERECONGNITION pstInParam, ref NET_OUT_STARTFIND_FACERECONGNITION pstOutParam, int waittime)
        {
            bool result = false;
            IntPtr inPtr = IntPtr.Zero;
            IntPtr outPtr = IntPtr.Zero;
            try
            {
                inPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_IN_STARTFIND_FACERECONGNITION)));
                Marshal.StructureToPtr(pstInParam, inPtr, true);
                outPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_OUT_STARTFIND_FACERECONGNITION)));
                Marshal.StructureToPtr(pstOutParam, outPtr, true);
                result = OriginalSDK.CLIENT_StartFindFaceRecognition(lLoginID, inPtr, outPtr, waittime);
                NetGetLastError(result);
                if (result)
                {
                    pstOutParam = (NET_OUT_STARTFIND_FACERECONGNITION)Marshal.PtrToStructure(outPtr, typeof(NET_OUT_STARTFIND_FACERECONGNITION));
                }
            }
            finally
            {
                Marshal.FreeHGlobal(inPtr);
                Marshal.FreeHGlobal(outPtr);
            }
            return result;
        }
 
        public static bool StartMultiFindFaceRecognition(IntPtr lLoginID, ref NET_IN_STARTMULTIFIND_FACERECONGNITION pstInParam, ref NET_OUT_STARTMULTIFIND_FACERECONGNITION pstOutParam, int waittime)
        {
            bool result = false;
            IntPtr inPtr = IntPtr.Zero;
            IntPtr outPtr = IntPtr.Zero;
            try
            {
                inPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_IN_STARTMULTIFIND_FACERECONGNITION)));
                Marshal.StructureToPtr(pstInParam, inPtr, true);
                outPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_OUT_STARTMULTIFIND_FACERECONGNITION)));
                Marshal.StructureToPtr(pstOutParam, outPtr, true);
                result = OriginalSDK.CLIENT_StartMultiFindFaceRecognition(lLoginID, inPtr, outPtr, waittime);
                NetGetLastError(result);
                if (result)
                {
                    pstOutParam = (NET_OUT_STARTMULTIFIND_FACERECONGNITION)Marshal.PtrToStructure(outPtr, typeof(NET_OUT_STARTMULTIFIND_FACERECONGNITION));
                }
            }
            finally
            {
                Marshal.FreeHGlobal(inPtr);
                Marshal.FreeHGlobal(outPtr);
            }
            return result;
        }
 
        public static bool DoFindFaceRecognition(ref NET_IN_DOFIND_FACERECONGNITION pstInParam, ref NET_OUT_DOFIND_FACERECONGNITION pstOutParam,
            int waittime)
        {
            bool result = false;
            IntPtr inPtr = IntPtr.Zero;
            IntPtr outPtr = IntPtr.Zero;
            try
            {
                inPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_IN_DOFIND_FACERECONGNITION)));
                Marshal.StructureToPtr(pstInParam, inPtr, true);
                outPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_OUT_DOFIND_FACERECONGNITION)));
                Marshal.StructureToPtr(pstOutParam, outPtr, true);
                result = OriginalSDK.CLIENT_DoFindFaceRecognition(inPtr, outPtr, waittime);
                NetGetLastError(result);
                if (result)
                {
                    pstOutParam = (NET_OUT_DOFIND_FACERECONGNITION)Marshal.PtrToStructure(outPtr, typeof(NET_OUT_DOFIND_FACERECONGNITION));
                }
            }
            finally
            {
                Marshal.FreeHGlobal(inPtr);
                Marshal.FreeHGlobal(outPtr);
            }
            return result;
        }
 
        public static bool StopFindFaceRecognition(IntPtr lFindHandle)
        {
            bool result = OriginalSDK.CLIENT_StopFindFaceRecognition(lFindHandle);
            NetGetLastError(result);
            return result;
        }
 
        public static bool DoFindFaceRecognitionRecordEx(NET_IN_DOFIND_FACERECONGNITIONRECORD_EX inParam, ref NET_OUT_DOFIND_FACERECONGNITIONRECORD_EX outParam, int nWaitTime)
        {
            bool result = OriginalSDK.CLIENT_DoFindFaceRecognitionRecordEx(ref inParam, ref outParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool FaceRecognitionPutDisposition(IntPtr lLoginID, NET_IN_FACE_RECOGNITION_PUT_DISPOSITION_INFO inParam, ref NET_OUT_FACE_RECOGNITION_PUT_DISPOSITION_INFO outParam, int nWaitTime)
        {
            bool result = false;
            IntPtr inPtr = IntPtr.Zero;
            IntPtr outPtr = IntPtr.Zero;
            try
            {
                inPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_IN_FACE_RECOGNITION_PUT_DISPOSITION_INFO)));
                Marshal.StructureToPtr(inParam, inPtr, true);
                outPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_OUT_FACE_RECOGNITION_PUT_DISPOSITION_INFO)));
                Marshal.StructureToPtr(outParam, outPtr, true);
                result = OriginalSDK.CLIENT_FaceRecognitionPutDisposition(lLoginID, inPtr, outPtr, nWaitTime);
                NetGetLastError(result);
                if (result)
                {
                    outParam = (NET_OUT_FACE_RECOGNITION_PUT_DISPOSITION_INFO)Marshal.PtrToStructure(outPtr, typeof(NET_OUT_FACE_RECOGNITION_PUT_DISPOSITION_INFO));
                }
            }
            finally
            {
                Marshal.FreeHGlobal(inPtr);
                Marshal.FreeHGlobal(outPtr);
            }
            return result;
        }
 
        public static bool FaceRecognitionDelDisposition(IntPtr lLoginID, NET_IN_FACE_RECOGNITION_DEL_DISPOSITION_INFO inParam, ref NET_OUT_FACE_RECOGNITION_DEL_DISPOSITION_INFO outParam, int nWaitTime)
        {
            bool result = OriginalSDK.CLIENT_FaceRecognitionDelDisposition(lLoginID, ref inParam, ref outParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool GetTotalFileCount(IntPtr lFindHandle, ref Int32 pTotalCount, IntPtr pReserved, Int32 nWaittime)
        {
            bool bReturn = false;
            bReturn = OriginalSDK.CLIENT_GetTotalFileCount(lFindHandle, ref pTotalCount, pReserved, nWaittime);
            NetGetLastError(bReturn);
            return bReturn;
        }
 
        public static bool SetFindingJumpOption(IntPtr lFindHandle, ref NET_FINDING_JUMP_OPTION_INFO pOption, IntPtr reserved, int waittime)
        {
            bool bReturn = false;
            bReturn = OriginalSDK.CLIENT_SetFindingJumpOption(lFindHandle, ref pOption, reserved, waittime);
            NetGetLastError(bReturn);
            return bReturn;
        }
 
        public static bool FindGroupInfo(IntPtr lLoginID, ref NET_IN_FIND_GROUP_INFO pstInParam, ref NET_OUT_FIND_GROUP_INFO pstOutParam, int nWaitTime)
        {
            bool bReturn = false;
            bReturn = OriginalSDK.CLIENT_FindGroupInfo(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(bReturn);
            return bReturn;
        }
 
        public static bool OperateFaceRecognitionGroup(IntPtr lLoginID, ref NET_IN_OPERATE_FACERECONGNITION_GROUP pstInParam, ref NET_OUT_OPERATE_FACERECONGNITION_GROUP pstOutParam, int nWaitTime)
        {
            bool bReturn = false;
            bReturn = OriginalSDK.CLIENT_OperateFaceRecognitionGroup(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(bReturn);
            return bReturn;
        }
 
        /// <summary>
        /// 删除指定人员组内符合条件的人员
        /// deletes the qualified personnel in the specified personnel group
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam 接口输入参数; [in] pstuInParam Indicates the input parameter of the interface</param>
        /// <param name="pstuOutParam">[out] pstuOutParam 接口输出参数; [out] pstuOutParam Indicates the output parameter of the interface</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Timeout period of the interface, in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE indicates success. FALSE Indicates failure</returns>
        public static bool DeletePersonByCondition(IntPtr lLoginID, ref NET_IN_DELETE_PERSON_BY_CONDITION_INFO pstuInParam, ref NET_OUT_DELETE_PERSON_BY_CONDITION_INFO pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DeletePersonByCondition(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool RenderPrivateData(IntPtr lPlayHandle, bool bTrue)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_RenderPrivateData(lPlayHandle, bTrue);
            NetGetLastError(result);
            return result;
        }
        #endregion
 
        #region Query device info
        /// <summary>
        /// query device info(storage device info)
        /// 查询设备信息(存储设备信息)
        /// </summary>
        /// <param name="lLoginID">CLIENT_Login's return value 登陆ID</param>
        /// <param name="stuInInfo">in param 输入参数</param>
        /// <param name="stuOutInfo">out param 输出参数</param>
        /// <param name="nWaitTime">Wait timeout, million second 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool QueryDevInfo(IntPtr lLoginID, ref NET_IN_STORAGE_DEV_INFOS stuInInfo, ref NET_OUT_STORAGE_DEV_INFOS stuOutInfo, int nWaitTime)
        {
            bool bRet = false;
            IntPtr pInBuf = IntPtr.Zero;
            IntPtr pOutBuf = IntPtr.Zero;
            try
            {
                pInBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuInInfo));
                pOutBuf = Marshal.AllocHGlobal(Marshal.SizeOf(stuOutInfo));
                Marshal.StructureToPtr(stuInInfo, pInBuf, true);
                Marshal.StructureToPtr(stuOutInfo, pOutBuf, true);
                bRet = OriginalSDK.CLIENT_QueryDevInfo(lLoginID, 0x02, pInBuf, pOutBuf, IntPtr.Zero, nWaitTime);
                if (bRet)
                {
                    stuOutInfo = (NET_OUT_STORAGE_DEV_INFOS)Marshal.PtrToStructure(pOutBuf, typeof(NET_OUT_STORAGE_DEV_INFOS));
                }
                NetGetLastError(bRet);
                return bRet;
            }
            finally
            {
                Marshal.FreeHGlobal(pInBuf);
                Marshal.FreeHGlobal(pOutBuf);
            }
        }
 
        #endregion //Query device info
 
        /// <summary>
        /// Get OSD Config
        /// 获取OSD配置
        /// </summary>
        /// <param name="lLoginID">Lonin return value 登陆ID</param>
        /// <param name="emCfgOpType">config type 配置类型</param>
        /// <param name="nChannelID">channel id 通道号</param>
        /// <param name="obj">config struct 配置结构体</param>
        /// <param name="waittime">waittime 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool GetOSDConfig(IntPtr lLoginID, EM_CFG_OSD_TYPE emCfgOpType, int nChannelID, ref object obj, int waittime)
        {
            bool result = false;
            Type type = obj.GetType();
            IntPtr outPtr = IntPtr.Zero;
            try
            {
                outPtr = Marshal.AllocHGlobal(Marshal.SizeOf(type));
                Marshal.StructureToPtr(obj, outPtr, true);
                result = OriginalSDK.CLIENT_GetConfig(lLoginID, (int)emCfgOpType, nChannelID, outPtr, (uint)Marshal.SizeOf(type), waittime, IntPtr.Zero);
                NetGetLastError(result);
                obj = Marshal.PtrToStructure(outPtr, type);
            }
            finally
            {
                Marshal.FreeHGlobal(outPtr);
            }
            return result;
        }
 
        /// <summary>
        /// Set OSD config
        /// 设置OSD配置
        /// </summary>
        /// <param name="lLoginID">Lonin return value 登陆ID</param>
        /// <param name="emCfgOpType">config type 配置类型</param>
        /// <param name="nChannelID">channel id 通道号</param>
        /// <param name="obj">config struct 配置结构体</param>
        /// <param name="waittime">waittime 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool SetOSDConfig(IntPtr lLoginID, EM_CFG_OSD_TYPE emCfgOpType, int nChannelID, object obj, int waittime)
        {
            bool result = false;
            Type type = obj.GetType();
            IntPtr inPtr = IntPtr.Zero;
            try
            {
                inPtr = Marshal.AllocHGlobal(Marshal.SizeOf(type));
                Marshal.StructureToPtr(obj, inPtr, true);
                result = OriginalSDK.CLIENT_SetConfig(lLoginID, (int)emCfgOpType, nChannelID, inPtr, (uint)Marshal.SizeOf(type), waittime, IntPtr.Zero, IntPtr.Zero);
                NetGetLastError(result);
            }
            finally
            {
                Marshal.FreeHGlobal(inPtr);
            }
            return result;
        }
 
 
        /// <summary>
        /// Get Encode Config
        /// 获取编码配置
        /// </summary>
        /// <param name="lLoginID">Lonin return value 登陆ID</param>
        /// <param name="emCfgOpType">config type 配置类型</param>
        /// <param name="nChannelID">channel id 通道号</param>
        /// <param name="obj">config struct 配置结构体</param>
        /// <param name="waittime">waittime 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool GetEncodeConfig(IntPtr lLoginID, EM_CFG_ENCODE_TYPE emCfgOpType, int nChannelID, ref object obj, int waittime)
        {
            bool result = false;
            Type type = obj.GetType();
            IntPtr outPtr = IntPtr.Zero;
            try
            {
                outPtr = Marshal.AllocHGlobal(Marshal.SizeOf(type));
                Marshal.StructureToPtr(obj, outPtr, true);
                result = OriginalSDK.CLIENT_GetConfig(lLoginID, (int)emCfgOpType, nChannelID, outPtr, (uint)Marshal.SizeOf(type), waittime, IntPtr.Zero);
                NetGetLastError(result);
                obj = Marshal.PtrToStructure(outPtr, type);
            }
            finally
            {
                Marshal.FreeHGlobal(outPtr);
            }
            return result;
        }
 
        /// <summary>
        /// Set Encode config
        /// 设置编码配置
        /// </summary>
        /// <param name="lLoginID">Lonin return value 登陆ID</param>
        /// <param name="emCfgOpType">config type 配置类型</param>
        /// <param name="nChannelID">channel id 通道号</param>
        /// <param name="obj">config struct 配置结构体</param>
        /// <param name="waittime">waittime 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool SetEncodeConfig(IntPtr lLoginID, EM_CFG_ENCODE_TYPE emCfgOpType, int nChannelID, object obj, int waittime)
        {
            bool result = false;
            Type type = obj.GetType();
            IntPtr inPtr = IntPtr.Zero;
            try
            {
                inPtr = Marshal.AllocHGlobal(Marshal.SizeOf(type));
                Marshal.StructureToPtr(obj, inPtr, true);
                result = OriginalSDK.CLIENT_SetConfig(lLoginID, (int)emCfgOpType, nChannelID, inPtr, (uint)Marshal.SizeOf(type), waittime, IntPtr.Zero, IntPtr.Zero);
                NetGetLastError(result);
            }
            finally
            {
                Marshal.FreeHGlobal(inPtr);
            }
            return result;
        }
 
        public static bool SetTrafficVoiceBroadcast(IntPtr lLoginID, NET_CFG_TRAFFIC_VOICE_BROADCAST_INFO info, int waittime)
        {
            bool result = false;
            Type type = info.GetType();
            IntPtr inPtr = IntPtr.Zero;
            try
            {
                inPtr = Marshal.AllocHGlobal(Marshal.SizeOf(type));
                Marshal.StructureToPtr(info, inPtr, true);
                result = OriginalSDK.CLIENT_SetConfig(lLoginID, (int)10001, -1, inPtr, (uint)Marshal.SizeOf(type), waittime, IntPtr.Zero, IntPtr.Zero);
                NetGetLastError(result);
            }
            finally
            {
                Marshal.FreeHGlobal(inPtr);
            }
            return result;
        }
        public static bool GetTrafficVoiceBroadcast(IntPtr lLoginID, ref NET_CFG_TRAFFIC_VOICE_BROADCAST_INFO info, int waittime)
        {
            bool result = false;
            Type type = info.GetType();
            IntPtr outPtr = IntPtr.Zero;
            try
            {
                outPtr = Marshal.AllocHGlobal(Marshal.SizeOf(type));
                Marshal.StructureToPtr(info, outPtr, true);
                result = OriginalSDK.CLIENT_GetConfig(lLoginID, (int)10001, -1, outPtr, (uint)Marshal.SizeOf(type), waittime, IntPtr.Zero);
                NetGetLastError(result);
                info = (NET_CFG_TRAFFIC_VOICE_BROADCAST_INFO)Marshal.PtrToStructure(outPtr, type);
            }
            finally
            {
                Marshal.FreeHGlobal(outPtr);
            }
            return result;
        }
 
        public static bool SetTrafficLatticeScreen(IntPtr lLoginID, NET_CFG_TRAFFIC_LATTICE_SCREEN_INFO info, int waittime)
        {
            bool result = false;
            Type type = info.GetType();
            IntPtr inPtr = IntPtr.Zero;
            try
            {
                inPtr = Marshal.AllocHGlobal(Marshal.SizeOf(type));
                Marshal.StructureToPtr(info, inPtr, true);
                result = OriginalSDK.CLIENT_SetConfig(lLoginID, (int)10000, -1, inPtr, (uint)Marshal.SizeOf(type), waittime, IntPtr.Zero, IntPtr.Zero);
                NetGetLastError(result);
            }
            finally
            {
                Marshal.FreeHGlobal(inPtr);
            }
            return result;
        }
        public static bool GetTrafficLatticeScreen(IntPtr lLoginID, ref NET_CFG_TRAFFIC_LATTICE_SCREEN_INFO info, int waittime)
        {
            bool result = false;
            Type type = info.GetType();
            IntPtr outPtr = IntPtr.Zero;
            try
            {
                outPtr = Marshal.AllocHGlobal(Marshal.SizeOf(type));
                Marshal.StructureToPtr(info, outPtr, true);
                result = OriginalSDK.CLIENT_GetConfig(lLoginID, (int)10000, -1, outPtr, (uint)Marshal.SizeOf(type), waittime, IntPtr.Zero);
                NetGetLastError(result);
                info = (NET_CFG_TRAFFIC_LATTICE_SCREEN_INFO)Marshal.PtrToStructure(outPtr, type);
            }
            finally
            {
                Marshal.FreeHGlobal(outPtr);
            }
            return result;
        }
 
        public static bool SetSpecialDaysScheduleConfig(IntPtr lLoginID, NET_CFG_ACCESSCTL_SPECIALDAY_GROUP_INFO info, int waittime)
        {
            bool result = false;
            Type type = info.GetType();
            IntPtr inPtr = IntPtr.Zero;
            try
            {
                inPtr = Marshal.AllocHGlobal(Marshal.SizeOf(type));
                Marshal.StructureToPtr(info, inPtr, true);
                result = OriginalSDK.CLIENT_SetConfig(lLoginID, (int)3902, -1, inPtr, (uint)Marshal.SizeOf(type), waittime, IntPtr.Zero, IntPtr.Zero);
                NetGetLastError(result);
            }
            finally
            {
                Marshal.FreeHGlobal(inPtr);
            }
            return result;
        }
        public static bool GetSpecialDaysScheduleConfig(IntPtr lLoginID, ref object[] objs, Type typeName, int waittime)
        {
            bool result = false;
            IntPtr outPtr = IntPtr.Zero;
            try
            {
                int nOutBufSize = Marshal.SizeOf(typeName) * objs.Length;
                outPtr = Marshal.AllocHGlobal(nOutBufSize);
                result = OriginalSDK.CLIENT_GetConfig(lLoginID, (int)3902, -1, outPtr, (uint)nOutBufSize, waittime, IntPtr.Zero);
                NetGetLastError(result);
                for (int i = 0; i < objs.Length; ++i)
                {
                    objs[i] = Marshal.PtrToStructure(IntPtr.Add(outPtr, i * Marshal.SizeOf(typeName)), typeName);
                }
 
            }
            finally
            {
                Marshal.FreeHGlobal(outPtr);
            }
            return result;
        }
 
        public static bool GetSplitWindowsInfo(IntPtr lLoginID, object inParam, ref object outParam, int nWaitTime)
        {
 
            bool result = false;
            IntPtr inPtr = IntPtr.Zero;
            IntPtr outPtr = IntPtr.Zero;
            try
            {
                inPtr = Marshal.AllocHGlobal(Marshal.SizeOf(inParam.GetType()));
                Marshal.StructureToPtr(inParam, inPtr, true);
                outPtr = Marshal.AllocHGlobal(Marshal.SizeOf(outParam.GetType()));
                Marshal.StructureToPtr(outParam, outPtr, false);
                result = OriginalSDK.CLIENT_GetSplitWindowsInfo(lLoginID, inPtr, outPtr, nWaitTime);
                NetGetLastError(result);
                if (result)
                {
                    outParam = Marshal.PtrToStructure(outPtr, outParam.GetType());
                }
            }
            finally
            {
                Marshal.FreeHGlobal(inPtr);
                Marshal.FreeHGlobal(outPtr);
            }
            return result;
        }
 
        public static bool OperateSplit(IntPtr lLoginID, EM_NET_SPLIT_OPERATE_TYPE emType, object inParam, ref object outParam, int nWaitTime)
        {
            bool result = false;
            IntPtr inPtr = IntPtr.Zero;
            IntPtr outPtr = IntPtr.Zero;
            try
            {
                inPtr = Marshal.AllocHGlobal(Marshal.SizeOf(inParam.GetType()));
                Marshal.StructureToPtr(inParam, inPtr, true);
                outPtr = Marshal.AllocHGlobal(Marshal.SizeOf(outParam.GetType()));
                Marshal.StructureToPtr(outParam, outPtr, true);
                result = OriginalSDK.CLIENT_OperateSplit(lLoginID, emType, inPtr, outPtr, nWaitTime);
                NetGetLastError(result);
                if (result)
                {
                    outParam = Marshal.PtrToStructure(outPtr, outParam.GetType());
                }
            }
            finally
            {
                Marshal.FreeHGlobal(inPtr);
                Marshal.FreeHGlobal(outPtr);
            }
            return result;
        }
 
        public static bool OperateSplitPlayer(IntPtr lLoginID, EM_NET_PLAYER_OPERATE_TYPE emType, object inParam, ref object outParam, int nWaitTime)
        {
            bool result = false;
            IntPtr inPtr = IntPtr.Zero;
            IntPtr outPtr = IntPtr.Zero;
            try
            {
                inPtr = Marshal.AllocHGlobal(Marshal.SizeOf(inParam.GetType()));
                Marshal.StructureToPtr(inParam, inPtr, true);
                outPtr = Marshal.AllocHGlobal(Marshal.SizeOf(outParam.GetType()));
                Marshal.StructureToPtr(outParam, outPtr, true);
                result = OriginalSDK.CLIENT_OperateSplitPlayer(lLoginID, emType, inPtr, outPtr, nWaitTime);
                NetGetLastError(result);
                if (result)
                {
                    outParam = Marshal.PtrToStructure(outPtr, outParam.GetType());
                }
            }
            finally
            {
                Marshal.FreeHGlobal(inPtr);
                Marshal.FreeHGlobal(outPtr);
            }
            return result;
        }
 
        public static bool WindowRegionEnlarge(IntPtr lLoginID, NET_IN_WINDOW_REGION_ENLARGE inParam, ref NET_OUT_WINDOW_REGION_ENLARGE outParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_WindowRegionEnlarge(lLoginID, ref inParam, ref outParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool WindowEnlargeReduction(IntPtr lLoginID, NET_IN_WINDOW_ENLARGE_REDUCTION inParam, ref NET_OUT_WINDOW_ENLARGE_REDUCTION outParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_WindowEnlargeReduction(lLoginID, ref inParam, ref outParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool OperateTrafficList(IntPtr lLoginID, NET_IN_OPERATE_TRAFFIC_LIST_RECORD inParam, ref NET_OUT_OPERATE_TRAFFIC_LIST_RECORD outParam, int waittime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_OperateTrafficList(lLoginID, ref inParam, ref outParam, waittime);
            NetGetLastError(result);
            return result;
        }
 
        public static IntPtr FileTransmit(IntPtr lLoginID, EM_FIELTRANSMIT_TYPE nTransType, object obj, fTransFileCallBack cbTransFile, IntPtr dwUserData, int waittime)
        {
            IntPtr result = IntPtr.Zero;
            IntPtr bufPtr = IntPtr.Zero;
            try
            {
                bufPtr = Marshal.AllocHGlobal(Marshal.SizeOf(obj.GetType()));
                Marshal.StructureToPtr(obj, bufPtr, true);
                result = OriginalSDK.CLIENT_FileTransmit(lLoginID, (int)nTransType, bufPtr, Marshal.SizeOf(obj.GetType()), cbTransFile, dwUserData, waittime);
                NetGetLastError(result);
            }
            finally
            {
                Marshal.FreeHGlobal(bufPtr);
            }
            return result;
        }
 
        public static bool QueryUserInfoNew(IntPtr lLoginID, ref NET_USER_MANAGE_INFO_NEW info, int waittime)
        {
            bool result = false;
            IntPtr inPtr = Marshal.AllocHGlobal((int)info.dwSize);
            Marshal.StructureToPtr(info, inPtr, true);
            result = OriginalSDK.CLIENT_QueryUserInfoNew(lLoginID, inPtr, IntPtr.Zero, waittime);
            NetGetLastError(result);
            if (result)
            {
                info = (NET_USER_MANAGE_INFO_NEW)Marshal.PtrToStructure(inPtr, typeof(NET_USER_MANAGE_INFO_NEW));
            }
            Marshal.FreeHGlobal(inPtr);
            return result;
        }
 
        public static bool OperateUserInfoNew(IntPtr lLoginID, EM_OPERATE_USER_TYPE nOperateType, IntPtr opParam, IntPtr subParam, int waittime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_OperateUserInfoNew(lLoginID, (int)nOperateType, opParam, subParam, IntPtr.Zero, waittime);
            NetGetLastError(result);
            return result;
        }
 
        public static IntPtr StartSearchDevice(fSearchDevicesCB cbSearchDevice, IntPtr pUserData, IntPtr szLocalIp)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_StartSearchDevices(cbSearchDevice, pUserData, szLocalIp);
            NetGetLastError(result);
            return result;
        }
 
        public static bool ModifyDevice(DEVICE_NET_INFO_EX devNetInfo, uint dwWaitTime)
        {
            bool result = false;
            int error = 0;
            result = OriginalSDK.CLIENT_ModifyDevice(ref devNetInfo, dwWaitTime, ref error, null, IntPtr.Zero);
            NetGetLastError(result);
            return result;
        }
 
        public static bool StopSearchDevice(IntPtr lSearchHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopSearchDevices(lSearchHandle);
            NetGetLastError(result);
            return result;
        }
 
        public static bool DownloadRemoteFile(IntPtr lLoginID, ref NET_IN_DOWNLOAD_REMOTE_FILE inParam, ref NET_OUT_DOWNLOAD_REMOTE_FILE outParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DownloadRemoteFile(lLoginID, ref inParam, ref outParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool GetDevEncodeCaps(IntPtr lLoginID, NET_IN_ENCODE_CFG_CAPS stuInParam, ref NET_OUT_ENCODE_CFG_CAPS stuOutParam, int nWaitTime)
        {
            bool result = false;
            NET_INTERNAL_IN_ENCODE_CAPS stuIn = new NET_INTERNAL_IN_ENCODE_CAPS
            {
                dwSize = (uint)Marshal.SizeOf(typeof(NET_INTERNAL_IN_ENCODE_CAPS)),
                stuInEncodeCaps = stuInParam,
            };
            NET_INTERNAL_OUT_ENCODE_CAPS stuOut = new NET_INTERNAL_OUT_ENCODE_CAPS
            {
                dwSize = (uint)Marshal.SizeOf(typeof(NET_INTERNAL_OUT_ENCODE_CAPS)),
                stuOutEncodeCaps = stuOutParam,
            };
            int size = Marshal.SizeOf(typeof(NET_INTERNAL_OUT_ENCODE_CAPS));
            for (int i = 0; i < 3; i++)
            {
                stuOut.stuOutEncodeCaps.stuMainFormatCaps[i].dwSize = (uint)Marshal.SizeOf(typeof(NET_STREAM_CFG_CAPS));
                stuOut.stuOutEncodeCaps.stuExtraFormatCaps[i].dwSize = (uint)Marshal.SizeOf(typeof(NET_STREAM_CFG_CAPS));
                if (i != 2)
                {
                    stuOut.stuOutEncodeCaps.stuSnapFormatCaps[i].dwSize = (uint)Marshal.SizeOf(typeof(NET_STREAM_CFG_CAPS));
                }
            }
 
            uint nBufSize = 1024 * 1024;
            string strCommand = "Encode";
            IntPtr pInBuf = IntPtr.Zero;
            int nError = 0;
            try
            {
                stuIn.pchEncodeJson = Marshal.AllocHGlobal((int)nBufSize);
            }
            catch (OutOfMemoryException)
            {
                result = false;
                return result;
            }
 
            result = OriginalSDK.CLIENT_GetNewDevConfig(lLoginID, strCommand, stuInParam.nChannelId, stuIn.pchEncodeJson,
                                                         nBufSize, out nError, nWaitTime, new IntPtr());
            if (result)
            {
                IntPtr intPtr = IntPtr.Zero;
                IntPtr outPtr = IntPtr.Zero;
                try
                {
                    intPtr = Marshal.AllocHGlobal((int)stuIn.dwSize);
                    outPtr = Marshal.AllocHGlobal((int)stuOut.dwSize);
                }
                catch (OutOfMemoryException)
                {
                    Marshal.FreeHGlobal(stuIn.pchEncodeJson);
                    result = false;
                    return result;
                }
 
                Marshal.StructureToPtr(stuIn, intPtr, true);
                Marshal.StructureToPtr(stuOut, outPtr, true);
                result = OriginalSDK.CLIENT_GetDevCaps(lLoginID, 0x02, intPtr, outPtr, nWaitTime);
                if (result)
                {
                    stuOut = (NET_INTERNAL_OUT_ENCODE_CAPS)Marshal.PtrToStructure(outPtr, typeof(NET_INTERNAL_OUT_ENCODE_CAPS));
                    stuOutParam = stuOut.stuOutEncodeCaps;
                }
                else
                {
                    NetGetLastError(result);
                }
 
                Marshal.FreeHGlobal(intPtr);
                Marshal.FreeHGlobal(outPtr);
            }
            Marshal.FreeHGlobal(stuIn.pchEncodeJson);
            return result;
        }
 
        public static bool QueryChannelName(IntPtr lLoginID, IntPtr pChannelName, int maxlen, ref int nChannelCount, int waittime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_QueryChannelName(lLoginID, pChannelName, maxlen, ref nChannelCount, waittime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool SetDeviceSearchParam(NET_DEVICE_SEARCH_PARAM inParam)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetDeviceSearchParam(ref inParam);
            NetGetLastError(result);
            return result;
        }
 
        public static bool GetDevConfig(IntPtr lLoginID, EM_DEV_CFG_TYPE type, int lChannel, IntPtr lpOutBuffer, uint dwOutBufferSize, ref uint bytesReturned, int waittime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetDevConfig(lLoginID, (uint)type, lChannel, lpOutBuffer, dwOutBufferSize, ref bytesReturned, waittime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool SetDevConfig(IntPtr lLoginID, EM_DEV_CFG_TYPE type, int lChannel, IntPtr lpInBuffer, uint dwInBufferSize, int waittime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetDevConfig(lLoginID, (uint)type, lChannel, lpInBuffer, dwInBufferSize, waittime);
            NetGetLastError(result);
            return result;
        }
 
        public static IntPtr DownloadByRecordFile(IntPtr lLoginID, ref NET_RECORDFILE_INFO lpRecordFile, string sSavedFileName, fDownLoadPosCallBack cbDownLoadPos, IntPtr dwUserData, bool bUseUTCTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_DownloadByRecordFile(lLoginID, ref lpRecordFile, sSavedFileName, cbDownLoadPos, dwUserData, bUseUTCTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool RebootDev(IntPtr lLoginID)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_RebootDev(lLoginID);
            NetGetLastError(result);
            return result;
        }
 
        public static bool Attendance_AddUser(IntPtr lLoginID, NET_IN_ATTENDANCE_ADDUSER stuInAddUser, ref NET_OUT_ATTENDANCE_ADDUSER stuOutAddUser, int nWaitTime)
        {
            bool result = false;
 
            result = OriginalSDK.CLIENT_Attendance_AddUser(lLoginID, ref stuInAddUser, ref stuOutAddUser, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool Attendance_DelUser(IntPtr lLoginID, NET_IN_ATTENDANCE_DELUSER stuInDelUser, ref NET_OUT_ATTENDANCE_DELUSER stuOutDelUser, int nWaitTime)
        {
            bool result = false;
 
            result = OriginalSDK.CLIENT_Attendance_DelUser(lLoginID, ref stuInDelUser, ref stuOutDelUser, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool Attendance_ModifyUser(IntPtr lLoginID, NET_IN_ATTENDANCE_ModifyUSER stuInModifyUser, ref NET_OUT_ATTENDANCE_ModifyUSER stuOutModifyUser, int nWaitTime)
        {
            bool result = false;
 
            result = OriginalSDK.CLIENT_Attendance_ModifyUser(lLoginID, ref stuInModifyUser, ref stuOutModifyUser, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool Attendance_GetUser(IntPtr lLoginID, NET_IN_ATTENDANCE_GetUSER stuInGetUser, ref NET_OUT_ATTENDANCE_GetUSER stuOutGetUser, int nWaitTime)
        {
            bool result = false;
 
            result = OriginalSDK.CLIENT_Attendance_GetUser(lLoginID, ref stuInGetUser, ref stuOutGetUser, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool Attendance_FindUser(IntPtr lLoginID, NET_IN_ATTENDANCE_FINDUSER stuInFindUser, ref NET_OUT_ATTENDANCE_FINDUSER stuOutFindUser, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_Attendance_FindUser(lLoginID, ref stuInFindUser, ref stuOutFindUser, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool Attendance_InsertFingerByUserID(IntPtr lLoginID, ref NET_IN_FINGERPRINT_INSERT_BY_USERID stuInInsert, ref NET_OUT_FINGERPRINT_INSERT_BY_USERID stuOutInsert, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_Attendance_InsertFingerByUserID(lLoginID, ref stuInInsert, ref stuOutInsert, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool Attendance_RemoveFingerByUserID(IntPtr lLoginID, ref NET_CTRL_IN_FINGERPRINT_REMOVE_BY_USERID stuInRemove, ref NET_CTRL_OUT_FINGERPRINT_REMOVE_BY_USERID stuOutRemove, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_Attendance_RemoveFingerByUserID(lLoginID, ref stuInRemove, ref stuOutRemove, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool Attendance_GetFingerByUserID(IntPtr lLoginID, ref NET_IN_FINGERPRINT_GETBYUSER stuIn, ref NET_OUT_FINGERPRINT_GETBYUSER stuOut, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_Attendance_GetFingerByUserID(lLoginID, ref stuIn, ref stuOut, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static IntPtr AttachMotionData(IntPtr lLoginID, NET_IN_ATTACH_MOTION_DATA inParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            NET_OUT_ATTACH_MOTION_DATA outParam = new NET_OUT_ATTACH_MOTION_DATA();
            outParam.dwSize = (uint)Marshal.SizeOf(typeof(NET_OUT_ATTACH_MOTION_DATA));
            result = OriginalSDK.CLIENT_AttachMotionData(lLoginID, ref inParam, ref outParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool DetachMotionData(IntPtr lAttachHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DetachMotionData(lAttachHandle);
            NetGetLastError(result);
            return result;
        }
 
        public static bool SearchDevicesByIPs(NET_DEVICE_IP_SEARCH_INFO pIpSearchInfo, fSearchDevicesCB cbSearchDevices, IntPtr dwUserData, string szLocalIp, uint dwWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SearchDevicesByIPs(ref pIpSearchInfo, cbSearchDevices, dwUserData, szLocalIp, dwWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool InitDevAccount(NET_IN_INIT_DEVICE_ACCOUNT pInitAccountIn, ref NET_OUT_INIT_DEVICE_ACCOUNT pInitAccountOut, uint dwWaitTime, string szLocalIp)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_InitDevAccount(ref pInitAccountIn, ref pInitAccountOut, dwWaitTime, szLocalIp);
            NetGetLastError(result);
            return result;
        }
 
        public static bool GetDevCaps(IntPtr lLoginID, EM_DEVCAP_TYPE nType, IntPtr pInBuf, IntPtr pOutBuf, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetDevCaps(lLoginID, (int)nType, pInBuf, pOutBuf, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static IntPtr ListenServer(string ip, ushort port, int nTimeout, fServiceCallBack cbListen, IntPtr dwUserData)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_ListenServer(ip, port, nTimeout, cbListen, dwUserData);
            NetGetLastError(result);
            return result;
        }
 
        public static bool StopListenServer(IntPtr lServerHandle)
        {
            bool result = OriginalSDK.CLIENT_StopListenServer(lServerHandle);
            NetGetLastError(result);
            return result;
        }
 
        public static bool QueryProductionDefinition(IntPtr lLoginID, ref NET_PRODUCTION_DEFNITION pstuProdDef, int nWaitTime)
        {
            bool result = OriginalSDK.CLIENT_QueryProductionDefinition(lLoginID, ref pstuProdDef, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool QueryDevInfo(IntPtr lLoginID, EM_QUERY_DEV_INFO emQueryType, IntPtr pInBuf, IntPtr pOutBuf, int nWaitTime = 1000)
        {
            bool result = OriginalSDK.CLIENT_QueryDevInfo(lLoginID, (int)emQueryType, pInBuf, pOutBuf, IntPtr.Zero, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static IntPtr AttachCameraState(IntPtr lLoginID, NET_IN_CAMERASTATE pstInParam, ref NET_OUT_CAMERASTATE pstOutParam, int nWaitTime = 3000)
        {
            IntPtr lAttachHandle = IntPtr.Zero;
            lAttachHandle = OriginalSDK.CLIENT_AttachCameraState(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(lAttachHandle);
            return lAttachHandle;
        }
 
        public static bool DetachCameraState(IntPtr lAttachHandle)
        {
            bool result = OriginalSDK.CLIENT_DetachCameraState(lAttachHandle);
            NetGetLastError(result);
            return result;
        }
 
        public static bool GetSoftwareVersion(IntPtr lLoginID, NET_IN_GET_SOFTWAREVERSION_INFO pstInParam, ref NET_OUT_GET_SOFTWAREVERSION_INFO pstOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetSoftwareVersion(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool GetDeviceType(IntPtr lLoginID, NET_IN_GET_DEVICETYPE_INFO pstInParam, ref NET_OUT_GET_DEVICETYPE_INFO pstOutParam, int nWaitTime)
        {
            bool result = OriginalSDK.CLIENT_GetDeviceType(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool LogOpen(NET_LOG_SET_PRINT_INFO pstLogPrintInfo)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_LogOpen(ref pstLogPrintInfo);
            NetGetLastError(result);
            return result;
        }
 
        public static bool AudioDecEx(IntPtr lTalkHandle, IntPtr pAudioDataBuf, uint dwBufSize)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_AudioDecEx(lTalkHandle, pAudioDataBuf, dwBufSize);
            NetGetLastError(result);
            return result;
        }
 
        public static bool Attendance_GetFingerRecord(IntPtr lLoginID, ref NET_CTRL_IN_FINGERPRINT_GET pstuInGet, ref NET_CTRL_OUT_FINGERPRINT_GET pstuOutGet, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_Attendance_GetFingerRecord(lLoginID, ref pstuInGet, ref pstuOutGet, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool Attendance_RemoveFingerRecord(IntPtr lLoginID, ref NET_CTRL_IN_FINGERPRINT_REMOVE pstuInRemove, ref NET_CTRL_OUT_FINGERPRINT_REMOVE pstuOutRemove, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_Attendance_RemoveFingerRecord(lLoginID, ref pstuInRemove, ref pstuOutRemove, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool OperateAccessFingerprintService(IntPtr lLoginID, EM_ACCESS_CTL_FINGERPRINT_SERVICE emtype, IntPtr pstInParam, IntPtr pstOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_OperateAccessFingerprintService(lLoginID, emtype, pstInParam, pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool OperateAccessControlManager(IntPtr lLoginID, NET_EM_ACCESS_CTL_MANAGER emtype, IntPtr pstInParam, IntPtr pstOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_OperateAccessControlManager(lLoginID, emtype, pstInParam, pstInParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool EncryptString(NET_IN_ENCRYPT_STRING pInParam, ref NET_OUT_ENCRYPT_STRING pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_EncryptString(ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
 
            return result;
        }
 
        public static IntPtr DownloadMediaFile(IntPtr lLoginID, EM_FILE_QUERY_TYPE emType, IntPtr lpMediaFileInfo, string sSavedFileName, fDownLoadPosCallBack cbDownLoadPos, IntPtr dwUserData, IntPtr reserved)
        {
            IntPtr result = IntPtr.Zero;
            IntPtr file_name = Marshal.StringToHGlobalAnsi(sSavedFileName);
            result = OriginalSDK.CLIENT_DownloadMediaFile(lLoginID, emType, lpMediaFileInfo, file_name, cbDownLoadPos, dwUserData, reserved);
            Marshal.FreeHGlobal(file_name);
            NetGetLastError(result);
            return result;
        }
 
        public static bool StopDownloadMediaFile(IntPtr lFileHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopDownloadMediaFile(lFileHandle);
            NetGetLastError(result);
            return result;
        }
 
        public static IntPtr SCADAAlarmAttachInfo(IntPtr lLoginID, NET_IN_SCADA_ALARM_ATTACH_INFO pInParam, NET_OUT_SCADA_ALARM_ATTACH_INFO pOutParam, int nWaitTime = 3000)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_SCADAAlarmAttachInfo(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool SCADAAlarmDetachInfo(IntPtr lAttachHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SCADAAlarmDetachInfo(lAttachHandle);
            NetGetLastError(result);
            return result;
        }
 
        public static IntPtr SCADAAttachInfo(IntPtr lLoginID, NET_IN_SCADA_ATTACH_INFO pInParam, NET_OUT_SCADA_ATTACH_INFO pOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_SCADAAttachInfo(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool SCADADetachInfo(IntPtr lAttachHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SCADADetachInfo(lAttachHandle);
            NetGetLastError(result);
            return result;
        }
 
        public static IntPtr AttachPTZStatusProc(IntPtr lLoginID, NET_IN_PTZ_STATUS_PROC pstuInPtzStatusProc, ref NET_OUT_PTZ_STATUS_PROC pstuOutPtzStatusProc, int nWaitTime = 3000)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_AttachPTZStatusProc(lLoginID, ref pstuInPtzStatusProc, ref pstuOutPtzStatusProc, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool DetachPTZStatusProc(IntPtr lAttachHandle)
        {
            bool result = true;
            result = OriginalSDK.CLIENT_DetachPTZStatusProc(lAttachHandle);
            NetGetLastError(result);
            return result;
        }
 
        public static bool StartFind(IntPtr lLoginID, EM_FIND emType, IntPtr pInBuf, IntPtr pOutBuf, int nWaitTime = 1000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StartFind(lLoginID, emType, pInBuf, pOutBuf, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool DoFind(IntPtr lLoginID, EM_FIND emType, IntPtr pInBuf, IntPtr pOutBuf, int nWaitTime = 1000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DoFind(lLoginID, emType, pInBuf, pOutBuf, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool StopFind(IntPtr lLoginID, EM_FIND emType, IntPtr pInBuf, IntPtr pOutBuf, int nWaitTime = 1000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopFind(lLoginID, emType, pInBuf, pOutBuf, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static IntPtr RadiometryAttach(IntPtr lLoginID, NET_IN_RADIOMETRY_ATTACH pInParam, ref NET_OUT_RADIOMETRY_ATTACH pOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_RadiometryAttach(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool RadiometryDetach(IntPtr lAttachHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_RadiometryDetach(lAttachHandle);
            NetGetLastError(result);
            return result;
        }
 
        public static bool RadiometryFetch(IntPtr lLoginID, NET_IN_RADIOMETRY_FETCH pInParam, ref NET_OUT_RADIOMETRY_FETCH pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_RadiometryFetch(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// RealPlay By Stream Data Type  指定回调数据类型 实施预览(预览)
        /// </summary>
        /// <param name="lLoginID">user LoginID:Login's return value 登陆ID,Login返回值</param>
        /// <param name="pstInParam">real play  parameter in 预览输入参数</param>
        /// <param name="pstOutParam">real play  parameter out 预览输出参数</param>
        /// <param name="dwWaitTime">Waiting Time 等待时间</param>
        /// <returns>failed return 0, successful return the realplay ID(realplay handle),as parameter of related function. 失败返回0,成功返回大于0的值</returns>
        public static IntPtr RealPlayByDataType(IntPtr lLoginID, NET_IN_REALPLAY_BY_DATA_TYPE pstInParam, ref NET_OUT_REALPLAY_BY_DATA_TYPE pstOutParam, uint dwWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_RealPlayByDataType(lLoginID, ref pstInParam, ref pstOutParam, dwWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Playback By Stream Data Type  指定回调数据类型回放 
        /// </summary>
        /// <param name="lLoginID">user LoginID:Login's return value 登陆ID,Login返回值</param>
        /// <param name="pstInParam">playback  parameter in 回放输入参数</param>
        /// <param name="pstOutParam">playback  parameter out 回放输出参数</param>
        /// <param name="dwWaitTime">Waiting Time 等待时间</param>
        /// <returns>failed return 0, successful return the playback ID(playback handle),as parameter of related function. 失败返回0,成功返回大于0的值</returns>
        public static IntPtr PlayBackByDataType(IntPtr lLoginID, NET_IN_PLAYBACK_BY_DATA_TYPE pstInParam, ref NET_OUT_PLAYBACK_BY_DATA_TYPE pstOutParam, uint dwWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_PlayBackByDataType(lLoginID, ref pstInParam, ref pstOutParam, dwWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Download By Stream Data Type  指定回调数据类型下载 
        /// </summary>
        /// <param name="lLoginID">user LoginID:Login's return value 登陆ID,Login返回值</param>
        /// <param name="pstInParam">download parameter in 下载输入参数</param>
        /// <param name="pstOutParam">download parameter Out 下载输出参数</param>
        /// <param name="dwWaitTime">Waiting Time 等待时间</param>
        /// <returns>failed return 0, successful return the download ID(download handle),as parameter of related function. 失败返回0,成功返回大于0的值</returns>
        public static IntPtr DownloadByDataType(IntPtr lLoginID, NET_IN_DOWNLOAD_BY_DATA_TYPE pstInParam, ref NET_OUT_DOWNLOAD_BY_DATA_TYPE pstOutParam, uint dwWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_DownloadByDataType(lLoginID, ref pstInParam, ref pstOutParam, dwWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Get Alarm ext module status 报警主机获取扩展模块在线状态接口
        /// </summary>
        /// <param name="lLoginID">user LoginID:Login's return value 登陆ID,Login返回值</param>
        /// <param name="pstInParam">Get Alarm ext module status parameter in 输入参数</param>
        /// <param name="pstOutParam">Get Alarm ext module status parameter Out 输出参数</param>
        /// <param name="dwWaitTime">Waiting Time 等待时间</param>
        /// <returns></returns>
        public static bool GetConnectionStatus(IntPtr lLoginID, NET_IN_GETCONNECTION_STATUS pstInParam, ref NET_OUT_GETCONNECTION_STATUS pstOutParam, int dwWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetConnectionStatus(lLoginID, ref pstInParam, ref pstOutParam, dwWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool GetDefenceArmMode(IntPtr lLoginID, NET_IN_GET_DEFENCEMODE pstInParam, ref NET_OUT_GET_DEFENCEMODE pstOutParam, int dwWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetDefenceArmMode(lLoginID, ref pstInParam, ref pstOutParam, dwWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        public static bool SetDefenceArmMode(IntPtr lLoginID, NET_IN_SET_DEFENCEMODE pstInParam, int dwWaitTime)
        {
            bool result = false;
            NET_OUT_SET_DEFENCEMODE outParam = new NET_OUT_SET_DEFENCEMODE();
            outParam.dwSize = (uint)Marshal.SizeOf(typeof(NET_OUT_SET_DEFENCEMODE));
            result = OriginalSDK.CLIENT_SetDefenceArmMode(lLoginID, ref pstInParam, ref outParam, dwWaitTime);
            NetGetLastError(result);
            return result;
        }
 
 
        public static bool SetParkingSpaceLightPlan(IntPtr lLoginID, NET_IN_SET_PARKING_SPACE_LIGHT_PLAN pstInParam, int nWaitTime)
        {
            bool result = false;
            NET_OUT_SET_PARKING_SPACE_LIGHT_PLAN outParam = new NET_OUT_SET_PARKING_SPACE_LIGHT_PLAN();
            outParam.dwSize = (uint)Marshal.SizeOf(typeof(NET_OUT_SET_PARKING_SPACE_LIGHT_PLAN));
            result = OriginalSDK.CLIENT_SetParkingSpaceLightPlan(lLoginID, ref pstInParam, ref outParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 下发人脸开门比对数据
        /// </summary>
        /// <param name="lLoginID">登录句柄</param>
        /// <param name="pInParam">入参</param>
        /// <param name="pOutParam">出参</param>
        /// <param name="nWaitTime">超时时间</param>
        /// <returns></returns>
        public static bool FaceOpenDoor(IntPtr lLoginID, NET_IN_FACE_OPEN_DOOR pInParam, NET_OUT_FACE_OPEN_DOOR pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_FaceOpenDoor(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 向服务器提交多张大图,从中检测人脸图片, pstInParam = NET_IN_FACE_RECOGNITION_DETECT_MULTI_FACE_INFO 与pstOutParam内存由用户申请释放
        /// submit multiple large images to the server, and detect face images from it, user malloc and free (pstInParam's = NET_IN_FACE_RECOGNITION_DETECT_MULTI_FACE_INFO and pstOutParam's) memory
        /// </summary>
        public static bool FaceRecognitionDetectMultiFace(IntPtr lLoginID, IntPtr pstInParam, ref NET_OUT_FACE_RECOGNITION_DETECT_MULTI_FACE_INFO pstOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_FaceRecognitionDetectMultiFace(lLoginID, pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 订阅大图检测小图进度,配合CLIENT_FaceRecognitionDetectMultiFace使用, pstInParam与pstOutParam内存由用户申请释放
        /// attach the progress of detect face images form the big images, cooperate with CLIENT_FaceRecognitionDetectMultiFace, user malloc and free (pstInParam's and pstOutParam's) memory
        /// </summary>
        public static IntPtr AttachDetectMultiFaceState(IntPtr lLoginID, ref NET_IN_MULTIFACE_DETECT_STATE pstInParam, ref NET_OUT_MULTIFACE_DETECT_STATE pstOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_AttachDetectMultiFaceState(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 取消订阅大图检测小图进度, lAttachHandle为CLIENT_AttachDetectMultiFaceState 返回的句柄
        /// detach the progress of detect face images form the big images, lAttachHandleis returned by CLIENT_AttachDetectMultiFaceState
        /// </summary>
        public static bool DetachDetectMultiFaceState(IntPtr lAttachHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DetachDetectMultiFaceState(lAttachHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 报警主机获取操作
        /// Get operate of alarm region
        /// </summary>
        public static bool GetAlarmRegionInfo(IntPtr lLoginID, EM_A_NET_EM_GET_ALARMREGION_INFO emType, IntPtr pstuInParam, IntPtr pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetAlarmRegionInfo(lLoginID, emType, pstuInParam, pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
 
        #region<< gps >>
 
        /// <summary>
        /// GPS inforamtion subscribe
        /// </summary>
        /// <param name="lLoginID">login handle</param>
        /// <param name="bStart">TRUE:subscribe  FALSE:cancle subscribe</param>
        /// <param name="KeepTime">subscribe time last (unit second) value:-1  means indefinite duration last</param>
        /// <param name="InterTime">GPS send rate in subscribe time</param>
        /// <returns>failed return false, successful return true</returns>
        public static bool SubcribeGPS(IntPtr lLoginID, bool bStart, int KeepTime, int InterTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SubcribeGPS(lLoginID, bStart, KeepTime, InterTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Set GPS subscription callback function
        /// </summary>
        /// <param name="OnGPSMessage">callback method</param>
        /// <param name="dwUser"></param>
        public static void SetSubcribeGPSCallBack(fGPSRevEx2 OnGPSMessage, IntPtr dwUser)
        {
            OriginalSDK.CLIENT_SetSubcribeGPSCallBackEX2(OnGPSMessage, dwUser);
        }
        #endregion GPS
 
        #region Analyze Task
 
        /// <summary>
        /// 订阅智能分析任务状态
        /// </summary>
        /// <param name="lLoginID">Lonin return value 登陆ID</param>
        /// <param name="stuInParam">入参</param>
        /// <param name="nWaitTime">waittime 等待时间</param>
        /// <returns>failed return Intptr.Zero, successful return other; 失败返回Intptr.Zero 成功返回其他值</returns>
        public static IntPtr AttachAnalyseTaskState(IntPtr lLoginID, ref NET_IN_ATTACH_ANALYSE_TASK_STATE pInParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_AttachAnalyseTaskState(lLoginID, ref pInParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 取消订阅智能分析任务状态
        /// </summary>
        /// <param name="lAttachHandle">AttachAnalyseTaskState return value; 订阅返回句柄ID</param>
        /// <returns></returns>
        public static bool DetachAnalyseTaskState(IntPtr lAttachHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DetachAnalyseTaskState(lAttachHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 推送需要智能分析的图片
        /// </summary>
        /// <param name="lLoginID">Lonin return value; 登陆ID</param>
        /// <param name="stuInParam">入参</param>
        /// <param name="stuOutParam">出参</param>
        /// <param name="nWaitTime">waittime; 等待时间</param>
        /// <returns>failed return false, successful return true; 失败返回false 成功返回true</returns>
        public static bool PushAnalysePictureFile(IntPtr lLoginID, ref NET_IN_PUSH_ANALYSE_PICTURE_FILE pInParam, ref NET_OUT_PUSH_ANALYSE_PICTURE_FILE pOutParam, int nWaitTime)
        {
            bool result = false;
 
            IntPtr ppInParam = IntPtr.Zero;
            IntPtr ppOutParam = IntPtr.Zero;
 
            ppInParam = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_IN_PUSH_ANALYSE_PICTURE_FILE)));
            ppOutParam = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_OUT_PUSH_ANALYSE_PICTURE_FILE)));
 
            Marshal.StructureToPtr(pInParam, ppInParam, false);
            Marshal.StructureToPtr(pOutParam, ppOutParam, false);
            result = OriginalSDK.CLIENT_PushAnalysePictureFile(lLoginID, ppInParam, ppOutParam, nWaitTime);
            NetGetLastError(result);
            if (result)
            {
                pOutParam = (NET_OUT_PUSH_ANALYSE_PICTURE_FILE)Marshal.PtrToStructure(ppOutParam, typeof(NET_OUT_PUSH_ANALYSE_PICTURE_FILE));
            }
 
            Marshal.FreeHGlobal(ppInParam);
            Marshal.FreeHGlobal(ppOutParam);
            
            return result;
        }
 
        /// <summary>
        /// 推送智能分析图片文件和规则信息,当CLIENT_AddAnalyseTask的数据源类型emDataSourceType为 EM_DATA_SOURCE_PUSH_PICFILE_BYRULE 时使用
        /// Push intelligent analysis of picture files and rule information when the client_ The data source type emdatasourcetype of addanalysistask is em_ DATA_ SOURCE_ PUSH_ PICFILE_ Used when byrule
        /// </summary>
        /// <param name="lLoginID">Lonin return value; 登陆ID</param>
        /// <param name="stuInParam">入参</param>
        /// <param name="stuOutParam">出参</param>
        /// <param name="nWaitTime">waittime; 等待时间</param>
        /// <returns>failed return false, successful return true; 失败返回false 成功返回true</returns>
        public static bool PushAnalysePictureFileByRule(IntPtr lLoginID, ref NET_IN_PUSH_ANALYSE_PICTURE_FILE_BYRULE pInParam, ref NET_OUT_PUSH_ANALYSE_PICTURE_FILE_BYRULE pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_PushAnalysePictureFileByRule(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
 
        /// <summary>
        /// 添加智能分析任务(图片方式)
        /// </summary>
        /// <param name="lLoginID">Lonin return value 登陆ID</param>
        /// <param name="stuPushInfo">推送图片文件信息</param>
        /// <param name="stuOutParam">出参</param>
        /// <param name="nWaitTime">waittime 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool AddAnalyseTask_PushPicFile(IntPtr lLoginID, NET_PUSH_PICFILE_INFO stuPushInfo, ref NET_OUT_ADD_ANALYSE_TASK pOutParam, int nWaitTime)
        {
            bool result = false;
            IntPtr pInParam = IntPtr.Zero;
            EM_DATA_SOURCE_TYPE emDataSourceType = EM_DATA_SOURCE_TYPE.PUSH_PICFILE;
            try
            {
                pInParam = Marshal.AllocHGlobal(Marshal.SizeOf(stuPushInfo));
                Marshal.StructureToPtr(stuPushInfo, pInParam, true);
                result = OriginalSDK.CLIENT_AddAnalyseTask(lLoginID, emDataSourceType, pInParam, ref pOutParam, nWaitTime); ;
                NetGetLastError(result);
                return result;
            }
            finally
            {
                Marshal.FreeHGlobal(pInParam);
            }
        }
 
        public static bool AddAnalyseTask(IntPtr lLoginID, EM_DATA_SOURCE_TYPE emDataSourceType, IntPtr pInParam, ref NET_OUT_ADD_ANALYSE_TASK pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_AddAnalyseTask(lLoginID, emDataSourceType, pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 删除智能分析任务
        /// </summary>
        /// <param name="lLoginID">Lonin return value 登陆ID</param>
        /// <param name="stuInParam">入参</param>
        /// <param name="stuOutParam">出参</param>
        /// <param name="nWaitTime">waittime 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool RemoveAnalyseTask(IntPtr lLoginID, ref NET_IN_REMOVE_ANALYSE_TASK pInParam, ref NET_OUT_REMOVE_ANALYSE_TASK pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_RemoveAnalyseTask(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 订阅智能分析结果
        /// </summary>
        /// <param name="lLoginID">Lonin return value 登陆ID</param>
        /// <param name="stuInParam">入参</param>
        /// <param name="nWaitTime">waittime 等待时间</param>
        /// <returns>failed return Intptr.Zero, successful return other; 失败返回Intptr.Zero 成功返回其他值</returns>
        public static IntPtr AttachAnalyseTaskResult(IntPtr lLoginID, ref NET_IN_ATTACH_ANALYSE_RESULT pInParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_AttachAnalyseTaskResult(lLoginID, ref pInParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 取消订阅智能分析结果
        /// </summary>
        /// <param name="lAttachHandle">AttachAnalyseTaskResult返回结果</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool DetachAnalyseTaskResult(IntPtr lAttachHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DetachAnalyseTaskResult(lAttachHandle);
            NetGetLastError(result);
            return result;
        }
 
        public static bool FindAnalyseTask(IntPtr lLoginID, ref NET_IN_FIND_ANALYSE_TASK stuInParam, ref NET_OUT_FIND_ANALYSE_TASK stuOutParam, int nWaitTime)
        {
            bool result = false;
            IntPtr pOut = IntPtr.Zero;
            try
            {
                pOut = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_OUT_FIND_ANALYSE_TASK)));
                result = OriginalSDK.CLIENT_FindAnalyseTask(lLoginID, ref stuInParam, pOut, nWaitTime);
                if (result)
                {
                    stuOutParam = (NET_OUT_FIND_ANALYSE_TASK)Marshal.PtrToStructure(pOut, typeof(NET_OUT_FIND_ANALYSE_TASK));
                }
 
            }
            finally
            {
                Marshal.FreeHGlobal(pOut);
            }
 
            NetGetLastError(result);
            return result;
        }
 
 
        #endregion
 
 
        /// <summary>
        /// Open PlayGroup
        /// 打开播放组
        /// </summary>
        /// <returns>failed return 0,successful return PlayGroupID 失败返回0,成功返回大于O的值</returns>
        public static IntPtr OpenPlayGroup()
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_OpenPlayGroup();
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        ///  Add PlayHandle To PlayGroup
        /// 将播放句柄加入播放组,保证同步播放
        /// </summary>
        /// <param name="pInParam">输入数据</param>
        /// <param name="pOutParam">输出数据</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool AddPlayHandleToPlayGroup(ref NET_IN_ADD_PLAYHANDLE_TO_PLAYGROUP pInParam, ref NET_OUT_ADD_PLAYHANDLE_TO_PLAYGROUP pOutParam)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_AddPlayHandleToPlayGroup(ref pInParam, ref pOutParam);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Pause or Play PlayGroup
        /// 暂停或继续播放组
        /// </summary>
        /// <param name="lPlayGroupHandle">PlayGroupID 播放组ID</param>
        /// <param name="bPause">false:play;true:pause  false:播放;true:暂停 </param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool PausePlayGroup(IntPtr lPlayGroupHandle, bool bPause)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_PausePlayGroup(lPlayGroupHandle, bPause);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Query the time of PlayGroup
        /// 查询播放组的播放时间
        /// </summary>
        /// <param name="pInParam"></param>
        /// <param name="pOutParam"></param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool QueryPlayGroupTime(ref NET_IN_QUERY_PLAYGROUP_TIME pInParam, ref NET_OUT_QUERY_PLAYGROUP_TIME pOutParam)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_QueryPlayGroupTime(ref pInParam, ref pOutParam);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Delete From PlayGroup
        /// 将指定句柄从播放组中删除
        /// </summary>
        /// <param name="pInParam"></param>
        /// <param name="pOutParam"></param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool DeletePlayHandleFromPlayGroup(ref NET_IN_DELETE_FROM_PLAYGROUP pInParam, ref NET_OUT_DELETE_FROM_PLAYGROUP pOutParam)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DeleteFromPlayGroup(ref pInParam, ref pOutParam);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// close PlayGroup
        /// 关闭播放组
        /// </summary>
        /// <param name="lPlayGroupHandle">播放组ID</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool ClosePlayGroup(IntPtr lPlayGroupHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_ClosePlayGroup(lPlayGroupHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Set PlayGroup Direction
        /// 设置播放组播放方向
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool SetPlayGroupDirection(ref NET_IN_SET_PLAYGROUP_DIRECTION pInParam, ref NET_OUT_SET_PLAYGROUP_DIRECTION pOutParam)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetPlayGroupDirection(ref pInParam, ref pOutParam);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Set PlayGroup Speed
        /// 设置播放组播放速度
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool SetPlayGroupSpeed(ref NET_IN_SET_PLAYGROUP_SPEED pInParam, ref NET_OUT_SET_PLAYGROUP_SPEED pOutParam)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetPlayGroupSpeed(ref pInParam, ref pOutParam);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// PlayGroup play fast
        /// 播放组快放
        /// </summary>
        /// <param name="lPlayGroupHandle">播放组ID</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool FastPlayGroup(IntPtr lPlayGroupHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_FastPlayGroup(lPlayGroupHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// PlayGroup play slow
        /// 播放组慢放
        /// </summary>
        /// <param name="lPlayGroupHandle">播放组ID</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool SlowPlayGroup(IntPtr lPlayGroupHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SlowPlayGroup(lPlayGroupHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// PlayGroup play normal
        /// 播放组正常播放
        /// </summary>
        /// <param name="lPlayGroupHandle">播放组ID</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool NormalPlayGroup(IntPtr lPlayGroupHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_NormalPlayGroup(lPlayGroupHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// start upload remote file
        /// 开始上传文件
        /// </summary>
        /// <param name="pInParam"></param>
        /// <param name="pOutParam"></param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static IntPtr StartUploadRemoteFile(IntPtr lLoginID, ref NET_IN_UPLOAD_REMOTE_FILE pInParam, ref NET_OUT_UPLOAD_REMOTE_FILE pOutParam, fUploadFileCallBack cbUploadFile, IntPtr dwUser)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_StartUploadRemoteFile(lLoginID, ref pInParam, ref pOutParam, cbUploadFile, dwUser);
            NetGetLastError(result);
            return result;
        }
        /// <summary>
        /// stop upload remote file
        /// 停止文件上传
        /// </summary>
        /// <param name="lPlayGroupHandle">上传ID</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool StopUploadRemoteFile(IntPtr lPlayGroupHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopUploadRemoteFile(lPlayGroupHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 开始打标签
        /// </summary>
        /// <param name="pInParam"></param>
        /// <param name="pOutParam"></param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool TagManagerStartTag(IntPtr lLoginID, ref NET_IN_TAGMANAGER_STARTTAG_INFO pInParam, ref NET_OUT_TAGMANAGER_STARTTAG_INFO pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_TagManagerStartTag(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 停止打标签
        /// </summary>
        /// <param name="pInParam"></param>
        /// <param name="pOutParam"></param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool TagManagerStopTag(IntPtr lLoginID, ref NET_IN_TAGMANAGER_STOPTAG_INFO pInParam, ref NET_OUT_TAGMANAGER_STOPTAG_INFO pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_TagManagerStopTag(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取标签状态
        /// </summary>
        /// <param name="pInParam"></param>
        /// <param name="pOutParam"></param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool TagManagerGetTagState(IntPtr lLoginID, ref NET_IN_TAGMANAGER_GETTAGSTATE_INFO pInParam, ref NET_OUT_TAGMANAGER_GETTAGSTATE_INFO pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_TagManagerGetTagState(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 开始查询标签信息
        /// </summary>
        /// <param name="pInParam"></param>
        /// <param name="pOutParam"></param>
        /// <returns>failed return 0, successful return the handle 失败返回0,成功返回大于0的值</returns>
        public static IntPtr TagManagerStartFind(IntPtr lLoginID, ref NET_IN_TAGMANAGER_STARTFIND_INFO pInParam, ref NET_OUT_TAGMANAGER_STARTFIND_INFO pOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_TagManagerStartFind(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取标签查询结果信息
        /// </summary>
        /// <param name="pInParam"></param>
        /// <param name="pOutParam"></param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool TagManagerDoFind(IntPtr lLoginID, ref NET_IN_TAGMANAGER_DOFIND_INFO pInParam, ref NET_OUT_TAGMANAGER_DOFIND_INFO pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_TagManagerDoFind(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取标签查询能力
        /// </summary>
        /// <param name="pInParam"></param>
        /// <param name="pOutParam"></param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool TagManagerGetCaps(IntPtr lLoginID, ref NET_IN_TAGMANAGER_GETCAPS_INFO pInParam, ref NET_OUT_TAGMANAGER_GETCAPS_INFO pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_TagManagerGetCaps(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 停止打标签
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool TagManagerStopFind(IntPtr lLoginID)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_TagManagerStopFind(lLoginID);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取黑体异常报警能力
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool GetHumanRadioCaps(IntPtr lLoginID, ref NET_IN_GET_HUMAN_RADIO_CAPS pInParam, ref NET_OUT_GET_HUMAN_RADIO_CAPS pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetHumanRadioCaps(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 异步添加自定义设备
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool AsyncAddCustomDevice(IntPtr lLoginID, ref NET_IN_ASYNC_ADD_CUSTOM_DEVICE pInParam, ref NET_OUT_ASYNC_ADD_CUSTOM_DEVICE pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_AsyncAddCustomDevice(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 删除设备
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool RemoveDevice(IntPtr lLoginID, ref NET_IN_REMOVE_DEVICE pInParam, ref NET_OUT_REMOVE_DEVICE pOutParam, int nWaitTime)
        {
            bool result = false;
            IntPtr inPtr = Marshal.AllocHGlobal((int)pInParam.dwSize);
            Marshal.StructureToPtr(pInParam, inPtr, true);
 
            IntPtr outPtr = Marshal.AllocHGlobal((int)pOutParam.dwSize);
            Marshal.StructureToPtr(pOutParam, outPtr, true);
 
            result = OriginalSDK.CLIENT_RemoveDevice(lLoginID, inPtr, outPtr, nWaitTime);
            NetGetLastError(result);
            if (result)
            {
                pOutParam = (NET_OUT_REMOVE_DEVICE)Marshal.PtrToStructure(outPtr, typeof(NET_OUT_REMOVE_DEVICE));
            }
            Marshal.FreeHGlobal(inPtr);
            Marshal.FreeHGlobal(outPtr);
            return result;
        }
 
        /// <summary>
        /// 下载离线智能分析数据-图片
        /// </summary>
        /// <returns>failed return 0, successful return the handle 失败返回0,成功返回大于0的值</returns>
        public static IntPtr LoadOffLineFile(IntPtr lLoginID, int nChannelID, uint dwAlarmType, NET_TIME_EX lpStartTime, NET_TIME_EX lpEndTime, fAnalyzerDataCallBack cbAnalyzerData, IntPtr dwUser)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_LoadOffLineFile(lLoginID, nChannelID, dwAlarmType, lpStartTime, lpEndTime, cbAnalyzerData, dwUser);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取回放帧速
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool GetFramePlayBack(IntPtr lPlayBackID, ref int nfileframerate, ref int nplayframerate)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetFramePlayBack(lPlayBackID, ref nfileframerate, ref nplayframerate);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 设置回放帧速
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool SetFramePlayBack(IntPtr lPlayBackID, int framerate)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetFramePlayBack(lPlayBackID, framerate);
            NetGetLastError(result);
            return result;
        }
 
        public static IntPtr StartSearchDevicesEx(ref NET_IN_STARTSERACH_DEVICE pInBuf, ref NET_OUT_STARTSERACH_DEVICE pOutBuf)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_StartSearchDevicesEx(ref pInBuf, ref pOutBuf);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// search device log item
        /// 查询设备日志条数
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool QueryDevLogCount(IntPtr lLoginID, ref NET_IN_GETCOUNT_LOG_PARAM pInParam, ref NET_OUT_GETCOUNT_LOG_PARAM pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_QueryDevLogCount(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Start query log(support BSC only)
        /// 开始查询日志(目前只支持门禁BSC系列)
        /// </summary>
        /// <returns>failed return 0, successful return non-0 失败返回0 成功返回非0</returns>
        public static IntPtr StartQueryLog(IntPtr lLoginID, ref NET_IN_START_QUERYLOG pInParam, ref NET_OUT_START_QUERYLOG pOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_StartQueryLog(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Query next log(support BSC only)
        /// 获取日志(目前只支持门禁BSC系列)
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool QueryNextLog(IntPtr lFindLogID, ref NET_IN_QUERYNEXTLOG pInParam, ref NET_OUT_QUERYNEXTLOG pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_QueryNextLog(lFindLogID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
        /// <summary>
        /// Stop query log(support BSC only)
        /// 结束查询日志(目前只支持门禁BSC系列)
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool StopQueryLog(IntPtr lFindLogID)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopQueryLog(lFindLogID);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 开始升级设备程序--扩展,pchFileName由用户申请释放内存,大小为MAX_PATH
        /// </summary>
        /// <returns>failed return 0, successful return the handle 失败返回0,成功返回大于0的值</returns>
        public static IntPtr StartUpgrade(IntPtr lLoginID, EM_UPGRADE_TYPE emType, string pchFileName, fUpgradeCallBack cbUpgrade, IntPtr dwUser)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_StartUpgradeEx(lLoginID, emType, pchFileName, cbUpgrade, dwUser);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 重启系统,恢复出厂默认(包括清空配置和删除账户)并重启,实现硬复位功能
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool ResetSystem(IntPtr lLoginID, ref NET_IN_RESET_SYSTEM pInParam, ref NET_OUT_RESET_SYSTEM pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_ResetSystem(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 恢复出厂配置扩展接口(包括清空配置和删除账户),实现硬复位及软复位功能
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool ResetSystemEx(IntPtr lLoginID, ref NET_IN_RESET_SYSTEM_EX pInParam, ref NET_OUT_RESET_SYSTEM_EX pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_ResetSystemEx(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 发送数据
        /// </summary>
        /// <param name="lUpgradeID">StartUpgrade返回值</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool SendUpgrade(IntPtr lUpgradeID)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SendUpgrade(lUpgradeID);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 结束升级设备程序
        /// </summary>
        /// <param name="lUpgradeID">StartUpgrade返回值</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool StopUpgrade(IntPtr lUpgradeID)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopUpgrade(lUpgradeID);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 开始查询人员信息
        /// </summary>
        /// <returns>failed return 0, successful return the handle 失败返回0,成功返回大于0的值</returns>
        public static IntPtr StartFindUserInfo(IntPtr lLoginID, ref NET_IN_USERINFO_START_FIND pstIn, ref NET_OUT_USERINFO_START_FIND pstOut, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_StartFindUserInfo(lLoginID, ref pstIn, ref pstOut, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取人员信息 ,lFindHandle 为StartFindUserInfo接口返回值
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool DoFindUserInfo(IntPtr lFindHandle, ref NET_IN_USERINFO_DO_FIND pstIn, ref NET_OUT_USERINFO_DO_FIND pstOut, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DoFindUserInfo(lFindHandle, ref pstIn, ref pstOut, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 停止查询人员信息 ,lFindHandle 为StartFindUserInfo接口返回值
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool StopFindUserInfo(IntPtr lFindHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopFindUserInfo(lFindHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 开始查询卡片信息
        /// </summary>
        /// <returns>failed return 0, successful return the handle 失败返回0,成功返回大于0的值</returns>
        public static IntPtr StartFindCardInfo(IntPtr lLoginID, ref NET_IN_CARDINFO_START_FIND pstIn, ref NET_OUT_CARDINFO_START_FIND pstOut, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_StartFindCardInfo(lLoginID, ref pstIn, ref pstOut, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取卡片信息,lFindHandle 为StartFindCardInfo接口返回值
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool DoFindCardInfo(IntPtr lFindHandle, ref NET_IN_CARDINFO_DO_FIND pstIn, ref NET_OUT_CARDINFO_DO_FIND pstOut, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DoFindCardInfo(lFindHandle, ref pstIn, ref pstOut, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 停止查询卡片信息,lFindHandle 为StartFindCardInfo接口返回值
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool StopFindCardInfo(IntPtr lFindHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopFindCardInfo(lFindHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 门禁人脸信息管理接口
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool OperateAccessFaceService(IntPtr lLoginID, EM_NET_ACCESS_CTL_FACE_SERVICE emtype, IntPtr pstInParam, IntPtr pstOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_OperateAccessFaceService(lLoginID, emtype, pstInParam, pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 订阅雷达的报警点信息
        /// </summary>
        /// <param name="lLoginID"></param>
        /// <param name="pInParam"></param>
        /// <param name="pOutParam"></param>
        /// <param name="nWaitTime"></param>
        /// <returns></returns>
        public static IntPtr AttachRadarAlarmPointInfo(IntPtr lLoginID, NET_IN_RADAR_ALARMPOINTINFO pInParam, ref NET_OUT_RADAR_ALARMPOINTINFO pOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_AttachRadarAlarmPointInfo(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
 
        /// <summary>
        /// 取消订阅雷达的报警点信息
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool DetachRadarAlarmPointInfo(IntPtr lAttachHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DetachRadarAlarmPointInfo(lAttachHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 雷达操作
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool RadarOperate(IntPtr lLoginID, EM_RADAR_OPERATE_TYPE emtype, IntPtr pInBuf, IntPtr pOutBuf, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_RadarOperate(lLoginID, emtype, pInBuf, pOutBuf, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Radar add link-SD
        /// 用于雷达联动球机添加
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool AddRadarLinkSD(IntPtr lLoginID, ref NET_IN_RADAR_ADD_RADARLINKSD pstInParam, ref NET_OUT_RADAR_ADD_RADARLINKSD pstOutParam, int nWaitTime)
        {
            bool result = OriginalSDK.CLIENT_AddRadarLinkSD(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Radar delete link-SD
        /// 用于雷达联动球机删除
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool DelRadarLinkSD(IntPtr lLoginID, ref NET_IN_RADAR_DEL_RADARLINKSD pstInParam, ref NET_OUT_RADAR_DEL_RADARLINKSD pstOutParam, int nWaitTime)
        {
            bool result = OriginalSDK.CLIENT_DelRadarLinkSD(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// radar get link SD state
        /// 获取雷达联动的远程球机状态
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool GetRadarLinkSDState(IntPtr lLoginID, ref NET_IN_RADAR_GET_LINKSTATE pstInParam, ref NET_OUT_RADAR_GET_LINKSTATE pstOutParam, int nWaitTime)
        {
            bool result = OriginalSDK.CLIENT_GetRadarLinkSDState(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Search IO status
        /// 查询IO状态(pState内存由用户申请释放,根据emType对应的类型找到相应的结构体,进而确定申请内存大小)
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool QueryIOControlState(IntPtr lLoginID, EM_NET_IOTYPE emType, IntPtr pState, int maxlen, ref int nIOCount, int waittime = 1000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_QueryIOControlState(lLoginID, emType, pState, maxlen, ref nIOCount, waittime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// IO control,user malloc memory of pState, please refer to corresponding structure of emType
        /// IO控制(pState内存由用户申请释放,根据emType对应的类型找到相应的结构体,进而确定申请内存大小)
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool IOControl(IntPtr lLoginID, EM_NET_IOTYPE emType, IntPtr pState, int maxlen)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_IOControl(lLoginID, emType, pState, maxlen);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取设备点位信息
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool SCADAGetAttributeInfo(IntPtr lLoginID, IntPtr pstInParam, IntPtr pstOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SCADAGetAttributeInfo(lLoginID, pstInParam, pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 根据楼层号获取对应梯控模块映射关系
        /// </summary>
        /// <returns></returns>
        public static bool GetFloorInfo(IntPtr lLoginID, ref NET_IN_GET_FLOOR_INFO pstInParam, ref NET_OUT_GET_FLOOR_INFO pstOutParam, uint dwWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetFloorInfo(lLoginID, ref pstInParam, ref pstOutParam, dwWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 自定义定时抓图订阅接口(目前智慧养殖猪温检测在用)
        /// </summary>
        /// <returns>failed return 0, successful return the handle 失败返回0,成功返回不等于0的值</returns>
        public static IntPtr AttachCustomSnapInfo(IntPtr lLoginID, ref NET_IN_ATTACH_CUSTOM_SNAP_INFO pstInParam, ref NET_OUT_ATTACH_CUSTOM_SNAP_INFO pstOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_AttachCustomSnapInfo(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 取消自定义定时抓图订阅接口(目前智慧养殖猪温检测在用)
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool DetachCustomSnapInfo(IntPtr lFindHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DetachCustomSnapInfo(lFindHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// operate Monitor Wall,user malloc memory of pInParam and pOutParam,please refer to the corresponding structure of emType
        /// 电视墙操作,pInParam与pOutParam内存由用户申请释放,大小参照emType对应的结构体
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool OperateMonitorWall(IntPtr lLoginID, NET_MONITORWALL_OPERATE_TYPE emType, IntPtr pInParam, IntPtr pOutParam, int nWaitTime = 5000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_OperateMonitorWall(lLoginID, emType, pInParam, pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取电视墙场景,pInParam与pOutParam内存由用户申请释放
        /// get scene of monitor wall ,user malloc memory of pInParam and pOutParam
        /// </summary>
        /// <param name="pInParam"></param>
        /// <param name="pOutParam"></param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool MonitorWallGetScene(IntPtr lLoginID, ref NET_A_IN_MONITORWALL_GET_SCENE pInParam, ref NET_A_OUT_MONITORWALL_GET_SCENE pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_MonitorWallGetScene(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取设备序列号
        /// </summary>
        /// <returns></returns>
        public static bool GetDeviceSerialNo(IntPtr lLoginID, ref NET_IN_GET_DEVICESERIALNO_INFO pstInParam, ref NET_OUT_GET_DEVICESERIALNO_INFO pstOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetDeviceSerialNo(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取机器名称
        /// </summary>
        /// <returns></returns>
        public static bool GetMachineName(IntPtr lLoginID, ref NET_IN_GET_MACHINENAME_INFO pstInParam, ref NET_OUT_GET_MACHINENAME_INFO pstOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetMachineName(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Subscribe to Bus status
        /// 订阅Bus状态
        /// </summary>
        /// <returns>failed return 0, successful return the handle 失败返回0,成功返回不等于0的值</returns>
        public static IntPtr AttachBusState(IntPtr lLoginID, ref NET_IN_BUS_ATTACH pstuInBus, ref NET_OUT_BUS_ATTACH pstuOutBus, int nWaitTime = 3000)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_AttachBusState(lLoginID, ref pstuInBus, ref pstuOutBus, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Stop subscribing to Bus status
        /// 停止订阅Bus状态
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool DetachBusState(IntPtr lAttachHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DetachBusState(lAttachHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Set playback speed
        /// 设置录像回放速度
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool SetPlayBackSpeed(IntPtr lPlayHandle, EM_PLAY_BACK_SPEED emSpeed)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetPlayBackSpeed(lPlayHandle, emSpeed);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Record by time marker
        /// 按时间标记录像
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool SetMarkFileByTime(IntPtr lLoginID, ref NET_IN_SET_MARK_FILE_BY_TIME pInParam, ref NET_OUT_SET_MARK_FILE_BY_TIME pOutParam, int nWaitTime = 1000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetMarkFileByTime(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Acquire sign video info
        /// 获取标记录像信息
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool GetMarkInfo(IntPtr lLoginID, ref NET_IN_GET_MARK_INFO pInParam, ref NET_OUT_GET_MARK_INFO pOutParam, int nWaitTime = 1000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetMarkInfo(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Interface of get record state
        /// 获取录像状态
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool GetRecordState(IntPtr lLoginID, ref NET_IN_GET_RECORD_STATE pInParam, ref NET_OUT_GET_RECORD_STATE pOutParam, int nWaitTime = 1000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetRecordState(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Start or stop record
        /// 开启/关闭指定通道录像
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool SetCourseRecordState(IntPtr lLoginID, ref NET_IN_SET_COURSE_RECORD_STATE pInParam, ref NET_OUT_SET_COURSE_RECORD_STATE pOutParam, int nWaitTime = 1000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetCourseRecordState(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Get code rate, bit rate
        /// 获取码率,比特率
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool GetVideoEncodeBitrate(IntPtr lLoginID, ref NET_IN_GET_VIDEO_ENCODE_BITRATE_INFO pInParam, ref NET_OUT_GET_VIDEO_ENCODE_BITRATE_INFO pOutParam, int nWaitTime = 1000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetVideoEncodeBitrate(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// pre-upload remote file to remote device
        /// 通过存储设备远程预上传文件至前端设备,用于识别前端设备是否具备接收文件的条件
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool RemotePreUploadFile(IntPtr lLoginID, ref NET_IN_REMOTE_PREUPLOAD_FILE pInParam, ref NET_OUT_REMOTE_PREUPLOAD_FILE pOutParam, int nWaitTime = 1000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_RemotePreUploadFile(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Start to upload remote file to remote device. pInParam and pOutParam managed by users
        /// 开始异步通过存储设备上传文件到前端设备 pInParam与pOutParam内存由用户申请释放
        /// </summary>
        /// <returns>failed return 0, successful return the handle 失败返回0,成功返回不等于0的值</returns>
        public static IntPtr StartRemoteUploadFile(IntPtr lLoginID, ref NET_IN_REMOTE_UPLOAD_FILE pInParam, ref NET_OUT_REMOTE_UPLOAD_FILE pOutParam, int nWaitTime = 1000)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_StartRemoteUploadFile(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Stop to upload remote file to remote device
        /// 停止异步通过存储设备上传文件到前端设备
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool StopRemoteUploadFile(IntPtr lRemoteUploadFileID)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopRemoteUploadFile(lRemoteUploadFileID);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Get the file information in the remote specified directory (including files / subdirectories), pInParam and pOutParam managed by users
        /// 得到远程指定目录下文件信息(含文件/子目录)pInParam与pOutParam内存由用户申请释放
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool RemoteList(IntPtr lLoginID, ref NET_IN_REMOTE_LIST pInParam, ref NET_OUT_REMOTE_LIST pOutParam, int nWaitTime = 1000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_RemoteList(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Delete multiple remote files or directories, pInParam and pOutParam managed by users
        /// 删除多个远程文件或目录 pInParam与pOutParam内存由用户申请释放
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool RemoteRemoveFiles(IntPtr lLoginID, ref NET_IN_REMOTE_REMOVE_FILES pInParam, ref NET_OUT_REMOTE_REMOVE_FILES pOutParam, int nWaitTime = 1000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_RemoteRemoveFiles(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Set upload file length, user malloc memory of pInParam and pOutParam
        /// 设置文件长度, pInParam与pOutParam内存由用户申请释放
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool PreUploadRemoteFile(IntPtr lLoginID, ref NET_IN_PRE_UPLOAD_REMOTE_FILE pInParam, ref NET_OUT_PRE_UPLOAD_REMOTE_FILE pOutParam, int nWaitTime = 1000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_PreUploadRemoteFile(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// sybcgribize fule upload,user malloc memory of pInParam and pOutParam
        /// 同步文件上传, 只适用于小文件,pInParam与pOutParam内存由用户申请释放
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool UploadRemoteFile(IntPtr lLoginID, ref NET_IN_UPLOAD_REMOTE_FILE pInParam, ref NET_OUT_UPLOAD_REMOTE_FILE pOutParam, int nWaitTime = 1000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_UploadRemoteFile(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// display files and subdirectories in a directory,user malloc memory of pInParam and pOutParam
        /// 显示目录中文件和子目录,pInParam与pOutParam内存由用户申请释放
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool ListRemoteFile(IntPtr lLoginID, ref NET_IN_LIST_REMOTE_FILE pInParam, ref NET_OUT_LIST_REMOTE_FILE pOutParam, int nWaitTime = 1000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_ListRemoteFile(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// remove file,user malloc memory of pInParam and pOutParam
        /// 删除文件或目录,pInParam与pOutParam内存由用户申请释放
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool RemoveRemoteFiles(IntPtr lLoginID, ref NET_IN_REMOVE_REMOTE_FILES pInParam, ref NET_OUT_REMOVE_REMOTE_FILES pOutParam, int nWaitTime = 1000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_RemoveRemoteFiles(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// multimodal Target recognition
        /// 开始目标识别多通道查询
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool StartMultiFindFaceRecognitionRecord(IntPtr lLoginID, ref NET_IN_STARTMULTIFIND_FACERECONGNITIONRECORD pInParam, ref NET_OUT_STARTMULTIFIND_FACERECONGNITIONRECORD pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StartMultiFindFaceRecognitionRecord(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// multi channel Search file:nFilecount:the searched amount. The return value is media file amount. The search in the specified time completed if return <nFilecount.
        /// 多通道查找文件:nFilecount:需要查询的条数, 返回值为媒体文件条数 返回值<nFilecount则相应时间段内的文件查询完毕
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool DoFindFaceRecognitionRecord(ref NET_IN_DOFIND_FACERECONGNITIONRECORD inParam, ref NET_OUT_DOFIND_FACERECONGNITIONRECORD outParam, int nWaitTime)
        {
            bool result = OriginalSDK.CLIENT_DoFindFaceRecognitionRecord(ref inParam, ref outParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// end search
        /// 结束查询
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool StopFindFaceRecognitionRecord(IntPtr lFindHandle)
        {
            bool result = OriginalSDK.CLIENT_StopFindFaceRecognitionRecord(lFindHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Alarm upload function. Enable service. dwTimeOut paramter is invalid 
        /// 警上传功能,启动服务;dwTimeOut参数已无效
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static IntPtr StartService(uint wPort, IntPtr pIp, fServiceCallBack pfscb, uint dwTimeOut = 0xffffffff, IntPtr dwUserData = new IntPtr())
        {
            IntPtr result = OriginalSDK.CLIENT_StartService(wPort, pIp, pfscb, dwTimeOut, dwUserData);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// add logical cameras by group,user malloc and free (pInParam's and pOutParam's) memory
        /// 批量添加视频源,pInParam与pOutParam内存由用户申请释放
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool MatrixAddCamerasByGroup(IntPtr lLoginID, ref NET_IN_ADD_LOGIC_BYGROUP_CAMERA pInParam, ref NET_OUT_ADD_LOGIC_BYGROUP_CAMERA pOutParam, int nWaitTime = 1000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_MatrixAddCamerasByGroup(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// get camera all by group, user malloc and free (pInParam's and pOutParam's) memory
        /// 按组获取视频通道
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool MatrixGetCameraAllByGroup(IntPtr lLoginID, ref NET_IN_GET_CAMERA_ALL_BY_GROUP pInParam, ref NET_OUT_GET_CAMERA_ALL_BY_GROUP pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_MatrixGetCameraAllByGroup(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// delete camera by group, user malloc and free (pInParam's and pOutParam's) memory
        /// 按组删除视频通道
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool MatrixDeleteCameraByGroup(IntPtr lLoginID, ref NET_IN_DELETE_CAMERA_BY_GROUP pInParam, ref NET_OUT_DELETE_CAMERA_BY_GROUP pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_MatrixDeleteCameraByGroup(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// open burning session, return to burning session handle,user malloc and free (pstInParam's and pstOutParam's) memory
        /// 打开刻录会话, 返回刻录会话句柄,pstInParam与pstOutParam内存由用户申请释放
        /// </summary>
        /// <returns>failed return 0, successful return the handle 失败返回0,成功返回不等于0的值</returns> 
        public static IntPtr StartBurnSession(IntPtr lLoginID, ref NET_IN_START_BURN_SESSION pstInParam, ref NET_OUT_START_BURN_SESSION pstOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_StartBurnSession(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// close burning session
        /// 关闭刻录会话
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns> 
        public static bool StopBurnSession(IntPtr lBurnSession)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopBurnSession(lBurnSession);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// start burning,user malloc and free (pstInParam's and pstOutParam's) memory
        /// 开始刻录,pstInParam与pstOutParam内存由用户申请释放
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns> 
        public static bool StartBurn(IntPtr lBurnSession, ref NET_IN_START_BURN pstInParam, ref NET_OUT_START_BURN pstOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StartBurn(lBurnSession, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// stop burning
        /// 停止刻录
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns> 
        public static bool StopBurn(IntPtr lBurnSession)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopBurn(lBurnSession);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// pause/recover burning
        /// 暂停/恢复刻录
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns> 
        public static bool PauseBurn(IntPtr lBurnSession, bool bPause)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_PauseBurn(lBurnSession, bPause);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// attach burn state,user malloc and free (pstInParam's and pstOutParam's) memory
        /// 监听刻录状态,pstInParam与pstOutParam内存由用户申请释放
        /// </summary>
        /// <returns>failed return 0, successful return the handle 失败返回0,成功返回不等于0的值</returns> 
        public static IntPtr AttachBurnState(IntPtr lLoginID, ref NET_IN_ATTACH_STATE pstInParam, ref NET_OUT_ATTACH_STATE pstOutParam, int nWaitTime = 1000)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_AttachBurnState(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// cancel listening burning status, lAttachHandle is CLIENT_AttachBurnState return value
        /// 取消监听刻录状态,lAttachHandle是CLIENT_AttachBurnState返回值
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns> 
        public static bool DetachBurnState(IntPtr lAttachHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DetachBurnState(lAttachHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// key mark,user malloc and free (pstInParam's and pstOutParam's) memory
        /// 重点标记,pstInParam与pstOutParam内存由用户申请释放
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns> 
        public static bool BurnMarkTag(IntPtr lBurnSession, ref NET_IN_BURN_MARK_TAG pstInParam, ref NET_OUT_BURN_MARK_TAG pstOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_BurnMarkTag(lBurnSession, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// get burning status,user malloc and free (pstInParam's and pstOutParam's) memory
        /// 获取刻录状态,pstInParam与pstOutParam内存由用户申请释放
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool BurnGetState(IntPtr lBurnSession, ref NET_IN_BURN_GET_STATE pstInParam, ref NET_OUT_BURN_GET_STATE pstOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_BurnGetState(lBurnSession, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Start the backup task, and the memory of pstInParam and pstOutParam will be released by the user
        /// 开始备份任务,pstInParam与pstOutParam内存由用户申请释放
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool StartBackupTask(IntPtr lLoginID, ref NET_IN_START_BACKUP_TASK_INFO pstInParam, ref NET_OUT_START_BACKUP_TASK_INFO pstOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StartBackupTask(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Subscribe to the backup status, pstInParam and pstOutParam memory are released by the user's application
        /// 订阅备份状态,pstInParam与pstOutParam内存由用户申请释放
        /// </summary>
        /// <returns>failed return 0, successful return the handle 失败返回0,成功返回不等于0的值</returns>
        public static IntPtr AttachBackupTaskState(IntPtr lLoginID, ref NET_IN_ATTACH_BACKUP_STATE pstInParam, ref NET_OUT_ATTACH_BACKUP_STATE pstOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_AttachBackupTaskState(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Unsubscribe the backup state, lAttachHandle is the return value of CLIENT_AttachBackupTaskState
        /// 取消订阅备份状态,lAttachHandle是CLIENT_AttachBackupTaskState返回值
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool DetachBackupTaskState(IntPtr lAttachHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DetachBackupTaskState(lAttachHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Real-time monitoring - Extends the Ex2 interface
        /// 实时预览--扩展Ex2接口
        /// </summary>
        /// <returns>failed return 0, successful return the handle 失败返回0,成功返回不等于0的值</returns>
        public static IntPtr RealPlayEx2(IntPtr lLoginID, ref NET_IN_REALPLAY pInParam, ref NET_OUT_REALPLAY pOutParam, uint dwWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_RealPlayEx2(lLoginID, ref pInParam, ref pOutParam, dwWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Set screen overlay callback 
        /// 设置屏幕叠加回调
        /// </summary>
        public static void RigisterDrawFun(fDrawCallBack cbDraw, IntPtr dwUser)
        {
            OriginalSDK.CLIENT_RigisterDrawFun(cbDraw, dwUser);
        }
 
        /// <summary>
        /// 计算两张人脸图片的相似度faceRecognitionServer.matchTwoFace,pstInParam与pstOutParam内存由用户申请释放
        /// calculate the similarity of two face images,user malloc and free memory of pstInParam and pstOutParam
        /// </summary>
        public static bool MatchTwoFaceImage(IntPtr lLoginID, ref NET_MATCH_TWO_FACE_IN pstInParam, ref NET_MATCH_TWO_FACE_OUT pstOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_MatchTwoFaceImage(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 根据查询条件返回录像备份任务的信息表,pInParam与pOutParam内存由用户申请释放
        /// The information table of video backup task is returned according to the query conditions. The memory of pInParam and pOutParam is released by the user.
        /// </summary>
        /// <param name="lLoginID">CLIENT_Login's return value</param>
        /// <param name="pInParam">input info 输入参数</param>
        /// <param name="pOutParam">output info 输出参数</param>
        /// <param name="waittime">Wait timeout, million second</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool FindRecordBackupRestoreTaskInfos(IntPtr lLoginID, ref NET_IN_FIND_REC_BAK_RST_TASK pInParam, ref NET_OUT_FIND_REC_BAK_RST_TASK pOutParam, int nWaitTime = 3000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_FindRecordBackupRestoreTaskInfos(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 添加考试录像计划
        /// Add test video plan
        /// </summary>
        /// <param name="lLoginID">CLIENT_Login's return value</param>
        /// <param name="pstuInParam">input info 输入参数</param>
        /// <param name="pstuOutParam">output info 输出参数</param>
        /// <param name="waittime">Wait timeout, million second</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool SetExamRecordingPlans(IntPtr lLoginID, ref NET_IN_SET_EXAM_RECORDING_PLANS pstuInParam, ref NET_OUT_SET_EXAM_RECORDING_PLANS pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetExamRecordingPlans(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 手动抓图, 支持并发调用
        /// Manual snap, Indicates concurrent calls
        /// </summary>
        public static bool ManualSnap(IntPtr lLoginID, ref NET_IN_MANUAL_SNAP pInParam, ref NET_OUT_MANUAL_SNAP pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_ManualSnap(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Open stream
        /// 打开流
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool PlayOpenStream(int nPort, IntPtr pFileHeadBuf, uint nSize, uint nBufPoolSize)
        {
            bool result = false;
            result = OriginalSDK.PLAY_OpenStream(nPort, pFileHeadBuf, nSize, nBufPoolSize);
            return result;
        }
 
        /// <summary>
        /// Turn on playback, playback starts, the size of the playback video screen will be adjusted according to the hWnd window, to display full screen, as long as the hWnd window is enlarged to full screen. Start decoding thread, if the incoming display window handle is NULL, it is not displayed, but it does not affect decoding
        /// 开启播放,播放开始,播放视频画面大小将根据hWnd窗口调整,要全屏显示,只要把hWnd窗口放大到全屏。开始解码线程,若送入的显示窗口句柄为NULL,则不显示,但是不影响解码
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool PlayPlay(int nPort, IntPtr hWnd)
        {
            bool result = false;
            result = OriginalSDK.PLAY_Play(nPort, hWnd);
            return result;
        }
 
        /// <summary>
        /// Input data stream, to be used after PlayPlay
        /// 输入数据流,PlayPlay之后使用
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool PlayInputData(int nPort, IntPtr pBuf, uint nSize)
        {
            bool result = false;
            result = OriginalSDK.PLAY_InputData(nPort, pBuf, nSize);
            return result;
        }
 
        /// <summary>
        /// Stop play
        /// 关闭播放
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool PlayStop(int nPort)
        {
            bool result = false;
            result = OriginalSDK.PLAY_Stop(nPort);
            return result;
        }
 
        /// <summary>
        /// Close stream
        /// 关闭流
        /// </summary>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool PlayCloseStream(int nPort)
        {
            bool result = false;
            result = OriginalSDK.PLAY_CloseStream(nPort);
            return result;
        }
 
        /// <summary>
        /// Get monitor wall collections
        /// 获取电视墙预案
        /// </summary>
        /// <param name="lLoginID">Lonin return value 登陆ID</param>
        /// <param name="pInParam">input struct info 输入结构体</param>
        /// <param name="pOutParam">output struct info 输出结构体</param>
        /// <param name="waittime">waittime 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool GetMonitorWallCollections(IntPtr lLoginID, ref NET_IN_WM_GET_COLLECTIONS pInParam, ref NET_OUT_WM_GET_COLLECTIONS pOutParam, int nWaitTime = 1000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetMonitorWallCollections(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Load monitor wall collections
        /// 加载电视墙预案
        /// </summary>
        /// <param name="lLoginID">Lonin return value 登陆ID</param>
        /// <param name="pInParam">input struct info 输入结构体</param>
        /// <param name="pOutParam">output struct info 输出结构体</param>
        /// <param name="waittime">waittime 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool LoadMonitorWallCollection(IntPtr lLoginID, ref NET_IN_WM_LOAD_COLLECTION pInParam, ref NET_OUT_WM_LOAD_COLLECTION pOutParam, int nWaitTime = 1000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_LoadMonitorWallCollection(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Save monitor wall collections
        /// 添加电视墙预案
        /// </summary>
        /// <param name="lLoginID">Lonin return value 登陆ID</param>
        /// <param name="pInParam">input struct info 输入结构体</param>
        /// <param name="pOutParam">output struct info 输出结构体</param>
        /// <param name="waittime">waittime 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool SaveMonitorWallCollection(IntPtr lLoginID, ref NET_IN_WM_SAVE_COLLECTION pInParam, ref NET_OUT_WM_SAVE_COLLECTION pOutParam, int nWaitTime = 1000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SaveMonitorWallCollection(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Rename monitor wall collections(If the original plan name is empty, the plan will be deleted)
        /// 修改电视墙预案名称(原预案名为空则为删除该预案)
        /// </summary>
        /// <param name="lLoginID">Lonin return value 登陆ID</param>
        /// <param name="pInParam">input struct info 输入结构体</param>
        /// <param name="pOutParam">output struct info 输出结构体</param>
        /// <param name="waittime">waittime 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool RenameMonitorWallCollection(IntPtr lLoginID, ref NET_IN_WM_RENAME_COLLECTION pInParam, ref NET_OUT_WM_RENAME_COLLECTION pOutParam, int nWaitTime = 1000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_RenameMonitorWallCollection(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// Web information upload interface
        /// web信息上传接口
        /// </summary>
        /// <param name="lLoginID">Lonin return value 登陆ID</param>
        /// <param name="pInParam">input info 输入参数</param>
        /// <param name="pOutParam">output info 输出参数</param>
        /// <param name="waittime">waittime 等待时间</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool TransmitInfoForWebEx(IntPtr lLoginID, ref NET_IN_TRANSMIT_INFO pInParam, ref NET_OUT_TRANSMIT_INFO pOutParam, int nWaittime = 3000)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_TransmitInfoForWebEx(lLoginID, ref pInParam, ref pOutParam, nWaittime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取流量统计信息,pstInParam与pstOutParam内存由用户申请释放
        /// start find flux state,user malloc and free (pstInParam's and pstOutParam's) memory
        /// </summary>
        /// <param name="lLoginID">Lonin return value 登陆ID</param>
        /// <param name="pstInParam">input info 输入参数</param>
        /// <param name="pstOutParam">output info 输出参数</param>
        /// <returns>failed return 0, successful return lFindHandle 失败返回0 成功返回lFindHandle</returns>
        public static IntPtr StartFindFluxStat(IntPtr lLoginID, ref NET_IN_TRAFFICSTARTFINDSTAT pstInParam, ref NET_OUT_TRAFFICSTARTFINDSTAT pstOutParam)
        {
            return OriginalSDK.CLIENT_StartFindFluxStat(lLoginID, ref pstInParam, ref pstOutParam);
        }
        /// <summary>
        /// 继续查询流量统计,pstInParam与pstOutParam内存由用户申请释放
        /// do find flux state,user malloc and free (pstInParam's and pstOutParam's) memory
        /// </summary>
        /// <param name="lFindHandle">FindHandle value 登陆ID</param>
        /// <param name="pstInParam">input info 输入参数</param>
        /// <param name="pstOutParam">output info 输出参数</param>
        /// <returns>failed return -1, successful return 1 失败返回 -1 成功返回 1 </returns>
        public static int DoFindFluxStat(IntPtr lFindHandle, ref NET_IN_TRAFFICDOFINDSTAT pstInParam, ref NET_OUT_TRAFFICDOFINDSTAT pstOutParam)
        {
            int result = 0;
            result = OriginalSDK.CLIENT_DoFindFluxStat(lFindHandle, ref pstInParam, ref pstOutParam);
            if (result == -1) NetGetLastError(result);
            return result;
        }
        /// <summary>
        /// 结束查询流量统计
        /// stop find flux state
        /// </summary>
        /// <param name="lFindHandle">FindHandle value 登陆ID</param>
        /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
        public static bool StopFindFluxStat(IntPtr lFindHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopFindFluxStat(lFindHandle);
            NetGetLastError(result);
            return result;
        }
 
        // <summary>
        /// 添加人脸库下载任务
        /// Add task of download face data base
        /// </summary>
        public static bool AddFaceDbDownLoadTask(IntPtr lLoginID, ref NET_IN_ADD_FACEDB_DOWNLOAD_TASK pInParam, ref NET_OUT_ADD_FACEDB_DOWNLOAD_TASK pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_AddFaceDbDownLoadTask(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 订阅人脸库下载结果
        /// Attach the result of downloading face data base
        /// </summary>
        public static IntPtr AttachFaceDbDownLoadResult(IntPtr lLoginID, ref NET_IN_ATTACH_FACEDB_DOWNLOAD_RESULT pInParam, ref NET_OUT_ATTACH_FACEDB_DOWNLOAD_RESULT pOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_AttachFaceDbDownLoadResult(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 取消订阅人脸库下载结果 lAttachHandle为 AttachFaceDbDownLoadResult 接口的返回值
        /// Detach Attach the result of downloading face data base
        /// </summary>
        ///@brief , 
        public static bool DetachFaceDbDownLoadResult(IntPtr lAttachHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DetachFaceDbDownLoadResult(lAttachHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 设置解码窗口输出OSD信息扩展接口(pInparam, pOutParam内存由用户申请释放)
        /// set splite output OSD info ----expand interface (the memory of pInParam and pOutParam applyed and released by user),user malloc and free (pInParam's and pOutParam's)memory
        /// </summary>
        [Obsolete("此接口已弃用,原因是NET_IN_SPLIT_SET_OSD_EX结构体过大,请使用形参为IntPtr的重载\n" +
            "This interface has been deprecated due to the excessive size of the NET_IN_SPLIT_SET_OSD_EX structure. Please use an overload with the parameter IntPtr")]
        public static bool SetSplitOSDEx(IntPtr lLoginID, ref NET_IN_SPLIT_SET_OSD_EX pInParam, ref NET_OUT_SPLIT_SET_OSD_EX pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetSplitOSDEx(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
        /// <summary>
        /// 获取解码窗口输出OSD信息扩展接口(pInparam, pOutParam内存由用户申请释放)
        /// get splite output OSD info ----expand interface (the memory of pInParam and pOutParam applyed and released by user),user malloc and free (pInParam's and pOutParam's)memory
        /// </summary>
        [Obsolete("此接口已弃用,原因是NET_OUT_SPLIT_GET_OSD_EX结构体过大,请使用形参为IntPtr的重载\n" +
            "This interface has been deprecated due to the excessive size of the NET_OUT_SPLIT_GET_OSD_EX structure. Please use an overload with the parameter IntPtr")]
        public static bool GetSplitOSDEx(IntPtr lLoginID, ref NET_IN_SPLIT_GET_OSD_EX pInParam, ref NET_OUT_SPLIT_GET_OSD_EX pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetSplitOSDEx(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 设置解码窗口输出OSD信息扩展接口(pInparam, pOutParam内存由用户申请释放)
        /// set splite output OSD info ----expand interface (the memory of pInParam and pOutParam applyed and released by user),user malloc and free (pInParam's and pOutParam's)memory
        /// </summary>
        public static bool SetSplitOSDEx(IntPtr lLoginID, IntPtr pInParam, IntPtr pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetSplitOSDEx(lLoginID, pInParam, pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取解码窗口输出OSD信息扩展接口(pInparam, pOutParam内存由用户申请释放)
        /// get splite output OSD info ----expand interface (the memory of pInParam and pOutParam applyed and released by user),user malloc and free (pInParam's and pOutParam's)memory
        /// </summary>
        public static bool GetSplitOSDEx(IntPtr lLoginID, IntPtr pInParam, IntPtr pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetSplitOSDEx(lLoginID, pInParam, pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 在线升级检查是否有可用升级包, pInParam和pOutParam内存由用户申请和释放
        /// Check Cloud Upgrader, user mallloc memory of pInParam and pOutParam
        /// </summary>
        public static bool CheckCloudUpgrader(IntPtr lLoginID, ref NET_IN_CHECK_CLOUD_UPGRADER pInParam, ref NET_OUT_CHECK_CLOUD_UPGRADER pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_CheckCloudUpgrader(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 执行在线云升级, pInParam和pOutParam内存由用户申请和释放
        /// Execute Cloud Upgrader, user mallloc memory of pInParam and pOutParam
        /// </summary>
        public static bool ExecuteCloudUpgrader(IntPtr lLoginID, ref NET_IN_EXECUTE_CLOUD_UPGRADER pInParam, ref NET_OUT_EXECUTE_CLOUD_UPGRADER pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_ExecuteCloudUpgrader(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取云升级在线升级状态, pInParam和pOutParam内存由用户申请和释放
        /// Get Cloud Upgrader State, user mallloc memory of pInParam and pOutParam
        /// </summary>
        public static bool GetCloudUpgraderState(IntPtr lLoginID, ref NET_IN_GET_CLOUD_UPGRADER_STATE pInParam, ref NET_OUT_GET_CLOUD_UPGRADER_STATE pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetCloudUpgraderState(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 开始目标检测/注册库的多通道查询(IVSS产品特色功能以图搜图支持两段式查询。第一步先上传大图并从中识别出目标小图,返回小图的SmallID,第二步用SmallID进行以图搜图)
        /// Start the multi-channel query of target detection / registry (IVSS product features the function of image search, which supports two-stage query. The first step is to upload the large image and identify the target small image, return the smallid of the small image, and the second step is to search the image with smallid)
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstInParam">[in] pstInParam 接口输入参数; [in] pstInParam Interface input parameters</param>
        /// <param name="pstOutParam">[out]pstOutParam 接口输出参数; [out] pstOutParam Interface output parameters</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; True indicates success and false indicates failure</returns>
        public static bool StartMultiPersonFindFaceR(IntPtr lLoginID, ref NET_IN_STARTMULTIPERSONFIND_FACER pstInParam, ref NET_OUT_STARTMULTIPERSONFIND_FACER pstOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StartMultiPersonFindFaceR(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取目标检测令牌
        /// Get target detection token
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pInParam">[in] pInParam 接口输入参数; [in] pInParam Interface input parameters</param>
        /// <param name="pOutParam">[out]pOutParam 接口输出参数; [out] pOutParam Interface output parameters</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; True indicates success and false indicates failure</returns>
        public static bool FaceRServerGetDetectToken(IntPtr lLoginID, ref NET_IN_FACERSERVER_GETDETEVTTOKEN pInParam, ref NET_OUT_FACERSERVER_GETDETEVTTOKEN pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_FaceRServerGetDetectToken(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 指定时间段内录像自定义重命名
        /// Rename the recording within the specified time period
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID: 登录句柄; [in] lLoginID: Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam: 接口输入参数, 内存资源由用户申请和释放; [in] pstuInParam: Interface input parameters, memory resources are requested and released by the user</param>
        /// <param name="pstuOutParam">[out] pstuOutParam: 接口输出参数, 内存资源由用户申请和释放; [out] pstuOutParam: Interface output parameters, memory resources are requested and released by the user</param>
        /// <param name="nWaitTime">[in] nWaitTime: 接口超时时间, 单位毫秒; [in] nWaitTime: Interface timeout, in milliseconds</param>
        /// <returns>TRUE表示成功FALSE表示失败; TRUE means success, FALSE means failure</returns>
        public static bool SetFileAlias(IntPtr lLoginID, ref NET_IN_SET_FILE_ALIAS_INFO pstuInParam, ref NET_OUT_SET_FILE_ALIAS_INFO pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetFileAlias(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 根据录像的命名调取录像
        /// Query the video according to the name of the video
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID: 登录句柄; [in] lLoginID: Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam: 接口输入参数, 内存资源由用户申请和释放; [in] pstuInParam: Interface input parameters, memory resources are requested and released by the user</param>
        /// <param name="pstuOutParam">[out] pstuOutParam: 接口输出参数, 内存资源由用户申请和释放; [out] pstuOutParam: Interface output parameters, memory resources are requested and released by the user</param>
        /// <param name="nWaitTime">[in] nWaitTime: 接口超时时间, 单位毫秒; [in] nWaitTime: Interface timeout, in milliseconds</param>
        /// <returns>TRUE表示成功FALSE表示失败; TRUE means success, FALSE means failure</returns>
        public static bool SearchFileByAlias(IntPtr lLoginID, ref NET_IN_SEARCH_FILE_BYALIAS_INFO pstuInParam, ref NET_OUT_SEARCH_FILE_BYALIAS_INFO pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SearchFileByAlias(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取水质检测能力
        /// Acquire water quality detection capability
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam 接口输入参数; [in] pstuInParam Interface input parameters</param>
        /// <param name="pstuOutParam">[out]pstuOutParam 接口输出参数; [out]pstuOutParam Interface output parameters</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE indicates success FALSE indicates failure</returns>
        public static IntPtr GetWaterDataStatServerCaps(IntPtr lLoginID, ref NET_IN_WATERDATA_STAT_SERVER_GETCAPS_INFO pstuInParam, ref NET_OUT_WATERDATA_STAT_SERVER_GETCAPS_INFO pstuOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_GetWaterDataStatServerCaps(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 开始水质检测报表数据查询
        /// Start data query of water quality test report
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam 接口输入参数; [in] pstuInParam Interface input parameters</param>
        /// <param name="pstuOutParam">[out]pstuOutParam 接口输出参数; [out]pstuOutParam Interface output parameters</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE indicates success FALSE indicates failure</returns>
        public static IntPtr StartFindWaterDataStatServer(IntPtr lLoginID, ref NET_IN_START_FIND_WATERDATA_STAT_SERVER_INFO pstuInParam, ref NET_OUT_START_FIND_WATERDATA_STAT_SERVER_INFO pstuOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_StartFindWaterDataStatServer(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 水质检测报表数据查询
        /// Data query of water quality test report
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam 接口输入参数; [in] pstuInParam Interface input parameters</param>
        /// <param name="pstuOutParam">[out]pstuOutParam 接口输出参数; [out]pstuOutParam Interface output parameters</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE indicates success FALSE indicates failure</returns>
        public static IntPtr DoFindWaterDataStatServer(IntPtr lLoginID, ref NET_IN_DO_FIND_WATERDATA_STAT_SERVER_INFO pstuInParam, ref NET_OUT_DO_FIND_WATERDATA_STAT_SERVER_INFO pstuOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_DoFindWaterDataStatServer(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 停止水质检测报表数据查询
        /// Stop data query of water quality test report
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam 接口输入参数; [in] pstuInParam Interface input parameters</param>
        /// <param name="pstuOutParam">[out]pstuOutParam 接口输出参数; [out]pstuOutParam Interface output parameters</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE indicates success FALSE indicates failure</returns>
        public static IntPtr StopFindWaterDataStatServer(IntPtr lLoginID, ref NET_IN_STOP_FIND_WATERDATA_STAT_SERVER_INFO pstuInParam, ref NET_OUT_STOP_FIND_WATERDATA_STAT_SERVER_INFO pstuOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_StopFindWaterDataStatServer(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 水质检测实时数据获取
        /// Real time data acquisition of water quality detection
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam 接口输入参数; [in] pstuInParam Interface input parameters</param>
        /// <param name="pstuOutParam">[out]pstuOutParam 接口输出参数; [out]pstuOutParam Interface output parameters</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE indicates success FALSE indicates failure</returns>
        public static IntPtr GetWaterDataStatServerWaterData(IntPtr lLoginID, ref NET_IN_WATERDATA_STAT_SERVER_GETDATA_INFO pstuInParam, ref NET_OUT_WATERDATA_STAT_SERVER_GETDATA_INFO pstuOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_GetWaterDataStatServerWaterData(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
 
        /// <summary>
        /// 获取设备状态, DMSS专用接口, pInParam与pOutParam内存由用户申请释放
        /// </summary>
        public static bool GetUnifiedStatus(IntPtr lLoginID, ref NET_IN_UNIFIEDINFOCOLLECT_GET_DEVSTATUS pInParam, ref NET_OUT_UNIFIEDINFOCOLLECT_GET_DEVSTATUS pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetUnifiedStatus(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 订阅统计通道数据,pInParam与pOutParam内存由用户申请释放
        /// Subscribe to statistical channel data, and the memory of pinparam and outparam is released by user application
        /// </summary>
        public static IntPtr AttachVideoStatStream(IntPtr lLoginID, ref NET_IN_ATTACH_VIDEOSTAT_STREAM pInParam, ref NET_OUT_ATTACH_VIDEOSTAT_STREAM pOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_AttachVideoStatStream(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 取消订阅统计通道数据
        /// Unsubscribe statistics channel data
        /// </summary>
        public static bool DetachVideoStatStream(IntPtr lAttachHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DetachVideoStatStream(lAttachHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 添加多个人员信息和人脸样本
        /// batch append persons, user malloc and free (pstInParam's and pstOutParam's) memory
        /// </summary>
        public static bool BatchAppendFaceRecognition(IntPtr lLoginID, ref NET_IN_BATCH_APPEND_FACERECONGNITION pstInParam, ref NET_OUT_BATCH_APPEND_FACERECONGNITION pstOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_BatchAppendFaceRecognition(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// :设置GPS信息UUID
        /// :set gps uuid
        /// </summary>
        /// <param name="lLoginID">[in]: LLONG :lLoginID 登陆句柄; [in]: LLONG :lLoginID login handle</param>
        /// <param name="pInParam">[in]: NET_IN_SUBCRIBE_GPS_INFO :pInParam 接口输入参数, 内存资源由用户申请和释放; [in]: NET_IN_SUBCRIBE_GPS_INFO :pInParam Interface input parameters, memory resources are applied and released by the user</param>
        /// <param name="pOutParam">[out]: NET_OUT_SET_GPS_UUID_INFO :pOutParam 接口输出参数, 内存资源由用户申请和释放; [out]: NET_OUT_SET_GPS_UUID_INFO :pOutParam Interface output parameters, memory resources are applied and released by the user</param>
        /// <returns>TRUE表示成功 FALSE表示失败; True indicates success and false indicates failure</returns>
        public static bool SetGPSUuidInfo(IntPtr lLoginID, ref NET_IN_SET_GPS_UUID_INFO pInParam, ref NET_OUT_SET_GPS_UUID_INFO pOutParam)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetGPSUuidInfo(lLoginID, ref pInParam, ref pOutParam);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 人脸库导入接口
        /// interface of import face DB
        /// </summary>
        public static IntPtr ImportFaceDB(IntPtr lLoginID, ref NET_IN_IMPORT_FACE_DB pInParam, ref NET_OUT_IMPORT_FACE_DB pOutParam)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_ImportFaceDB(lLoginID, ref pInParam, ref pOutParam);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 停止人脸库导入
        /// interface of stopping import face DB
        /// </summary>
        public static bool StopImportFaceDB(IntPtr lImportFaceDbHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopImportFaceDB(lImportFaceDbHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 人脸库导出接口
        /// interface of export face DB
        /// </summary>
        public static IntPtr ExportFaceDB(IntPtr lLoginID, ref NET_IN_EXPORT_FACE_DB pInParam, ref NET_OUT_EXPORT_FACE_DB pOutParam)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_ExportFaceDB(lLoginID, ref pInParam, ref pOutParam);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 停止人脸库导出
        /// interface of stop export upload face DB
        /// </summary>
        public static bool StopExportFaceDB(IntPtr lExportFaceDbHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopExportFaceDB(lExportFaceDbHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 订阅事件重传,pInParam内存由用户申请释放
        /// attach event restore,user malloc and free memory of pInParam
        /// </summary>
        public static IntPtr AttachEventRestore(IntPtr lLoginID, ref NET_IN_ATTACH_EVENT_RESTORE pInParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_AttachEventRestore(lLoginID, ref pInParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 停止订阅事件重传,pInParam内存由用户申请释放
        /// detach event restore ,user malloc and free memory of pInParam
        /// </summary>
        public static bool DetachEventRestore(IntPtr lAttachHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DetachEventRestore(lAttachHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 查询远程设备状态,nType为DEVSTATE_ALARM_FRONTDISCONNECT时,通道号从1开始(pBuf内存由用户申请释放)
        /// query remote device state,when nType = DEVSTATE_ALARM_FRONTDISCONNECT,the number form 1.
        /// </summary>
        public static bool QueryRemotDevState(IntPtr lLoginID, int nType, int nChannelID, IntPtr pBuf, int nBufLen, IntPtr pRetLen, int waittime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_QueryRemotDevState(lLoginID, nType, nChannelID, pBuf, nBufLen, pRetLen, waittime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 报警主机设置操作
        /// Set operate of alarm region
        /// </summary>
        public static bool SetAlarmRegionInfo(IntPtr lLoginID, EM_A_NET_EM_SET_ALARMREGION_INFO emType, IntPtr pstuInParam, IntPtr pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetAlarmRegionInfo(lLoginID, emType, pstuInParam, pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 订阅无线对码信息接口,pstInParam与pstOutParam内存由用户申请释放
        /// Order wireless code info port,user malloc memory of pstInBuf and pstOutBuf
        /// </summary>
        public static IntPtr AttachLowRateWPAN(IntPtr lLoginID, ref NET_IN_ATTACH_LOWRATEWPAN pstInParam, ref NET_OUT_ATTACH_LOWRATEWPAN pstOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_AttachLowRateWPAN(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 平台下发轮询配置 < NET_IN_SET_POLLING_CONFIG pInParam > < NET_OUT_SET_POLLING_CONFIG pOutParam > 
        /// Set Polling Config
        /// </summary>
        public static bool SetPollingConfig(IntPtr lLoginID, IntPtr pInParam, IntPtr pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetPollingConfig(lLoginID, pInParam, pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// RPC测试
        /// RPC test
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID: 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam: 接口输入参数, 内存资源由用户申请和释放; [in] pstuInParam Indicates the interface parameter</param>
        /// <param name="pstuOutParam">[out] pstuOutParam: 接口输出参数, 内存资源由用户申请和释放; [out] pstuOutParam Indicates the output parameter of the interface</param>
        /// <param name="nWaitTime">[in] nWaitTime: 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout, in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE means success FALSE means failure</returns>
        public static bool TransmitCmd(IntPtr lLoginID, ref NET_IN_TRANSMIT_CMD pstuInParam, ref NET_OUT_TRANSMIT_CMD pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_TransmitCmd(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 手动测试
        /// Manual test
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID: 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam: 接口输入参数, 内存资源由用户申请和释放; [in] pstuInParam Indicates the interface parameter</param>
        /// <param name="pstuOutParam">[out] pstuOutParam: 接口输出参数, 内存资源由用户申请和释放; [out] pstuOutParam Indicates the output parameter of the interface</param>
        /// <param name="nWaitTime">[in] nWaitTime: 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout, in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE means success FALSE means failure</returns>
        public static bool ManualTest(IntPtr lLoginID, ref NET_IN_MANUAL_TEST pstuInParam, ref NET_OUT_MANUAL_TEST pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_ManualTest(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 添加报警用户
        /// Add alarm user
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID: 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam: 接口输入参数, 内存资源由用户申请和释放; [in] pstuInParam Indicates the interface parameter</param>
        /// <param name="pstuOutParam">[out] pstuOutParam: 接口输出参数, 内存资源由用户申请和释放; [out] pstuOutParam Indicates the output parameter of the interface</param>
        /// <param name="nWaitTime">[in] nWaitTime: 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout, in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE means success FALSE means failure</returns>
        public static bool AddAlarmUser(IntPtr lLoginID, ref NET_IN_ADD_ALARM_USER pstuInParam, ref NET_OUT_ADD_ALARM_USER pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_AddAlarmUser(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 修改报警用户
        /// Modify alarm user
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID: 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam: 接口输入参数, 内存资源由用户申请和释放; [in] pstuInParam Indicates the interface parameter</param>
        /// <param name="pstuOutParam">[out] pstuOutParam: 接口输出参数, 内存资源由用户申请和释放; [out] pstuOutParam Indicates the output parameter of the interface</param>
        /// <param name="nWaitTime">[in] nWaitTime: 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout, in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE means success FALSE means failure</returns>
        public static bool ModifyAlarmUser(IntPtr lLoginID, ref NET_IN_MODIFY_ALARM_USER pstuInParam, ref NET_OUT_MODIFY_ALARM_USER pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_ModifyAlarmUser(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 修改报警用户密码
        /// Modify alarm user password
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID: 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam: 接口输入参数, 内存资源由用户申请和释放; [in] pstuInParam Indicates the interface parameter</param>
        /// <param name="pstuOutParam">[out] pstuOutParam: 接口输出参数, 内存资源由用户申请和释放; [out] pstuOutParam Indicates the output parameter of the interface</param>
        /// <param name="nWaitTime">[in] nWaitTime: 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout, in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE means success FALSE means failure</returns>
        public static bool ModifyAlarmUserPassword(IntPtr lLoginID, ref NET_IN_MODIFY_ALARM_USER_PASSWORD pstuInParam, ref NET_OUT_MODIFY_ALARM_USER_PASSWORD pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_ModifyAlarmUserPassword(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 删除报警用户
        /// Modify Delete user password
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID: 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam: 接口输入参数, 内存资源由用户申请和释放; [in] pstuInParam Indicates the interface parameter</param>
        /// <param name="pstuOutParam">[out] pstuOutParam: 接口输出参数, 内存资源由用户申请和释放; [out] pstuOutParam Indicates the output parameter of the interface</param>
        /// <param name="nWaitTime">[in] nWaitTime: 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout, in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE means success FALSE means failure</returns>
        public static bool DeleteAlarmUser(IntPtr lLoginID, ref NET_IN_DELETE_ALARM_USER pstuInParam, ref NET_OUT_DELETE_ALARM_USER pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DeleteAlarmUser(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 实时预览--端到端音视频加密
        /// Real-time preview End-to-end audio and video encryption
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pInParam">[in] pstuInParam 接口输入参数, 内存资源由用户申请和释放; [in] pInParam Interface input parameters</param>
        /// <param name="pOutParam">[out]pstuOutParam 接口输出参数, 内存资源由用户申请和释放; [out]pOutParam Interface output parameters</param>
        /// <param name="dwWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; Returns the realplay handle</returns>
        public static IntPtr RealPlayForSpGdpr(IntPtr lLoginID, ref NET_IN_REALPLAY_FOR_SP_GDPR pInParam, ref NET_OUT_REALPLAY_FOR_SP_GDPR pOutParam, uint dwWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_RealPlayForSpGdpr(lLoginID, ref pInParam, ref pOutParam, dwWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 按时间方式回放--端到端加密方案
        /// Playback by time -- end-to-end encryption scheme
        /// @Param [in] lLoginID login handle
        /// @Param [in] nChannelID channel number
        /// @Param [in] lpStartTime Playback start event
        /// @Param [in] lpStopTime playback end event
        /// @Param [in] hWnd window handle
        /// @Param [in] cbDownLoadPos progress callback
        /// @Param [in] dwPosUser progress callback user data
        /// @Param [in] fDownLoadDataCallBack data callback
        /// @Param [in] dwDataUser data callback user data
        /// @Return non-0 means handle 0 means failure
        /// </summary>
        /// <returns>非0表示句柄 0 表示失败</returns>
        public static IntPtr PlayBackByTimeForSpGdpr(IntPtr lLoginID, int nChannelID, ref NET_TIME lpStartTime, ref NET_TIME lpStopTime, IntPtr hWnd, fDownLoadPosCallBack cbDownLoadPos, IntPtr dwPosUser, fDataCallBack fDownLoadDataCallBack, IntPtr dwDataUser)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_PlayBackByTimeForSpGdpr(lLoginID, nChannelID, ref lpStartTime, ref lpStopTime, hWnd, cbDownLoadPos, dwPosUser, fDownLoadDataCallBack, dwDataUser);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 设置窗口轮巡显示源(pInparam, pOutParam内存由用户申请释放)
        /// set window tour display source,user malloc and free (pInParam's and pOutParam's)memory
        /// </summary>
        public static bool SetTourSource(IntPtr lLoginID, ref NET_IN_SET_TOUR_SOURCE pInParam, ref NET_OUT_SET_TOUR_SOURCE pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetTourSource(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取窗口轮巡显示源(pInparam, pOutParam内存由用户申请释放)
        /// get window tour display source,user malloc and free (pInParam's and pOutParam's)memory
        /// </summary>
        public static bool GetTourSource(IntPtr lLoginID, ref NET_IN_GET_TOUR_SOURCE pInParam, ref NET_OUT_GET_TOUR_SOURCE pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetTourSource(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 查询系统状态(pstuStatus内存由用户申请释放)
        /// Search system status,user malloc and free pstuStatus's memory
        /// </summary>
        public static bool QuerySystemStatus(IntPtr lLoginID, ref NET_A_SYSTEM_STATUS pstuStatus, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_QuerySystemStatus(lLoginID, ref pstuStatus, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 局部放大(pSrcRect内存由用户申请释放)
        /// partial enlarged
        /// </summary>
        public static bool SetDisplayRegion(IntPtr lPlayHandle, uint nRegionNum, ref NET_A_DISPLAYRREGION pSrcRect, IntPtr hDestWnd, bool bEnable)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetDisplayRegion(lPlayHandle, nRegionNum, ref pSrcRect, hDestWnd, bEnable);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取码流值
        /// Get stream Bitrate
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam 接口入参; [in] pstuInParam Indicates the interface parameter</param>
        /// <param name="pstuOutParam">[out] pstuOutParam 接口出参; [out] pstuOutParam Indicates the outgoing parameter of the interface</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Timeout period of the interface, in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE Indicates success. FALSE Indicates failure</returns>
        public static bool GetEncodeBitrate(IntPtr lLoginID, ref NET_IN_GET_ENCODE_BITRATE pstuInParam, ref NET_OUT_GET_ENCODE_BITRATE pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetEncodeBitrate(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取课程录像模式,pInBuf与pOutBuf内存由用户申请释放
        /// get course record mode,user malloc and free memory of pInBuf and pOutBuf
        /// </summary>
        public static bool GetCourseRecordMode(IntPtr lLoginID, ref NET_IN_GET_COURSE_RECORD_MODE pInBuf, ref NET_OUT_GET_COURSE_RECORD_MODE pOutBuf, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetCourseRecordMode(lLoginID, ref pInBuf, ref pOutBuf, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 设置课程录像模式,pInBuf与pOutBuf内存由用户申请释放
        /// set course record mode,user malloc and free memory of pInBuf and pOutBuf
        /// </summary>
        public static bool SetCourseRecordMode(IntPtr lLoginID, ref NET_IN_SET_COURSE_RECORD_MODE pInBuf, ref NET_OUT_SET_COURSE_RECORD_MODE pOutBuf, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetCourseRecordMode(lLoginID, ref pInBuf, ref pOutBuf, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取真实预览通道号,pInBuf与pOutBuf内存由用户申请释放
        /// get course preview channel,user malloc and free memory of pInBuf and pOutBuf
        /// </summary>
        public static bool GetRealPreviewChannel(IntPtr lLoginID, ref NET_IN_GET_REAL_PREVIEW_CHANNEL pInBuf, ref NET_OUT_GET_REAL_PREVIEW_CHANNEL pOutBuf, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetRealPreviewChannel(lLoginID, ref pInBuf, ref pOutBuf, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 热图数据解压与转换接口
        /// radiometry data unachieving and conversion
        /// </summary>
        /// <param name="pRadiometryData">[in]pRadiometryData [IN] 热图数据, 由 fRadiometryAttachCB 获得; pRadiometryData [IN] radiometry data, obtained from fRadiometryAttachCB</param>
        /// <param name="pGrayImg">[out]pGrayImg [IN, OUT] 解压后的数据,是一张灰度图,  传空指针表示不需要此数据  用户需保证传入的缓冲区足够大(不小于 图像像素数*sizeof(unsigned short))  每个像素对应一个 unsigned short 型数据,表示图像某个像素的热成像灰度(范围 0 ~ 16383),  低地址对应画面左上角,高地址对应画面右下角; pGrayImg [IN, OUT] unachieved data, which is a grayscale image  you can pass NULL if this is not needed  you must ensure that the buffer is enough (no less than 'pixel number'*sizeof(unsigned short))  for each pixel, there is an unsigned short value representing the grayscale value (range: 0 ~ 16383)  and the ordering is top-left pixels in low memory address and lower-right pixels in high memory address</param>
        /// <param name="pTempForPixels">[out] pTempForPixels [IN, OUT] 每个像素的温度数据  不能传空指针,否则,返回失败  用户需保证传入的缓冲区足够大(不小于 图像像素数*sizeof(float))  每个像素对应一个 float 型数据,表示该像素位置的摄氏温度  低地址对应画面左上角,高地址对应画面右下角; pTempForPixels [IN, OUT] The temperature buffer for each pixel can not be empty  otherwise,it will fail to return  you must ensure that the buffer is enough (no less than 'pixel number'*sizeof(float))  for each pixel, there is a float value representing temperature at pixel position, in centigrade  and the ordering is top-left pixels in low memory address and lower-right pixels in high memory address</param>
        /// <returns>TRUE 成功,FALSE 失败; TRUE for success, FALSE for failure</returns>
        public static bool RadiometryDataParse(ref NET_RADIOMETRY_DATA pRadiometryData, IntPtr pGrayImg, IntPtr pTempForPixels)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_RadiometryDataParse(ref pRadiometryData, pGrayImg, pTempForPixels);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取已添加的设备状态
        /// Get the status of added devices
        /// </summary>
        /// <returns>TRUE表示成功 FALSE表示失败</returns>
        public static bool GetDeviceInfoEx(IntPtr lLoginID, ref NET_IN_GET_DEVICE_INFO_EX pstuInParam, ref NET_OUT_GET_DEVICE_INFO_EX pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetDeviceInfoEx(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取已添加的设备状态  inParam = NET_IN_GET_DEVICE_LIST_INFO, outParam = NET_OUT_GET_DEVICE_LIST_INFO 
        /// interface of get added device info inParam = NET_IN_GET_DEVICE_LIST_INFO, outParam = NET_OUT_GET_DEVICE_LIST_INFO 
        /// </summary>
        public static bool GetDeviceInfo(IntPtr lLoginID, IntPtr pInParam, IntPtr pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetDeviceInfo(lLoginID, pInParam, pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取设备通道信息
        /// interface of get channel info
        /// </summary>
        public static bool GetChannelInfo(IntPtr lLoginID, ref NET_IN_GET_CHANNEL_INFO pInParam, ref NET_OUT_GET_CHANNEL_INFO pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetChannelInfo(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 开始巡航
        /// Start Tour
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID: 登录句柄; [in] lLoginID: login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam: 接口输入参数, 内存资源由用户申请和释放; [in] pstuInParam: interface input parameters, memory resources are applied and released by the user</param>
        /// <param name="pstuOutParam">[out] pstuOutParam: 接口输出参数, 内存资源由用户申请和释放; [out] pstuOutParam: interface output parameters, memory resources are applied and released by the user</param>
        /// <param name="nWaitTime">[in] nWaitTime: 接口超时时间, 单位毫秒; [in] nWaitTime: interface timeout, in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE means success FALSE means failure</returns>
        public static bool PTZStartTour(IntPtr lLoginID, ref NET_IN_PTZ_START_TOUR pstuInParam, ref NET_OUT_PTZ_START_TOUR pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_PTZStartTour(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 停止巡航
        /// Stop Tour
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID: 登录句柄; [in] lLoginID: login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam: 接口输入参数, 内存资源由用户申请和释放; [in] pstuInParam: interface input parameters, memory resources are applied and released by the user</param>
        /// <param name="pstuOutParam">[out] pstuOutParam: 接口输出参数, 内存资源由用户申请和释放; [out] pstuOutParam: interface output parameters, memory resources are applied and released by the user</param>
        /// <param name="nWaitTime">[in] nWaitTime: 接口超时时间, 单位毫秒; [in] nWaitTime: interface timeout, in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE means success FALSE means failure</returns>
        public static bool PTZStopTour(IntPtr lLoginID, ref NET_IN_PTZ_STOP_TOUR pstuInParam, ref NET_OUT_PTZ_STOP_TOUR pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_PTZStopTour(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 手动抓拍图片
        /// Manually capturing images
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam 接口输入参数; [in] pstInParam Indicates the interface parameter</param>
        /// <param name="pstuOutParam">[out]pstuOutParam 接口输出参数; [out] pstOutParam Indicates the output parameter of the interface</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout, in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE indicates success. FALSE indicates failure</returns>
        public static bool ManualSnapByEvent(IntPtr lLoginID, ref NET_IN_MANUALSNAP_BY_EVENT_INFO pstuInParam, ref NET_OUT_MANUALSNAP_BY_EVENT_INFO pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_ManualSnapByEvent(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取测温区域的参数值, pInParam与pOutParam内存由用户申请释放
        /// Get the parameter value of the Temperature Monitoring area, user malloc and free memory of pInParam and pOutParam
        /// </summary>
        public static bool RadiometryGetRandomRegionTemper(IntPtr lLoginID, ref NET_IN_RADIOMETRY_RANDOM_REGION_TEMPER pInParam, ref NET_OUT_RADIOMETRY_RANDOM_REGION_TEMPER pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_RadiometryGetRandomRegionTemper(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取录像时间范围
        /// Obtain the video time range
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam 接口输入参数; [in] pstuInParam Indicates the input parameter of the interface</param>
        /// <param name="pstuOutParam">[out] pstuOutParam 接口输出参数; [out] pstuOutParam Indicates the output parameter of the interface</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Timeout period of the interface, in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE indicates success. FALSE Indicates failure</returns>
        public static bool GetStorageBoundTime(IntPtr lLoginID, ref NET_IN_GET_STORAGE_BOUND_TIME_INFO pstuInParam, ref NET_OUT_GET_STORAGE_BOUND_TIME_INFO pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetStorageBoundTime(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 开始升级设备程序--扩展支持G以上文件升级
        /// Begin upgrading device program--extensive,support large file upgrade,for example G bytes file
        /// </summary>
        public static IntPtr StartUpgradeEx2(IntPtr lLoginID, EM_UPGRADE_TYPE emType, IntPtr pchFileName, fUpgradeCallBackEx cbUpgrade, IntPtr dwUser)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_StartUpgradeEx2(lLoginID, emType, pchFileName, cbUpgrade, dwUser);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 智慧用电Things物模型属性订阅接口
        /// Smart electricity Things subscription interface
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pInParam">[in] pInParam 接口输入参数, 内存资源由用户申请和释放; [in] pInParam input param, memory resources are applied and released by the user</param>
        /// <param name="pOutParam">[out] pOutParam 接口输出参数, 内存资源由用户申请和释放; [out] pOutParam output param, memory resources are applied and released by the user</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout in milliseconds</param>
        /// <returns>订阅句柄; Attach handle</returns>
        public static IntPtr AttachThingsInfo(IntPtr lLoginID, ref NET_IN_THINGS_ATTACH pInParam, ref NET_OUT_THINGS_ATTACH pOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_AttachThingsInfo(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 智慧用电Things取消物模型属性订阅接口
        /// Smart electricity Things Unsubscription interface
        /// </summary>
        /// <param name="lAttachHandle">[in] lAttachHandle 订阅句柄; [in] lAttachHandle Attach handle</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE:success FALSE:failed</returns>
        public static bool DetachThingsInfo(IntPtr lAttachHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DetachThingsInfo(lAttachHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 智慧用电Things获取设备列表接口
        /// Smart electricity Things get device list interface
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pInParam">[in] pInParam 接口输入参数, 内存资源由用户申请和释放; [in] pInParam input param, memory resources are applied and released by the user</param>
        /// <param name="pOutParam">[out] pOutParam 接口输出参数, 内存资源由用户申请和释放; [out] pOutParam output param, memory resources are applied and released by the user</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE:success FALSE:failed</returns>
        public static bool GetThingsDevList(IntPtr lLoginID, ref NET_IN_THINGS_GET_DEVLIST pInParam, ref NET_OUT_THINGS_GET_DEVLIST pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetThingsDevList(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 智慧用电Things获取设备能力集接口
        /// Smart electricity Things get caps interface
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pInParam">[in] pInParam 接口输入参数, 内存资源由用户申请和释放; [in] pInParam input param, memory resources are applied and released by the user</param>
        /// <param name="pOutParam">[out] pOutParam 接口输出参数, 内存资源由用户申请和释放; [out] pOutParam output param, memory resources are applied and released by the user</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE:success FALSE:failed</returns>
        public static bool GetThingsCaps(IntPtr lLoginID, ref NET_IN_THINGS_GET_CAPS pInParam, ref NET_OUT_THINGS_GET_CAPS pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetThingsCaps(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 智慧用电Things配置获取接口
        /// Smart electricity Things Configuration acquisition interface
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pInParam">[in] pInParam 接口输入参数, 内存资源由用户申请和释放; [in] pInParam input param, memory resources are applied and released by the user</param>
        /// <param name="pOutParam">[out] pOutParam 接口输出参数, 内存资源由用户申请和释放; [out] pOutParam output param, memory resources are applied and released by the user</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE:success FALSE:failed</returns>
        public static bool GetThingsConfig(IntPtr lLoginID, ref NET_IN_THINGS_GET pInParam, ref NET_OUT_THINGS_GET pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetThingsConfig(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 智慧用电Things配置设置接口
        /// Smart electricity Things Configure settings interface
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pInParam">[in] pInParam 接口输入参数, 内存资源由用户申请和释放; [in] pInParam input param, memory resources are applied and released by the user</param>
        /// <param name="pOutParam">[out] pOutParam 接口输出参数, 内存资源由用户申请和释放; [out] pOutParam output param, memory resources are applied and released by the user</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE:success FALSE:failed</returns>
        public static bool SetThingsConfig(IntPtr lLoginID, ref NET_IN_THINGS_SET pInParam, ref NET_OUT_THINGS_SET pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetThingsConfig(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 开始升级远程设备程序
        /// Start remote upgrade
        /// </summary>
        public static IntPtr StartRemoteUpgrade(IntPtr lLoginID, ref NET_IN_START_REMOTE_UPGRADE_INFO pInParam, ref NET_OUT_START_REMOTE_UPGRADE_INFO pOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_StartRemoteUpgrade(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 结束升级远程设备程序
        /// Stop remote upgrade
        /// </summary>
        public static bool StopRemoteUpgrade(IntPtr lUpgradeID)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopRemoteUpgrade(lUpgradeID);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 智慧用电Things物模型服务调用接口
        /// Smart electricity Things service interface
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="emType">[in] emType 物模型服务类型; [in] emType service type</param>
        /// <param name="pInBuf">[in] pInBuf 接口输入参数,参考emType类型,内存资源由用户申请和释放; [in] pInBuf input param,memory resources are applied and released by the user</param>
        /// <param name="pOutBuf">[out] pOutBuf 接口输出参数, 参考emType类型,内存资源由用户申请和释放; [out] pOutBuf output param,memory resources are applied and released by the user</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE:success FALSE:failed</returns>
        public static bool ThingsServiceOperate(IntPtr lLoginID, EM_THINGS_SERVICE_TYPE emType, IntPtr pInBuf, IntPtr pOutBuf, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_ThingsServiceOperate(lLoginID, emType, pInBuf, pOutBuf, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 查询设备当前时间扩展接口
        /// Search device current time extension interface
        /// </summary>
        public static bool QueryDeviceTimeEx(IntPtr lLoginID, ref NET_TIME_EX pDeviceTime, int waittime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_QueryDeviceTimeEx(lLoginID, ref pDeviceTime, waittime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 设置设备当前时间扩展接口
        /// Set device current time extension interface
        /// </summary>
        public static bool SetupDeviceTimeEx(IntPtr lLoginID, ref NET_TIME_EX pDeviceTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetupDeviceTimeEx(lLoginID, ref pDeviceTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 镜头聚焦控制
        /// dwFocusCommand = 0为聚焦调节
        /// dwFocusCommand = 1为连续聚焦调节
        /// dwFocusCommand = 2为自动聚焦调节,调节焦点至最佳位置。nFocus和nZoom无效。
        /// control focus
        /// dwFocusCommand = 0 focus adjucy
        /// dwFocusCommand = 1continuous focus adjustment
        /// dwFocusCommand = 2 auto adjust ,adjust to the best position,nFocus and nZoominvalid
        /// </summary>
        public static bool FocusControl(IntPtr lLoginID, int nChannelID, uint dwFocusCommand, double nFocus, double nZoom, IntPtr reserved, int waittime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_FocusControl(lLoginID, nChannelID, dwFocusCommand, nFocus, nZoom, reserved, waittime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取用户添加的所有方案信息
        /// Obtain all scheme information added by the user
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam 接口入参; [in] pstuInParam Indicates the interface parameter</param>
        /// <param name="pstuOutParam">[out] pstuOutParam 接口出参; [out] pstuOutParam Indicates the outgoing parameter of the interface</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Timeout period of the interface, in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE Indicates success. FALSE Indicates failure</returns>
        public static bool GetClassify(IntPtr lLoginID, ref NET_IN_GET_CLASSIFY_INFO pstuInParam, ref NET_OUT_GET_CLASSIFY_INFO pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetClassify(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 训练服务器训练任务管理模块获取训练任务接口
        /// Training server training task management module obtains training task interface
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam 接口入参; [in] pstuInParam Indicates the interface parameter</param>
        /// <param name="pstuOutParam">[out] pstuOutParam 接口出参; [out] pstuOutParam Indicates the outgoing parameter of the interface</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Timeout period of the interface, in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE Indicates success. FALSE Indicates failure</returns>
        public static bool FindTrainingTask(IntPtr lLoginID, ref NET_IN_FIND_TRAININGTASK_INFO pstuInParam, ref NET_OUT_FIND_TRAININGTASK_INFO pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_FindTrainingTask(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 订阅训练任务完成情况
        /// Subscription training task completion status
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam 接口输入参数; [in] pstuInParam Indicates the interface parameter</param>
        /// <param name="pstuOutParam">[out] pstuOutParam 接口输出参数; [out] pstuOutParam Indicates the outgoing parameter of the interface</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Timeout period of the interface, in milliseconds</param>
        /// <returns>返回订阅句柄; Return subscription handle</returns>
        public static IntPtr AttachTrainTask(IntPtr lLoginID, ref NET_IN_ATTACH_TRAIN_TASK_INFO pstuInParam, ref NET_OUT_ATTACH_TRAIN_TASK_INFO pstuOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_AttachTrainTask(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 取消订阅实时数据
        /// Unsubscribe from real-time data
        /// </summary>
        /// <param name="lAttachHandle">[in] lAttachHandle 订阅句柄; [in] lAttachHandle Subscription handle</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE Indicates success. FALSE Indicates failure</returns>
        public static bool DetachTrainTask(IntPtr lAttachHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DetachTrainTask(lAttachHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取用户信息
        /// Obtain user information
        /// </summary>
        public static bool GetUserInfoAll(IntPtr lLoginID, ref NET_IN_GET_USER_ALL_INFO pstuInParam, ref NET_OUT_GET_USER_ALL_INFO pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetUserInfoAll(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 开始查找指纹信息
        /// 开始查找指纹信息
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID 登录句柄</param>
        /// <param name="pstuInParam">[in] pstuInParam 接口入参; [in] pstuInParam 接口入参</param>
        /// <param name="pstuOutParam">[out] pstuOutParam 接口出参; [out] pstuOutParam 接口出参</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime 接口超时时间, 单位毫秒</param>
        /// <returns>返回控制句柄; 返回控制句柄</returns>
        public static IntPtr StartFindAccessFingerprint(IntPtr lLoginID, ref NET_IN_FINGERPRINT_START_FIND_INFO pstuInParam, ref NET_OUT_FINGERPRINT_START_FIND_INFO pstuOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_StartFindAccessFingerprint(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 查询指纹信息
        /// 查询指纹信息
        /// </summary>
        /// <param name="lFindHandle">[in] lFindHandle 查询句柄; [in] lFindHandle 查询句柄</param>
        /// <param name="pstuInParam">[in] pstuInParam 接口入参; [in] pstuInParam 接口入参</param>
        /// <param name="pstuOutParam">[out] pstuOutParam 接口出参; [out] pstuOutParam 接口出参</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime 接口超时时间, 单位毫秒</param>
        /// <returns>TRUE 表示成功 FALSE表示失败; TRUE 表示成功 FALSE表示失败</returns>
        public static bool DoFindAccessFingerprint(IntPtr lFindHandle, ref NET_IN_FINGERPRINT_DO_FIND_INFO pstuInParam, ref NET_OUT_FINGERPRINT_DO_FIND_INFO pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DoFindAccessFingerprint(lFindHandle, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 停止指纹查询
        /// 停止指纹查询
        /// </summary>
        /// <param name="lFindHandle">[in] lFindHandle 查询句柄; [in] lFindHandle 查询句柄</param>
        /// <returns>TRUE 表示成功 FALSE表示失败; TRUE 表示成功 FALSE表示失败</returns>
        public static bool StopFindAccessFingerprint(IntPtr lFindHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopFindAccessFingerprint(lFindHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 交通抓拍--网络触发方式,pstInParam与pstOutParam内存由用户申请释放
        /// traffic snap--snapshot by network,user malloc and free (pstInParam's and pstOutParam's) memory
        /// </summary>
        public static bool TrafficSnapByNetwork(IntPtr lLoginID, int nChannelID, ref NET_IN_SNAPSHOT pstInParam, ref NET_OUT_SNAPSHOT pstOutParam)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_TrafficSnapByNetwork(lLoginID, nChannelID, ref pstInParam, ref pstOutParam);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 设置窗口场景信息
        /// Set window scene information
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录ID; [in] lLoginID Login ID</param>
        /// <param name="pInParam">[in] pInParam 接口入参; [in] pInParam Interface input parameter</param>
        /// <param name="pOutParam">[out] pOutParam 接口出参; [out] pOutParam Interface output parameters</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout time in milliseconds</param>
        /// <returns>TRUE 表示成功 FALSE表示失败; TRUE indicates success, FALSE indicates failure</returns>
        public static bool SetSplitWindowsInfo(IntPtr lLoginID, IntPtr pInParam, IntPtr pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetSplitWindowsInfo(lLoginID, pInParam, pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 设置窗口次序(pInparam, pOutParam内存由用户申请释放)
        /// set window order,user malloc and free (pInParam's and pOutParam's)memory
        /// </summary>
        /// <returns>TRUE表示成功 FALSE表示失败</returns>
        public static bool SetSplitTopWindow(IntPtr lLoginID, ref NET_IN_SPLIT_SET_TOP_WINDOW pInParam, ref NET_OUT_SPLIT_SET_TOP_WINDOW pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetSplitTopWindow(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 关窗(pInparam, pOutParam内存由用户申请释放)
        /// close window,user malloc and free (pInParam's and pOutParam's)memory
        /// </summary>
        /// <returns>TRUE表示成功 FALSE表示失败</returns>
        public static bool CloseSplitWindow(IntPtr lLoginID, ref NET_IN_SPLIT_CLOSE_WINDOW pInParam, ref NET_OUT_SPLIT_CLOSE_WINDOW pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_CloseSplitWindow(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
        
        /// <summary>
        /// 获取事件详细信息
        /// Obtain event details
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID login handle</param>
        /// <param name="pstuInParam">[in] pstInParam 接口输入参数; [in] pstInParam Interface input parameter</param>
        /// <param name="pstuOutParam">[out] pstOutParam 接口输出参数; [out] pstOutParam Interface output parameter</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime nWaitTime Interface timeout, in milliseconds</param>
        /// <returns>TRUE表示成功,FALSE表示失败; TRUE means success FALSE means failure</returns>
        public static bool GetIVSEventDetail(IntPtr lLoginID, ref NET_IN_GET_IVSEVENT_DETAIL_INFO pstuInParam, ref NET_OUT_GET_IVSEVENT_DETAIL_INFO pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetIVSEventDetail(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 文件下载,多次触发分包下载大文件,每次请求指定文件名和下载偏移,pOutParam内存由用户申请释放
        /// download piece file,user malloc memory of pInParam and pOutParam
        /// </summary>
        /// <returns>TRUE表示成功 FALSE表示失败</returns>
        public static bool DownloadPieceFile(IntPtr lLoginID, ref NET_IN_DOWNLOAD_PIECE_FILE pInParam, ref NET_OUT_DOWNLOAD_PIECE_FILE pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DownloadPieceFile(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取热图数据
        /// heatmap data
        /// </summary>
        /// <returns>TRUE表示成功 FALSE表示失败</returns>
        public static bool GetHeatMapsDirectly(IntPtr lLoginID, ref NET_IN_GET_HEATMAPS_INFO pInParam, ref NET_OUT_GET_HEATMAPS_INFO pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetHeatMapsDirectly(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// pstInParam与pstOutParam内存由用户申请释放
        /// user malloc memory of pstInParam and pstOutParam
        /// </summary>
        /// <returns>TRUE表示成功 FALSE表示失败</returns>
        public static bool AddMission(IntPtr lLoginID, ref NET_IN_ADD_MISSION pstInParam, ref NET_OUT_ADD_MISSION pstOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_AddMission(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取网卡信息(lpInParam, lpOutParam内存由用户申请释放,大小参照emType对应的结构体)
        /// get net card info,user malloc the memory of lpInParam and lpOutParam,please refer to the corresponding structure of emType
        /// </summary>
        /// <returns>TRUE表示成功 FALSE表示失败</returns>
        public static bool QueryNetStat(IntPtr lLoginID, EM_NET_QUERY_TYPE emType, IntPtr lpInParam, int nInParamLen, IntPtr lpOutParam, int nOutParamLen, IntPtr pError, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_QueryNetStat(lLoginID, emType, lpInParam, nInParamLen, lpOutParam, nOutParamLen, pError, nWaitTime);
            NetGetLastError(result);
            return result;
        }
        
        /// <summary>
        /// 获取规则配置信息(支持只获取配置节点或子节点的部分字段)
        /// Get Config Partly
        /// </summary>
        public static bool GetConfigPartly(IntPtr lLoginID, NET_EM_CFGPARTLY_OPERATE_TYPE emCfgOpType, ref NET_CFGPARTLY_OPERATE_FILTER pstuFilter, IntPtr lpOutBuffer, int nOutBufferSize, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetConfigPartly(lLoginID, emCfgOpType, ref pstuFilter, lpOutBuffer, nOutBufferSize, nWaitTime);
            NetGetLastError(result);
            return result;
        }
        
        /// <summary>
        /// 获取温湿度信息
        /// get Hygrothermograph Infos
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID login handle</param>
        /// <param name="pInParam">[in] pstInParam 接口输入参数; [in] pstInParam interface input parameter</param>
        /// <param name="pOutParam">[out]pstOutParam 接口输出参数; [out]pstOutParam interface output parameter</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime interface timeout, in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE means success FALSE means failure</returns>
        public static bool GetHygrothermographInfo(IntPtr lLoginID, ref NET_IN_GET_HYGROTHERMOGRAPH_INFO pInParam, ref NET_OUT_GET_HYGROTHERMOGRAPH_INFO pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetHygrothermographInfo(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
        
        /// <summary>
        /// 分组人员统计--获取摘要信息
        /// NumberStatGroup--Get summary info
        /// </summary>
        /// <returns>TRUE表示成功 FALSE表示失败</returns>
        public static bool GetNumberStatGroupSummary(IntPtr lLoginID, ref NET_IN_NUMBERSTATGROUPSUMMARY_INFO pInParam, ref NET_OUT_NUMBERSTATGROUPSUMMARY_INFO pOutParam, int waittime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetNumberStatGroupSummary(lLoginID, ref pInParam, ref pOutParam, waittime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 订阅电梯内实时数据
        /// Subscribe to real-time data inside the elevator
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam 接口输入参数; [in] pstuInParam The input parameters for the interface, memory resources are allocated and released by the user</param>
        /// <param name="pstuOutParam">[out] pstuOutParam 接口输出参数; [out] pstuOutParam The output parameters for the interface, memory resources are allocated and released by the user</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout, in milliseconds</param>
        /// <returns>返回订阅句柄; Return subscription handle</returns>
        public static IntPtr AttachElevatorFloorCounter(IntPtr lLoginID, ref NET_IN_ATTACH_ELEVATOR_FLOOR_COUNTER_INFO pstuInParam, ref NET_OUT_ATTACH_ELEVATOR_FLOOR_COUNTER_INFO pstuOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_AttachElevatorFloorCounter(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 取消订阅电梯内实时数据
        /// Unsubscribe from real-time data in the elevator
        /// </summary>
        /// <param name="lAttachHandle">[in] lAttachHandle 订阅句柄; [in] lAttachHandle Subscription handle</param>
        /// <returns>TRUE表示成功 FALSE表示失败; indicates success, FALSE indicates failure</returns>
        public static bool DetachElevatorFloorCounter(IntPtr lAttachHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DetachElevatorFloorCounter(lAttachHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取电视墙上屏幕窗口解码信息,pInParam与pOutParam内存由用户申请释放
        /// get monitorwall window info,user malloc memory of pInParam and pOutParam
        /// </summary>
        /// <returns>TRUE表示成功 FALSE表示失败</returns>
        public static bool MonitorWallGetWindowInfo(IntPtr lLoginID, ref NET_IN_MW_GET_WINODW_INFO pInParam, ref NET_OUT_MW_GET_WINDOW_INFO pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_MonitorWallGetWindowInfo(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 门禁设备开始捕获新卡
        /// The access control device starts to capture the new card
        /// </summary>
        /// <returns>TRUE表示成功 FALSE表示失败</returns>
        public static bool AccessControlCaptureNewCard(IntPtr lLoginID, ref NET_IN_ACCESSCONTROL_CAPTURE_NEWCARD pInParam, ref NET_OUT_ACCESSCONTROL_CAPTURE_NEWCARD pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_AccessControlCaptureNewCard(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 布控通道人员组信息,pstInParam与pstOutParam内存由用户申请释放
        /// arm channel staff group info ,user malloc and free (pstInParam's and pstOutParam's) memory
        /// </summary>
        /// <returns>TRUE表示成功 FALSE表示失败</returns>
        public static bool SetGroupInfoForChannel(IntPtr lLoginID, ref NET_IN_SET_GROUPINFO_FOR_CHANNEL pstInParam, ref NET_OUT_SET_GROUPINFO_FOR_CHANNEL pstOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetGroupInfoForChannel(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 自动标定,阻塞接口,耗时非常久(分钟级)
        /// Automatic calibration, blocking interface, very time-consuming (in minutes)
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam 接口入参; [in] pstuInParam Interface input parameter</param>
        /// <param name="pstuOutParam">[out] pstuOutParam 接口出参; [out] pstuOutParam Interface output parameters</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout time, in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE indicates success, FALSE indicates failure</returns>
        public static bool StartAutoCalibrate(IntPtr lLoginID, ref NET_IN_START_AUTO_CALIBRATE pstuInParam, ref NET_OUT_START_AUTO_CALIBRATE pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StartAutoCalibrate(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 订阅标定状态
        /// Subscription calibration status
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam 接口输入参数; [in] pstuInParam Interface input parameters</param>
        /// <param name="pstuOutParam">[out] pstuOutParam 接口输出参数; [out] pstuOutParam Interface output parameters</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout time, in milliseconds</param>
        /// <returns>返回订阅句柄; Return subscription handle</returns>
        public static IntPtr AttachCalibrateStatus(IntPtr lLoginID, ref NET_IN_ATTACH_CALIBRATE_STATUS pstuInParam, ref NET_OUT_ATTACH_CALIBRATE_STATUS pstuOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_AttachCalibrateStatus(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 取消订阅标定状态
        /// Unsubscribe from calibration status
        /// </summary>
        /// <param name="lAttachHandle">[in] lAttachHandle 订阅句柄; [in] lAttachHandle Subscription handle</param>
        /// <param name="pstuInParam">[in] pstuInParam 接口输入参数; [in] pstuInParam Interface input parameters</param>
        /// <param name="pstuOutParam">[out] pstuOutParam 接口输出参数; [out] pstuOutParam Interface output parameters</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE indicates success, FALSE indicates failure</returns>
        public static bool DetachCalibrateStatus(IntPtr lAttachHandle, ref NET_IN_DETACH_CALIBRATE_STATUS pstuInParam, ref NET_OUT_DETACH_CALIBRATE_STATUS pstuOutParam)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DetachCalibrateStatus(lAttachHandle, ref pstuInParam, ref pstuOutParam);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 设置窗口位置(pInparam, pOutParam内存由用户申请释放)
        /// set windown position,user malloc and free (pInParam's and pOutParam's)memory
        /// </summary>
        /// <returns>TRUE表示成功 FALSE表示失败</returns>
        public static bool SetSplitWindowRect(IntPtr lLoginID, ref NET_IN_SPLIT_SET_RECT pInParam, ref NET_OUT_SPLIT_SET_RECT pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetSplitWindowRect(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 查询显示源(pstuSplitSrc内存由用户申请释放)
        /// get display source,user malloc and free pstuSplitSrc's memory
        /// </summary>
        /// <returns>TRUE表示成功 FALSE表示失败</returns>
        public static bool GetSplitSource(IntPtr lLoginID, int nChannel, int nWindow, IntPtr pstuSplitSrc, int nMaxCount, ref int nRetCount, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetSplitSource(lLoginID, nChannel, nWindow, pstuSplitSrc, nMaxCount, ref nRetCount, nWaitTime);
            NetGetLastError(result);
            return result;
        }
        
           /// <summary>
        /// 获取临时token
        /// Get a temporary token
        /// </summary>
        /// <returns>TRUE表示成功 FALSE表示失败</returns>
        public static bool GetTemporaryToken(IntPtr lLoginID, ref NET_IN_GET_TEMPORARY_TOKEN pstuInParam, ref NET_OUT_GET_TEMPORARY_TOKEN pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetTemporaryToken(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取分压业务能力信息, 由主业务模块调用
        /// Get capability information of sub business, called by main business module
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pInParam">[in] pInParam 接口输入参数, 内存资源由用户申请和释放; [in] pInParam Interface input parameters, memory resources are applied and released by the user</param>
        /// <param name="pOutParam">[out] pOutParam 接口输出参数, 内存资源由用户申请和释放; [out] pOutParam Interface output parameters, memory resources are applied and released by the user</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒(目前不生效, 保留在此以便后续扩展); [in] nWaitTime Interface timeout in milliseconds(It does not take effect at present. It is reserved here for subsequent expansion)</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE:success FALSE:failed</returns>
        public static bool GetSubBusinessCaps(IntPtr lLoginID, ref NET_IN_GET_SUBBIZ_CAPS pInParam, ref NET_OUT_GET_SUBBIZ_CAPS pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetSubBusinessCaps(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 创建业务sdk模块
        /// Create sub business module
        /// </summary>
        /// <param name="pInParam">[in] pInParam 接口输入参数, 内存资源由用户申请和释放; [in] pInParam Interface input parameters, memory resources are applied and released by the user</param>
        /// <param name="pOutParam">[out] pOutParam 接口输出参数, 内存资源由用户申请和释放; [out] pOutParam Interface output parameters, memory resources are applied and released by the user</param>
        /// <returns>业务sdk句柄,非0表示成功 0表示失败; Sub business module handle, Non 0 means success and 0 means failure</returns>
        public static IntPtr CreateSubBusinessModule(ref NET_IN_CREAT_SUB_BUSINESS_MDL_INFO pInParam, ref NET_OUT_CREAT_SUB_BUSINESS_MDL_INFO pOutParam)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_CreateSubBusinessModule(ref pInParam, ref pOutParam);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 启动子连接监听服务
        /// Start sub link listen server
        /// </summary>
        /// <param name="pInParam">[in] pInParam 接口输入参数, 内存资源由用户申请和释放; [in] pInParam Interface input parameters, memory resources are applied and released by the user</param>
        /// <param name="pOutParam">[out] pOutParam 接口输出参数, 内存资源由用户申请和释放; [out] pOutParam Interface output parameters, memory resources are applied and released by the user</param>
        /// <returns>子链接监听服务句柄, 非0表示成功 0表示失败; Sub libk listen server handle, Non 0 means success and 0 means failure</returns>
        public static IntPtr StartSubLinkListenServer(ref NET_IN_START_SUBLINK_LISTEN_SERVER pInParam, ref NET_OUT_START_SUBLINK_LISTEN_SERVER pOutParam)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_StartSubLinkListenServer(ref pInParam, ref pOutParam);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 发送创建子连接所需的信息给设备, 由主业务模块调用
        /// Send the information required to create a sub connection to the device, called by main business module
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pInParam">[in] pInParam 接口输入参数, 内存资源由用户申请和释放; [in] pInParam Interface input parameters, memory resources are applied and released by the user</param>
        /// <param name="pOutParam">[out] pOutParam 接口输出参数, 内存资源由用户申请和释放; [out] pOutParam Interface output parameters, memory resources are applied and released by the user</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE:success FALSE:failed</returns>
        public static bool TransferSubLinkInfo(IntPtr lLoginID, ref NET_IN_TRANSFER_SUBLINK_INFO pInParam, ref NET_OUT_TRANSFER_SUBLINK_INFO pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_TransferSubLinkInfo(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 设置私有透传通道参数
        /// Set param about private tunnel
        /// </summary>
        /// <param name="pInParam">[in] pInParam 接口输入参数, 内存资源由用户申请和释放; [in] pInParam Input param, resources are requested and released by users</param>
        /// <param name="pOutParam">[out] pOutParam 接口输出参数, 内存资源由用户申请和释放; [out] pOutParam Output param, resources are requested and released by users</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE:Success FALSE:Failed</returns>
        public static bool SetTransmitTunnelParam(ref NET_IN_SET_TRANSMITTUNNEL_PARAM pInParam, ref NET_OUT_SET_TRANSMITTUNNEL_PARAM pOutParam)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetTransmitTunnelParam(ref pInParam, ref pOutParam);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 创建隧道
        /// Create private tunnel
        /// </summary>
        /// <param name="lSubBizHandle">[in] lSubBizHandle 业务sdk句柄,由CLIENT_CreateSubBusinessModule接口返回; [in] lSubBizHandle Sub business handle, it is returned by CLIENT_CreateSubBusinessModule</param>
        /// <param name="pInParam">[in] pInParam 接口输入参数, 内存资源由用户申请和释放; [in] pInParam Input param, resosurces are requested and released by users</param>
        /// <param name="pOutParam">[out] pOutParam 接口输出参数, 内存资源由用户申请和释放; [out] pOutParam Output param, resources are requested and released by userss</param>
        /// <returns>LLONG 透传隧道业务句柄,非0表示成功 0表示失败; LLONG Private tunnel handle, Non 0 means success and 0 means failure</returns>
        public static IntPtr CreateTransmitTunnel(IntPtr lSubBizHandle, ref NET_IN_CREATE_TRANSMIT_TUNNEL pInParam, ref NET_OUT_CREATE_TRANSMIT_TUNNEL pOutParam)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_CreateTransmitTunnel(lSubBizHandle, ref pInParam, ref pOutParam);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 销毁隧道
        /// Destroy private tunnel
        /// </summary>
        /// <param name="lTransmitHandle">[in] lTransmitHandle 透传隧道业务句柄,由CLIENT_CreateTransmitTunnel接口返回; [in] lTransmitHandle Private tunnel handle, it is returned by CLIENT_CreateTransmitTunnel</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE:Success FALSE:Failed</returns>
        public static bool DestroyTransmitTunnel(IntPtr lTransmitHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DestroyTransmitTunnel(lTransmitHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 销毁业务sdk模块
        /// Destroy sub business module
        /// </summary>
        /// <param name="lSubBizHandle">[in] lSubBizHandle 业务sdk句柄,由CLIENT_CreateSubBusinessModule接口返回; [in] lSubBizHandle:sub business module handle, it is returned by CLIENT_CreateSubBusinessModule</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE:success FALSE:failed</returns>
        public static bool DestroySubBusinessModule(IntPtr lSubBizHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DestroySubBusinessModule(lSubBizHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 停止子连接监听服务
        /// Stop sub link listen server
        /// </summary>
        /// <param name="lListenServer">[in] lListenServer 监听服务句柄,由CLIENT_StartSubLinkListenServer接口返回; [in] lListenServer:sub link listen server handle, it is returned by CLIENT_StartSubLinkListenServer</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE:success FALSE:failed</returns>
        public static bool StopSubLinkListenServer(IntPtr lListenServer)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopSubLinkListenServer(lListenServer);
            NetGetLastError(result);
            return result;
        }
        
        /// <summary>
        /// 获取热成像当前冷(最低的温度)、热(最高的温度)点信息
        /// Obtaining the imformation of current cold(minimum)and hot(maximum)points in thermal imaging
        /// </summary>
        /// <returns>TRUE表示成功 FALSE表示失败</returns>
        public static bool RadiometryGetCurrentHotColdSpotInfo(IntPtr lLoginID, ref NET_IN_RADIOMETRY_CURRENTHOTCOLDSPOT_INFO pInParam, ref NET_OUT_RADIOMETRY_CURRENTHOTCOLDSPOT_INFO pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_RadiometryGetCurrentHotColdSpotInfo(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 门禁人证设备获取目标
        /// Access control ID device to obtain target
        /// </summary>
        /// <returns>TRUE表示成功 FALSE表示失败</returns>
        public static bool AccessControlCaptureCmd(IntPtr lLoginID, ref NET_IN_ACCESSCONTROL_CAPTURE_CMD pInParam, ref NET_OUT_ACCESSCONTROL_CAPTURE_CMD pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_AccessControlCaptureCmd(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 下发人员信息录入结果
        /// set person input result to device
        /// </summary>
        /// <returns>TRUE表示成功 FALSE表示失败</returns>
        public static bool SetPersonInfoInputResult(IntPtr lLoginID, ref NET_IN_PERSON_INFO_INPUT_RESULT pInParam, ref NET_OUT_PERSON_INFO_INPUT_RESULT pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_SetPersonInfoInputResult(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 订阅485实时数据
        /// Subscribe to 485 real-time data
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam 接口输入参数; [in] pstuInParam Indicates the input parameter of the interface</param>
        /// <param name="pstuOutParam">[out] pstuOutParam 接口输出参数; [out] pstuOutParam Indicates the output parameter of the interface</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Timeout period of the interface, in milliseconds</param>
        /// <returns>返回订阅句柄; Returns the subscription handle</returns>
        public static IntPtr AttachIotboxComm(IntPtr lLoginID, ref NET_IN_ATTACH_IOTBOX_COMM pstuInParam, ref NET_OUT_ATTACH_IOTBOX_COMM pstuOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_AttachIotboxComm(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 取消订阅实时数据
        /// Unsubscribe from real-time data
        /// </summary>
        /// <param name="lAttachHandle">[in] lAttachHandle 订阅句柄; [in] lAttachHandle Subscription handle</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE indicates success. FALSE Indicates failure</returns>
        public static bool DetachIotboxComm(IntPtr lAttachHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DetachIotboxComm(lAttachHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取车载无线模块状态
        /// Get mobile module state
        /// </summary>
        /// <returns>TRUE表示成功 FALSE表示失败</returns>
        public static bool GetMobileModuleState(IntPtr lLoginID, ref NET_IN_GET_MOBILE_MODULE_STATE pInParam, ref NET_OUT_GET_MOBILE_MODULE_STATE pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetMobileModuleState(lLoginID, ref pInParam, ref pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取SIM卡信息接口
        /// Get the SIMINFO of SIM card
        /// </summary>
        /// <returns>TRUE表示成功 FALSE表示失败</returns>
        public static bool GetMobileSIMInfo(IntPtr lLoginID, EM_SIMINFO_TYPE emType, IntPtr pInParam, IntPtr pOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetMobileSIMInfo(lLoginID, emType, pInParam, pOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 网络应用组件
        /// 可用于获取前端设备的网络资源数据,如网络收发数据的速率等,pstuIn与pstuOut内存由用户申请释放,大小参照emType对应的结构体
        /// network application component, company internal customized port
        /// used to acquire network source data of front-end device,user malloc and free memory of pstuIn and pstuOut,please refer to corresponding structure of emType
        /// </summary>
        public static bool RPC_NetApp(IntPtr lLoginID, EM_RPC_NETAPP_TYPE emType, IntPtr pstuIn, IntPtr pstuOut, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_RPC_NetApp(lLoginID, emType, pstuIn, pstuOut, nWaitTime);
            NetGetLastError(result);
            return result;
        }
        
        /// <summary>
        /// 区分报表查询, 单独实现一套全量查询数据接口
        /// differentiates report query and implements a set of full query data interface separately
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstInParam">[in] pstInParam 接口输入参数; [in] pstInParam Indicates the interface parameter</param>
        /// <param name="pstOutParam">[out] pstOutParam 接口输出参数; [out] pstOutParam Indicates the output parameter of the interface</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout, in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE indicates success. FALSE indicates failure</returns>
        public static bool StartFindDetailNumberStatCluster(IntPtr lLoginID, ref NET_IN_START_FIND_DETAIL_CLUSTER pstInParam, ref NET_OUT_START_FIND_DETAIL_CLUSTER pstOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StartFindDetailNumberStatCluster(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
        
        /// <summary>
        /// 分批查询全量记录
        /// Query full records in batches
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstInParam">[in] pstInParam 接口输入参数; [in] pstInParam Indicates the interface parameter</param>
        /// <param name="pstOutParam">[out] pstOutParam 接口输出参数; [out] pstOutParam Indicates the output parameter of the interface</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout, in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE indicates success. FALSE indicates failure</returns>
        public static bool DoFindDetailNumberStatCluster(IntPtr lLoginID, IntPtr pstInParam, IntPtr  pstOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DoFindDetailNumberStatCluster(lLoginID, pstInParam, pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
        
        /// <summary>
        /// 停止查询
        /// stop the query
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstInParam">[in] pstInParam 接口输入参数; [in] pstInParam Indicates the interface parameter</param>
        /// <param name="pstOutParam">[out] pstOutParam 接口输出参数; [out] pstOutParam Indicates the output parameter of the interface</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout, in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE indicates success. FALSE indicates failure</returns>
        public static bool StopFindDetailNumberStatCluster(IntPtr lLoginID, ref NET_IN_STOP_FIND_DETAIL_CLUSTER_INFO pstInParam, ref NET_OUT_STOP_FIND_DETAIL_CLUSTER_INFO pstOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopFindDetailNumberStatCluster(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
        
        /// <summary>
        /// 订阅云台可视域,pstuInViewRange与pstuOutViewRange内存由用户申请释放
        /// subscribe PTZ visual domain,user malloc memory of pstuInViewRange and pstuOutViewRange
        /// </summary>
        /// <returns>返回处理句柄</returns>
        public static IntPtr AttachViewRangeState(IntPtr lLoginID, ref NET_IN_VIEW_RANGE_STATE pstuInViewRange, ref NET_OUT_VIEW_RANGE_STATE pstuOutViewRange, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_AttachViewRangeState(lLoginID, ref pstuInViewRange, ref pstuOutViewRange, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 停止订阅云台可视域,lAttachHandle是CLIENT_AttachViewRangeState返回值
        /// stop subscribe PTZ visual domain, lAttachHandle is CLIENT_AttachViewRangeState return value
        /// </summary>
        /// <returns>TRUE表示成功 FALSE表示失败</returns>
        public static bool DetachViewRangeState(IntPtr lAttachHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DetachViewRangeState(lAttachHandle);
            NetGetLastError(result);
            return result;
        }
        
        /// <summary>
        /// 获取从片性能信息
        /// Get sub-chip performance information
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID: 登录句柄; [in] lLoginID: Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam: 接口输入参数, 内存资源由用户申请和释放; [in] pstuInParam: Interface input parameters; memory managed by the user</param>
        /// <param name="pstuOutParam">[out] pstuOutParam: 接口输出参数, 内存资源由用户申请和释放; [out] pstuOutParam: Interface output parameters; memory managed by the user</param>
        /// <param name="nWaitTime">[in] nWaitTime: 接口超时时间, 单位毫秒; [in] nWaitTime: Interface timeout duration, in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE if successful, FALSE if failed</returns>
        public static bool GetPeripheralChipPerformanceInfoByID(IntPtr lLoginID, ref NET_IN_GET_CHIP_PERFORMANCE_BYID_INFO pstuInParam, ref NET_OUT_GET_CHIP_PERFORMANCE_BYID_INFO pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetPeripheralChipPerformanceInfoByID(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
        
                /// <summary>
        /// 获取可以升级的芯片列表
        /// Get the list of chips that can be upgraded
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID: 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam: 接口输入参数, 内存资源由用户申请和释放; [in] pstuInParam input param, memory resources are applied and released by the user</param>
        /// <param name="pstuOutParam">[out] pstuOutParam: 接口输出参数, 内存资源由用户申请和释放; [out] pstuOutParam output param, memory resources are applied and released by the user</param>
        /// <param name="nWaitTime">[in] nWaitTime: 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE:success FALSE:failed</returns>
        public static bool UpgraderGetChipList(IntPtr lLoginID, ref NET_IN_UPGRADER_GET_CHIPLIST_INFO pstuInParam, ref NET_OUT_UPGRADER_GET_CHIPLIST_INFO pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_UpgraderGetChipList(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 获取从片状态
        /// Get peripheralchip status
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID: 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstuInParam: 接口输入参数, 内存资源由用户申请和释放; [in] pstuInParam input param, memory resources are applied and released by the user</param>
        /// <param name="pstuOutParam">[out] pstuOutParam: 接口输出参数, 内存资源由用户申请和释放; [out] pstuOutParam output param, memory resources are applied and released by the user</param>
        /// <param name="nWaitTime">[in] nWaitTime: 接口超时时间, 单位毫秒; [in] nWaitTime Interface timeout in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE:success FALSE:failed</returns>
        public static bool GetPeripheralChipStateByID(IntPtr lLoginID, ref NET_IN_GET_CHIP_STATE_BYID_INFO pstuInParam, ref NET_OUT_GET_CHIP_STATE_BYID_INFO pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_GetPeripheralChipStateByID(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 强制I帧;nChannelID:通道号,nSubChannel:码流类型(0:主,1:子码流1)
        /// Compulsive I frame
        /// </summary>
        /// <returns>TRUE表示成功 FALSE表示失败</returns>
        public static bool MakeKeyFrame(IntPtr lLoginID, int nChannelID, int nSubChannel)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_MakeKeyFrame(lLoginID, nChannelID, nSubChannel);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 停止服务
        /// Stop service
        /// </summary>
        /// <returns>TRUE表示成功 FALSE表示失败</returns>
        public static bool StopService(IntPtr lHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_StopService(lHandle);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 订阅客流统计服务实时数据
        /// Attach video statistics real-time data
        /// </summary>
        /// <returns>返回处理句柄</returns>
        public static IntPtr AttachVideoStatistics(IntPtr lLoginID, ref NET_IN_ATTACH_VIDEO_STATISTICS pstInParam, ref NET_OUT_ATTACH_VIDEO_STATISTICS pstOutParam, int nWaitTime)
        {
            IntPtr result = IntPtr.Zero;
            result = OriginalSDK.CLIENT_AttachVideoStatistics(lLoginID, ref pstInParam, ref pstOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 取消订阅客流统计服务实时数据
        /// Detach video statistics real-time data
        /// </summary>
        /// <returns>TRUE表示成功 FALSE表示失败</returns>
        public static bool DetachVideoStatistics(IntPtr lAttachHandle)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_DetachVideoStatistics(lAttachHandle);
            NetGetLastError(result);
            return result;
        }
        
        /// <summary>
        /// 手动发送短信
        /// Manually sending text messages
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstInParam 接口输入参数, 内存资源由用户申请和释放; [in] pstInParam Interface input parameters, memory resources are requested and released by the user</param>
        /// <param name="pstuOutParam">[out] pstOutParam 接口输出参数, 内存资源由用户申请和释放; [out] pstOutParam Interface output parameters, memory resources are requested and released by users</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime interface timeout, in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE indicates success, FALSE indicates failure</returns>
        public static bool ManualSendSMS(IntPtr lLoginID, ref NET_IN_MANUAL_SEND_SMS_INFO pstuInParam, ref NET_OUT_MANUAL_SEND_SMS_INFO pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_ManualSendSMS(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 手动拨打电话
        /// Manually make phone calls
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">[in] pstInParam 接口输入参数, 内存资源由用户申请和释放; [in] pstInParam Interface input parameters, memory resources are requested and released by the user</param>
        /// <param name="pstuOutParam">[out] pstOutParam 接口输出参数, 内存资源由用户申请和释放; [out] pstOutParam Interface output parameters, memory resources are requested and released by users</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime interface timeout, in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE indicates success, FALSE indicates failure</returns>
        public static bool ManualMakeCall(IntPtr lLoginID, ref NET_IN_MANUAL_MAKE_CALL_INFO pstuInParam, ref NET_OUT_MANUAL_MAKE_CALL_INFO pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_ManualMakeCall(lLoginID, ref pstuInParam, ref pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
 
        /// <summary>
        /// 触发报警
        /// Trigger alarm
        /// </summary>
        /// <param name="lLoginID">[in] lLoginID 登录句柄; [in] lLoginID Login handle</param>
        /// <param name="pstuInParam">NET_IN_TRIGGER_ALARM_INFO [in] pstInParam 接口输入参数, 内存资源由用户申请和释放; [in] pstInParam Interface input parameters, memory resources are requested and released by the user</param>
        /// <param name="pstuOutParam">NET_OUT_TRIGGER_ALARM_INFO[out] pstOutParam 接口输出参数, 内存资源由用户申请和释放; [out] pstOutParam Interface output parameters, memory resources are requested and released by users</param>
        /// <param name="nWaitTime">[in] nWaitTime 接口超时时间, 单位毫秒; [in] nWaitTime interface timeout, in milliseconds</param>
        /// <returns>TRUE表示成功 FALSE表示失败; TRUE indicates success, FALSE indicates failure</returns>
        public static bool TriggerUnifiedInfoCollectAlarm(IntPtr lLoginID, IntPtr pstuInParam, IntPtr pstuOutParam, int nWaitTime)
        {
            bool result = false;
            result = OriginalSDK.CLIENT_TriggerUnifiedInfoCollectAlarm(lLoginID, pstuInParam, pstuOutParam, nWaitTime);
            NetGetLastError(result);
            return result;
        }
#endregion //<< C# SDK calls >>
    }
 
    /// <summary>
    /// throw SDK exception Class
    /// SDK异常类
    /// </summary>
    public class NETClientExcetion : Exception
    {
        /// <summary>
        /// SDK error code property
        /// SDK错误码属性
        /// </summary>
        public int ErrorCode { get; private set; }
 
        /// <summary>
        /// SDK error message property
        /// SDK错误信息属性
        /// </summary>
        new public string Message { get; private set; }
 
        /// <summary>
        /// construct function.
        /// 构造函数
        /// </summary>
        /// <param name="errorCode">SDK error code number</param>
        /// <param name="message">SDK error message</param>
        public NETClientExcetion(int errorCode, string message)
        {
            ErrorCode = errorCode;
            Message = message;
        }
    }
 
    #region << delegate >>
 
    /// <summary>
    /// network disconnection callback function original shape
    /// 断线回调函数
    /// </summary>
    /// <param name="lLoginID">user LoginID:Login's returns value 登陆ID</param>
    /// <param name="pchDVRIP">device IP 设备IP</param>
    /// <param name="nDVRPort">device prot 设备端口</param>
    /// <param name="dwUser">user data from Init function 用户数据</param>
    public delegate void fDisConnectCallBack(IntPtr lLoginID, IntPtr pchDVRIP, int nDVRPort, IntPtr dwUser);
 
    /// <summary>
    /// network re-connection callback function original shape
    /// 重连回调函数
    /// </summary>
    /// <param name="lLoginID">user LoginID:Login's returns value 登陆ID</param>
    /// <param name="pchDVRIP">device IP,string type 设备IP</param>
    /// <param name="nDVRPort">device prot 设备端口</param>
    /// <param name="dwUser">user data from SetAutoReconnect function 用户数据</param>
    public delegate void fHaveReConnectCallBack(IntPtr lLoginID, IntPtr pchDVRIP, int nDVRPort, IntPtr dwUser);
 
    /// <summary>
    /// real-time monitor data callback function original shape---extensive. just only support 32bit.
    /// 实时预览数据回调函数,只支持32位,不支持64位.
    /// </summary>
    /// <param name="lRealHandle">monitor handle 预览句柄</param>
    /// <param name="dwDataType">callback data type ,only data set in dwFlag will be callback:回调数据类型
    ///                         <para>0 original data (identicla SaveRealData saveddata)</para>
    ///                         <para>1 frame data</para>
    ///                         <para>2 yuv data</para>
    ///                         <para>3 pcm audio data</para></param>
    /// <param name="pBuffer">byte array, length is dwBufSize 回调数据缓存
    ///                      <para>callback data, except type 0, other type is base on frame, one frame data per callback</para></param>
    /// <param name="dwBufSize">pBuffer's size 回调数据的缓存大小</param>
    /// <param name="param">pointer to parameter structure,based on different type 参数结构体的指针
    ///                    <para>if type is 0(original) or 2(yuv), param is 0</para>
    ///                    <para>if callback data is frame data, pointer to NET_VideoFrameParam</para>
    ///                    <para>if callback data is PCM data, pointer to NET_CBPCMDataParam</para></param>
    /// <param name="dwUser">user data,which input above</param>
    public delegate void fRealDataCallBackEx(IntPtr lRealHandle, uint dwDataType, IntPtr pBuffer, uint dwBufSize, int param, IntPtr dwUser);
 
    /// <summary>
    /// real-time monitor data callback function original shape---extensive. support 32bit and 64bit
    /// 实时预览数据回调函数.支持32位和64位.
    /// </summary>
    /// <param name="lRealHandle">monitor handle 预览句柄</param>
    /// <param name="dwDataType">callback data type ,only data set in dwFlag will be callback:回调数据类型
    ///                         <para>0 original data (identicla SaveRealData saveddata)</para>
    ///                         <para>1 frame data</para>
    ///                         <para>2 yuv data</para>
    ///                         <para>3 pcm audio data</para></param>
    /// <param name="pBuffer">byte array, length is dwBufSize 回调数据缓存
    ///                      <para>callback data, except type 0, other type is base on frame, one frame data per callback</para></param>
    /// <param name="dwBufSize">pBuffer's size 回调数据的缓存大小</param>
    /// <param name="param">pointer to parameter structure,based on different type 参数结构体的指针
    ///                    <para>if type is 0(original) or 2(yuv), param is 0</para>
    ///                    <para>if callback data is frame data, pointer to NET_VideoFrameParam</para>
    ///                    <para>if callback data is PCM data, pointer to NET_CBPCMDataParam</para></param>
    /// <param name="dwUser">user data,which input above</param>
    public delegate void fRealDataCallBackEx2(IntPtr lRealHandle, uint dwDataType, IntPtr pBuffer, uint dwBufSize, IntPtr param, IntPtr dwUser);
 
    /// <summary>
    /// real-time monitor data callback function original shape---extensive. support 32bit and 64bit
    /// 回放YUV数据回调函数
    /// </summary>
    /// <param name="lPlaybackHandle">monitor handle 预览句柄</param>
    /// <param name="pBuffer">byte array, length is dwBufSize 回调数据缓存
    ///                      <para>callback data, except type 0, other type is base on frame, one frame data per callback</para></param>
    /// <param name="dwBufSize">pBuffer's size 回调数据的缓存大小</param>
    /// <param name="param">pointer to parameter structure,based on different type 参数结构体的指针
    ///                    <para>if type is 0(original) or 2(yuv), param is 0</para>
    ///                    <para>if callback data is frame data, pointer to NET_VideoFrameParam</para>
    ///                    <para>if callback data is PCM data, pointer to NET_CBPCMDataParam</para></param>
    /// <param name="dwUser">user data,which input above 用户数据</param>
    /// <param name="pReserved">reserved 预留字段</param>
    public delegate void fYUVDataCallBack(IntPtr lPlaybackHandle, IntPtr pBuffer, uint dwBufSize, IntPtr param, IntPtr dwUser, IntPtr reserved);
 
    /// <summary>
    /// Real-time monitoring of the raw codestream data callback function (pBuffer memory is freed by SDK internal request)
    /// 实时预览原始码流数据回调函数(pBuffer内存由SDK内部申请释放)
    /// </summary>
    /// <param name="lRealHandle">monitor handle 预览句柄</param>
    /// <param name="pBuffer">byte array, length is dwBufSize 回调数据缓存</param>
    /// <param name="dwBufSize">pBuffer's size 回调数据的缓存大小</param>
    /// <param name="dwUser">user data,which input above</param>
    public delegate void fOriginalRealDataCallBack(IntPtr lRealHandle, IntPtr pBuffer, uint dwBufSize, IntPtr dwUser);
 
    /// <summary>
    /// Real-time monitoring of encrypted data callback functions (pBuffer memory is freed by SDK internal request)
    /// 实时预览加密数据回调函数(pBuffer内存由SDK内部申请释放)
    /// </summary>
    /// <param name="lRealHandle">monitor handle 预览句柄</param>
    /// <param name="pBuffer">byte array, length is dwBufSize 回调数据缓存</param>
    /// <param name="dwBufSize">pBuffer's size 回调数据的缓存大小</param>
    /// <param name="dwUser">user data,which input above</param>
    public delegate void fEncryptRealDataCallBackEx(IntPtr lRealHandle, IntPtr pBuffer, uint dwBufSize, IntPtr dwUser);
 
    /// <summary>
    /// monitor disconnect callback function
    /// 实时预览断线回调函数
    /// </summary>
    /// <param name="lRealHandle">monitoring handle 预览句柄</param>
    /// <param name="dwEventType">event type 断线类型</param>
    /// <param name="param">event parameter,currently not used 断线事件的数据指针</param>
    /// <param name="dwUser">user data,which input above 用户数据</param>
    public delegate void fRealPlayDisConnectCallBack(IntPtr lRealHandle, EM_REALPLAY_DISCONNECT_EVENT_TYPE dwEventType, IntPtr param, IntPtr dwUser);
 
    /// <summary>
    /// VK info callback,dwError value for example:NET_NOERROR,NET_ERROR_VK_INFO_DECRYPT_FAILED
    /// VK信息回调(pBuffer内存由SDK内部申请释放),dwError值示例比如NET_NOERROR,NET_ERROR_VK_INFO_DECRYPT_FAILED等
    /// </summary>
    /// <param name="lRealHandle">monitoring handle 预览句柄</param>
    /// <param name="pBuffer">NET_VKINFO struct, length is dwBufSize 回调数据缓存NET_VKINFO</param>
    /// <param name="dwError">error code for example:NET_NOERROR,NET_ERROR_VK_INFO_DECRYPT_FAILED 错误码</param>
    /// <param name="dwUser">user data,which input above 用户数据</param>
    /// <param name="pReserved">reserved 预留字段</param>
    public delegate void fVKInfoCallBack(IntPtr lRealHandle, IntPtr pBuffer, uint dwError, IntPtr dwUser, IntPtr pReserved);
 
    /// <summary>
    /// snapshot callback function original shape
    /// 远程抓图数据回调
    /// </summary>
    /// <param name="lLoginID">loginID,login returns value 登陆ID</param>
    /// <param name="pBuf">byte array, length is RevLen 数据缓存
    ///                    <para>pointer to data</para></param>
    /// <param name="RevLen">pBuf's size 数据缓存大小</param>
    /// <param name="EncodeType">image encode type:0:mpeg4 I frame;10:jpeg 编码类型</param>
    /// <param name="CmdSerial">operation NO.,not used in Synchronous capture conditions 序列号</param>
    /// <param name="dwUser">user data,which input above 用户数据</param>
    public delegate void fSnapRevCallBack(IntPtr lLoginID, IntPtr pBuf, uint RevLen, uint EncodeType, uint CmdSerial, IntPtr dwUser);
 
    /// <summary>
    /// vt event callback
    /// vt事件回调
    /// </summary>
    /// <param name="instId">vt instance id vt实例ID</param>
    /// <param name="ulRegisterId">register id 注册ID</param>
    /// <param name="ulSessionId">session id </param>
    /// <param name="nEvent">evnet see EM_AUDIO_CB_FLAG 事件类型</param>
    /// <param name="pDataBuf">date buffer,IntPtr.Zero now 数据缓存</param>
    /// <param name="dwBufSize">data size,0 now 数据缓存大小</param>
    /// <param name="dwUser">user data 用户数据</param>
    /// <returns>reserved 保留</returns>
    public delegate int fVtEventCallBack(IntPtr instId, IntPtr ulRegisterId, IntPtr ulSessionId, int nEvent, IntPtr pDataBuf, uint dwBufSize, IntPtr dwUser);
 
    /// <summary>
    /// play back progress's data callback function
    /// 回放进度的数据回调函数
    /// </summary>
    /// <param name="lPlayHandle">playback handle 回放句柄</param>
    /// <param name="dwTotalSize">total size of this play(kb) 总大小</param>
    /// <param name="dwDownLoadSize">played size(kb) 当前的大小
    ///                             <para>-1:playback has over</para>
    ///                             <para>-2:write file failed</para></param>
    /// <param name="dwUser">user data,which input above 用户数据</param>
    public delegate void fDownLoadPosCallBack(IntPtr lPlayHandle, uint dwTotalSize, uint dwDownLoadSize, IntPtr dwUser);
 
    /// <summary>
    /// playback data callback function
    /// 回放数据回调函数
    /// </summary>
    /// <param name="lRealHandle">playback handle 回放数据</param>
    /// <param name="dwDataType">data type 数据类型</param>
    /// <param name="pBuffer">byte array, length is dwBufSize 数据缓存</param>
    /// <param name="dwBufSize">pBuffer's size 数据缓存大小</param>
    /// <param name="dwUser">user data,which input above 用户数据</param>
    /// <returns>reserved</returns>
    public delegate int fDataCallBack(IntPtr lRealHandle, uint dwDataType, IntPtr pBuffer, uint dwBufSize, IntPtr dwUser);
 
 
    /// <summary>
    /// Prototype of playback data callback function (extended)
    /// 回放数据回调函数(扩展)
    /// </summary>
    /// <param name="lRealHandle">playback handle 回放数据</param>
    /// <param name="pDataCallBack">NET_DATA_CALL_BACK_INFO 数据内容</param>
    /// <param name="dwUser">user data,which input above 用户数据</param>
    /// <returns>reserved</returns>
    public delegate int fDataCallBackEx(IntPtr lRealHandle, IntPtr pDataCallBack, IntPtr dwUser);
 
    /// <summary>
    /// download progress callback function
    /// 下载进度回调函数
    /// </summary>
    /// <param name="lPlayHandle">download handle 下载句柄</param>
    /// <param name="dwTotalSize">total size of this play(kb) 下载总大小</param>
    /// <param name="dwDownLoadSize">played size(kb) 已下载的大小</param>
    /// <param name="index">file index 文件序列</param>
    /// <param name="recordfileinfo">record file information 录像文件信息</param>
    /// <param name="dwUser">user data,which input above 用户数据</param>
    public delegate void fTimeDownLoadPosCallBack(IntPtr lPlayHandle, uint dwTotalSize, uint dwDownLoadSize, int index, NET_RECORDFILE_INFO recordfileinfo, IntPtr dwUser);
 
    /// <summary>
    /// alarm message callback function original shape
    /// 报警回调函数
    /// </summary>
    /// <param name="lCommand">alarm type,see EM_ALARM_TYPE 报警类型</param>
    /// <param name="lLoginID">loginID:login returns value 登陆ID</param>
    /// <param name="pBuf">alarm data 报警数据缓存</param>
    /// <param name="dwBufLen">alarm data length 数据大小</param>
    /// <param name="pchDVRIP">device ip,string type 设备IP</param>
    /// <param name="nDVRPort">device port 设备端口</param>
    /// <param name="bAlarmAckFlag">true:the event is affirmable event;false:the event is not affirmable event TRUE,该事件为可以进行确认的事件;FALSE,该事件无法进行确认</param>
    /// <param name="nEventID">used to AlarmAck function,when the bAlarmAckFlag is true,this paramter is valid 用于对 CLIENT_AlarmAck 接口的入参进行赋值,当 bAlarmAckFlag 为 TRUE 时,该数据有效</param>
    /// <param name="dwUser">user data from SetDVRMessCallBack function 用户数据</param>
    /// <returns>reserved</returns>
    public delegate bool fMessCallBackEx(int lCommand, IntPtr lLoginID, IntPtr pBuf, uint dwBufLen, IntPtr pchDVRIP, int nDVRPort, bool bAlarmAckFlag, int nEventID, IntPtr dwUser);
 
    /// <summary>
    /// event data callback
    /// 事件数据回调函数
    /// </summary>
    /// <param name="lAnalyzerHandle">analyzerHandle:RealLoadPicture returns value 事件句柄</param>
    /// <param name="dwEventType">event type,see EM_EVENT_IVS_TYPE 事件类型</param>
    /// <param name="pEventInfo">event information 事件信息</param>
    /// <param name="pBuffer">picture buffer 数据缓存</param>
    /// <param name="dwBufSize">picture buffer size 数据缓存大小</param>
    /// <param name="dwUser">user data from RealLoadPicture function 用户数据</param>
    /// <param name="nSequence">means status of the same uploaded image, when it is 0, it appears first time.When it is 2, it appears last time or appears once.When it is 1, it will appear again. 序列号</param>
    /// <param name="reserved">int nState = (int) reserved means current callback data status;when it is 1, it means current data is real time and current callback data is offline;when it is 2,it means offline data send structure 保留</param>
    /// <returns>reserved 保留</returns>
    public delegate int fAnalyzerDataCallBack(IntPtr lAnalyzerHandle, uint dwEventType, IntPtr pEventInfo, IntPtr pBuffer, uint dwBufSize, IntPtr dwUser, int nSequence, IntPtr reserved);
 
    /// <summary>
    /// 统计通道数据回调函数
    /// Statistics channel data callback function
    /// </summary>
    public delegate void fVideoStatStreamCallBack(IntPtr lAttachHandle, IntPtr pBuf, int nBufLen, IntPtr dwUser);
 
    /// <summary>
    /// audio data callback
    /// 语音数据回调函数
    /// </summary>
    /// <param name="lTalkHandle">StartTalk returns value StartTalk返回值</param>
    /// <param name="pDataBuf">audio data 语音数据缓存</param>
    /// <param name="dwBufSize">audio data size 数据缓存大小</param>
    /// <param name="byAudioFlag">audio flag,for send or dec 标志用于发送语音或解码</param>
    /// <param name="dwUser">user data 用户数据</param>
    public delegate void fAudioDataCallBack(IntPtr lTalkHandle, IntPtr pDataBuf, uint dwBufSize, byte byAudioFlag, IntPtr dwUser);
 
    /// <summary>
    ///  video statistical summary callback function type
    ///  视频统计摘要信息回调函数
    /// </summary>
    /// <param name="lAttachHandle">return value of AttachVideoStatSummary AttachVideoStatSummary返回值</param>
    /// <param name="pBuf">pointer to NET_VIDEOSTAT_SUMMARY 数据缓存</param>
    /// <param name="dwBufLen">buffer length 数据缓存大小</param>
    /// <param name="dwUser">user data of AttachVideoStatSummary 用户数据</param>
    public delegate void fVideoStatSumCallBack(IntPtr lAttachHandle, IntPtr pBuf, uint dwBufLen, IntPtr dwUser);
 
    /// <summary>
    /// Transparent COM callback function original shape
    /// 透明串口回调函数
    /// </summary>
    /// <param name="lLoginID">loginID:login returns value 登陆ID</param>
    /// <param name="lTransComChannel">TransCom Channel 串口通道</param>
    /// <param name="pBuffer">pointer to TransCom data 数据缓存</param>
    /// <param name="dwBufSize">buffer length 数据缓存大小</param>
    /// <param name="dwUser">user data from CreateTransComChannel 用户数据</param>
    public delegate void fTransComCallBack(IntPtr lLoginID, IntPtr lTransComChannel, IntPtr pBuffer, uint dwBufSize, IntPtr dwUser);
 
    public delegate void fFaceFindStateCallBack(IntPtr lLoginID, IntPtr lAttachHandle, IntPtr pstStates, Int32 nStateNum, UInt32 dwUser);
 
    public delegate void fTransFileCallBack(IntPtr lHandle, int nTransType, int nState, int nSendSize, int nTotalSize, IntPtr dwUser);
 
    /// <summary>
    /// 异步搜索设备回调
    /// </summary>
    public delegate void fSearchDevicesCB(IntPtr pDevNetInfo, IntPtr pUserData);
 
    public delegate void fAttachMotionDataCB(IntPtr lAttachHandle, IntPtr pBuf, IntPtr dwUser);
 
    public delegate int fServiceCallBack(IntPtr lHandle, IntPtr pIp, ushort wPort, int lCommand, IntPtr pParam, uint dwParamLen, IntPtr dwUserData);
 
    public delegate void fCameraStateCallBack(IntPtr lLoginID, IntPtr lAttachHandle, IntPtr pBuf, int nBufLen, IntPtr dwUser);
 
    // 订阅云台元数据接口回调函数原型
    // pBuf 现阶段主要为 DH_PTZ_LOCATION_INFO 类型
    public delegate void fPTZStatusProcCallBack(IntPtr lLoginID, IntPtr lAttachHandle, IntPtr pBuf, int nBufLen, IntPtr dwUser);
 
    /// <summary>
    /// 
    /// </summary>
    /// <param name="lAttachHandle"></param>
    /// <param name="pInfo">NET_SCADA_NOTIFY_POINT_ALARM_INFO_LIST</param>
    /// <param name="nBufLen"></param>
    /// <param name="dwUser"></param>
    public delegate void fSCADAAlarmAttachInfoCallBack(IntPtr lAttachHandle, IntPtr pInfo, int nBufLen, IntPtr dwUser);
 
    /// <summary>
    /// 
    /// </summary>
    /// <param name="lLoginID"></param>
    /// <param name="lAttachHandle"></param>
    /// <param name="pInfo">NET_SCADA_NOTIFY_POINT_INFO_LIST</param>
    /// <param name="nBufLen"></param>
    /// <param name="dwUser"></param>
    public delegate void fSCADAAttachInfoCallBack(IntPtr lLoginID, IntPtr lAttachHandle, IntPtr pInfo, int nBufLen, IntPtr dwUser);
 
    public delegate void fRadiometryAttachCB(IntPtr lAttachHandle, IntPtr pBuf, int nBufLen, IntPtr dwUser);
 
    /// <summary>
    /// GPS message subscription callback
    /// </summary>
    /// <param name="lLoginID">loginID:login returns value</param>
    /// <param name="pGpsInfo">GPS info, struct is NET_GPS_LOCATION_INFO</param>
    /// <param name="dwUserData">user data from _SetSubcribeGPSCallBackEX2 function 用户数据</param>
    /// <param name="reserved">reserved</param>
    public delegate void fGPSRevEx2(IntPtr lLoginID, IntPtr pGpsInfo, IntPtr dwUserData, IntPtr reserved);
 
 
    /// <summary>
    /// 智能分析状态订阅函数原型, lAttachHandle 为 CLIENT_AttachAnalyseTaskState 函数的返回值
    /// </summary>
    /// <param name="lAttachHandle"></param>
    /// <param name="pstAnalyseTaskStateInfo">NET_CB_ANALYSE_TASK_STATE_INFO*</param>
    /// <param name="dwUser"></param>
    public delegate void fAnalyseTaskStateCallBack(IntPtr lAttachHandle, IntPtr pstAnalyseTaskStateInfo, IntPtr dwUser);
 
 
    /// <summary>
    /// 智能分析结果订阅函数原型, lAttachHandle 为 CLIENT_AttachAnalyseResultState 函数的返回值
    /// </summary>
    /// <param name="lAttachHandle"></param>
    /// <param name="pstAnalyseTaskResult">NET_CB_ANALYSE_TASK_RESULT_INFO</param>
    /// <param name="pBuf"></param>
    /// <param name="dwBufSize"></param>
    /// <param name="dwUser"></param>
    public delegate void fAnalyseTaskResultCallBack(IntPtr lAttachHandle, IntPtr pstAnalyseTaskResult, IntPtr pBuf, uint dwBufSize, IntPtr dwUser);
 
    /// <summary>
    /// Upload File callback function
    /// 异步文件上传回调函数
    /// </summary>
    /// <param name="lRealHandle">uploadfile handle 上传文件数据</param>
    /// <param name="nTotalSize">file total size 文件总数据大小</param>
    /// <param name="nSendSize">file send size 文件已上传数据大小</param>
    /// <param name="dwUser">user data,which input above 用户数据</param>
    /// <returns>reserved</returns>
    public delegate int fUploadFileCallBack(IntPtr lUploadFileHandle, int nTotalSize, int nSendSize, IntPtr dwUser);
 
    // SDK日志回调
    public delegate int fSDKLogCallBack(IntPtr lUploadFileHandle, uint nLogSize, IntPtr dwUser);
 
    // 异步搜索设备回调(pDevNetInfo内存由SDK内部申请释放)
    public delegate void fSearchDevicesCBEx(IntPtr lSearchHandle, IntPtr pDevNetInfo, IntPtr dwUser);
 
    // 升级设备程序回调函数原形
    // nTotalSize = 0, nSendSize = -1 表示升级完成
    // nTotalSize = 0, nSendSize = -2 表示升级出错
    // nTotalSize = 0, nSendSize = -3 用户没有权限升级
    // nTotalSize = 0, nSendSize = -4 升级程序版本过低
    // nTotalSize = -1, nSendSize = XX 表示升级进度
    // nTotalSize = XX, nSendSize = XX 表示升级文件发送进度
    // Upgrade device callback function original shape
    // nTotalSize = 0, nSendSize = -1 Indicates Upgrade Finish
    // nTotalSize = 0, nSendSize = -2 Indicates Upgrade Failed
    // nTotalSize = 0, nSendSize = -3 User do not have permission to upgrade
    // nTotalSize = 0, nSendSize = -4 Upgrade version  too low
    // nTotalSize = -1, nSendSize = XX Indicates Upgrade Progress
    // nTotalSize = XX, nSendSize = XX Upgrade file transmission progress
    public delegate void fUpgradeCallBack(IntPtr lLoginID, IntPtr lUpgradechannel, int nTotalSize, int nSendSize, IntPtr dwUser);
 
    // 升级设备程序回调函数原形支持G以上升级文件
    // nTotalSize = 0, nSendSize = -1 表示升级完成
    // nTotalSize = 0, nSendSize = -2 表示升级出错
    // nTotalSize = 0, nSendSize = -3 用户没有权限升级
    // nTotalSize = 0, nSendSize = -4 升级程序版本过低
    // nTotalSize = -1, nSendSize = XX 表示升级进度
    // nTotalSize = XX, nSendSize = XX 表示升级文件发送进度 
    public delegate void fUpgradeCallBackEx(IntPtr lLoginID, IntPtr lUpgradechannel, long nTotalSize, long nSendSize, IntPtr dwUser);
 
    //雷达报警点信息回调函数指针
    public delegate void fRadarAlarmPointInfoCallBack(IntPtr lLoginId, IntPtr lAttachHandle, IntPtr pBuf, uint dwBufLen, IntPtr pReserved, IntPtr dwUser);
 
    /// <summary>
    /// 自定义定时抓图订阅回调函数原型, lAttachHandle为 CLIENT_AttachCustomSnapInfo 接口的返回值
    /// </summary>
    /// <param name="lAttachHandle"></param>
    /// <param name="pstResult">NET_CB_CUSTOM_SNAP_INFO</param>
    /// <param name="pBuf"></param>
    /// <param name="dwBufSize"></param>
    /// <param name="dwUser"></param>
    public delegate void fAttachCustomSnapInfo(IntPtr lAttachHandle, IntPtr pstResult, IntPtr pBuf, uint dwBufSize, IntPtr dwUser);
 
    /// <summary>
    /// Subscribe to the Bus state callback function prototype
    /// 订阅Bus状态回调函数原型, lAttachHandle为 CLIENT_AttachBusState 接口的返回值
    /// </summary>
    public delegate void fBusStateCallBack(IntPtr lAttachHandle, int lCommand, IntPtr pBuf, uint dwBufLen, IntPtr dwUser);
 
    /// <summary>
    /// Start to upload remote file to remote device process callback,lRemoteUploadFileID is return by CLIENT_StartRemoteUploadFile
    /// 开始异步文件上传至前端的调函数原形,lRemoteUploadFileID 为 CLIENT_StartRemoteUploadFile 接口返回值
    /// </summary>
    public delegate void fRemoteUploadFileCallBack(IntPtr lRemoteUploadFileID, int nTotalSize, int nSendSize, EM_UPLOAD_PROCESS_STATUS emStatus, IntPtr dwUser);
 
    /// <summary>
    /// burning device callback function original, lAttachHandle is CLIENT_AttachBurnState return value,each 1 item, pBuf->dwSize == nBufLen
    /// 刻录设备回调函数原形,lAttachHandle是CLIENT_AttachBurnState返回值, 每次1条,pBuf->dwSize == nBufLen,pBuf类型为NET_CB_BURNSTATE
    /// </summary>
    public delegate void fAttachBurnStateCB(IntPtr lLoginID, IntPtr lAttachHandle, IntPtr pBuf, int nBufLen, IntPtr dwUser);
 
    /// <summary>
    /// burning device callback extension function original
    /// 刻录设备回调扩展函数原形,pBuf类型为NET_OUT_BURN_GET_STATE
    /// </summary>
    public delegate void fAttachBurnStateCBEx(IntPtr lLoginID, IntPtr lAttachHandle, IntPtr pBuf, int nBufLen, IntPtr dwUser);
 
    /// <summary>
    /// The prototype of the callback function of the burning device, lAttachHandle is the return value of CLIENT_AttachBackupTaskState
    /// 刻录设备回调函数原形,lAttachHandle是CLIENT_AttachBackupTaskState返回值,pBuf类型为NET_CB_BACKUPTASK_STATE
    /// </summary>
    public delegate void fAttachBackupTaskStateCB(IntPtr lAttachHandle, IntPtr pBuf, IntPtr dwUser);
 
    /// <summary>
    /// OSD callback function original shape
    /// 屏幕叠加回调函数原形
    /// </summary>
    public delegate void fDrawCallBack(IntPtr lLoginID, IntPtr lPlayHandle, IntPtr hDC, IntPtr dwUser);
 
    /// <summary>
    /// 订阅人脸库下载进度回调函数原型, lAttachHandle为 CLIENT_AttachFaceDbDownLoadResult 接口的返回值 < pstResult = NET_CB_FACEDB_DOWNLOAD_RESULT >
    /// Callback function of downloading remote face data base, lAttachHandle is returned by CLIENT_AttachFaceDbDownLoadResult < pstResult = NET_CB_FACEDB_DOWNLOAD_RESULT >
    /// </summary>
    public delegate void fFaceDbDownLoadResult(IntPtr lAttachHandle, IntPtr pstResult, IntPtr dwUser);
 
    /// <summary>
    /// 订阅大图检测小图进度回调函数原型 < pstStates = NET_CB_MULTIFACE_DETECT_STATE >
    /// the callback function of detection small image form the large image < pstStates = NET_CB_MULTIFACE_DETECT_STATE >
    /// </summary>
    public delegate void fMultiFaceDetectState(IntPtr lAttachHandle, IntPtr pstStates, IntPtr dwUser);
 
    /// <summary>
    /// 订阅大图检测小图进度回调函数原型 < pstStates = NET_CB_MULTIFACE_DETECT_STATE_EX >
    /// The callback function about attach to large image to detect small image < pstStates = NET_CB_MULTIFACE_DETECT_STATE_EX >
    /// </summary>
    public delegate void fMultiFaceDetectStateEx(IntPtr lAttachHandle, IntPtr pstStates, IntPtr dwUser);
 
    /// <summary>
    /// 回放数据原始回调函数原形
    /// pBuffer: 数据缓冲区,内存由SDK内部申请释放
    /// 无论设备传的码流是不是加密的,都回调原始码流
    /// Playback data callback function prototype
    /// pBuffer: data buffer, memory malloc or free was managed by SDK interior
    /// Whether the stream is encrypted or not,dwDataType: 0-original stream
    /// </summary>
    public delegate int fOriDataCallBack(IntPtr lRealHandle, uint dwDataType, IntPtr pBuffer, uint dwBufSize, IntPtr dwUser);
 
    /// <summary>
    /// 导入人脸库回调函数原形 pstFaceDbState : NET_IMPORT_FACEDB_STATE
    /// the callback function of import face DB, pstFaceDbState : NET_IMPORT_FACEDB_STATE
    /// </summary>
    public delegate void fImportFaceDbCallBack(IntPtr lImportFaceDbHandle, IntPtr pstFaceDbState, IntPtr dwUser);
 
    /// <summary>
    /// 导出人脸库回调函数原形 pstFaceDbState : NET_EXPORT_FACEDB_STATE
    /// the callback function of export face DB, pstFaceDbState : NET_EXPORT_FACEDB_STATE
    /// </summary>
    public delegate void fExportStateCallBack(IntPtr lExportFaceDbHandle, IntPtr pstFaceDbState, IntPtr dwUser);
 
    /// <summary>
    /// 订阅无线对码信息回调函数原形,lAttachHandle是CLIENT_AttachLowRateWPAN返回值
    /// Order wireless code info call function origin, lAttachHandle is CLIENT_AttachLowRateWPAN return valud
    /// </summary>
    public delegate void fAttachLowRateWPANCB(IntPtr lLoginID, IntPtr lAttachHandle, IntPtr stuBuf, EM_A_NET_CODEID_ERROR_TYPE emError, IntPtr dwUser);
 
    /// <summary>
    /// 物模型属性订阅回调函数原型, lAttachHandle为CLIENT_AttachThingsInfo接口的返回值
    /// things data state callback function
    /// </summary>
    /// <param name="lAttachHandle">[out] lAttachHandle 订阅句柄; [out] lAttachHandle subscription handle</param>
    /// <param name="pstResult">[out] pstResult 物模型属性订阅回调信息; [out] pstResult things data info</param>
    /// <param name="dwUserData">[out] dwUserData 用户信息; [out] dwUserData User Info</param>
    /// <returns>void; void</returns>
    public delegate void fThingsCallBack(IntPtr lAttachHandle, IntPtr pstResult, IntPtr dwUserData);
 
    /// <summary>
    /// 升级远程设备程序回调函数
    /// RemoteUpgrade callback
    /// </summary>
    public delegate void fRemoteUpgradeCallBack(IntPtr lLoginID, IntPtr lUpgradeID, EM_REMOTE_UPGRADE_CB_TYPE emState, long nParam1, long nParam2, IntPtr dwUser);
 
    /// <summary>
    /// 消息回调函数原形(pBuf内存由SDK内部申请释放)
    /// Alarm message callback function original shape
    /// </summary>
    public delegate bool fMessCallBack(int lCommand, IntPtr lLoginID, IntPtr pBuf, uint dwBufLen, IntPtr pchDVRIP, int nDVRPort, IntPtr dwUser);
 
    /// <summary>
    /// 订阅训练任务完成情况接口回调函数原型, lAttachHandle 为 CLIENT_AttachTrainTask 接口的返回值
    /// Prototype callback function for subscription training task completion interface, with lAttachHandle as CLIENT_ The return value of the AttachTrainTask interface
    /// </summary>
    /// <param name="lAttachHandle">[out] lAttachHandle 订阅句柄; [out] lAttachHandle Subscription handle</param>
    /// <param name="pstuTrainTaskInfo">[out] pstuTalkDevTaskState 操作执行状态信息; [out] pstuTalkDevTaskState Operation execution status information</param>
    /// <param name="dwUser">[out] dwUser 用户信息; [out] dwUser user information</param>
    /// <returns>void; void</returns>
    public delegate void fNotifyTrainTaskdata(IntPtr lAttachHandle, IntPtr pstuTrainTaskInfo, IntPtr dwUser);
    /// <summary>
    /// 事件详细信息回调
    /// Event Details Callback
    /// </summary>
    /// <param name="pstuNotifyIVSEventDetailInfo">[out] pstuNotifyIVSEventDetailInfo 获取事件的详细信息; [out] pstuNotifyIVSEventDetailInfo Obtain detailed information about the event</param>
    /// <param name="dwUser">[out] dwUser 用户信息; [out] dwUser user information</param>
    /// <returns>void; void</returns>
    public delegate void fNotifyIVSEventDetail(IntPtr pstuNotifyIVSEventDetailInfo, IntPtr dwUser);
 
    /// <summary>
    /// 订阅电梯内实时数据接口回调函数原型, lAttachHandle 为 CLIENT_AttachElevatorFloorCounter 接口的返回值
    /// Prototype of callback function for subscribing to real-time data interface in elevators, lAttachHandle is the return value of the CLIENT-AttachElevatorFloorCounter interface
    /// </summary>
    /// <param name="lAttachHandle">[out] lAttachHandle 订阅句柄; [out] lAttachHandle Subscription handle</param>
    /// <param name="pstuElevatorFloorCounterInfo">[out] pstuCentraProxyActionInfo 操作执行状态信息; [out] pstuCentraProxyActionInfo Operation execution status information</param>
    /// <param name="dwUser">[out] dwUser 用户信息; [out] dwUser user information</param>
    /// <returns>void; void</returns>
    public delegate void fNotifyElevatorFloorCounterdata(IntPtr lAttachHandle, IntPtr pstuElevatorFloorCounterInfo, IntPtr dwUser);
 
    /// <summary>
    /// 订阅标定状态接口回调函数原型, lAttachHandle 为 CLIENT_AttachCalibrateStatus 接口的返回值
    /// Prototype of callback function for subscription calibration status interface, lAttachHandle is the return value of CLIENT_AttachCalibrateStatus
    /// </summary>
    /// <param name="lAttachHandle">[out] lAttachHandle 订阅句柄; [out] lAttachHandle Subscription handle</param>
    /// <param name="pstuCalibrateStatusInfo">[out] pstuCalibrateStatusInfo 标定状态信息; [out] pstuCalibrateStatusInfo Calibration status information</param>
    /// <param name="dwUser">[out] dwUser 用户信息; [out] dwUser User Information</param>
    /// <returns>void; void</returns>
    public delegate void fNotifyCalibrateStatus(IntPtr lAttachHandle, IntPtr pstuCalibrateStatusInfo, IntPtr dwUser);
    
    /// <summary>
    /// callback
    /// 子连接监听服务回调函数原型
    /// Callback function of sublink server
    /// </summary>
    /// <param name="lListenServer">[out] lListenServer 子链接监听服务句柄, 由CLIENT_StartSubLinkListenServer接口返回; [out] lListenServer:Sublink server handle, it is returned by CLIENT_StartSubLinkListenServer</param>
    /// <param name="lSubBizHandle">[out] lSubBizHandle 分压业务sdk句柄, 由CLIENT_CreateSubBusinessModule接口返回; [out] lSubBizHandle: sub business module handle, it is returned by CLIENT_CreateSubBusinessModule</param>
    /// <param name="pstSubLinkCallBack">[out] pstSubLinkCallBack 子链接监听服务回调信息; [out] pstSubLinkCallBack: callback info of sublink server @retval void</param>
    /// <returns>void</returns>
    public delegate void fSubLinkServiceCallBack(IntPtr lListenServer, IntPtr lSubBizHandle, IntPtr pstSubLinkCallBack);
 
    /// <summary>
    /// 隧道业务连接断开回调
    /// Private tunnel disconnect callback function
    /// </summary>
    /// <param name="lSubBizHandle">[out] lSubBizHandle 分压模块句柄, 由CLIENT_CreateSubBusinessModule接口返回; [out] lSubBizHandle: Sub business handle, it is returned by CLIENT_CreateSubBusinessModule</param>
    /// <param name="lOperateHandle">[out] lOperateHandle 业务句柄; [out] lOperateHandle: Opreate handle</param>
    /// <param name="pstDisConnectInfo">[out] pstDisConnectInfo 断线回调数据; [out] pstDisConnectInfo: Disconnect callback info of private tunnel</param>
    /// <returns>void; void</returns>
    public delegate void fTransmitDisConnectCallBack(IntPtr lSubBizHandle, IntPtr lOperateHandle, IntPtr pstDisConnectInfo);
 
    /// <summary>
    /// 分压业务连接断线回调
    /// Call back function of subbiz disconnect
    /// </summary>
    /// <param name="lSubBizHandle">[out] lSubBizHandle 分压业务sdk句柄, 由CLIENT_CreateSubBusinessModule接口返回; [out] lSubBizHandle: Sub business module handle, it is retuened by CLIENT_CreateSubBusinessModule</param>
    /// <param name="lOperateHandle">[out] lOperateHandle 业务句柄; [out] lOperateHandle: Operate handle</param>
    /// <param name="pstDisConnectInfo">[out] pstDisConnectInfo 断线回调数据; [out] pstDisConnectInfo: Call back info of disconnect @retval void</param>
    /// <returns>void</returns>
    public delegate void fSubBizDisConnectCallBack(IntPtr lSubBizHandle, IntPtr lOperateHandle, IntPtr pstDisConnectInfo);
 
    /// <summary>
    /// 订阅485实时数据接口回调函数原型, lAttachHandle 为 CLIENT_AttachIotboxComm 接口的返回值
    /// Subscribe to 485 real-time data interface callback Function prototype, lAttachHandle is the return value of CLIENT_AttachIotboxComm
    /// </summary>
    /// <param name="lAttachHandle">[out] lAttachHandle 订阅句柄; [out] lAttachRecalHandle Subscription handle</param>
    /// <param name="pstuIotboxComm">[out] pstuIotboxComm 订阅的485实时数据; [out] pstuIotboxComm Subscribed 485 real-time data</param>
    /// <param name="dwUser">[out] dwUser 用户信息; [out] dwUser user information</param>
    /// <returns>void; void</returns>
    public delegate void fNotifyIotboxRealdata(IntPtr lAttachHandle, IntPtr pstuIotboxComm, IntPtr dwUser);
    
    /// <summary>
    /// 订阅云台可视域回调函数原型
    /// Subscribe to yuntai horizon callback function prototype
    /// </summary>
    public delegate void fViewRangeStateCallBack(IntPtr lLoginID, IntPtr lAttachHandle, IntPtr pBuf, int nBufLen, IntPtr dwUser);
 
    /// <summary>
    /// 立体行为-视频统计信息回调函数原形,lAttachHandle 是 CLIENT_AttachVideoStatistics返回值
    /// StereoBehavior-Video statistics data callback function,lAttachHandle is the return value of CLIENT_AttachVideoStatistics
    /// </summary>
    public delegate void fVideoStatisticsInfoCallBack(IntPtr lAttachHandle, EM_VS_TYPE emType, IntPtr pBuf, uint dwBufLen, IntPtr dwUser);
 
    /// <summary>
    /// TTLV异步搜索设备回调(pDevNetInfo内存由SDK内部申请释放)
    /// TTLV Asynchronism search device call
    /// </summary>
    public delegate void fSearchDevicesCBTTLV(IntPtr lSearchHandle, IntPtr pDevNetInfo, IntPtr pUserData);
 
    #endregion //<< delegate >>
}