private unsafe void InitDllLogging() { var fakeTrackirData = new FreePieTrackIRHeadposeData(); using (var logpath = new MarshalledString(Path.Combine(Environment.CurrentDirectory, "NPClient.log"))) CopyMemory(new IntPtr(fakeTrackirData.LogPath), logpath.Pointer, logpath.Length); freepieData.Write(x => x.TrackIRData.FakeTrackIRData, fakeTrackirData); }