-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Adding GetComWrappersRCWData cDAC API #118428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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)
...native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/Object_1.cs
Outdated
Show resolved
Hide resolved
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
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. |
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. |
...e/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/ComWrappers_1.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader/ContractDescriptorTarget.cs
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/ISOSDacInterface.cs
Outdated
Show resolved
Hide resolved
* adding GetComWrappersRCWData cDAC API * allow duplicate contract and global names
No description provided.