Source code of Windows XP (NT5)
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.

188 lines
4.3 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. linkpif.h
  5. Abstract:
  6. Implements routines to manage .LNK and .PIF files. This
  7. is a complete redesign from the work that MikeCo did.
  8. Author:
  9. Calin Negreanu (calinn) 23-Sep-1998
  10. Revision History:
  11. <alias> <date> <comments>
  12. --*/
  13. #pragma once
  14. typedef struct _LNK_EXTRA_DATAA {
  15. BOOL FullScreen;
  16. DWORD xSize;
  17. DWORD ySize;
  18. BOOL QuickEdit;
  19. CHAR FontName [LF_FACESIZE];
  20. DWORD xFontSize;
  21. DWORD yFontSize;
  22. DWORD FontWeight;
  23. DWORD FontFamily;
  24. WORD CurrentCodePage;
  25. } LNK_EXTRA_DATAA, *PLNK_EXTRA_DATAA;
  26. typedef struct _LNK_EXTRA_DATAW {
  27. BOOL FullScreen;
  28. DWORD xSize;
  29. DWORD ySize;
  30. BOOL QuickEdit;
  31. WCHAR FontName [LF_FACESIZE];
  32. DWORD xFontSize;
  33. DWORD yFontSize;
  34. DWORD FontWeight;
  35. DWORD FontFamily;
  36. WORD CurrentCodePage;
  37. } LNK_EXTRA_DATAW, *PLNK_EXTRA_DATAW;
  38. BOOL
  39. InitCOMLinkA (
  40. OUT IShellLinkA **ShellLink,
  41. OUT IPersistFile **PersistFile
  42. );
  43. BOOL
  44. InitCOMLinkW (
  45. OUT IShellLinkW **ShellLink,
  46. OUT IPersistFile **PersistFile
  47. );
  48. BOOL
  49. FreeCOMLinkA (
  50. IN OUT IShellLinkA **ShellLink,
  51. IN OUT IPersistFile **PersistFile
  52. );
  53. BOOL
  54. FreeCOMLinkW (
  55. IN OUT IShellLinkW **ShellLink,
  56. IN OUT IPersistFile **PersistFile
  57. );
  58. BOOL
  59. ExtractPifInfoA(
  60. OUT PSTR Target,
  61. OUT PSTR Params,
  62. OUT PSTR WorkDir,
  63. OUT PSTR IconPath,
  64. OUT PINT IconNumber,
  65. OUT BOOL *MsDosMode,
  66. OUT PLNK_EXTRA_DATAA ExtraData, OPTIONAL
  67. IN PCSTR FileName
  68. );
  69. BOOL
  70. ExtractPifInfoW(
  71. OUT PWSTR Target,
  72. OUT PWSTR Params,
  73. OUT PWSTR WorkDir,
  74. OUT PWSTR IconPath,
  75. OUT PINT IconNumber,
  76. OUT BOOL *MsDosMode,
  77. OUT PLNK_EXTRA_DATAW ExtraData, OPTIONAL
  78. IN PCWSTR FileName
  79. );
  80. BOOL
  81. ExtractShellLinkInfoA (
  82. OUT PSTR Target,
  83. OUT PSTR Params,
  84. OUT PSTR WorkDir,
  85. OUT PSTR IconPath,
  86. OUT PINT IconNumber,
  87. OUT PWORD HotKey,
  88. OUT PINT ShowMode, OPTIONAL
  89. IN PCSTR FileName,
  90. IN IShellLinkA *ShellLink,
  91. IN IPersistFile *PersistFile
  92. );
  93. BOOL
  94. ExtractShellLinkInfoW (
  95. OUT PWSTR Target,
  96. OUT PWSTR Params,
  97. OUT PWSTR WorkDir,
  98. OUT PWSTR IconPath,
  99. OUT PINT IconNumber,
  100. OUT PWORD HotKey,
  101. OUT PINT ShowMode, OPTIONAL
  102. IN PCWSTR FileName,
  103. IN IShellLinkW *ShellLink,
  104. IN IPersistFile *PersistFile
  105. );
  106. BOOL
  107. ExtractShortcutInfoA (
  108. OUT PSTR Target,
  109. OUT PSTR Params,
  110. OUT PSTR WorkDir,
  111. OUT PSTR IconPath,
  112. OUT PINT IconNumber,
  113. OUT PWORD HotKey,
  114. OUT BOOL *DosApp,
  115. OUT BOOL *MsDosMode,
  116. OUT PINT ShowMode, OPTIONAL
  117. OUT PLNK_EXTRA_DATAA ExtraData, OPTIONAL
  118. IN PCSTR FileName,
  119. IN IShellLinkA *ShellLink,
  120. IN IPersistFile *PersistFile
  121. );
  122. BOOL
  123. ExtractShortcutInfoW (
  124. OUT PWSTR Target,
  125. OUT PWSTR Params,
  126. OUT PWSTR WorkDir,
  127. OUT PWSTR IconPath,
  128. OUT PINT IconNumber,
  129. OUT PWORD HotKey,
  130. OUT BOOL *DosApp,
  131. OUT BOOL *MsDosMode,
  132. OUT PINT ShowMode, OPTIONAL
  133. OUT PLNK_EXTRA_DATAW ExtraData, OPTIONAL
  134. IN PCWSTR FileName,
  135. IN IShellLinkW *ShellLink,
  136. IN IPersistFile *PersistFile
  137. );
  138. PVOID
  139. FindEnhPifSignature (
  140. IN PVOID FileImage,
  141. IN PCSTR Signature
  142. );
  143. #ifdef UNICODE
  144. #define InitCOMLink InitCOMLinkW
  145. #define FreeCOMLink FreeCOMLinkW
  146. #define ExtractPifInfo ExtractPifInfoW
  147. #define ExtractShellLinkInfo ExtractShellLinkInfoW
  148. #define ExtractShortcutInfo ExtractShortcutInfoW
  149. #define LNK_EXTRA_DATA LNK_EXTRA_DATAW
  150. #define PLNK_EXTRA_DATA PLNK_EXTRA_DATAW
  151. #else
  152. #define InitCOMLink InitCOMLinkA
  153. #define FreeCOMLink FreeCOMLinkA
  154. #define ExtractPifInfo ExtractPifInfoA
  155. #define ExtractShellLinkInfo ExtractShellLinkInfoA
  156. #define ExtractShortcutInfo ExtractShortcutInfoA
  157. #define LNK_EXTRA_DATA LNK_EXTRA_DATAA
  158. #define PLNK_EXTRA_DATA PLNK_EXTRA_DATAA
  159. #endif