Skip to content

Conversation

@jkoritzinsky
Copy link
Member

Fixes #94749

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR makes the StandardOleMarshalObject class COM visible by adding the [ComVisible(true)] attribute to address issue #94749. The change enables COM marshaling operations for objects that derive from this class.

  • Adds [ComVisible(true)] attribute to StandardOleMarshalObject class
  • Includes a test to verify that GetIDispatchForObject works correctly with derived objects
  • Adds the new test file to the project file

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
StandardOleMarshalObject.Windows.cs Adds [ComVisible(true)] attribute to the class declaration
StandardOleMarshalObjectTests.cs New test file verifying COM interop functionality works with derived objects
System.Runtime.InteropServices.Tests.csproj Includes the new test file in the project

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apartment threaded IDispatch server throws InvalidOperationException or fails to marshal

2 participants