Clean-up error in `IDispatch::Invoke()` scenario (#86964)
authorAaron Robinson <arobins@microsoft.com>
Wed, 31 May 2023 22:11:00 +0000 (15:11 -0700)
committerGitHub <noreply@github.com>
Wed, 31 May 2023 22:11:00 +0000 (15:11 -0700)
* Clean-up error in IDispatch::Invoke scenario

src/coreclr/inc/corerror.xml
src/coreclr/vm/interoputil.cpp
src/coreclr/vm/invokeutil.cpp

index afeaf4f602a4ad440e958bc71de24b678ae3194d..81c7bab5ea1f0a1697a9dc0330979691f6f94935 100644 (file)
 <HRESULT NumericValue="0x80131603">
        <SymbolicName>COR_E_TARGET</SymbolicName>
        <Message>"Attempt to invoke non-static method with a null Object."</Message>
-       <Comment> - If you attempt to invoke a non-static method with a null Object - If you atte</Comment>
+       <Comment>If you attempt to invoke a non-static method with a null Object</Comment>
 </HRESULT>
 
 <HRESULT NumericValue="0x80131604">
index 65710a5227be5465ca0696476420302d9134185f..d2dc577b30cf71cec032231944aed0e1e295b090 100644 (file)
@@ -3114,7 +3114,7 @@ void IUInvokeDispMethod(
 
     // Validate that the target is valid for the specified type.
     if (!IsComTargetValidForType(pRefClassObj, pTarget))
-        COMPlusThrow(kTargetException, W("RFLCT.Targ_ITargMismatch"));
+        COMPlusThrow(kTargetException, W("RFLCT_Targ_ITargMismatch"));
 
     // If the invoked type is an interface, make sure it is IDispatch based.
     if (pInvokedMT->IsInterface())
index ea2278e73e37c4ae1b517d48fbdf2e92556e3fda..c4ba804a4c493f7ffbf2445a4f752a07e82dd905 100644 (file)
@@ -681,7 +681,7 @@ void InvokeUtil::ValidateObjectTarget(FieldDesc *pField, TypeHandle enclosingTyp
         return;
 
     if (!pField->IsStatic() && !*target)
-        COMPlusThrow(kTargetException,W("RFLCT.Targ_StatFldReqTarg"));
+        COMPlusThrow(kTargetException,W("RFLCT_Targ_StatFldReqTarg"));
 
     // Verify that the object is of the proper type...
     TypeHandle ty = (*target)->GetTypeHandle();