@@ -362,12 +362,12 @@ public enum SurfaceTypes
362362 /// before any other DLL function.
363363 /// </summary>
364364 /// <returns>Zero if fails, one if success</returns>
365- [ DllImport ( "SpatialUnderstanding" ) ]
365+ [ DllImport ( "SpatialUnderstanding" , CallingConvention = CallingConvention . Cdecl ) ]
366366 public static extern int SpatialUnderstanding_Init ( ) ;
367367 /// <summary>
368368 /// Terminate the spatial understanding DLL.
369369 /// </summary>
370- [ DllImport ( "SpatialUnderstanding" ) ]
370+ [ DllImport ( "SpatialUnderstanding" , CallingConvention = CallingConvention . Cdecl ) ]
371371 public static extern void SpatialUnderstanding_Term ( ) ;
372372
373373 /// <summary>
@@ -384,7 +384,7 @@ public enum SurfaceTypes
384384 /// <param name="camUp_Z">The user's camera/view unit up vector, z value</param>
385385 /// <param name="searchDst">Suggested search distance for playspace center</param>
386386 /// <param name="optimalSize">Optimal room size. Used to determined the playspace size</param>
387- [ DllImport ( "SpatialUnderstanding" ) ]
387+ [ DllImport ( "SpatialUnderstanding" , CallingConvention = CallingConvention . Cdecl ) ]
388388 public static extern void GeneratePlayspace_InitScan (
389389 [ In ] float camPos_X , [ In ] float camPos_Y , [ In ] float camPos_Z ,
390390 [ In ] float camFwd_X , [ In ] float camFwd_Y , [ In ] float camFwd_Z ,
@@ -407,7 +407,7 @@ public static extern void GeneratePlayspace_InitScan(
407407 /// <param name="camUp_Z">The user's camera/view unit up vector, z value</param>
408408 /// <param name="deltaTime">Time since last update</param>
409409 /// <returns>One if scanning has been finalized, zero if more updates are required.</returns>
410- [ DllImport ( "SpatialUnderstanding" ) ]
410+ [ DllImport ( "SpatialUnderstanding" , CallingConvention = CallingConvention . Cdecl ) ]
411411 public static extern int GeneratePlayspace_UpdateScan (
412412 [ In ] int meshCount , [ In ] IntPtr meshes ,
413413 [ In ] float camPos_X , [ In ] float camPos_Y , [ In ] float camPos_Z ,
@@ -420,7 +420,7 @@ public static extern int GeneratePlayspace_UpdateScan(
420420 /// finalized. This should be called once the user is happy with the currently
421421 /// scanned in playspace.
422422 /// </summary>
423- [ DllImport ( "SpatialUnderstanding" ) ]
423+ [ DllImport ( "SpatialUnderstanding" , CallingConvention = CallingConvention . Cdecl ) ]
424424 public static extern void GeneratePlayspace_RequestFinish ( ) ;
425425
426426 /// <summary>
@@ -432,7 +432,7 @@ public static extern int GeneratePlayspace_UpdateScan(
432432 /// <param name="vertexCount">Filled in with the number of vertices to be returned in the subsequent extract call</param>
433433 /// <param name="indexCount">Filled in with the number of indices to be returned in the subsequent extract call</param>
434434 /// <returns>Zero if fails, one if success</returns>
435- [ DllImport ( "SpatialUnderstanding" ) ]
435+ [ DllImport ( "SpatialUnderstanding" , CallingConvention = CallingConvention . Cdecl ) ]
436436 public static extern int GeneratePlayspace_ExtractMesh_Setup (
437437 [ Out ] out int vertexCount ,
438438 [ Out ] out int indexCount ) ;
@@ -447,7 +447,7 @@ public static extern int GeneratePlayspace_ExtractMesh_Setup(
447447 /// <param name="bufferIndexCount">Size of indices, in number of elements</param>
448448 /// <param name="indices">Array to receive the mesh indices</param>
449449 /// <returns>Zero if fails, one if success</returns>
450- [ DllImport ( "SpatialUnderstanding" ) ]
450+ [ DllImport ( "SpatialUnderstanding" , CallingConvention = CallingConvention . Cdecl ) ]
451451 public static extern int GeneratePlayspace_ExtractMesh_Extract (
452452 [ In ] int bufferVertexCount ,
453453 [ In ] IntPtr verticesPos , // (vertexCount) DirectX::XMFLOAT3*
@@ -460,7 +460,7 @@ public static extern int GeneratePlayspace_ExtractMesh_Extract(
460460 /// </summary>
461461 /// <param name="playspaceStats">playspace stats structure to receive the statistics data</param>
462462 /// <returns>Zero if fails, one if success</returns>
463- [ DllImport ( "SpatialUnderstanding" ) ]
463+ [ DllImport ( "SpatialUnderstanding" , CallingConvention = CallingConvention . Cdecl ) ]
464464 public static extern int QueryPlayspaceStats (
465465 [ In ] IntPtr playspaceStats ) ; // PlayspaceStats
466466
@@ -469,7 +469,7 @@ public static extern int QueryPlayspaceStats(
469469 /// </summary>
470470 /// <param name="playspaceAlignment">playspace alignment structure to receive the alignment data</param>
471471 /// <returns>Zero if fails, one if success</returns>
472- [ DllImport ( "SpatialUnderstanding" ) ]
472+ [ DllImport ( "SpatialUnderstanding" , CallingConvention = CallingConvention . Cdecl ) ]
473473 public static extern int QueryPlayspaceAlignment (
474474 [ In ] IntPtr playspaceAlignment ) ; // PlayspaceAlignment
475475
@@ -485,7 +485,7 @@ public static extern int QueryPlayspaceAlignment(
485485 /// <param name="rayVec_Z">Ray direction vector, z component. Length of ray indicates the length of the ray cast query.</param>
486486 /// <param name="result">Structure to receive the results of the raycast</param>
487487 /// <returns>Zero if fails or no intersection, one if an intersection is detected</returns>
488- [ DllImport ( "SpatialUnderstanding" ) ]
488+ [ DllImport ( "SpatialUnderstanding" , CallingConvention = CallingConvention . Cdecl ) ]
489489 public static extern int PlayspaceRaycast (
490490 [ In ] float rayPos_X , [ In ] float rayPos_Y , [ In ] float rayPos_Z ,
491491 [ In ] float rayVec_X , [ In ] float rayVec_Y , [ In ] float rayVec_Z ,
0 commit comments