<data name="Argument_MustBeRuntimeMethodInfo" xml:space="preserve">
<value>MethodInfo must be a runtime MethodInfo object.</value>
</data>
- <data name="Argument_MustBeRuntimeModule" xml:space="preserve">
- <value>Module must be a runtime Module object.</value>
- </data>
<data name="Argument_MustBeRuntimeReflectionObject" xml:space="preserve">
<value>The object must be a runtime Reflection object.</value>
</data>
throw new ArgumentNullException(nameof(m));
}
- RuntimeModule rtModule = m as RuntimeModule;
- if (rtModule == null && m is ModuleBuilder mb)
+ if (m is RuntimeModule rtModule)
{
- rtModule = mb.InternalModule;
+ return GetHINSTANCE(rtModule.GetNativeHandle());
}
- if (rtModule == null)
- {
- throw new ArgumentNullException(nameof(m), SR.Argument_MustBeRuntimeModule);
- }
-
- return GetHINSTANCE(rtModule.GetNativeHandle());
+ return (IntPtr)(-1);
}
[DllImport(JitHelpers.QCall, CharSet = CharSet.Unicode)]
"classes": null,
"methods": [
{
+ "name": "System.Runtime.InteropServices.Tests.GetHINSTANCETests.GetHINSTANCE_NonRuntimeModule_ThrowsArgumentNullException",
+ "reason": "https://github.com/dotnet/coreclr/pull/30925"
+ },
+ {
"name" : "System.Runtime.InteropServices.Tests.SafeBufferTests.Initialize_NumBytesTimesSizeOfEachElement_ThrowsOverflowException",
"reason" : "https://github.com/dotnet/coreclr/pull/20132"
},