Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Gets a ModuleRef token to represent the target assembly of a PInvoke call.
Syntax
HRESULT GetPinvokeMap(
[in] mdToken tk,
[out] DWORD *pdwMappingFlags,
[out] LPWSTR szImportName,
[in] ULONG cchImportName,
[out] ULONG *pchImportName,
[out] mdModuleRef *ptkImportDLL
);
Parameters
[in] tk
A FieldDef or MethodDef token to get the PInvoke mapping metadata for.
[out] pdwMappingFlags
A pointer to flags used for mapping. This value is a bitmask from the CorPinvokeMap enumeration.
[out] szImportName
The name of the unmanaged target DLL.
[in] cchImportName
The size in wide characters of szImportName.
[out] pchImportName
The number of wide characters returned in szImportName.
[out] ptkImportDLL
A pointer to a ModuleRef token that represents the unmanaged target object library.
Return value
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Requirements
| Requirement | Value |
|---|---|
| Target Platform | Windows |
| Header | rometadataapi.h |