IShellLinkW.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. using System.Runtime.InteropServices;
  3. using System.Text;
  4. namespace Standard;
  5. [Guid("000214F9-0000-0000-C000-000000000046")]
  6. [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  7. [ComImport]
  8. internal interface IShellLinkW
  9. {
  10. void GetPath([MarshalAs(UnmanagedType.LPWStr)][Out] StringBuilder pszFile, int cchMaxPath, [In][Out] WIN32_FIND_DATAW pfd, SLGP fFlags);
  11. void GetIDList(out IntPtr ppidl);
  12. void SetIDList(IntPtr pidl);
  13. void GetDescription([MarshalAs(UnmanagedType.LPWStr)][Out] StringBuilder pszFile, int cchMaxName);
  14. void SetDescription([MarshalAs(UnmanagedType.LPWStr)] string pszName);
  15. void GetWorkingDirectory([MarshalAs(UnmanagedType.LPWStr)][Out] StringBuilder pszDir, int cchMaxPath);
  16. void SetWorkingDirectory([MarshalAs(UnmanagedType.LPWStr)] string pszDir);
  17. void GetArguments([MarshalAs(UnmanagedType.LPWStr)][Out] StringBuilder pszArgs, int cchMaxPath);
  18. void SetArguments([MarshalAs(UnmanagedType.LPWStr)] string pszArgs);
  19. short GetHotKey();
  20. void SetHotKey(short wHotKey);
  21. uint GetShowCmd();
  22. void SetShowCmd(uint iShowCmd);
  23. void GetIconLocation([MarshalAs(UnmanagedType.LPWStr)][Out] StringBuilder pszIconPath, int cchIconPath, out int piIcon);
  24. void SetIconLocation([MarshalAs(UnmanagedType.LPWStr)] string pszIconPath, int iIcon);
  25. void SetRelativePath([MarshalAs(UnmanagedType.LPWStr)] string pszPathRel, uint dwReserved);
  26. void Resolve(IntPtr hwnd, uint fFlags);
  27. void SetPath([MarshalAs(UnmanagedType.LPWStr)] string pszFile);
  28. }