internal static void CreateComInstance(Guid clsid, Utilities.CLSCTX clsctx, Guid riid, ComObject comObject) { IntPtr comObject1; Utilities.CoCreateInstance(clsid, IntPtr.Zero, clsctx, riid, out comObject1).CheckError(); comObject.NativePointer = comObject1; }