Category "pinvoke"

C# variables of class are zeroed after P/Invoke call

I'm writing some vulkan code and ran into a problem which I can't get my head around. I've the following code: NativeMethods.cs: [DllImport("libvulkan.1.dylib",

Is synchronization required when passing a cancel flag with P/Invoke?

I am passing a cancel flag by reference (or by pointer) to a C++ DLL by P/Invoke. The flag will be set at some time in C# code, and the C++ code checks for the