Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/coreclr/dlls/mscorrc/mscorrc.rc
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ STRINGTABLE DISCARDABLE
BEGIN
IDS_EE_THREAD_APARTMENT_NOT_SUPPORTED "The system does not support the %1 thread apartment."
IDS_EE_NDIRECT_UNSUPPORTED_SIG "Method's type signature is not PInvoke compatible."
IDS_EE_NDIRECT_NAMED_UNSUPPORTED_SIG "Method '%1.%2', has a signature that is not PInvoke compatible."
IDS_EE_COM_UNSUPPORTED_SIG "Method's type signature is not Interop compatible."
IDS_EE_COM_UNSUPPORTED_TYPE "The method returned a COM Variant type that is not Interop compatible."
IDS_EE_MULTIPLE_CALLCONV_UNSUPPORTED "Multiple unmanaged calling conventions are specified. Only a single calling convention is supported."
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/dlls/mscorrc/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#define IDS_DS_DSOTHREADMODEL 0x1707

#define IDS_EE_NDIRECT_UNSUPPORTED_SIG 0x1708
#define IDS_EE_NDIRECT_NAMED_UNSUPPORTED_SIG 0x1709
#define IDS_EE_NDIRECT_BADNATL 0x170a
#define IDS_EE_NDIRECT_LOADLIB_WIN 0x170b
#define IDS_EE_NDIRECT_GETPROCADDRESS_WIN 0x170c
Expand Down
9 changes: 7 additions & 2 deletions src/coreclr/vm/dllimport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3415,7 +3415,6 @@ BOOL NDirect::MarshalingRequired(
return FALSE;
}


// factorization of CreateNDirectStubWorker
static MarshalInfo::MarshalType DoMarshalReturnValue(MetaSig& msig,
mdParamDef* params,
Expand Down Expand Up @@ -4291,7 +4290,13 @@ static void CreateNDirectStubAccessMetadata(
// P/Invoke marked with UnmanagedCallersOnlyAttribute is not
// presently supported.
if (pMD->HasUnmanagedCallersOnlyAttribute())
COMPlusThrow(kNotSupportedException, IDS_EE_NDIRECT_UNSUPPORTED_SIG);
{
SString namespaceOrClassName;
SString methodName;
pMD->GetMethodInfoNoSig(namespaceOrClassName, methodName);
COMPlusThrow(kNotSupportedException, IDS_EE_NDIRECT_NAMED_UNSUPPORTED_SIG,
namespaceOrClassName.GetUnicode(), methodName.GetUnicode());
}

// Check to see if we need to do LCID conversion.
lcidArg = GetLCIDParameterIndex(pMD);
Expand Down
Loading