acedinet.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2015 Autodesk, Inc. All rights reserved.
  4. //
  5. // Use of this software is subject to the terms of the Autodesk license
  6. // agreement provided at the time of installation or download, or which
  7. // otherwise accompanies this software in either electronic or hard copy form.
  8. //
  9. //////////////////////////////////////////////////////////////////////////////
  10. //
  11. // Name: acedInet.h
  12. //
  13. // Remarks: Miscellaneous functions to create and resolve Windows shell links
  14. // and MS Internet Explorer shortcuts.
  15. //
  16. //////////////////////////////////////////////////////////////////////////////
  17. #if !defined(AFX_ACEDINET_H__2357B7CE_20CE_11d2_A981_0060B0CD39AD__INCLUDED_)
  18. #define AFX_ACEDINET_H__2357B7CE_20CE_11d2_A981_0060B0CD39AD__INCLUDED_
  19. #pragma pack (push, 8)
  20. // FUNCTION acedCreateShortcut()
  21. //
  22. // ARGUMENTS pvHwndParent -- pointer to a window handle (of type HWND)
  23. // that will be used as the parent window in
  24. // case we need to display a message box or
  25. // an animation dialog; this value should not
  26. // be NULL
  27. // szLinkPath -- full path to the .lnk file that will be
  28. // created as the Windows-style shortcut;
  29. // note that the ".lnk" extension is required
  30. // szObjectPath -- full path to the filesystem object which
  31. // the shortcut will point to
  32. // szDesc -- a descriptive string for the shortcut; can
  33. // have any arbitrary value except NULL
  34. //
  35. // RETURN VALUE Adesk::kTrue on success; Adesk::kFalse on failure
  36. //
  37. extern Adesk::Boolean
  38. acedCreateShortcut(/*[in]*/void* pvHwndParent, /*[in]*/const ACHAR* szLinkPath,
  39. /*[in]*/const ACHAR* szObjectPath, /*[in]*/const ACHAR* szDesc);
  40. // FUNCTION acedResolveShortcut()
  41. //
  42. // ARGUMENTS pvHwndParent -- pointer to a window handle (of type HWND)
  43. // that will be used as the parent window in
  44. // case we need to display a message box or
  45. // an animation dialog; this value should not
  46. // be NULL
  47. // szLinkPath -- full path to the .lnk file that will be
  48. // created as the Windows-style shortcut;
  49. // note that the ".lnk" extension is required
  50. // szObjectPath -- an ACHAR buffer that receives the full path
  51. // of the filesystem object which the shortcut
  52. // points; it is the caller's responsibility
  53. // to provide a sufficiently large buffer
  54. //
  55. // RETURN VALUE Adesk::kTrue on success; Adesk::kFalse on failure
  56. //
  57. extern Adesk::Boolean
  58. acedResolveShortcut(/*[in]*/void* pvHwndParent, /*[in]*/const ACHAR* szLinkPath,
  59. /*[out]*/ACHAR* szObjectPath);
  60. //
  61. // FUNCTION acedGetUserFavoritesDir()
  62. //
  63. // ARGUMENTS szFavoritesDir -- a char buffer that receives the full path
  64. // to the Windows Favorites folder of the
  65. // currently logged-in user; it is the caller's
  66. // responsibility to provide a sufficiently
  67. // large buffer
  68. //
  69. // RETURN VALUE Adesk::kTrue on success; Adesk::kFalse on failure
  70. //
  71. extern Adesk::Boolean
  72. acedGetUserFavoritesDir(/*[out]*/ACHAR* szFavoritesDir);
  73. // 'acedCreateInternetShortcut()' creates an MSIE-compatible Internet shortcut
  74. // using the arguments passed to it. 'szURL' is the URL that the shortcut will
  75. // "wrap" (point to), and 'szShortcutPath' is the filesystem path to the resulting
  76. // shortcut.
  77. //
  78. // Note that 'szShortcutPath' should specify a path to a file that has the ".url"
  79. // extension. In the absence of such an extension, the specified path will be
  80. // considered invalid and Adesk::kFalse will be returned.
  81. //
  82. // RETURN VALUE Adesk::kTrue on success; Adesk::kFalse on failure
  83. //
  84. extern Adesk::Boolean
  85. acedCreateInternetShortcut(/*[in]*/const ACHAR* szURL, /*[in]*/const ACHAR* szShortcutPath);
  86. // 'acedResolveInternetShortcut()' is the inverse of 'acedCreateInternetShortcut().'
  87. // This function accepts a path to an (MSIE-compatible) Internet shortcut file and
  88. // extracts the URL from it. The retrieved URL is returned via the parameter 'szURL.'
  89. // It is the caller's responsibility to ensure that 'szURL' points to a sufficiently
  90. // large buffer.
  91. //
  92. // RETURN VALUE Adesk::kTrue on success; Adesk::kFalse on failure
  93. //
  94. extern Adesk::Boolean
  95. acedResolveInternetShortcut(/*[in]*/const ACHAR* szLinkFile, /*[out]*/ACHAR* szUrl);
  96. #pragma pack (pop)
  97. #endif // #define AFX_ACEDINET_H__2357B7CE_20CE_11d2_A981_0060B0CD39AD__INCLUDED_