Skip to content

Conversation

rcj1
Copy link
Contributor

@rcj1 rcj1 commented Aug 6, 2025

No description provided.

@rcj1 rcj1 requested review from Copilot and max-charlamb and removed request for Copilot August 6, 2025 04:25
Copy link
Contributor

@Copilot 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 implements the GetComWrappersRCWData cDAC API, which enables retrieval of COM wrapper Runtime Callable Wrapper (RCW) identity data through the data contract reader system. The implementation provides a new cDAC-based approach while maintaining compatibility with the legacy DAC implementation.

Key changes:

  • Implements GetComWrappersRCWData method in the cDAC system with proper error handling and validation
  • Adds support for NativeObjectWrapperObject data type to access external COM object addresses
  • Includes debug validation to ensure consistency between cDAC and legacy DAC implementations

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
SOSDacImpl.cs Replaces simple delegation with full cDAC implementation of GetComWrappersRCWData including validation and debug checks
NativeObjectWrapperObject.cs New data contract class for accessing COM wrapper object data
Object_1.cs Adds GetComWrappersRCWIdentity method to extract external COM object address from RCW
Constants.cs Adds FeatureCOMWrappers global constant
DataType.cs Registers NativeObjectWrapperObject as a new data type
IObject.cs Defines interface for GetComWrappersRCWIdentity method
interoplibinterface_comwrappers.h Adds cdac_data template specialization for NativeObjectWrapperObject
datadescriptor.inc Defines cDAC metadata for NativeObjectWrapperObject type and FeatureCOMWrappers global
datadescriptor.cpp Includes necessary header for NativeObjectWrapperObject
debug_interface_globals.md Documents the new FeatureCOMWrappers global variable
Object.md Documents the new GetComWrappersRCWIdentity API method
Comments suppressed due to low confidence (1)

src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs:392

  • Catching System.Exception is overly broad and may hide unexpected errors. Consider catching more specific exceptions or documenting why a general catch is necessary here.
        catch (System.Exception ex)

Copy link
Contributor

Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

@rcj1
Copy link
Contributor Author

rcj1 commented Aug 6, 2025

At some point we probably want unit tests for this. I’m looking into what it will take to get them set up and may set them up once the new contract is a bit more fleshed out.

@rcj1
Copy link
Contributor Author

rcj1 commented Sep 15, 2025

I have added a ComWrappers contract and modified the build tool and data descriptors such that the contracts are listed as part of the data descriptors file. contract.jsonc has been deleted.

@rcj1 rcj1 requested review from jkotas and hoyosjs September 18, 2025 22:17
@rcj1 rcj1 merged commit f2b7911 into dotnet:main Sep 18, 2025
102 checks passed
@rcj1 rcj1 deleted the GetComWrappersRCWData branch September 18, 2025 22:44
xtqqczze pushed a commit to xtqqczze/dotnet-runtime that referenced this pull request Sep 20, 2025
* adding GetComWrappersRCWData cDAC API

* allow duplicate contract and global names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants