C#中如何像VB一样使用API
高手请解答一下吧!
确认一下,kernal.dll是包含大多数API,你使用时要先找到你的API的文件, 例如, [DllImport("Shell32.dll")] public static extern int SHGetFileInfo(string pszPath, uint dwFileAttributes, ref SHFILEINFO psfi, uint cbFileInfo, uint uFlags);
public struct SHFILEINFO { public IntPtr hIcon; public int iIcon; public uint dwAttributes; public char szDisplayName; public char szTypeName; }