@@ -1012,170 +1012,175 @@ public class LeapC
1012
1012
private LeapC ( ) { }
1013
1013
public static int DistortionSize = 64 ;
1014
1014
1015
- [ DllImport ( "LeapC" , EntryPoint = "LeapSetTrackingMode" ) ]
1015
+ #if UNITY_IOS && ! UNITY_EDITOR
1016
+ private const string DllName = "__Internal" ;
1017
+ #else
1018
+ private const string DllName = "LeapC" ;
1019
+ #endif
1020
+ [ DllImport ( DllName , EntryPoint = "LeapSetTrackingMode" ) ]
1016
1021
public static extern eLeapRS SetTrackingMode ( IntPtr hConnection , eLeapTrackingMode mode ) ;
1017
1022
1018
- [ DllImport ( "LeapC" , EntryPoint = "LeapSetTrackingModeEx" ) ]
1023
+ [ DllImport ( DllName , EntryPoint = "LeapSetTrackingModeEx" ) ]
1019
1024
public static extern eLeapRS SetTrackingModeEx ( IntPtr hConnection , IntPtr hDevice , eLeapTrackingMode mode ) ;
1020
1025
1021
- [ DllImport ( "LeapC" , EntryPoint = "LeapGetTrackingMode" ) ]
1026
+ [ DllImport ( DllName , EntryPoint = "LeapGetTrackingMode" ) ]
1022
1027
public static extern eLeapRS LeapGetTrackingMode ( IntPtr hConnection ) ;
1023
1028
1024
- [ DllImport ( "LeapC" , EntryPoint = "LeapGetTrackingModeEx" ) ]
1029
+ [ DllImport ( DllName , EntryPoint = "LeapGetTrackingModeEx" ) ]
1025
1030
public static extern eLeapRS LeapGetTrackingModeEx ( IntPtr hConnection , IntPtr hDevice ) ;
1026
1031
1027
- [ DllImport ( "LeapC" , EntryPoint = "LeapGetNow" ) ]
1032
+ [ DllImport ( DllName , EntryPoint = "LeapGetNow" ) ]
1028
1033
public static extern long GetNow ( ) ;
1029
1034
1030
- [ DllImport ( "LeapC" , EntryPoint = "LeapCreateClockRebaser" ) ]
1035
+ [ DllImport ( DllName , EntryPoint = "LeapCreateClockRebaser" ) ]
1031
1036
public static extern eLeapRS CreateClockRebaser ( out IntPtr phClockRebaser ) ;
1032
1037
1033
- [ DllImport ( "LeapC" , EntryPoint = "LeapDestroyClockRebaser" ) ]
1038
+ [ DllImport ( DllName , EntryPoint = "LeapDestroyClockRebaser" ) ]
1034
1039
public static extern eLeapRS DestroyClockRebaser ( IntPtr hClockRebaser ) ;
1035
1040
1036
- [ DllImport ( "LeapC" , EntryPoint = "LeapUpdateRebase" ) ]
1041
+ [ DllImport ( DllName , EntryPoint = "LeapUpdateRebase" ) ]
1037
1042
public static extern eLeapRS UpdateRebase ( IntPtr hClockRebaser , Int64 userClock , Int64 leapClock ) ;
1038
1043
1039
- [ DllImport ( "LeapC" , EntryPoint = "LeapRebaseClock" ) ]
1044
+ [ DllImport ( DllName , EntryPoint = "LeapRebaseClock" ) ]
1040
1045
public static extern eLeapRS RebaseClock ( IntPtr hClockRebaser , Int64 userClock , out Int64 leapClock ) ;
1041
1046
1042
- [ DllImport ( "LeapC" , EntryPoint = "LeapCreateConnection" ) ]
1047
+ [ DllImport ( DllName , EntryPoint = "LeapCreateConnection" ) ]
1043
1048
public static extern eLeapRS CreateConnection ( ref LEAP_CONNECTION_CONFIG pConfig , out IntPtr pConnection ) ;
1044
1049
1045
1050
//Overrides to allow config to be set to null to use default config
1046
- [ DllImport ( "LeapC" , EntryPoint = "LeapCreateConnection" ) ]
1051
+ [ DllImport ( DllName , EntryPoint = "LeapCreateConnection" ) ]
1047
1052
private static extern eLeapRS CreateConnection ( IntPtr nulled , out IntPtr pConnection ) ;
1048
1053
public static eLeapRS CreateConnection ( out IntPtr pConnection )
1049
1054
{
1050
1055
return CreateConnection ( IntPtr . Zero , out pConnection ) ;
1051
1056
}
1052
1057
1053
- [ DllImport ( "LeapC" , EntryPoint = "LeapGetConnectionInfo" ) ]
1058
+ [ DllImport ( DllName , EntryPoint = "LeapGetConnectionInfo" ) ]
1054
1059
public static extern eLeapRS GetConnectionInfo ( IntPtr hConnection , ref LEAP_CONNECTION_INFO pInfo ) ;
1055
1060
1056
- [ DllImport ( "LeapC" , EntryPoint = "LeapOpenConnection" ) ]
1061
+ [ DllImport ( DllName , EntryPoint = "LeapOpenConnection" ) ]
1057
1062
public static extern eLeapRS OpenConnection ( IntPtr hConnection ) ;
1058
1063
1059
- [ DllImport ( "LeapC" , EntryPoint = "LeapSetConnectionMetadata" ) ]
1064
+ [ DllImport ( DllName , EntryPoint = "LeapSetConnectionMetadata" ) ]
1060
1065
public static extern eLeapRS SetConnectionMetadata ( IntPtr hConnection , string metadata , UIntPtr len ) ;
1061
1066
1062
- [ DllImport ( "LeapC" , EntryPoint = "LeapSetAllocator" ) ]
1067
+ [ DllImport ( DllName , EntryPoint = "LeapSetAllocator" ) ]
1063
1068
public static extern eLeapRS SetAllocator ( IntPtr hConnection , ref LEAP_ALLOCATOR pAllocator ) ;
1064
1069
1065
- [ DllImport ( "LeapC" , EntryPoint = "LeapGetDeviceList" ) ]
1070
+ [ DllImport ( DllName , EntryPoint = "LeapGetDeviceList" ) ]
1066
1071
public static extern eLeapRS GetDeviceList ( IntPtr hConnection , [ In , Out ] LEAP_DEVICE_REF [ ] pArray , out UInt32 pnArray ) ;
1067
1072
1068
- [ DllImport ( "LeapC" , EntryPoint = "LeapGetDeviceList" ) ]
1073
+ [ DllImport ( DllName , EntryPoint = "LeapGetDeviceList" ) ]
1069
1074
private static extern eLeapRS GetDeviceList ( IntPtr hConnection , [ In , Out ] IntPtr pArray , out UInt32 pnArray ) ;
1070
1075
//Override to allow pArray argument to be set to null (IntPtr.Zero) in order to get the device count
1071
1076
public static eLeapRS GetDeviceCount ( IntPtr hConnection , out UInt32 deviceCount )
1072
1077
{
1073
1078
return GetDeviceList ( hConnection , IntPtr . Zero , out deviceCount ) ;
1074
1079
}
1075
1080
1076
- [ DllImport ( "LeapC" , EntryPoint = "LeapOpenDevice" ) ]
1081
+ [ DllImport ( DllName , EntryPoint = "LeapOpenDevice" ) ]
1077
1082
public static extern eLeapRS OpenDevice ( LEAP_DEVICE_REF rDevice , out IntPtr pDevice ) ;
1078
1083
1079
- [ DllImport ( "LeapC" , EntryPoint = "LeapSetPrimaryDevice" ) ]
1084
+ [ DllImport ( DllName , EntryPoint = "LeapSetPrimaryDevice" ) ]
1080
1085
public static extern eLeapRS LeapSetPrimaryDevice ( IntPtr hConnection , IntPtr hDevice , bool unsubscribeOthers ) ;
1081
1086
1082
- [ DllImport ( "LeapC" , EntryPoint = "LeapSubscribeEvents" ) ]
1087
+ [ DllImport ( DllName , EntryPoint = "LeapSubscribeEvents" ) ]
1083
1088
public static extern eLeapRS LeapSubscribeEvents ( IntPtr hConnection , IntPtr hDevice ) ;
1084
1089
1085
- [ DllImport ( "LeapC" , EntryPoint = "LeapUnsubscribeEvents" ) ]
1090
+ [ DllImport ( DllName , EntryPoint = "LeapUnsubscribeEvents" ) ]
1086
1091
public static extern eLeapRS LeapUnsubscribeEvents ( IntPtr hConnection , IntPtr hDevice ) ;
1087
1092
1088
- [ DllImport ( "LeapC" , EntryPoint = "LeapGetDeviceInfo" , CharSet = CharSet . Ansi ) ]
1093
+ [ DllImport ( DllName , EntryPoint = "LeapGetDeviceInfo" , CharSet = CharSet . Ansi ) ]
1089
1094
public static extern eLeapRS GetDeviceInfo ( IntPtr hDevice , ref LEAP_DEVICE_INFO info ) ;
1090
1095
1091
- [ DllImport ( "LeapC" , EntryPoint = "LeapDeviceTransformAvailable" ) ]
1096
+ [ DllImport ( DllName , EntryPoint = "LeapDeviceTransformAvailable" ) ]
1092
1097
public static extern bool GetDeviceTransformAvailable ( IntPtr hDevice ) ;
1093
1098
1094
- [ DllImport ( "LeapC" , EntryPoint = "LeapGetDeviceTransform" ) ]
1099
+ [ DllImport ( DllName , EntryPoint = "LeapGetDeviceTransform" ) ]
1095
1100
public static extern eLeapRS GetDeviceTransform ( IntPtr hDevice , [ MarshalAs ( UnmanagedType . LPArray , SizeConst = 16 ) ] float [ ] transform ) ;
1096
1101
1097
- [ DllImport ( "LeapC" , EntryPoint = "LeapSetPolicyFlags" ) ]
1102
+ [ DllImport ( DllName , EntryPoint = "LeapSetPolicyFlags" ) ]
1098
1103
public static extern eLeapRS SetPolicyFlags ( IntPtr hConnection , UInt64 set , UInt64 clear ) ;
1099
1104
1100
- [ DllImport ( "LeapC" , EntryPoint = "LeapSetPolicyFlagsEx" ) ]
1105
+ [ DllImport ( DllName , EntryPoint = "LeapSetPolicyFlagsEx" ) ]
1101
1106
public static extern eLeapRS SetPolicyFlagsEx ( IntPtr hConnection , IntPtr hDevice , UInt64 set , UInt64 clear ) ;
1102
1107
1103
- [ DllImport ( "LeapC" , EntryPoint = "LeapSetPause" ) ]
1108
+ [ DllImport ( DllName , EntryPoint = "LeapSetPause" ) ]
1104
1109
public static extern eLeapRS LeapSetPause ( IntPtr hConnection , bool pause ) ;
1105
1110
1106
- [ DllImport ( "LeapC" , EntryPoint = "LeapSetDeviceFlags" ) ]
1107
- public static extern eLeapRS SetDeviceFlags ( IntPtr hDevice , UInt64 set , UInt64 clear , out UInt64 prior ) ;
1111
+ // [DllImport(DllName , EntryPoint = "LeapSetDeviceFlags")]
1112
+ // public static extern eLeapRS SetDeviceFlags(IntPtr hDevice, UInt64 set, UInt64 clear, out UInt64 prior);
1108
1113
1109
- [ DllImport ( "LeapC" , EntryPoint = "LeapPollConnection" ) ]
1114
+ [ DllImport ( DllName , EntryPoint = "LeapPollConnection" ) ]
1110
1115
public static extern eLeapRS PollConnection ( IntPtr hConnection , UInt32 timeout , ref LEAP_CONNECTION_MESSAGE msg ) ;
1111
1116
1112
- [ DllImport ( "LeapC" , EntryPoint = "LeapGetFrameSize" ) ]
1117
+ [ DllImport ( DllName , EntryPoint = "LeapGetFrameSize" ) ]
1113
1118
public static extern eLeapRS GetFrameSize ( IntPtr hConnection , Int64 timestamp , out UInt64 pncbEvent ) ;
1114
1119
1115
- [ DllImport ( "LeapC" , EntryPoint = "LeapGetFrameSizeEx" ) ]
1120
+ [ DllImport ( DllName , EntryPoint = "LeapGetFrameSizeEx" ) ]
1116
1121
public static extern eLeapRS GetFrameSizeEx ( IntPtr hConnection , IntPtr hDevice , Int64 timestamp , out UInt64 pncbEvent ) ;
1117
1122
1118
- [ DllImport ( "LeapC" , EntryPoint = "LeapInterpolateFrame" ) ]
1123
+ [ DllImport ( DllName , EntryPoint = "LeapInterpolateFrame" ) ]
1119
1124
public static extern eLeapRS InterpolateFrame ( IntPtr hConnection , Int64 timestamp , IntPtr pEvent , UInt64 ncbEvent ) ;
1120
1125
1121
- [ DllImport ( "LeapC" , EntryPoint = "LeapInterpolateFrameEx" ) ]
1126
+ [ DllImport ( DllName , EntryPoint = "LeapInterpolateFrameEx" ) ]
1122
1127
public static extern eLeapRS InterpolateFrameEx ( IntPtr hConnection , IntPtr hDevice , Int64 timestamp , IntPtr pEvent , UInt64 ncbEvent ) ;
1123
1128
1124
- [ DllImport ( "LeapC" , EntryPoint = "LeapInterpolateFrameFromTime" ) ]
1129
+ [ DllImport ( DllName , EntryPoint = "LeapInterpolateFrameFromTime" ) ]
1125
1130
public static extern eLeapRS InterpolateFrameFromTime ( IntPtr hConnection , Int64 timestamp , Int64 sourceTimestamp , IntPtr pEvent , UInt64 ncbEvent ) ;
1126
1131
1127
- [ DllImport ( "LeapC" , EntryPoint = "LeapInterpolateFrameFromTimeEx" ) ]
1132
+ [ DllImport ( DllName , EntryPoint = "LeapInterpolateFrameFromTimeEx" ) ]
1128
1133
public static extern eLeapRS InterpolateFrameFromTimeEx ( IntPtr hConnection , IntPtr hDevice , Int64 timestamp , Int64 sourceTimestamp , IntPtr pEvent , UInt64 ncbEvent ) ;
1129
1134
1130
- [ DllImport ( "LeapC" , EntryPoint = "LeapInterpolateHeadPose" ) ]
1135
+ [ DllImport ( DllName , EntryPoint = "LeapInterpolateHeadPose" ) ]
1131
1136
public static extern eLeapRS InterpolateHeadPose ( IntPtr hConnection , Int64 timestamp , ref LEAP_HEAD_POSE_EVENT headPose ) ;
1132
1137
1133
- [ DllImport ( "LeapC" , EntryPoint = "LeapInterpolateEyePositions" ) ]
1138
+ [ DllImport ( DllName , EntryPoint = "LeapInterpolateEyePositions" ) ]
1134
1139
public static extern eLeapRS InterpolateEyePositions ( IntPtr hConnection , Int64 timestamp , ref LEAP_EYE_EVENT eyes ) ;
1135
1140
1136
- [ DllImport ( "LeapC" , EntryPoint = "LeapPixelToRectilinear" ) ]
1141
+ [ DllImport ( DllName , EntryPoint = "LeapPixelToRectilinear" ) ]
1137
1142
public static extern LEAP_VECTOR LeapPixelToRectilinear ( IntPtr hConnection ,
1138
1143
eLeapPerspectiveType camera , LEAP_VECTOR pixel ) ;
1139
1144
1140
- [ Obsolete ( "Use of calibrationType is not valid. Use alternative LeapPixelToRectilinearEx method." ) , DllImport ( "LeapC" , EntryPoint = "LeapPixelToRectilinearEx" ) ]
1145
+ [ Obsolete ( "Use of calibrationType is not valid. Use alternative LeapPixelToRectilinearEx method." ) , DllImport ( DllName , EntryPoint = "LeapPixelToRectilinearEx" ) ]
1141
1146
public static extern LEAP_VECTOR LeapPixelToRectilinearEx ( IntPtr hConnection ,
1142
1147
IntPtr hDevice , eLeapPerspectiveType camera , eLeapCameraCalibrationType calibrationType , LEAP_VECTOR pixel ) ;
1143
1148
1144
- [ DllImport ( "LeapC" , EntryPoint = "LeapPixelToRectilinearEx" ) ]
1149
+ [ DllImport ( DllName , EntryPoint = "LeapPixelToRectilinearEx" ) ]
1145
1150
public static extern LEAP_VECTOR LeapPixelToRectilinearEx ( IntPtr hConnection ,
1146
1151
IntPtr hDevice , eLeapPerspectiveType camera , LEAP_VECTOR pixel ) ;
1147
1152
1148
- [ DllImport ( "LeapC" , EntryPoint = "LeapRectilinearToPixel" ) ]
1153
+ [ DllImport ( DllName , EntryPoint = "LeapRectilinearToPixel" ) ]
1149
1154
public static extern LEAP_VECTOR LeapRectilinearToPixel ( IntPtr hConnection ,
1150
1155
eLeapPerspectiveType camera , LEAP_VECTOR rectilinear ) ;
1151
1156
1152
- [ DllImport ( "LeapC" , EntryPoint = "LeapRectilinearToPixelEx" ) ]
1157
+ [ DllImport ( DllName , EntryPoint = "LeapRectilinearToPixelEx" ) ]
1153
1158
public static extern LEAP_VECTOR LeapRectilinearToPixelEx ( IntPtr hConnection ,
1154
1159
IntPtr hDevice , eLeapPerspectiveType camera , LEAP_VECTOR rectilinear ) ;
1155
1160
1156
- [ DllImport ( "LeapC" , EntryPoint = "LeapExtrinsicCameraMatrix" ) ]
1161
+ [ DllImport ( DllName , EntryPoint = "LeapExtrinsicCameraMatrix" ) ]
1157
1162
public static extern eLeapRS LeapExtrinsicCameraMatrix ( IntPtr hConnection , eLeapPerspectiveType camera ,
1158
1163
[ MarshalAs ( UnmanagedType . LPArray , SizeConst = 16 ) ] float [ ] extrinsicMatrix ) ;
1159
1164
1160
- [ DllImport ( "LeapC" , EntryPoint = "LeapExtrinsicCameraMatrixEx" ) ]
1165
+ [ DllImport ( DllName , EntryPoint = "LeapExtrinsicCameraMatrixEx" ) ]
1161
1166
public static extern eLeapRS LeapExtrinsicCameraMatrixEx ( IntPtr hConnection , IntPtr hDevice , eLeapPerspectiveType camera ,
1162
1167
[ MarshalAs ( UnmanagedType . LPArray , SizeConst = 16 ) ] float [ ] extrinsicMatrix ) ;
1163
1168
1164
- [ DllImport ( "LeapC" , EntryPoint = "LeapCloseDevice" ) ]
1169
+ [ DllImport ( DllName , EntryPoint = "LeapCloseDevice" ) ]
1165
1170
public static extern void CloseDevice ( IntPtr pDevice ) ;
1166
1171
1167
- [ DllImport ( "LeapC" , EntryPoint = "LeapCloseConnection" ) ]
1172
+ [ DllImport ( DllName , EntryPoint = "LeapCloseConnection" ) ]
1168
1173
public static extern eLeapRS CloseConnection ( IntPtr hConnection ) ;
1169
1174
1170
- [ DllImport ( "LeapC" , EntryPoint = "LeapDestroyConnection" ) ]
1175
+ [ DllImport ( DllName , EntryPoint = "LeapDestroyConnection" ) ]
1171
1176
public static extern void DestroyConnection ( IntPtr connection ) ;
1172
1177
1173
1178
[ Obsolete ( "Config is not used in Ultraleap's Tracking Service 5.X+. This will be removed in the next Major release" ) ]
1174
- [ DllImport ( "LeapC" , EntryPoint = "LeapSaveConfigValue" ) ]
1179
+ [ DllImport ( DllName , EntryPoint = "LeapSaveConfigValue" ) ]
1175
1180
private static extern eLeapRS SaveConfigValue ( IntPtr hConnection , string key , IntPtr value , out UInt32 requestId ) ;
1176
1181
1177
1182
[ Obsolete ( "Config is not used in Ultraleap's Tracking Service 5.X+. This will be removed in the next Major release" ) ]
1178
- [ DllImport ( "LeapC" , EntryPoint = "LeapRequestConfigValue" ) ]
1183
+ [ DllImport ( DllName , EntryPoint = "LeapRequestConfigValue" ) ]
1179
1184
public static extern eLeapRS RequestConfigValue ( IntPtr hConnection , string name , out UInt32 request_id ) ;
1180
1185
1181
1186
[ Obsolete ( "Config is not used in Ultraleap's Tracking Service 5.X+. This will be removed in the next Major release" ) ]
@@ -1245,10 +1250,10 @@ private static eLeapRS SaveConfigWithRefType(IntPtr hConnection, string key, LEA
1245
1250
return callResult ;
1246
1251
}
1247
1252
1248
- [ DllImport ( "LeapC" , EntryPoint = "LeapGetPointMappingSize" ) ]
1253
+ [ DllImport ( DllName , EntryPoint = "LeapGetPointMappingSize" ) ]
1249
1254
public static extern eLeapRS GetPointMappingSize ( IntPtr hConnection , ref ulong pSize ) ;
1250
1255
1251
- [ DllImport ( "LeapC" , EntryPoint = "LeapGetPointMapping" ) ]
1256
+ [ DllImport ( DllName , EntryPoint = "LeapGetPointMapping" ) ]
1252
1257
public static extern eLeapRS GetPointMapping ( IntPtr hConnection , IntPtr pointMapping , ref ulong pSize ) ;
1253
1258
1254
1259
[ StructLayout ( LayoutKind . Sequential , Pack = 1 , CharSet = CharSet . Ansi ) ]
@@ -1262,37 +1267,37 @@ public struct LEAP_RECORDING_STATUS
1262
1267
public UInt32 mode ;
1263
1268
}
1264
1269
1265
- [ DllImport ( "LeapC" , EntryPoint = "LeapRecordingOpen" ) ]
1270
+ [ DllImport ( DllName , EntryPoint = "LeapRecordingOpen" ) ]
1266
1271
public static extern eLeapRS RecordingOpen ( ref IntPtr ppRecording , string userPath , LEAP_RECORDING_PARAMETERS parameters ) ;
1267
1272
1268
- [ DllImport ( "LeapC" , EntryPoint = "LeapRecordingClose" ) ]
1273
+ [ DllImport ( DllName , EntryPoint = "LeapRecordingClose" ) ]
1269
1274
public static extern eLeapRS RecordingClose ( ref IntPtr ppRecording ) ;
1270
1275
1271
- [ DllImport ( "LeapC" , EntryPoint = "LeapRecordingGetStatus" ) ]
1276
+ [ DllImport ( DllName , EntryPoint = "LeapRecordingGetStatus" ) ]
1272
1277
public static extern eLeapRS LeapRecordingGetStatus ( IntPtr pRecording , ref LEAP_RECORDING_STATUS status ) ;
1273
1278
1274
- [ DllImport ( "LeapC" , EntryPoint = "LeapRecordingReadSize" ) ]
1279
+ [ DllImport ( DllName , EntryPoint = "LeapRecordingReadSize" ) ]
1275
1280
public static extern eLeapRS RecordingReadSize ( IntPtr pRecording , ref UInt64 pncbEvent ) ;
1276
1281
1277
- [ DllImport ( "LeapC" , EntryPoint = "LeapRecordingRead" ) ]
1282
+ [ DllImport ( DllName , EntryPoint = "LeapRecordingRead" ) ]
1278
1283
public static extern eLeapRS RecordingRead ( IntPtr pRecording , ref LEAP_TRACKING_EVENT pEvent , UInt64 ncbEvent ) ;
1279
1284
1280
- [ DllImport ( "LeapC" , EntryPoint = "LeapRecordingWrite" ) ]
1285
+ [ DllImport ( DllName , EntryPoint = "LeapRecordingWrite" ) ]
1281
1286
public static extern eLeapRS RecordingWrite ( IntPtr pRecording , ref LEAP_TRACKING_EVENT pEvent , ref UInt64 pnBytesWritten ) ;
1282
1287
1283
- [ DllImport ( "LeapC" , EntryPoint = "LeapTelemetryProfiling" ) ]
1288
+ [ DllImport ( DllName , EntryPoint = "LeapTelemetryProfiling" ) ]
1284
1289
public static extern eLeapRS LeapTelemetryProfiling ( IntPtr hConnection , ref LEAP_TELEMETRY_DATA telemetryData ) ;
1285
1290
1286
- [ DllImport ( "LeapC" , EntryPoint = "LeapTelemetryGetNow" ) ]
1291
+ [ DllImport ( DllName , EntryPoint = "LeapTelemetryGetNow" ) ]
1287
1292
public static extern UInt64 TelemetryGetNow ( ) ;
1288
1293
1289
- [ DllImport ( "LeapC" , EntryPoint = "LeapGetVersion" ) ]
1294
+ [ DllImport ( DllName , EntryPoint = "LeapGetVersion" ) ]
1290
1295
public static extern eLeapRS GetVersion ( IntPtr hConnection , eLeapVersionPart versionPart , ref LEAP_VERSION pVersion ) ;
1291
1296
1292
- [ DllImport ( "LeapC" , EntryPoint = "LeapGetServerStatus" ) ]
1297
+ [ DllImport ( DllName , EntryPoint = "LeapGetServerStatus" ) ]
1293
1298
public static extern eLeapRS GetServerStatus ( UInt32 timeout , ref IntPtr status ) ;
1294
1299
1295
- [ DllImport ( "LeapC" , EntryPoint = "LeapReleaseServerStatus" ) ]
1300
+ [ DllImport ( DllName , EntryPoint = "LeapReleaseServerStatus" ) ]
1296
1301
public static extern eLeapRS ReleaseServerStatus ( ref LEAP_SERVER_STATUS status ) ;
1297
1302
1298
1303
@@ -1313,17 +1318,18 @@ public struct LEAP_SERVER_STATUS_DEVICE
1313
1318
1314
1319
public static eLeapRS SetDeviceHints ( IntPtr hConnection , IntPtr hDevice , string [ ] hints )
1315
1320
{
1316
- // Ensure the final element of the array is null terminated.
1317
- if ( hints . Length == 0 || hints [ ^ 1 ] != null )
1318
- {
1319
- Array . Resize ( ref hints , hints . Length + 1 ) ;
1320
- hints [ ^ 1 ] = null ;
1321
- }
1322
-
1323
- return SetDeviceHintsInternal ( hConnection , hDevice , hints ) ;
1321
+ return eLeapRS . eLeapRS_Success ;
1322
+ // // Ensure the final element of the array is null terminated.
1323
+ // if (hints.Length == 0 || hints[^1] != null)
1324
+ // {
1325
+ // Array.Resize(ref hints, hints.Length + 1);
1326
+ // hints[^1] = null;
1327
+ // }
1328
+ //
1329
+ // return SetDeviceHintsInternal(hConnection, hDevice, hints);
1324
1330
}
1325
1331
1326
- [ DllImport ( "LeapC" , EntryPoint = "LeapSetDeviceHints" ) ]
1327
- private static extern eLeapRS SetDeviceHintsInternal ( IntPtr hConnection , IntPtr hDevice , string [ ] hints ) ;
1332
+ // [DllImport(DllName , EntryPoint = "LeapSetDeviceHints")]
1333
+ // private static extern eLeapRS SetDeviceHintsInternal(IntPtr hConnection, IntPtr hDevice, string[] hints);
1328
1334
}
1329
1335
}
0 commit comments