Works fine without burst. The IntPtr is not zero.
This is the interop signature in case it helps.
[SuppressUnmanagedCodeSecurity]
[DllImport(NativeLibrary, EntryPoint = "QueryGetRandomPosition", CallingConvention = CallingConvention.Cdecl)]
public static extern int GetRandomPosition(IntPtr aiQuery, out float3 result);
Unexpected exception Burst.Compiler.IL.CompilerException: Missing external function name: #dllimport:C:\Games\aigame\AiNav\x64\Release\AiNav.dll|QueryGetRandomPosition => method: AiNav.Navigation.Query.GetRandomPosition(System.IntPtr aiQuery, ref Unity.Mathematics.float3 result)_DFB76F9F3726AB57. Reason: Function pointer cannot be IntPtr.Zero
at Burst.Compiler.IL.Jit.JitCompiler.CompileMethodInternal (Burst.Compiler.IL.Jit.JitCompiler+CachedMethodValue currentMethodValue, Mono.Cecil.MethodReference methodReference, Burst.Compiler.IL.Jit.JitOptions jitOptions) [0x00542] in <3179d4839c86430ca331f2949f40ede5>:0
at Burst.Compiler.IL.Jit.JitCompiler.CompileMethod (Mono.Cecil.MethodReference methodReference, Burst.Compiler.IL.Jit.JitOptions jitOptions) [0x0006b] in <3179d4839c86430ca331f2949f40ede5>:0
at Burst.Compiler.IL.Jit.JitCompilerService.Compile (Burst.Compiler.IL.Jit.JitCompilerService+CompileJob job) [0x002ce] in <3179d4839c86430ca331f2949f40ede5>:0
While compiling job: System.Void Unity.Entities.JobForEachExtensions/JobStruct_Process_C2<AiNav.AiNavTestSystem/MoveAgentsJob,AiNav.AiNavAgent>::Execute(Unity.Entities.JobForEachExtensions/JobStruct_Process_C2<T,T0>&,System.IntPtr,System.IntPtr,Unity.Jobs.LowLevel.Unsafe.JobRanges&,System.Int32)