gpt4 book ai didi

c++ - 编译器错误 - 元数据操作失败

转载 作者:太空宇宙 更新时间:2023-11-04 14:18:53 25 4
gpt4 key购买 nike

我收到这个错误:

    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 返回不映射到 Int64 的 BOOL。

顺便说一句,当您调用此函数的 ANSI 版本时,您可能会遇到麻烦。 Windows 7 创建系统保留分区时,安装程​​序会根据安装程序的语言为其指定一个卷名,该卷名不必与您将在其中执行的环境相匹配。最好调用 Unicode 版本。

关于c++ - 编译器错误 - 元数据操作失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9169026/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com