如何创建 ac# 包装器来调用:
[DllImport("FirewallAPI.dll")]
internal static extern uint NetworkIsolationEnumAppContainers(out uint pdwCntPublicACs, out IntPtr ppACs);
当像这样运行它时,我得到了一个 AccessViolationException (试图读取或写入受保护的内存):
uint aux=0;
IntPtr foo=new IntPtr();
NetworkIsolationEnumAppContainers(out aux, out foo);
Marshall的正确方法是什么?谢谢