}
}
-StubSigDesc::StubSigDesc(MethodDesc *pMD, PInvokeStaticSigInfo* pSigInfo /*= NULL*/)
+StubSigDesc::StubSigDesc(MethodDesc *pMD)
{
CONTRACTL
{
NOTHROW;
GC_NOTRIGGER;
SUPPORTS_DAC;
+ PRECONDITION(pMD != NULL);
}
CONTRACTL_END;
m_pMD = pMD;
m_pMT = nullptr;
- if (pSigInfo != NULL)
- {
- m_sig = pSigInfo->GetSignature();
- m_pModule = pSigInfo->GetModule();
- }
- else
- {
- _ASSERTE(pMD != NULL);
- m_sig = pMD->GetSignature();
- m_pModule = pMD->GetModule(); // Used for token resolution.
- }
+ m_sig = pMD->GetSignature();
+ m_pModule = pMD->GetModule(); // Used for token resolution.
- if (pMD != NULL)
- {
- m_tkMethodDef = pMD->GetMemberDef();
- SigTypeContext::InitTypeContext(pMD, &m_typeContext);
- m_pLoaderModule = pMD->GetLoaderModule(); // Used for ILStubCache selection and MethodTable creation.
- }
- else
- {
- m_tkMethodDef = mdMethodDefNil;
- m_pLoaderModule = m_pModule;
- }
+ m_tkMethodDef = pMD->GetMemberDef();
+ SigTypeContext::InitTypeContext(pMD, &m_typeContext);
+ m_pLoaderModule = pMD->GetLoaderModule(); // Used for ILStubCache selection and MethodTable creation.
INDEBUG(InitDebugNames());
}
-StubSigDesc::StubSigDesc(MethodDesc* pMD, Signature sig, Module* pModule)
+StubSigDesc::StubSigDesc(MethodDesc* pMD, const Signature& sig, Module* pModule)
{
CONTRACTL
{
INDEBUG(InitDebugNames());
}
-StubSigDesc::StubSigDesc(MethodTable* pMT, Signature sig, Module* pModule)
+StubSigDesc::StubSigDesc(MethodTable* pMT, const Signature& sig, Module* pModule)
{
CONTRACTL
{
INDEBUG(InitDebugNames());
}
-StubSigDesc::StubSigDesc(std::nullptr_t, Signature sig, Module* pModule)
+StubSigDesc::StubSigDesc(const Signature& sig, Module* pModule)
{
CONTRACTL
{
}
// Convert a CorNativeLinkType into an unambiguous usable value.
- bool TryRemapLinkType(_In_ CorNativeLinkType value, _Out_ CorNativeLinkType* nlt)
+ HRESULT RemapLinkType(_In_ CorNativeLinkType value, _Out_ CorNativeLinkType* nlt)
{
LIMITED_METHOD_CONTRACT;
_ASSERTE(nlt != NULL);
#endif
break;
default:
- return false;
+ return E_INVALIDARG;
}
// Validate we remapped to a usable value.
_ASSERTE(*nlt == nltAnsi || *nlt == nltUnicode);
- return true;
+ return S_OK;
}
}
}
PInvokeStaticSigInfo::PInvokeStaticSigInfo(
- MethodDesc* pMD, LPCUTF8 *pLibName, LPCUTF8 *pEntryPointName)
+ _In_ MethodDesc* pMD, _Outptr_opt_ LPCUTF8 *pLibName, _Outptr_opt_ LPCUTF8 *pEntryPointName)
{
STANDARD_VM_CONTRACT;
LONG cData = 0;
CorPinvokeMap callConv = (CorPinvokeMap)0;
- HRESULT hRESULT = pMT->GetCustomAttribute(
+ hr = pMT->GetCustomAttribute(
WellKnownAttribute::UnmanagedFunctionPointer, (const VOID **)(&pData), (ULONG *)&cData);
- IfFailThrow(hRESULT);
+ IfFailThrow(hr);
if (cData != 0)
{
CustomAttributeParser ca(pData, cData);
args[0].InitEnum(SERIALIZATION_TYPE_I4, (ULONG)m_callConv);
IfFailGo(ParseKnownCaArgs(ca, args, lengthof(args)));
+ callConv = (CorPinvokeMap)(args[0].val.u4 << 8);
enum UnmanagedFunctionPointerNamedArgs
{
IfFailGo(ParseKnownCaNamedArgs(ca, namedArgs, lengthof(namedArgs)));
- callConv = (CorPinvokeMap)(args[0].val.u4 << 8);
-
CorNativeLinkType nlt;
- if (!TryRemapLinkType((CorNativeLinkType)namedArgs[MDA_CharSet].val.u4, &nlt))
- {
- hr = E_FAIL;
- goto ErrExit;
- }
+ IfFailGo(RemapLinkType((CorNativeLinkType)namedArgs[MDA_CharSet].val.u4, &nlt));
SetCharSet ( nlt );
SetBestFitMapping (namedArgs[MDA_BestFitMapping].val.u1);
SetLinkFlags ((CorNativeLinkFlags)(nlfLastError | GetLinkFlags()));
}
+ InitCallConv(GetCallConvValueForPInvokeCallConv(callConv), pMD->IsVarArg());
+
ErrExit:
- if (hr != S_OK)
+ if (FAILED(hr))
SetError(IDS_EE_NDIRECT_BADNATL);
- InitCallConv(GetCallConvValueForPInvokeCallConv(callConv), pMD->IsVarArg());
-
if (throwOnError)
ReportErrors();
}
PreInit(pModule, NULL);
m_sig = sig;
- SetIsStatic (!(MetaSig::GetCallingConvention(pModule, sig) & IMAGE_CEE_CS_CALLCONV_HASTHIS));
+ SetIsStatic(!(MetaSig::GetCallingConvention(sig) & IMAGE_CEE_CS_CALLCONV_HASTHIS));
InitCallConv(CallConvWinApiSentinel, FALSE);
ReportErrors();
}
-void PInvokeStaticSigInfo::DllImportInit(MethodDesc* pMD, LPCUTF8 *ppLibName, LPCUTF8 *ppEntryPointName)
+void PInvokeStaticSigInfo::DllImportInit(_In_ MethodDesc* pMD, _Outptr_opt_ LPCUTF8 *ppLibName, _Outptr_opt_ LPCUTF8 *ppEntryPointName)
{
CONTRACTL
{
else if (unmappableMask == pmThrowOnUnmappableCharDisabled)
SetThrowOnUnmappableChar (FALSE);
- // inkFlags : CorPinvoke -> CorNativeLinkFlags
+ // linkFlags : CorPinvoke -> CorNativeLinkFlags
if (mappingFlags & pmSupportsLastError)
SetLinkFlags ((CorNativeLinkFlags)(GetLinkFlags() | nlfLastError));
if (mappingFlags & pmNoMangle)
break;
}
- if (TryRemapLinkType(nlt, &nlt))
+ if (SUCCEEDED(RemapLinkType(nlt, &nlt)))
{
SetCharSet(nlt);
}
}
}
-void NDirect::PopulateNDirectMethodDesc(NDirectMethodDesc* pNMD, PInvokeStaticSigInfo* pSigInfo)
+namespace
{
- if (pNMD->IsSynchronized())
- COMPlusThrow(kTypeLoadException, IDS_EE_NOSYNCHRONIZED);
+ void PopulateNDirectMethodDescImpl(_Inout_ NDirectMethodDesc* pNMD, _In_ const PInvokeStaticSigInfo& sigInfo, _In_z_ LPCUTF8 libName, _In_z_ LPCUTF8 entryPointName)
+ {
+ CONTRACTL
+ {
+ STANDARD_VM_CHECK;
+ PRECONDITION(pNMD != NULL);
+ }
+ CONTRACTL_END;
- WORD ndirectflags = 0;
- if (pNMD->MethodDesc::IsVarArg())
- ndirectflags |= NDirectMethodDesc::kVarArgs;
+ WORD ndirectflags = 0;
+ if (pNMD->MethodDesc::IsVarArg())
+ ndirectflags |= NDirectMethodDesc::kVarArgs;
- LPCUTF8 szLibName = NULL, szEntryPointName = NULL;
- new (pSigInfo) PInvokeStaticSigInfo(pNMD, &szLibName, &szEntryPointName);
+ if (sigInfo.GetCharSet() == nltAnsi)
+ ndirectflags |= NDirectMethodDesc::kNativeAnsi;
- if (pSigInfo->GetCharSet() == nltAnsi)
- ndirectflags |= NDirectMethodDesc::kNativeAnsi;
+ CorNativeLinkFlags linkflags = sigInfo.GetLinkFlags();
+ if (linkflags & nlfLastError)
+ ndirectflags |= NDirectMethodDesc::kLastError;
+ if (linkflags & nlfNoMangle)
+ ndirectflags |= NDirectMethodDesc::kNativeNoMangle;
- CorNativeLinkFlags linkflags = pSigInfo->GetLinkFlags();
- if (linkflags & nlfLastError)
- ndirectflags |= NDirectMethodDesc::kLastError;
- if (linkflags & nlfNoMangle)
- ndirectflags |= NDirectMethodDesc::kNativeNoMangle;
+ CorInfoCallConvExtension callConv = sigInfo.GetCallConv();
+ if (callConv == CorInfoCallConvExtension::Stdcall)
+ ndirectflags |= NDirectMethodDesc::kStdCall;
+ if (callConv == CorInfoCallConvExtension::Thiscall)
+ ndirectflags |= NDirectMethodDesc::kThisCall;
+
+ if (pNMD->GetLoaderModule()->IsSystem() && (strcmp(libName, "QCall") == 0))
+ {
+ ndirectflags |= NDirectMethodDesc::kIsQCall;
+ }
+ else
+ {
+ pNMD->ndirect.m_pszLibName.SetValueMaybeNull(libName);
+ pNMD->ndirect.m_pszEntrypointName.SetValueMaybeNull(entryPointName);
+ }
- CorInfoCallConvExtension callConv = pSigInfo->GetCallConv();
- if (callConv == CorInfoCallConvExtension::Stdcall)
- ndirectflags |= NDirectMethodDesc::kStdCall;
- if (callConv == CorInfoCallConvExtension::Thiscall)
- ndirectflags |= NDirectMethodDesc::kThisCall;
+ // Call this exactly ONCE per thread. Do not publish incomplete prestub flags
+ // or you will introduce a race condition.
+ pNMD->InterlockedSetNDirectFlags(ndirectflags);
+ }
+}
- if (pNMD->GetLoaderModule()->IsSystem() && (strcmp(szLibName, "QCall") == 0))
+void NDirect::PopulateNDirectMethodDesc(_Inout_ NDirectMethodDesc* pNMD)
+{
+ CONTRACTL
{
- ndirectflags |= NDirectMethodDesc::kIsQCall;
+ STANDARD_VM_CHECK;
+ PRECONDITION(CheckPointer(pNMD));
}
- else
+ CONTRACTL_END;
+
+ if (pNMD->IsSynchronized())
+ COMPlusThrow(kTypeLoadException, IDS_EE_NOSYNCHRONIZED);
+
+ LPCUTF8 szLibName = NULL, szEntryPointName = NULL;
+ PInvokeStaticSigInfo sigInfo(pNMD, &szLibName, &szEntryPointName);
+ PopulateNDirectMethodDescImpl(pNMD, sigInfo, szLibName, szEntryPointName);
+}
+
+void NDirect::InitializeSigInfoAndPopulateNDirectMethodDesc(_Inout_ NDirectMethodDesc* pNMD, _Inout_ PInvokeStaticSigInfo* pSigInfo)
+{
+ CONTRACTL
{
- pNMD->ndirect.m_pszLibName.SetValueMaybeNull(szLibName);
- pNMD->ndirect.m_pszEntrypointName.SetValueMaybeNull(szEntryPointName);
+ STANDARD_VM_CHECK;
+ PRECONDITION(CheckPointer(pNMD));
+ PRECONDITION(CheckPointer(pSigInfo));
}
+ CONTRACTL_END;
+
+ if (pNMD->IsSynchronized())
+ COMPlusThrow(kTypeLoadException, IDS_EE_NOSYNCHRONIZED);
- // Call this exactly ONCE per thread. Do not publish incomplete prestub flags
- // or you will introduce a race condition.
- pNMD->InterlockedSetNDirectFlags(ndirectflags);
+ LPCUTF8 szLibName = NULL, szEntryPointName = NULL;
+ new (pSigInfo) PInvokeStaticSigInfo(pNMD, &szLibName, &szEntryPointName);
+
+ PopulateNDirectMethodDescImpl(pNMD, *pSigInfo, szLibName, szEntryPointName);
}
#ifdef FEATURE_COMINTEROP
sigBuilder.AppendBlob((const PVOID)(szMetaSig + 1), cbMetaSigSize - 1);
szMetaSig = (PCCOR_SIGNATURE)sigBuilder.GetSignature(&cbMetaSigSize);
- StubSigDesc sigDesc(nullptr, Signature(szMetaSig, cbMetaSigSize), pModule);
+ StubSigDesc sigDesc(Signature(szMetaSig, cbMetaSigSize), pModule);
#ifdef _DEBUG
sigDesc.m_pDebugName = pFD->GetDebugName();
DWORD dwStubFlags,
MethodDesc* pMD)
{
- STANDARD_VM_CONTRACT;
+ CONTRACTL
+ {
+ STANDARD_VM_CHECK;
+ PRECONDITION(pSigInfo != NULL);
+ }
+ CONTRACTL_END;
- StubSigDesc sigDesc(pMD, pSigInfo);
+ StubSigDesc sigDesc(pMD, pSigInfo->GetSignature(), pSigInfo->GetModule());
return CreateCLRToNativeILStub(&sigDesc,
pSigInfo->GetCharSet(),
MethodDesc* NDirect::GetILStubMethodDesc(NDirectMethodDesc* pNMD, PInvokeStaticSigInfo* pSigInfo, DWORD dwStubFlags)
{
- STANDARD_VM_CONTRACT;
+ CONTRACTL
+ {
+ STANDARD_VM_CHECK;
+ PRECONDITION(pNMD != NULL);
+ }
+ CONTRACTL_END;
MethodDesc* pStubMD = NULL;
if (NULL == *ppStubMD)
{
PInvokeStaticSigInfo sigInfo;
- NDirect::PopulateNDirectMethodDesc(pNMD, &sigInfo);
+ NDirect::InitializeSigInfoAndPopulateNDirectMethodDesc(pNMD, &sigInfo);
*ppStubMD = NDirect::GetILStubMethodDesc(pNMD, &sigInfo, dwStubFlags);
}
{
// we need the MD to be populated in case we decide to build an intercept
// stub to wrap the target in InitEarlyBoundNDirectTarget
- PInvokeStaticSigInfo sigInfo;
- NDirect::PopulateNDirectMethodDesc(pMD, &sigInfo);
+ NDirect::PopulateNDirectMethodDesc(pMD);
}
pMD->InitEarlyBoundNDirectTarget();
if (!pMD->IsZapped())
{
- PInvokeStaticSigInfo sigInfo;
- NDirect::PopulateNDirectMethodDesc(pMD, &sigInfo);
+ NDirect::PopulateNDirectMethodDesc(pMD);
}
else
{
dwStubFlags |= NDIRECTSTUB_FL_UNMANAGED_CALLI;
// need to convert the CALLI signature to stub signature with managed calling convention
- BYTE callConv = MetaSig::GetCallingConvention(pVASigCookie->pModule, signature);
+ BYTE callConv = MetaSig::GetCallingConvention(signature);
// Unmanaged calling convention indicates modopt should be read
if (callConv != IMAGE_CEE_CS_CALLCONV_UNMANAGED)
struct StubSigDesc
{
public:
- StubSigDesc(MethodDesc * pMD, PInvokeStaticSigInfo* pSigInfo = NULL);
- StubSigDesc(MethodDesc* pMD, Signature sig, Module* m_pModule);
- StubSigDesc(MethodTable* pMT, Signature sig, Module* m_pModule);
- StubSigDesc(std::nullptr_t, Signature sig, Module* m_pModule);
+ StubSigDesc(MethodDesc* pMD);
+ StubSigDesc(MethodDesc* pMD, const Signature& sig, Module* m_pModule);
+ StubSigDesc(MethodTable* pMT, const Signature& sig, Module* m_pModule);
+ StubSigDesc(const Signature& sig, Module* m_pModule);
MethodDesc *m_pMD;
MethodTable *m_pMT;
_In_opt_ PCCOR_SIGNATURE pSig = NULL,
_In_opt_ Module* pModule = NULL,
_In_ bool unmanagedCallersOnlyRequiresMarshalling = true);
- static void PopulateNDirectMethodDesc(NDirectMethodDesc* pNMD, PInvokeStaticSigInfo* pSigInfo);
+
+ static void PopulateNDirectMethodDesc(_Inout_ NDirectMethodDesc* pNMD);
+ static void InitializeSigInfoAndPopulateNDirectMethodDesc(_Inout_ NDirectMethodDesc* pNMD, _Inout_ PInvokeStaticSigInfo* pSigInfo);
static MethodDesc* CreateCLRToNativeILStub(
StubSigDesc* pSigDesc,
PInvokeStaticSigInfo(MethodDesc* pMdDelegate, ThrowOnError throwOnError = THROW_ON_ERROR);
- PInvokeStaticSigInfo(MethodDesc* pMD, LPCUTF8 *pLibName, LPCUTF8 *pEntryPointName);
-
-public:
- void ReportErrors();
+ PInvokeStaticSigInfo(_In_ MethodDesc* pMD, _Outptr_opt_ LPCUTF8 *pLibName, _Outptr_opt_ LPCUTF8 *pEntryPointName);
private:
+ void ReportErrors();
void InitCallConv(CorInfoCallConvExtension callConv, BOOL bIsVarArg);
- void DllImportInit(MethodDesc* pMD, LPCUTF8 *pLibName, LPCUTF8 *pEntryPointName);
+ void DllImportInit(_In_ MethodDesc* pMD, _Outptr_opt_ LPCUTF8 *pLibName, _Outptr_opt_ LPCUTF8 *pEntryPointName);
void PreInit(Module* pModule, MethodTable *pClass);
void PreInit(MethodDesc* pMD);
void SetError(WORD error) { if (!m_error) m_error = error; }
void BestGuessNDirectDefaults(MethodDesc* pMD);
-public:
- DWORD GetStubFlags()
+private:
+ enum
+ {
+ PINVOKE_STATIC_SIGINFO_IS_STATIC = 0x0001,
+ PINVOKE_STATIC_SIGINFO_THROW_ON_UNMAPPABLE_CHAR = 0x0002,
+ PINVOKE_STATIC_SIGINFO_BEST_FIT = 0x0004,
+
+ COR_NATIVE_LINK_TYPE_MASK = 0x0038, // 0000 0000 0011 1000 <--- These 3 1's make the link type mask
+
+ COR_NATIVE_LINK_FLAGS_MASK = 0x00C0, //0000 0000 1100 0000 <---- These 2 bits make up the link flags
+
+ PINVOKE_STATIC_SIGINFO_IS_DELEGATE_INTEROP = 0x0100,
+
+ };
+ #define COR_NATIVE_LINK_TYPE_SHIFT 3 // Keep in synch with above mask
+ #define COR_NATIVE_LINK_FLAGS_SHIFT 6 // Keep in synch with above mask
+
+public: // getters
+ DWORD GetStubFlags() const
{
WRAPPER_NO_CONTRACT;
return (GetThrowOnUnmappableChar() ? NDIRECTSTUB_FL_THROWONUNMAPPABLECHAR : 0) |
(GetBestFitMapping() ? NDIRECTSTUB_FL_BESTFIT : 0) |
(IsDelegateInterop() ? NDIRECTSTUB_FL_DELEGATE : 0);
}
- Module* GetModule() { LIMITED_METHOD_CONTRACT; return m_pModule; }
- BOOL IsStatic() { LIMITED_METHOD_CONTRACT; return m_wFlags & PINVOKE_STATIC_SIGINFO_IS_STATIC; }
- void SetIsStatic (BOOL isStatic)
+ Module* GetModule() const { LIMITED_METHOD_CONTRACT; return m_pModule; }
+ BOOL IsStatic() const { LIMITED_METHOD_CONTRACT; return m_wFlags & PINVOKE_STATIC_SIGINFO_IS_STATIC; }
+ BOOL GetThrowOnUnmappableChar() const { LIMITED_METHOD_CONTRACT; return m_wFlags & PINVOKE_STATIC_SIGINFO_THROW_ON_UNMAPPABLE_CHAR; }
+ BOOL GetBestFitMapping() const { LIMITED_METHOD_CONTRACT; return m_wFlags & PINVOKE_STATIC_SIGINFO_BEST_FIT; }
+ BOOL IsDelegateInterop() const { LIMITED_METHOD_CONTRACT; return m_wFlags & PINVOKE_STATIC_SIGINFO_IS_DELEGATE_INTEROP; }
+ CorInfoCallConvExtension GetCallConv() const { LIMITED_METHOD_CONTRACT; return m_callConv; }
+ Signature GetSignature() const { LIMITED_METHOD_CONTRACT; return m_sig; }
+ CorNativeLinkType GetCharSet() const { LIMITED_METHOD_CONTRACT; return (CorNativeLinkType)((m_wFlags & COR_NATIVE_LINK_TYPE_MASK) >> COR_NATIVE_LINK_TYPE_SHIFT); }
+ CorNativeLinkFlags GetLinkFlags() const { LIMITED_METHOD_CONTRACT; return (CorNativeLinkFlags)((m_wFlags & COR_NATIVE_LINK_FLAGS_MASK) >> COR_NATIVE_LINK_FLAGS_SHIFT); }
+
+private: // setters
+ void SetIsStatic(BOOL isStatic)
{
LIMITED_METHOD_CONTRACT;
if (isStatic)
else
m_wFlags &= ~PINVOKE_STATIC_SIGINFO_IS_STATIC;
}
- BOOL GetThrowOnUnmappableChar() { LIMITED_METHOD_CONTRACT; return m_wFlags & PINVOKE_STATIC_SIGINFO_THROW_ON_UNMAPPABLE_CHAR; }
- void SetThrowOnUnmappableChar (BOOL throwOnUnmappableChar)
+ void SetThrowOnUnmappableChar(BOOL throwOnUnmappableChar)
{
LIMITED_METHOD_CONTRACT;
if (throwOnUnmappableChar)
else
m_wFlags &= ~PINVOKE_STATIC_SIGINFO_THROW_ON_UNMAPPABLE_CHAR;
}
- BOOL GetBestFitMapping() { LIMITED_METHOD_CONTRACT; return m_wFlags & PINVOKE_STATIC_SIGINFO_BEST_FIT; }
- void SetBestFitMapping (BOOL bestFit)
+ void SetBestFitMapping(BOOL bestFit)
{
LIMITED_METHOD_CONTRACT;
if (bestFit)
else
m_wFlags &= ~PINVOKE_STATIC_SIGINFO_BEST_FIT;
}
- BOOL IsDelegateInterop() { LIMITED_METHOD_CONTRACT; return m_wFlags & PINVOKE_STATIC_SIGINFO_IS_DELEGATE_INTEROP; }
- void SetIsDelegateInterop (BOOL delegateInterop)
+ void SetIsDelegateInterop(BOOL delegateInterop)
{
LIMITED_METHOD_CONTRACT;
if (delegateInterop)
else
m_wFlags &= ~PINVOKE_STATIC_SIGINFO_IS_DELEGATE_INTEROP;
}
- CorInfoCallConvExtension GetCallConv() { LIMITED_METHOD_CONTRACT; return m_callConv; }
- Signature GetSignature() { LIMITED_METHOD_CONTRACT; return m_sig; }
-
-private:
- Module* m_pModule;
- Signature m_sig;
- CorInfoCallConvExtension m_callConv;
- WORD m_error;
-
- enum
- {
- PINVOKE_STATIC_SIGINFO_IS_STATIC = 0x0001,
- PINVOKE_STATIC_SIGINFO_THROW_ON_UNMAPPABLE_CHAR = 0x0002,
- PINVOKE_STATIC_SIGINFO_BEST_FIT = 0x0004,
-
- COR_NATIVE_LINK_TYPE_MASK = 0x0038, // 0000 0000 0011 1000 <--- These 3 1's make the link type mask
-
- COR_NATIVE_LINK_FLAGS_MASK = 0x00C0, //0000 0000 1100 0000 <---- These 2 bits make up the link flags
-
- PINVOKE_STATIC_SIGINFO_IS_DELEGATE_INTEROP = 0x0100,
-
- };
- #define COR_NATIVE_LINK_TYPE_SHIFT 3 // Keep in synch with above mask
- #define COR_NATIVE_LINK_FLAGS_SHIFT 6 // Keep in synch with above mask
- WORD m_wFlags;
-
- public:
- CorNativeLinkType GetCharSet() { LIMITED_METHOD_CONTRACT; return (CorNativeLinkType)((m_wFlags & COR_NATIVE_LINK_TYPE_MASK) >> COR_NATIVE_LINK_TYPE_SHIFT); }
- CorNativeLinkFlags GetLinkFlags() { LIMITED_METHOD_CONTRACT; return (CorNativeLinkFlags)((m_wFlags & COR_NATIVE_LINK_FLAGS_MASK) >> COR_NATIVE_LINK_FLAGS_SHIFT); }
void SetCharSet(CorNativeLinkType linktype)
{
LIMITED_METHOD_CONTRACT;
// Then set the given value
m_wFlags |= (linkflags << COR_NATIVE_LINK_FLAGS_SHIFT);
}
+
+private:
+ Module* m_pModule;
+ Signature m_sig;
+ CorInfoCallConvExtension m_callConv;
+ WORD m_error;
+ WORD m_wFlags;
};