public unsafe QuicApi() { NativeQuicApi *nativeApi = null; int status = QuicNativeMethods.MsQuicOpen(&nativeApi); if (status != 0) { Marshal.ThrowExceptionForHR(status); m_nativeApi = null !; return; } m_nativeApi = ApiGenerator.CreateApiImplementation(nativeApi, QuicNativeMethods.MsQuicClose); }