diff options
author | Jeremy Koritzinsky <jkoritzinsky@gmail.com> | 2019-04-15 15:54:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-15 15:54:51 -0700 |
commit | 9f9dcdd2780ac4716c757e0c78d7324f8e382891 (patch) | |
tree | c4c9453a0ec46b96428c4fa2c91f454406a42a31 /src/vm/dllimport.cpp | |
parent | 77a5f9cef77c34db739bb3c13bfd091c693a12d4 (diff) | |
download | coreclr-9f9dcdd2780ac4716c757e0c78d7324f8e382891.tar.gz coreclr-9f9dcdd2780ac4716c757e0c78d7324f8e382891.tar.bz2 coreclr-9f9dcdd2780ac4716c757e0c78d7324f8e382891.zip |
Opt COM methods out of the new Windows instance-method handling. (#23974)
* Opt COM methods out of the new Windows instance-method handling.
* Add test for an HResult "struct" returned from a COM method.
* Update ErrorMarshalTesting.cs
* Update "is member function" check on the ilmarshalers.h side to only consider thiscall.
Diffstat (limited to 'src/vm/dllimport.cpp')
-rw-r--r-- | src/vm/dllimport.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vm/dllimport.cpp b/src/vm/dllimport.cpp index 924a50fe9d..93d0f79ca0 100644 --- a/src/vm/dllimport.cpp +++ b/src/vm/dllimport.cpp @@ -3956,7 +3956,10 @@ static void CreateNDirectStubWorker(StubState* pss, BOOL fMarshalReturnValueFirst = FALSE; BOOL fReverseWithReturnBufferArg = FALSE; - bool isInstanceMethod = fStubNeedsCOM || fThisCall; + // Only consider ThisCall methods to be instance methods. + // Techinically COM methods are also instance methods, but we don't want to change the behavior of the built-in + // COM abi work because there are many users that rely on the current behavior (for example WPF). + bool isInstanceMethod = fThisCall; // We can only change fMarshalReturnValueFirst to true when we are NOT doing HRESULT-swapping! // When we are HRESULT-swapping, the managed return type is actually the type of the last parameter and not the return type. |