【问题标题】:Externs and DLL imports外部和 DLL 导入
【发布时间】:2012-09-06 15:31:45
【问题描述】:

我的代码中有这几行看起来很奇怪,我正试图破译。有谁知道上面写的是什么?

[DllImport("kernel32")]
private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath);

【问题讨论】:

标签: dllimport extern


【解决方案1】:

该行称为 Platform Invoke,基本上它只是使 kernel32.dll 中的函数 GetPrivateProfileString 可用于您的程序。查看http://www.pinvoke.net/default.aspx/kernel32.GetPrivateProfileString 了解有关该特定功能的更多信息。

【讨论】:

    猜你喜欢
    • 2010-11-04
    • 1970-01-01
    • 2021-05-31
    • 1970-01-01
    • 1970-01-01
    • 2013-07-25
    • 2010-09-10
    • 1970-01-01
    • 2011-11-30
    相关资源
    最近更新 更多