-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Partially revert PR #125326: revert ComActivator/LicenseInteropProxy changes #125706
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -137,16 +137,20 @@ IUnknown *ComClassFactory::CreateInstanceFromClassFactory(IClassFactory *pClassF | |
| GCPROTECT_BEGIN(gc); | ||
|
|
||
| // Create an instance of the object | ||
| UnmanagedCallersOnlyCaller createObj(METHOD__LICENSE_INTEROP_PROXY__CREATE); | ||
| createObj.InvokeThrowing(&gc.pProxy); | ||
| MethodDescCallSite createObj(METHOD__LICENSE_INTEROP_PROXY__CREATE); | ||
| gc.pProxy = createObj.Call_RetOBJECTREF(NULL); | ||
| gc.pType = rth.GetManagedClassObject(); | ||
|
|
||
| // Query the current licensing context | ||
| UnmanagedCallersOnlyCaller getCurrentContextInfo(METHOD__LICENSE_INTEROP_PROXY__GETCURRENTCONTEXTINFO); | ||
| MethodDescCallSite getCurrentContextInfo(METHOD__LICENSE_INTEROP_PROXY__GETCURRENTCONTEXTINFO, &gc.pProxy); | ||
| CLR_BOOL fDesignTime = FALSE; | ||
| INT_PTR bstrKeyRaw = NULL; | ||
| getCurrentContextInfo.InvokeThrowing(&gc.pProxy, &gc.pType, &fDesignTime, &bstrKeyRaw); | ||
| bstrKey = (BSTR)bstrKeyRaw; | ||
| ARG_SLOT args[4]; | ||
| args[0] = ObjToArgSlot(gc.pProxy); | ||
| args[1] = ObjToArgSlot(gc.pType); | ||
| args[2] = (ARG_SLOT)&fDesignTime; | ||
| args[3] = (ARG_SLOT)(BSTR*)&bstrKey; | ||
|
|
||
| getCurrentContextInfo.Call(args); | ||
AaronRobinsonMSFT marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| if (fDesignTime) | ||
| { | ||
|
|
@@ -177,9 +181,11 @@ IUnknown *ComClassFactory::CreateInstanceFromClassFactory(IClassFactory *pClassF | |
| // Store the requested license key | ||
| if (SUCCEEDED(hr)) | ||
| { | ||
| UnmanagedCallersOnlyCaller saveKeyInCurrentContext(METHOD__LICENSE_INTEROP_PROXY__SAVEKEYINCURRENTCONTEXT); | ||
| BSTR bstrKeyValue = (BSTR)bstrKey; | ||
| saveKeyInCurrentContext.InvokeThrowing(&gc.pProxy, reinterpret_cast<INT_PTR>(bstrKeyValue)); | ||
| MethodDescCallSite saveKeyInCurrentContext(METHOD__LICENSE_INTEROP_PROXY__SAVEKEYINCURRENTCONTEXT, &gc.pProxy); | ||
|
|
||
| args[0] = ObjToArgSlot(gc.pProxy); | ||
| args[1] = (ARG_SLOT)(BSTR)bstrKey; | ||
| saveKeyInCurrentContext.Call(args); | ||
|
Comment on lines
+186
to
+188
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was this in the original? I agree that using the original args appears odd. If this was the same previous design, then okay.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, this PR is a simple revert. Not trying to fix anything. |
||
| } | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.