Skip to content

Conversation

jkotas
Copy link
Member

@jkotas jkotas commented Jul 31, 2025

No description provided.

@Copilot Copilot AI review requested due to automatic review settings July 31, 2025 05:12
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 renames "NDirect" terminology to "PInvoke" throughout the codebase to improve clarity and consistency. NDirect was an older term used internally to refer to Platform Invoke (P/Invoke) functionality for calling native code from managed code.

  • Renames classes, methods, and variables from NDirect* to PInvoke*
  • Updates comments and documentation to use PInvoke terminology
  • Maintains the same functionality while improving code readability

Reviewed Changes

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

File Description
Multiple .cpp/.h files Rename NDirectMethodDesc to PInvokeMethodDesc and related methods
Assembly files Update function names from NDirectImportThunk to PInvokeImportThunk
Header files Rename class declarations and type definitions
Documentation/comments Update terminology from NDirect to PInvoke throughout

Copy link
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

@jkotas
Copy link
Member Author

jkotas commented Jul 31, 2025

The codebase has been using mix of both names that just does not look great.

  • PInvoke is the official name of the feature in public APIs and ECMA-335 spec.
  • N/Direct name was likely inspired by J/Direct in the early days of .NET. We do not need to carry this legacy naming forward.

@AaronRobinsonMSFT
Copy link
Member

/cc @dotnet/dotnet-diag

@jkotas jkotas requested a review from AaronRobinsonMSFT July 31, 2025 19:03
@AaronRobinsonMSFT
Copy link
Member

Failures are #118246

Copy link
Member

@AaronRobinsonMSFT AaronRobinsonMSFT left a comment

Choose a reason for hiding this comment

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

:shipit:

@jkotas jkotas merged commit e58b345 into dotnet:main Aug 1, 2025
153 of 161 checks passed
@jkotas jkotas deleted the ndirect branch August 1, 2025 00:21
@github-actions github-actions bot locked and limited conversation to collaborators Aug 31, 2025
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.

2 participants