编译器错误-元数据操作失败
Compiler Error - metadata operation failed
我收到这个错误:
Joke.obj : error LNK2022: metadata operation failed (80131187) : Inconsistent method declarations in duplicated types (types: SE.Crypt; methods: GetVolumeInformationA): (0x06000008).
LINK : fatal error LNK1215: metadata operation failed (8013118A) :
这是头文件中的代码:
private:
[System::Runtime::InteropServices::DllImport("kernel32.dll")]
static Int64 GetVolumeInformation(String ^PathName, StringBuilder ^VolumeNameBuffer, UInt32 VolumeNameSize, UInt32 %VolumeSerialNumber, UInt32 %MaximumComponentLength, UInt32 %FileSystemFlags, StringBuilder ^FileSystemNameBuffer, UInt32 FileSystemNameSize);
有什么想法吗?
感谢
GetVolumeInformation
返回BOOL,该BOOL不映射到Int64。
顺便说一句,当你调用这个函数的ANSI版本时,你可能会遇到麻烦。当Windows7创建系统保留分区时,安装程序会根据安装程序的语言为其提供卷名,而不必与您将在其中执行的环境相匹配。最好调用Unicode版本。
相关文章:
- 如果没有malloc,链表实现将失败
- 无法调用成员函数,尝试正确执行此操作仍然失败
- 元数据操作失败LNK2022错误 (8013118D):重复类型中的布局信息不一致 (选择设备参数):(0x020002
- 为什么三元操作失败不咳嗽
- LoadLibrary失败带有错误4250:此操作仅在应用程序容器的上下文中有效
- C/C++ 套接字:如果我在 IPv6 TCP 连接之前执行任何操作,则连接将失败
- 谷歌测试:如果测试失败,则执行其他操作
- X失败请求的错误:BadValue(整数参数超出操作范围)
- 如何在服务exe中添加失败操作
- OpenCL OpenGL 互操作上下文创建失败
- 什么会导致罕见的 lchown() 失败:不允许操作
- 当 std::fprintf(stderr,..) 失败时,操作是否不起作用,或者可以在失败之前写入一点
- 对于某些输入,使用逐位操作完成的2除法器的舍入幂失败
- 重载的*运算符在多个*操作后调用析构函数时失败
- 编译器错误-元数据操作失败
- 可能在刷新操作中写入文件失败
- Qt打开文本文件操作失败
- Allegro5 - openGL:失败请求的主要操作码:55 (X_CreateGC)
- 调试断言失败!使用指针运算的字符串操作
- 操作失败后,TransferClient不返回错误消息