Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.8 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. Shortcut.h
  5. Abstract:
  6. Class definition for the IShellLink wrapper class.
  7. Notes:
  8. ANSI & Unicode via TCHAR - runs on Win9x/NT/2K/XP etc.
  9. History:
  10. 01/30/2001 rparsons Created
  11. 01/10/2002 rparsons Revised
  12. 01/27/2002 rparsons Converted to TCHAR
  13. --*/
  14. #ifndef _CSHORTCUT_H
  15. #define _CSHORTCUT_H
  16. #include <windows.h>
  17. #include <tchar.h>
  18. #include <shlobj.h>
  19. #include <stdio.h>
  20. #include <strsafe.h>
  21. #define ARRAYSIZE(a) (sizeof(a) / sizeof(a[0]))
  22. class CShortcut {
  23. public:
  24. HRESULT CreateShortcut(IN LPCTSTR pszFileNamePath,
  25. IN LPTSTR pszDisplayName,
  26. IN LPCTSTR pszArguments OPTIONAL,
  27. IN LPCTSTR pszStartIn OPTIONAL,
  28. IN int nCmdShow,
  29. IN int nFolder);
  30. HRESULT CreateShortcut(IN LPCTSTR pszLnkDirectory,
  31. IN LPCTSTR pszFileNamePath,
  32. IN LPTSTR pszDisplayName,
  33. IN LPCTSTR pszArguments OPTIONAL,
  34. IN LPCTSTR pszStartIn OPTIONAL,
  35. IN int nCmdShow);
  36. HRESULT CreateGroup(IN LPCTSTR pszGroupName,
  37. IN BOOL fAllUsers);
  38. HRESULT SetArguments(IN LPTSTR pszFileName,
  39. IN LPTSTR pszArguments);
  40. private:
  41. HRESULT BuildShortcut(IN LPCTSTR pszPath,
  42. IN LPCTSTR pszArguments OPTIONAL,
  43. IN LPCTSTR pszLocation,
  44. IN LPCTSTR pszWorkingDir OPTIONAL,
  45. IN int nCmdShow);
  46. };
  47. #endif // _CSHORTCUT_H