shellapi.pp 101 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929
  1. {
  2. This file is part of the Free Pascal run time library.
  3. This unit contains the record definition for the Win32 API
  4. Copyright (c) 1999-2002 by Marco van de Voort,
  5. member of the Free Pascal development team.
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. ************************************************************************}
  12. { leave out unused functions so the unit can be used on win2000 as well }
  13. {$ifndef NO_SMART_LINK}
  14. {$smartlink on}
  15. {$endif}
  16. {$PACKRECORDS C}
  17. {$calling stdcall}
  18. {$mode objfpc}
  19. {$ifdef FPC_OS_UNICODE}
  20. {$define UNICODE}
  21. {$endif}
  22. Unit ShellApi;
  23. //+-------------------------------------------------------------------------
  24. //
  25. // Microsoft Windows
  26. // Copyright (c) Microsoft Corporation. All rights reserved.
  27. //
  28. // File: shellapi.h
  29. //
  30. // Header translation by Marco van de Voort for Free Pascal Platform
  31. // SDK dl'ed January 2002
  32. //
  33. //--------------------------------------------------------------------------
  34. Interface
  35. Uses Windows, ActiveX;
  36. {
  37. shellapi.h - SHELL.DLL functions, types, and definitions
  38. Copyright (c) Microsoft Corporation. All rights reserved. }
  39. const
  40. shell32 = 'shell32.dll';
  41. Const
  42. SHGDN_NORMAL = $0000; // default (display purpose)
  43. SHGDN_INFOLDER = $0001; // displayed under a folder (relative)
  44. SHGDN_FOREDITING = $1000; // for in-place editing
  45. SHGDN_FORADDRESSBAR = $4000; // UI friendly parsing name (remove ugly stuff)
  46. SHGDN_FORPARSING = $8000; // parsing name for ParseDisplayName()
  47. SHCONTF_FOLDERS = $0020; // only want folders enumerated (SFGAO_FOLDER)
  48. SHCONTF_NONFOLDERS = $0040; // include non folders
  49. SHCONTF_INCLUDEHIDDEN = $0080; // show items normally hidden
  50. SHCONTF_INIT_ON_FIRST_NEXT = $0100; // allow EnumObject() to return before validating enum
  51. SHCONTF_NETPRINTERSRCH = $0200; // hint that client is looking for printers
  52. SHCONTF_SHAREABLE = $0400; // hint that client is looking sharable resources (remote shares)
  53. SHCONTF_STORAGE = $0800; // include all items with accessible storage and their ancestors
  54. SHCIDS_ALLFIELDS = $80000000;
  55. SHCIDS_CANONICALONLY = $10000000;
  56. SHCIDS_BITMASK = $FFFF0000;
  57. SHCIDS_COLUMNMASK = $0000FFFF;
  58. SFGAO_CANCOPY = DROPEFFECT_COPY; // Objects can be copied (= $1)
  59. SFGAO_CANMOVE = DROPEFFECT_MOVE; // Objects can be moved (= $2)
  60. SFGAO_CANLINK = DROPEFFECT_LINK; // Objects can be linked (= $4)
  61. SFGAO_STORAGE = $00000008; // supports BindToObject(IID_IStorage)
  62. SFGAO_CANRENAME = $00000010; // Objects can be renamed
  63. SFGAO_CANDELETE = $00000020; // Objects can be deleted
  64. SFGAO_HASPROPSHEET = $00000040; // Objects have property sheets
  65. SFGAO_DROPTARGET = $00000100; // Objects are drop target
  66. SFGAO_CAPABILITYMASK = $00000177;
  67. SFGAO_ENCRYPTED = $00002000; // object is encrypted (use alt color)
  68. SFGAO_ISSLOW = $00004000; // 'slow' object
  69. SFGAO_GHOSTED = $00008000; // ghosted icon
  70. SFGAO_LINK = $00010000; // Shortcut (link)
  71. SFGAO_SHARE = $00020000; // shared
  72. SFGAO_READONLY = $00040000; // read-only
  73. SFGAO_HIDDEN = $00080000; // hidden object
  74. SFGAO_DISPLAYATTRMASK = $000FC000;
  75. SFGAO_FILESYSANCESTOR = $10000000; // may contain children with SFGAO_FILESYSTEM
  76. SFGAO_FOLDER = $20000000; // support BindToObject(IID_IShellFolder)
  77. SFGAO_FILESYSTEM = $40000000; // is a win32 file system object (file/folder/root)
  78. SFGAO_HASSUBFOLDER = $80000000; // may contain children with SFGAO_FOLDER
  79. SFGAO_CONTENTSMASK = $80000000;
  80. SFGAO_VALIDATE = $01000000; // invalidate cached information
  81. SFGAO_REMOVABLE = $02000000; // is this removeable media?
  82. SFGAO_COMPRESSED = $04000000; // Object is compressed (use alt color)
  83. SFGAO_BROWSABLE = $08000000; // supports IShellFolder, but only implements CreateViewObject() (non-folder view)
  84. SFGAO_NONENUMERATED = $00100000; // is a non-enumerated object
  85. SFGAO_NEWCONTENT = $00200000; // should show bold in explorer tree
  86. SFGAO_CANMONIKER = $00400000; // defunct
  87. SFGAO_HASSTORAGE = $00400000; // defunct
  88. SFGAO_STREAM = $00400000; // supports BindToObject(IID_IStream)
  89. SFGAO_STORAGEANCESTOR = $00800000; // may contain children with SFGAO_STORAGE or SFGAO_STREAM
  90. SFGAO_STORAGECAPMASK = $70C50008; // for determining storage capabilities, ie for open/save semantics
  91. SHCOLSTATE_TYPE_STR = $1;
  92. SHCOLSTATE_TYPE_INT = $2;
  93. SHCOLSTATE_TYPE_DATE = $3;
  94. SHCOLSTATE_TYPEMASK = $f;
  95. SHCOLSTATE_ONBYDEFAULT = $10;
  96. SHCOLSTATE_SLOW = $20;
  97. SHCOLSTATE_EXTENDED = $40;
  98. SHCOLSTATE_SECONDARYUI = $80;
  99. SHCOLSTATE_HIDDEN = $100;
  100. SHCOLSTATE_PREFER_VARCMP = $200;
  101. GIL_OPENICON = $0001; // allows containers to specify an "open" look
  102. GIL_FORSHELL = $0002; // icon is to be displayed in a ShellFolder
  103. GIL_ASYNC = $0020; // this is an async extract, return E_PENDING
  104. GIL_DEFAULTICON = $0040; // get the default icon location if the final one takes too long to get
  105. GIL_FORSHORTCUT = $0080; // the icon is for a shortcut to the object
  106. // GetIconLocation() return flags
  107. GIL_SIMULATEDOC = $0001; // simulate this document icon for this
  108. GIL_PERINSTANCE = $0002; // icons from this class are per instance (each file has its own)
  109. GIL_PERCLASS = $0004; // icons from this class per class (shared for all files of this type)
  110. GIL_NOTFILENAME = $0008; // location is not a filename, must call ::ExtractIcon
  111. GIL_DONTCACHE = $0010; // this icon should not be cached
  112. // QueryContextMenu uFlags
  113. CMF_NORMAL = $00000000;
  114. CMF_DEFAULTONLY = $00000001;
  115. CMF_VERBSONLY = $00000002;
  116. CMF_EXPLORE = $00000004;
  117. CMF_NOVERBS = $00000008;
  118. CMF_CANRENAME = $00000010;
  119. CMF_NODEFAULT = $00000020;
  120. CMF_INCLUDESTATIC = $00000040;
  121. CMF_EXTENDEDVERBS = $00000100; // rarely used verbs
  122. CMF_RESERVED = $ffff0000; // View specific
  123. // GetCommandString uFlags
  124. GCS_VERBA = $00000000; // canonical verb
  125. GCS_HELPTEXTA = $00000001; // help text (for status bar)
  126. GCS_VALIDATEA = $00000002; // validate command exists
  127. GCS_VERBW = $00000004; // canonical verb (unicode)
  128. GCS_HELPTEXTW = $00000005; // help text (unicode version)
  129. GCS_VALIDATEW = $00000006; // validate command exists (unicode)
  130. GCS_UNICODE = $00000004; // for bit testing - Unicode string
  131. {$ifdef UNICODE}
  132. GCS_VERB = GCS_VERBW;
  133. GCS_HELPTEXT = GCS_HELPTEXTW;
  134. GCS_VALIDATE = GCS_VALIDATEW;
  135. {$else}
  136. GCS_VERB = GCS_VERBA;
  137. GCS_HELPTEXT = GCS_HELPTEXTA;
  138. GCS_VALIDATE = GCS_VALIDATEA;
  139. {$endif}
  140. SLDF_HAS_ID_LIST = $00000001; // Shell link saved with ID list
  141. SLDF_HAS_LINK_INFO = $00000002; // Shell link saved with LinkInfo
  142. SLDF_HAS_NAME = $00000004;
  143. SLDF_HAS_RELPATH = $00000008;
  144. SLDF_HAS_WORKINGDIR = $00000010;
  145. SLDF_HAS_ARGS = $00000020;
  146. SLDF_HAS_ICONLOCATION = $00000040;
  147. SLDF_UNICODE = $00000080; // the strings are unicode
  148. SLDF_FORCE_NO_LINKINFO = $00000100; // don't create a LINKINFO (make a dumb link)
  149. SLDF_HAS_EXP_SZ = $00000200; // the link contains expandable env strings
  150. SLDF_RUN_IN_SEPARATE = $00000400; // Run the 16-bit target exe in a separate VDM/WOW
  151. SLDF_HAS_LOGO3ID = $00000800; // this link is a special Logo3/MSICD link
  152. SLDF_HAS_DARWINID = $00001000; // this link is a special Darwin link
  153. SLDF_RUNAS_USER = $00002000; // Run this link as a different user
  154. SLDF_HAS_EXP_ICON_SZ = $00004000; // contains expandable env string for icon path
  155. SLDF_NO_PIDL_ALIAS = $00008000; // don't ever resolve to a logical location
  156. SLDF_FORCE_UNCNAME = $00010000; // make GetPath() prefer the UNC name to the local name
  157. SLDF_RUN_WITH_SHIMLAYER = $00020000; // Launch the target of this link w/ shim layer active
  158. SLDF_RESERVED = $80000000; // Reserved-- so we can use the low word as an index value in the future
  159. // Define File View Show Info Flags.
  160. FVSIF_RECT = $00000001; // The rect variable has valid data.
  161. FVSIF_PINNED = $00000002; // We should Initialize pinned
  162. FVSIF_NEWFAILED = $08000000; // The new file passed back failed
  163. // to be viewed.
  164. FVSIF_NEWFILE = dword($80000000); // A new file to view has been returned
  165. FVSIF_CANVIEWIT = $40000000; // The viewer can view it.
  166. FCIDM_SHVIEWFIRST = $0000;
  167. FCIDM_SHVIEWLAST = $7fff;
  168. FCIDM_BROWSERFIRST = $a000;
  169. FCIDM_BROWSERLAST = $bf00;
  170. FCIDM_GLOBALFIRST = $8000;
  171. FCIDM_GLOBALLAST = $9fff;
  172. //
  173. // Global submenu IDs and separator IDs
  174. //
  175. FCIDM_MENU_FILE = (FCIDM_GLOBALFIRST+$0000);
  176. FCIDM_MENU_EDIT = (FCIDM_GLOBALFIRST+$0040);
  177. FCIDM_MENU_VIEW = (FCIDM_GLOBALFIRST+$0080);
  178. FCIDM_MENU_VIEW_SEP_OPTIONS = (FCIDM_GLOBALFIRST+$0081);
  179. FCIDM_MENU_TOOLS = (FCIDM_GLOBALFIRST+$00c0); // for Win9x compat
  180. FCIDM_MENU_TOOLS_SEP_GOTO = (FCIDM_GLOBALFIRST+$00c1); // for Win9x compat
  181. FCIDM_MENU_HELP = (FCIDM_GLOBALFIRST+$0100);
  182. FCIDM_MENU_FIND = (FCIDM_GLOBALFIRST+$0140);
  183. FCIDM_MENU_EXPLORE = (FCIDM_GLOBALFIRST+$0150);
  184. FCIDM_MENU_FAVORITES = (FCIDM_GLOBALFIRST+$0170);
  185. PANE_NONE = -1;
  186. PANE_ZONE = 1;
  187. PANE_OFFLINE = 2;
  188. PANE_PRINTER = 3;
  189. PANE_SSL = 4;
  190. PANE_NAVIGATION = 5;
  191. PANE_PROGRESS = 6;
  192. PANE_PRIVACY = 7;
  193. CDBOSC_SETFOCUS = $00000000;
  194. CDBOSC_KILLFOCUS = $00000001;
  195. CDBOSC_SELCHANGE = $00000002;
  196. CDBOSC_RENAME = $00000003;
  197. CDBOSC_STATECHANGE = $00000004;
  198. CDB2N_CONTEXTMENU_DONE = $00000001;
  199. CDB2N_CONTEXTMENU_START = $00000002;
  200. //GetViewFlags
  201. CDB2GVF_SHOWALLFILES = $00000001;
  202. CSIDL_DESKTOP = $0000; // <desktop>
  203. CSIDL_INTERNET = $0001; // Internet Explorer (icon on desktop)
  204. CSIDL_PROGRAMS = $0002; // Start Menu\Programs
  205. CSIDL_CONTROLS = $0003; // My Computer\Control Panel
  206. CSIDL_PRINTERS = $0004; // My Computer\Printers
  207. CSIDL_PERSONAL = $0005; // My Documents
  208. CSIDL_FAVORITES = $0006; // <user name>\Favorites
  209. CSIDL_STARTUP = $0007; // Start Menu\Programs\Startup
  210. CSIDL_RECENT = $0008; // <user name>\Recent
  211. CSIDL_SENDTO = $0009; // <user name>\SendTo
  212. CSIDL_BITBUCKET = $000a; // <desktop>\Recycle Bin
  213. CSIDL_STARTMENU = $000b; // <user name>\Start Menu
  214. CSIDL_MYDOCUMENTS = $000c; // logical "My Documents" desktop icon
  215. CSIDL_MYMUSIC = $000d; // "My Music" folder
  216. CSIDL_MYVIDEO = $000e; // "My Videos" folder
  217. CSIDL_DESKTOPDIRECTORY = $0010; // <user name>\Desktop
  218. CSIDL_DRIVES = $0011; // My Computer
  219. CSIDL_NETWORK = $0012; // Network Neighborhood (My Network Places)
  220. CSIDL_NETHOOD = $0013; // <user name>\nethood
  221. CSIDL_FONTS = $0014; // windows\fonts
  222. CSIDL_TEMPLATES = $0015;
  223. CSIDL_COMMON_STARTMENU = $0016; // All Users\Start Menu
  224. CSIDL_COMMON_PROGRAMS = $0017; // All Users\Start Menu\Programs
  225. CSIDL_COMMON_STARTUP = $0018; // All Users\Startup
  226. CSIDL_COMMON_DESKTOPDIRECTORY = $0019; // All Users\Desktop
  227. CSIDL_APPDATA = $001a; // <user name>\Application Data
  228. CSIDL_PRINTHOOD = $001b; // <user name>\PrintHood
  229. CSIDL_LOCAL_APPDATA = $001c; // <user name>\Local Settings\Applicaiton Data (non roaming)
  230. CSIDL_ALTSTARTUP = $001d; // non localized startup
  231. CSIDL_COMMON_ALTSTARTUP = $001e; // non localized common startup
  232. CSIDL_COMMON_FAVORITES = $001f;
  233. CSIDL_INTERNET_CACHE = $0020;
  234. CSIDL_COOKIES = $0021;
  235. CSIDL_HISTORY = $0022;
  236. CSIDL_COMMON_APPDATA = $0023; // All Users\Application Data
  237. CSIDL_WINDOWS = $0024; // GetWindowsDirectory()
  238. CSIDL_SYSTEM = $0025; // GetSystemDirectory()
  239. CSIDL_PROGRAM_FILES = $0026; // C:\Program Files
  240. CSIDL_MYPICTURES = $0027; // C:\Program Files\My Pictures
  241. CSIDL_PROFILE = $0028; // USERPROFILE
  242. CSIDL_SYSTEMX86 = $0029; // x86 system directory on RISC
  243. CSIDL_PROGRAM_FILESX86 = $002a; // x86 C:\Program Files on RISC
  244. CSIDL_PROGRAM_FILES_COMMON = $002b; // C:\Program Files\Common
  245. CSIDL_PROGRAM_FILES_COMMONX86 = $002c; // x86 Program Files\Common on RISC
  246. CSIDL_COMMON_TEMPLATES = $002d; // All Users\Templates
  247. CSIDL_COMMON_DOCUMENTS = $002e; // All Users\Documents
  248. CSIDL_COMMON_ADMINTOOLS = $002f; // All Users\Start Menu\Programs\Administrative Tools
  249. CSIDL_ADMINTOOLS = $0030; // <user name>\Start Menu\Programs\Administrative Tools
  250. CSIDL_CONNECTIONS = $0031; // Network and Dial-up Connections
  251. CSIDL_COMMON_MUSIC = $0035; // All Users\My Music
  252. CSIDL_COMMON_PICTURES = $0036; // All Users\My Pictures
  253. CSIDL_COMMON_VIDEO = $0037; // All Users\My Video
  254. CSIDL_RESOURCES = $0038; // Resource Direcotry
  255. CSIDL_RESOURCES_LOCALIZED = $0039; // Localized Resource Direcotry
  256. CSIDL_COMMON_OEM_LINKS = $003a; // Links to All Users OEM specific apps
  257. CSIDL_CDBURN_AREA = $003b; // USERPROFILE\Local Settings\Application Data\Microsoft\CD Burning
  258. // unused = $003c
  259. CSIDL_COMPUTERSNEARME = $003d; // Computers Near Me (computered from Workgroup membership)
  260. CSIDL_FLAG_CREATE = $8000; // combine with CSIDL_ value to force folder creation in SHGetFolderPath()
  261. CSIDL_FLAG_DONT_VERIFY = $4000; // combine with CSIDL_ value to return an unverified folder path
  262. CSIDL_FLAG_NO_ALIAS = $1000; // combine with CSIDL_ value to insure non-alias versions of the pidl
  263. CSIDL_FLAG_PER_USER_INIT = $0800; // combine with CSIDL_ value to indicate per-user init (eg. upgrade)
  264. CSIDL_FLAG_MASK = $FF00; // mask for all possible flag values
  265. FCS_READ = $00000001;
  266. FCS_FORCEWRITE = $00000002;
  267. FCS_WRITE = (FCS_READ or FCS_FORCEWRITE);
  268. FCS_FLAG_DRAGDROP = 2;
  269. // Mask which values have been retreived or being set.
  270. FCSM_VIEWID = $00000001;
  271. FCSM_WEBVIEWTEMPLATE = $00000002;
  272. FCSM_INFOTIP = $00000004;
  273. FCSM_CLSID = $00000008;
  274. FCSM_ICONFILE = $00000010;
  275. FCSM_LOGO = $00000020;
  276. FCSM_FLAGS = $00000040;
  277. // Browsing for directory.
  278. BIF_RETURNONLYFSDIRS = $0001; // For finding a folder to start document searching
  279. BIF_DONTGOBELOWDOMAIN = $0002; // For starting the Find Computer
  280. BIF_STATUSTEXT = $0004; // Top of the dialog has 2 lines of text for BROWSEINFO.lpszTitle and one line if
  281. // this flag is set. Passing the message BFFM_SETSTATUSTEXTA to the hwnd can set the
  282. // rest of the text. This is not used with BIF_USENEWUI and BROWSEINFO.lpszTitle gets
  283. // all three lines of text.
  284. BIF_RETURNFSANCESTORS = $0008;
  285. BIF_EDITBOX = $0010; // Add an editbox to the dialog
  286. BIF_VALIDATE = $0020; // insist on valid result (or CANCEL)
  287. BIF_NEWDIALOGSTYLE = $0040; // Use the new dialog layout with the ability to resize
  288. // Caller needs to call OleInitialize() before using this API
  289. BIF_USENEWUI = (BIF_NEWDIALOGSTYLE or BIF_EDITBOX);
  290. BIF_BROWSEINCLUDEURLS = $0080; // Allow URLs to be displayed or entered. (Requires BIF_USENEWUI)
  291. BIF_UAHINT = $0100; // Add a UA hint to the dialog, in place of the edit box. May not be combined with BIF_EDITBOX
  292. BIF_NONEWFOLDERBUTTON = $0200; // Do not add the "New Folder" button to the dialog. Only applicable with BIF_NEWDIALOGSTYLE.
  293. BIF_NOTRANSLATETARGETS = $0400; // don't traverse target as shortcut
  294. BIF_BROWSEFORCOMPUTER = $1000; // Browsing for Computers.
  295. BIF_BROWSEFORPRINTER = $2000; // Browsing for Printers
  296. BIF_BROWSEINCLUDEFILES = $4000; // Browsing for Everything
  297. BIF_SHAREABLE = $8000; // sharable resources displayed (remote shares, requires BIF_USENEWUI)
  298. // message from browser
  299. BFFM_INITIALIZED = 1;
  300. BFFM_SELCHANGED = 2;
  301. BFFM_VALIDATEFAILEDA = 3; // lParam:szPath ret:1(cont),0(EndDialog)
  302. BFFM_VALIDATEFAILEDW = 4; // lParam:wzPath ret:1(cont),0(EndDialog)
  303. BFFM_IUNKNOWN = 5; // provides IUnknown to client. lParam: IUnknown*
  304. // messages to browser
  305. BFFM_SETSTATUSTEXTA = (WM_USER + 100);
  306. BFFM_ENABLEOK = (WM_USER + 101);
  307. BFFM_SETSELECTIONA = (WM_USER + 102);
  308. BFFM_SETSELECTIONW = (WM_USER + 103);
  309. BFFM_SETSTATUSTEXTW = (WM_USER + 104);
  310. BFFM_SETOKTEXT = (WM_USER + 105); // Unicode only
  311. BFFM_SETEXPANDED = (WM_USER + 106); // Unicode only
  312. {$IFDEF UNICODE}
  313. BFFM_SETSTATUSTEXT = BFFM_SETSTATUSTEXTW;
  314. BFFM_SETSELECTION = BFFM_SETSELECTIONW;
  315. {$ELSE}
  316. BFFM_SETSTATUSTEXT = BFFM_SETSTATUSTEXTA;
  317. BFFM_SETSELECTION = BFFM_SETSELECTIONA;
  318. {$ENDIF}
  319. ISHCUTCMDID_DOWNLOADICON = 0;
  320. ISHCUTCMDID_INTSHORTCUTCREATE = 1;
  321. ACLO_NONE = 0; // don't enumerate anything
  322. ACLO_CURRENTDIR = 1; // enumerate current directory
  323. ACLO_MYCOMPUTER = 2; // enumerate MyComputer
  324. ACLO_DESKTOP = 4; // enumerate Desktop Folder
  325. ACLO_FAVORITES = 8; // enumerate Favorites Folder
  326. ACLO_FILESYSONLY = 16; // enumerate only the file system
  327. ACLO_FILESYSDIRS = 32; // enumerate only the file system dirs, UNC shares, and UNC servers.
  328. // Flags for IProgressDialog::StartProgressDialog() (dwFlags)
  329. PROGDLG_NORMAL = $00000000; // default normal progress dlg behavior
  330. PROGDLG_MODAL = $00000001; // the dialog is modal to its hwndParent (default is modeless)
  331. PROGDLG_AUTOTIME = $00000002; // automatically updates the "Line3" text with the "time remaining" (you cant call SetLine3 if you passs this!)
  332. PROGDLG_NOTIME = $00000004; // we dont show the "time remaining" if this is set. We need this if dwTotal < dwCompleted for sparse files
  333. PROGDLG_NOMINIMIZE = $00000008; // Do not have a minimize button in the caption bar.
  334. PROGDLG_NOPROGRESSBAR = $00000010; // Don't display the progress bar
  335. // Time Actions (dwTimerAction)
  336. PDTIMER_RESET = $00000001; // Reset the timer so the progress will be calculated from now until the first ::SetProgress() is called so
  337. // those this time will correspond to the values passed to ::SetProgress(). Only do this before ::SetProgress() is called.
  338. // flags for RemoveToolbar
  339. DWFRF_NORMAL = $0000;
  340. DWFRF_DELETECONFIGDATA = $0001;
  341. // flags for AddToolbar
  342. DWFAF_HIDDEN = $0001; // add hidden
  343. // Convenient state values
  344. IRTIR_TASK_NOT_RUNNING = 0;
  345. IRTIR_TASK_RUNNING = 1;
  346. IRTIR_TASK_SUSPENDED = 2;
  347. IRTIR_TASK_PENDING = 3;
  348. IRTIR_TASK_FINISHED = 4;
  349. // Status() flags,
  350. // wait for the current task to complete before deleting the scheduler
  351. ITSSFLAG_COMPLETE_ON_DESTROY = $0000;
  352. // kill the current task (if there is one) when the task scheduler is deleted
  353. ITSSFLAG_KILL_ON_DESTROY = $0001;
  354. ITSSFLAG_SUPPORTS_TERMINATE = $0002;
  355. ITSSFLAG_FLAGS_MASK = $0003;
  356. // set the timeout for killing the thread when the object is terminated.
  357. // this timeout can be used to stop the object from blocking the system
  358. // indefinitely.
  359. ITSSFLAG_THREAD_TERMINATE_TIMEOUT = $0010;
  360. // set the timeout for threads that are idle in the thread pool
  361. ITSSFLAG_THREAD_POOL_TIMEOUT = $0020;
  362. // The default timeout passed to release Status to determine how long the thread
  363. // can be asleep before the thread is expired
  364. ITSS_THREAD_DESTROY_DEFAULT_TIMEOUT = (60*1000);
  365. // default, we won't kill it...
  366. ITSS_THREAD_TERMINATE_TIMEOUT = (INFINITE);
  367. // there is no change to the thread timeout
  368. ITSS_THREAD_TIMEOUT_NO_CHANGE = (INFINITE - 1);
  369. // the LPARAM allows task to be associated with items thus all tasks owned by a
  370. // particular item can be accessed by passing a non default value for this parameter
  371. ITSAT_DEFAULT_LPARAM = $ffffffff;
  372. // Task priorities
  373. // ---------------
  374. // This depends on the cooperation of tasks currently under execution. New tasks will
  375. // be inserted in the queue in priority order. If a task of a low priority is currently
  376. // under execution when a higher priority task is added, the scheduler will attempt
  377. // to suspend the task currently under execution. It will be resumed when the other tasks
  378. // have been completed.
  379. ITSAT_DEFAULT_PRIORITY = $10000000;
  380. ITSAT_MAX_PRIORITY = $7fffffff;
  381. ITSAT_MIN_PRIORITY = $00000000;
  382. ITSSFLAG_TASK_PLACEINFRONT = $00000001;
  383. ITSSFLAG_TASK_PLACEINBACK = $00000002;
  384. SHIMSTCAPFLAG_LOCKABLE = $0001; // does the store require/support locking
  385. SHIMSTCAPFLAG_PURGEABLE = $0002; // does the store require dead items purging externally ?
  386. //// IShellFolderBand
  387. // Field mask
  388. ISFB_MASK_STATE = $00000001; // TRUE if dwStateMask and dwState is valid
  389. ISFB_MASK_BKCOLOR = $00000002; // TRUE if crBkgnd field is valid
  390. ISFB_MASK_VIEWMODE = $00000004; // TRUE if wViewMode field is valid
  391. ISFB_MASK_SHELLFOLDER = $00000008;
  392. ISFB_MASK_IDLIST = $00000010;
  393. ISFB_MASK_COLORS = $00000020; // TRUE if crXXXX fields are valid (except bkgnd)
  394. ISFB_STATE_DEFAULT = $00000000;
  395. ISFB_STATE_DEBOSSED = $00000001;
  396. ISFB_STATE_ALLOWRENAME = $00000002;
  397. ISFB_STATE_NOSHOWTEXT = $00000004; // TRUE if _fNoShowText
  398. ISFB_STATE_CHANNELBAR = $00000010; // TRUE if we want NavigateTarget support
  399. ISFB_STATE_QLINKSMODE = $00000020; // TRUE if we want to turn off drag & drop onto content items
  400. ISFB_STATE_FULLOPEN = $00000040; // TRUE if band should maximize when opened
  401. ISFB_STATE_NONAMESORT = $00000080; // TRUE if band should _not_ sort icons by name
  402. ISFB_STATE_BTNMINSIZE = $00000100; // TRUE if band should report min thickness of button
  403. ISFBVIEWMODE_SMALLICONS = $0001;
  404. ISFBVIEWMODE_LARGEICONS = $0002;
  405. ISFBVIEWMODE_LOGOS = $0003;
  406. DBC_GS_IDEAL = 0; // get the ideal size
  407. DBC_GS_SIZEDOWN = 1; // clip the height of a rect to a multiple of the rebar's integral size
  408. DBC_HIDE = 0; // Band is hidden (being destroyed)
  409. DBC_SHOW = 1; // Band is visible
  410. DBC_SHOWOBSCURE = 2; // Band is completely obscured
  411. // iCompType values
  412. COMP_TYPE_HTMLDOC = 0;
  413. COMP_TYPE_PICTURE = 1;
  414. COMP_TYPE_WEBSITE = 2;
  415. COMP_TYPE_CONTROL = 3;
  416. COMP_TYPE_CFHTML = 4;
  417. COMP_TYPE_MAX = 4;
  418. // Defines for dwCurItemState
  419. IS_NORMAL = $00000001;
  420. IS_FULLSCREEN = $00000002;
  421. IS_SPLIT = $00000004;
  422. IS_VALIDSIZESTATEBITS = (IS_NORMAL or IS_SPLIT or IS_FULLSCREEN); // The set of IS_* state bits which define the "size" of the component - these bits are mutually exclusive.
  423. IS_VALIDSTATEBITS = (IS_NORMAL or IS_SPLIT or IS_FULLSCREEN or $80000000 or $40000000); // All of the currently defined IS_* bits.
  424. ////////////////////////////////////////////
  425. // Flags for IActiveDesktop::ApplyChanges()
  426. AD_APPLY_SAVE = $00000001;
  427. AD_APPLY_HTMLGEN = $00000002;
  428. AD_APPLY_REFRESH = $00000004;
  429. AD_APPLY_ALL = (AD_APPLY_SAVE or AD_APPLY_HTMLGEN or AD_APPLY_REFRESH);
  430. AD_APPLY_FORCE = $00000008;
  431. AD_APPLY_BUFFERED_REFRESH = $00000010;
  432. AD_APPLY_DYNAMICREFRESH = $00000020;
  433. ////////////////////////////////////////////
  434. // Flags for IActiveDesktop::GetWallpaperOptions()
  435. // IActiveDesktop::SetWallpaperOptions()
  436. WPSTYLE_CENTER = 0;
  437. WPSTYLE_TILE = 1;
  438. WPSTYLE_STRETCH = 2;
  439. WPSTYLE_MAX = 3;
  440. ////////////////////////////////////////////
  441. // Flags for IActiveDesktop::ModifyComponent()
  442. COMP_ELEM_TYPE = $00000001;
  443. COMP_ELEM_CHECKED = $00000002;
  444. COMP_ELEM_DIRTY = $00000004;
  445. COMP_ELEM_NOSCROLL = $00000008;
  446. COMP_ELEM_POS_LEFT = $00000010;
  447. COMP_ELEM_POS_TOP = $00000020;
  448. COMP_ELEM_SIZE_WIDTH = $00000040;
  449. COMP_ELEM_SIZE_HEIGHT = $00000080;
  450. COMP_ELEM_POS_ZINDEX = $00000100;
  451. COMP_ELEM_SOURCE = $00000200;
  452. COMP_ELEM_FRIENDLYNAME = $00000400;
  453. COMP_ELEM_SUBSCRIBEDURL = $00000800;
  454. COMP_ELEM_ORIGINAL_CSI = $00001000;
  455. COMP_ELEM_RESTORED_CSI = $00002000;
  456. COMP_ELEM_CURITEMSTATE = $00004000;
  457. COMP_ELEM_ALL = (COMP_ELEM_TYPE or COMP_ELEM_CHECKED or COMP_ELEM_DIRTY or
  458. COMP_ELEM_NOSCROLL or COMP_ELEM_POS_LEFT or COMP_ELEM_SIZE_WIDTH or
  459. COMP_ELEM_SIZE_HEIGHT or COMP_ELEM_POS_ZINDEX or COMP_ELEM_SOURCE or
  460. COMP_ELEM_FRIENDLYNAME or COMP_ELEM_POS_TOP or COMP_ELEM_SUBSCRIBEDURL or
  461. COMP_ELEM_ORIGINAL_CSI or COMP_ELEM_RESTORED_CSI or COMP_ELEM_CURITEMSTATE);
  462. ////////////////////////////////////////////
  463. // Flags for IActiveDesktop::AddDesktopItemWithUI()
  464. DTI_ADDUI_DEFAULT = $00000000;
  465. DTI_ADDUI_DISPSUBWIZARD = $00000001;
  466. DTI_ADDUI_POSITIONITEM = $00000002;
  467. ////////////////////////////////////////////
  468. // Flags for IActiveDesktop::AddUrl()
  469. ADDURL_SILENT = $0001;
  470. // Default positions for ADI
  471. COMPONENT_DEFAULT_LEFT = $FFFF;
  472. COMPONENT_DEFAULT_TOP = $FFFF;
  473. // Flags for SetSafeMode
  474. SSM_CLEAR = $0000;
  475. SSM_SET = $0001;
  476. SSM_REFRESH = $0002;
  477. SSM_UPDATE = $0004;
  478. // Flags for Set/GetScheme
  479. SCHEME_DISPLAY = $0001;
  480. SCHEME_EDIT = $0002;
  481. SCHEME_LOCAL = $0004;
  482. SCHEME_GLOBAL = $0008;
  483. SCHEME_REFRESH = $0010;
  484. SCHEME_UPDATE = $0020;
  485. SCHEME_DONOTUSE = $0040; // used to be SCHEME_ENUMERATE; no longer supported
  486. SCHEME_CREATE = $0080;
  487. SHCDF_UPDATEITEM = $00000001; // this flag is a hint that the file has changed since the last call to GetItemData
  488. DVASPECT_SHORTNAME = 2; // use for CF_HDROP to get short name version of file paths
  489. DVASPECT_COPY = 3; // use to indicate format is a "Copy" of the data (FILECONTENTS, FILEDESCRIPTOR, etc)
  490. DVASPECT_LINK = 4; // use to indicate format is a "Shortcut" to the data (FILECONTENTS, FILEDESCRIPTOR, etc)
  491. FD_CLSID = $0001;
  492. FD_SIZEPOINT = $0002;
  493. FD_ATTRIBUTES = $0004;
  494. FD_CREATETIME = $0008;
  495. FD_ACCESSTIME = $0010;
  496. FD_WRITESTIME = $0020;
  497. FD_FILESIZE = $0040;
  498. FD_PROGRESSUI = $4000; // Show Progress UI w/Drag and Drop
  499. FD_LINKUI = $8000; // 'link' UI is prefered
  500. SHCNE_RENAMEITEM = DWord($00000001);
  501. SHCNE_CREATE = DWord($00000002);
  502. SHCNE_DELETE = DWord($00000004);
  503. SHCNE_MKDIR = DWord($00000008);
  504. SHCNE_RMDIR = DWord($00000010);
  505. SHCNE_MEDIAINSERTED = DWord($00000020);
  506. SHCNE_MEDIAREMOVED = DWord($00000040);
  507. SHCNE_DRIVEREMOVED = DWord($00000080);
  508. SHCNE_DRIVEADD = DWord($00000100);
  509. SHCNE_NETSHARE = DWord($00000200);
  510. SHCNE_NETUNSHARE = DWord($00000400);
  511. SHCNE_ATTRIBUTES = DWord($00000800);
  512. SHCNE_UPDATEDIR = DWord($00001000);
  513. SHCNE_UPDATEITEM = DWord($00002000);
  514. SHCNE_SERVERDISCONNECT = DWord($00004000);
  515. SHCNE_UPDATEIMAGE = DWord($00008000);
  516. SHCNE_DRIVEADDGUI = DWord($00010000);
  517. SHCNE_RENAMEFOLDER = DWord($00020000);
  518. SHCNE_FREESPACE = DWord($00040000);
  519. SHCNE_EXTENDED_EVENT = DWord($04000000);
  520. SHCNE_ASSOCCHANGED = DWord($08000000);
  521. SHCNE_DISKEVENTS = DWord($0002381F);
  522. SHCNE_GLOBALEVENTS = DWord($0C0581E0); // Events that dont match pidls first
  523. SHCNE_ALLEVENTS = DWord($7FFFFFFF);
  524. SHCNE_INTERRUPT = DWord($80000000); // The presence of this flag indicates
  525. // that the event was generated by an
  526. // interrupt. It is stripped out before
  527. // the clients of SHCNNotify_ see it.
  528. //#if (_WIN32_IE >= $0400)
  529. // SHCNE_EXTENDED_EVENT extended events. These events are ordinals.
  530. // This is not a bitfield.
  531. SHCNEE_ORDERCHANGED = 2; // pidl2 is the changed folder
  532. SHCNEE_MSI_CHANGE = 4; // pidl2 is a SHChangeProductKeyAsIDList
  533. SHCNEE_MSI_UNINSTALL = 5; // pidl2 is a SHChangeProductKeyAsIDList
  534. //#endif
  535. // Flags
  536. // uFlags & SHCNF_TYPE is an ID which indicates what dwItem1 and dwItem2 mean
  537. SHCNF_IDLIST = $0000; // LPITEMIDLIST
  538. SHCNF_PATHA = $0001; // path name
  539. SHCNF_PRINTERA = $0002; // printer friendly name
  540. SHCNF_DWORD = $0003; // DWORD
  541. SHCNF_PATHW = $0005; // path name
  542. SHCNF_PRINTERW = $0006; // printer friendly name
  543. SHCNF_TYPE = $00FF;
  544. SHCNF_FLUSH = $1000;
  545. SHCNF_FLUSHNOWAIT = $2000;
  546. {$ifdef UNICODE}
  547. SHCNF_PATH = SHCNF_PATHW;
  548. SHCNF_PRINTER = SHCNF_PRINTERW;
  549. {$else}
  550. SHCNF_PATH = SHCNF_PATHA;
  551. SHCNF_PRINTER = SHCNF_PRINTERA;
  552. {$endif}
  553. QITIPF_DEFAULT = $00000000;
  554. QITIPF_USENAME = $00000001;
  555. QITIPF_LINKNOTARGET = $00000002;
  556. QITIPF_LINKUSETARGET = $00000004;
  557. QITIPF_USESLOWTIP = $00000008; // Flag says it's OK to take a long time generating tip
  558. QIF_CACHED = $00000001;
  559. QIF_DONTEXPANDFOLDER = $00000002;
  560. //
  561. // SHAddToRecentDocs
  562. //
  563. SHARD_PIDL = DWord($00000001);
  564. SHARD_PATHA = DWord($00000002);
  565. SHARD_PATHW = DWord($00000003);
  566. {$ifdef UNICODE}
  567. SHARD_PATH = SHARD_PATHW;
  568. {$else}
  569. SHARD_PATH = SHARD_PATHA;
  570. {$endif}
  571. //
  572. // SHGetDataFromIDListA/W
  573. //
  574. // SHGetDataFromIDList nFormat values TCHAR
  575. SHGDFIL_FINDDATA = 1;
  576. SHGDFIL_NETRESOURCE = 2;
  577. SHGDFIL_DESCRIPTIONID = 3;
  578. SHDID_ROOT_REGITEM = 1 ;
  579. SHDID_FS_FILE = 2 ;
  580. SHDID_FS_DIRECTORY = 3 ;
  581. SHDID_FS_OTHER = 4 ;
  582. SHDID_COMPUTER_DRIVE35 = 5 ;
  583. SHDID_COMPUTER_DRIVE525 = 6 ;
  584. SHDID_COMPUTER_REMOVABLE = 7 ;
  585. SHDID_COMPUTER_FIXED = 8 ;
  586. SHDID_COMPUTER_NETDRIVE = 9 ;
  587. SHDID_COMPUTER_CDROM = 10;
  588. SHDID_COMPUTER_RAMDISK = 11;
  589. SHDID_COMPUTER_OTHER = 12;
  590. SHDID_NET_DOMAIN = 13;
  591. SHDID_NET_SERVER = 14;
  592. SHDID_NET_SHARE = 15;
  593. SHDID_NET_RESTOFNET = 16;
  594. SHDID_NET_OTHER = 17;
  595. SHDID_COMPUTER_IMAGING = 18;
  596. SHDID_COMPUTER_AUDIO = 19;
  597. SHDID_COMPUTER_SHAREDDOCS = 20;
  598. // PathResolve flags
  599. PRF_VERIFYEXISTS = $0001;
  600. PRF_TRYPROGRAMEXTENSIONS = ($0002 or PRF_VERIFYEXISTS);
  601. PRF_FIRSTDIRDEF = $0004;
  602. PRF_DONTFINDLNK = $0008; // if PRF_TRYPROGRAMEXTENSIONS is specified
  603. PCS_FATAL = $80000000;
  604. PCS_REPLACEDCHAR = $00000001;
  605. PCS_REMOVEDCHAR = $00000002;
  606. PCS_TRUNCATED = $00000004;
  607. PCS_PATHTOOLONG = $00000008; // Always combined with FATA);
  608. MM_ADDSEPARATOR = DWord($00000001);
  609. MM_SUBMENUSHAVEIDS = DWord($00000002);
  610. MM_DONTREMOVESEPS = DWord($00000004);
  611. SHOP_PRINTERNAME = $00000001; // lpObject points to a printer friendly name
  612. SHOP_FILEPATH = $00000002; // lpObject points to a fully qualified path+file name
  613. SHOP_VOLUMEGUID = $00000004; // lpObject points to a Volume GUID
  614. SHFMT_ID_DEFAULT = $FFFF;
  615. //
  616. // Option bits for options parameter
  617. //
  618. SHFMT_OPT_FULL = $0001;
  619. SHFMT_OPT_SYSONLY = $0002;
  620. //
  621. // Special return values. PLEASE NOTE that these are DWORD values.
  622. //
  623. SHFMT_ERROR = DWord($FFFFFFFF); // Error on last format, drive may be formatable
  624. SHFMT_CANCEL = DWord($FFFFFFFE); // Last format was canceled
  625. SHFMT_NOFORMAT = DWord($FFFFFFFD); // Drive is not formatable
  626. REST_NONE = $00000000;
  627. REST_NORUN = $00000001;
  628. REST_NOCLOSE = $00000002;
  629. REST_NOSAVESET = $00000004;
  630. REST_NOFILEMENU = $00000008;
  631. REST_NOSETFOLDERS = $00000010;
  632. REST_NOSETTASKBAR = $00000020;
  633. REST_NODESKTOP = $00000040;
  634. REST_NOFIND = $00000080;
  635. REST_NODRIVES = $00000100;
  636. REST_NODRIVEAUTORUN = $00000200;
  637. REST_NODRIVETYPEAUTORUN = $00000400;
  638. REST_NONETHOOD = $00000800;
  639. REST_STARTBANNER = $00001000;
  640. REST_RESTRICTRUN = $00002000;
  641. REST_NOPRINTERTABS = $00004000;
  642. REST_NOPRINTERDELETE = $00008000;
  643. REST_NOPRINTERADD = $00010000;
  644. REST_NOSTARTMENUSUBFOLDERS = $00020000;
  645. REST_MYDOCSONNET = $00040000;
  646. REST_NOEXITTODOS = $00080000;
  647. REST_ENFORCESHELLEXTSECURITY = $00100000;
  648. REST_LINKRESOLVEIGNORELINKINFO = $00200000;
  649. REST_NOCOMMONGROUPS = $00400000;
  650. REST_SEPARATEDESKTOPPROCESS = $00800000;
  651. REST_NOWEB = $01000000;
  652. REST_NOTRAYCONTEXTMENU = $02000000;
  653. REST_NOVIEWCONTEXTMENU = $04000000;
  654. REST_NONETCONNECTDISCONNECT = $08000000;
  655. REST_STARTMENULOGOFF = $10000000;
  656. REST_NOSETTINGSASSIST = $20000000;
  657. REST_NOINTERNETICON = $40000001;
  658. REST_NORECENTDOCSHISTORY = $40000002;
  659. REST_NORECENTDOCSMENU = $40000003;
  660. REST_NOACTIVEDESKTOP = $40000004;
  661. REST_NOACTIVEDESKTOPCHANGES = $40000005;
  662. REST_NOFAVORITESMENU = $40000006;
  663. REST_CLEARRECENTDOCSONEXIT = $40000007;
  664. REST_CLASSICSHELL = $40000008;
  665. REST_NOCUSTOMIZEWEBVIEW = $40000009;
  666. REST_NOHTMLWALLPAPER = $40000010;
  667. REST_NOCHANGINGWALLPAPER = $40000011;
  668. REST_NODESKCOMP = $40000012;
  669. REST_NOADDDESKCOMP = $40000013;
  670. REST_NODELDESKCOMP = $40000014;
  671. REST_NOCLOSEDESKCOMP = $40000015;
  672. REST_NOCLOSE_DRAGDROPBAND = $40000016; // Disable Close and Drag & Drop on ALL Bands
  673. REST_NOMOVINGBAND = $40000017; // Disable Moving ALL Bands
  674. REST_NOEDITDESKCOMP = $40000018;
  675. REST_NORESOLVESEARCH = $40000019;
  676. REST_NORESOLVETRACK = $4000001A;
  677. REST_FORCECOPYACLWITHFILE = $4000001B;
  678. REST_NOLOGO3CHANNELNOTIFY = $4000001C;
  679. REST_NOFORGETSOFTWAREUPDATE = $4000001D;
  680. REST_NOSETACTIVEDESKTOP = $4000001E; // No Active desktop on Settings Menu
  681. REST_NOUPDATEWINDOWS = $4000001F; // No Windows Update on Settings Menu
  682. REST_NOCHANGESTARMENU = $40000020; // No Context menu or Drag and Drop on Start menu
  683. REST_NOFOLDEROPTIONS = $40000021; // No Folder Options on Settings Menu
  684. REST_HASFINDCOMPUTERS = $40000022; // Show Start/Search/Computers
  685. REST_INTELLIMENUS = $40000023;
  686. REST_RUNDLGMEMCHECKBOX = $40000024;
  687. REST_ARP_ShowPostSetup = $40000025; // ARP: Show Post-Setup page
  688. REST_NOCSC = $40000026; // Disable the ClientSide caching on SM
  689. REST_NOCONTROLPANEL = $40000027; // Remove the Control Panel only from SM or Settings
  690. REST_ENUMWORKGROUP = $40000028; // Enumerate workgroup in root of nethood
  691. REST_ARP_NOARP = $40000029; // ARP: Don't Allow ARP to come up at all
  692. REST_ARP_NOREMOVEPAGE = $4000002A; // ARP: Don't allow Remove page
  693. REST_ARP_NOADDPAGE = $4000002B; // ARP: Don't allow Add page
  694. REST_ARP_NOWINSETUPPAGE = $4000002C; // ARP: Don't allow opt components page
  695. REST_GREYMSIADS = $4000002D; // SM: Allow the greying of Darwin Ads in SM
  696. REST_NOCHANGEMAPPEDDRIVELABEL = $4000002E; // Don't enable the UI which allows users to rename mapped drive labels
  697. REST_NOCHANGEMAPPEDDRIVECOMMENT = $4000002F; // Don't enable the UI which allows users to change mapped drive comments
  698. REST_MaxRecentDocs = $40000030;
  699. REST_NONETWORKCONNECTIONS = $40000031; // No Start Menu or Settings or Network Connections
  700. REST_FORCESTARTMENULOGOFF = $40000032; // Force logoff on the Start Menu
  701. REST_NOWEBVIEW = $40000033; // Disable Web View
  702. REST_NOCUSTOMIZETHISFOLDER = $40000034; // Disable Customize This Folder
  703. REST_NOENCRYPTION = $40000035; // Don't allow file encryption
  704. // Do NOT use me = $40000036;
  705. REST_DONTSHOWSUPERHIDDEN = $40000037; // don't show super hidden files
  706. REST_NOSHELLSEARCHBUTTON = $40000038;
  707. REST_NOHARDWARETAB = $40000039; // No Hardware tab on Drives or in control panel
  708. REST_NORUNASINSTALLPROMPT = $4000003A; // Don't bring up "Run As" prompt for install programs
  709. REST_PROMPTRUNASINSTALLNETPATH = $4000003B; // Force the "Run As" prompt for install programs on unc/network shares
  710. REST_NOMANAGEMYCOMPUTERVERB = $4000003C; // No Manage verb on My Computer
  711. REST_NORECENTDOCSNETHOOD = $4000003D; // dont add the recent docs shares to nethood
  712. REST_DISALLOWRUN = $4000003E; // don't allow certain apps to be run
  713. REST_NOWELCOMESCREEN = $4000003F; // don't allow the welcome screen to be displayed.
  714. REST_RESTRICTCPL = $40000040; // only allow certain cpls to be run
  715. REST_DISALLOWCPL = $40000041; // don't allow certain cpls to be run
  716. REST_NOSMBALLOONTIP = $40000042; // No Start Menu Balloon Tip
  717. REST_NOSMHELP = $40000043; // No Help on the Start Menu
  718. REST_NOWINKEYS = $40000044; // No Windows-X Hot keys
  719. REST_NOENCRYPTONMOVE = $40000045; // Don't automatically try to encrypt files that are moved to encryped directories
  720. REST_NOLOCALMACHINERUN = $40000046; // ignore HKLM\sw\ms\win\cv\Run and all of it's sub keys
  721. REST_NOCURRENTUSERRUN = $40000047; // ignore HKCU\sw\ms\win\cv\Run and all of it's sub keys
  722. REST_NOLOCALMACHINERUNONCE = $40000048; // ignore HKLM\sw\ms\win\cv\RunOnce and all of it's sub keys
  723. REST_NOCURRENTUSERRUNONCE = $40000049; // ignore HKCU\sw\ms\win\cv\RunOnce and all of it's sub keys
  724. REST_FORCEACTIVEDESKTOPON = $4000004A; // Force ActiveDesktop to be turned ON all the time.
  725. REST_NOCOMPUTERSNEARME = $4000004B; // removes the "Computers near me" link
  726. REST_NOVIEWONDRIVE = $4000004C; // disallows CreateViewObject() on specified drives (CFSFolder only)
  727. REST_NONETCRAWL = $4000004D; // disables the crawling of the WNet namespace.
  728. REST_NOSHAREDDOCUMENTS = $4000004E; // don't auto share the Shared Documents/create link
  729. REST_NOSMMYDOCS = $4000004F; // Don't show the My Documents item on the Start Menu.
  730. REST_NOSMMYPICS = $40000050; // Don't show the My Pictures item on the Start Menu
  731. REST_ALLOWBITBUCKDRIVES = $40000051; // Bit mask indicating which which drives have bit bucket support
  732. REST_NONLEGACYSHELLMODE = $40000052; // new consumer shell modes
  733. REST_NOCONTROLPANELBARRICADE = $40000053; // The webview barricade in Control Panel
  734. REST_NOSTARTPAGE = $40000054; // Whistler Start Page on desktop.
  735. REST_NOAUTOTRAYNOTIFY = $40000055; // Whistler auto-tray notify feature
  736. REST_NOTASKGROUPING = $40000056; // Whistler taskbar button grouping feature
  737. REST_NOCDBURNING = $40000057; // whistler cd burning feature
  738. REST_MYCOMPNOPROP = $40000058; // disables Properties on My Computer's context menu
  739. REST_MYDOCSNOPROP = $40000059; // disables Properties on My Documents' context menu
  740. REST_NOSTARTPANEL = $4000005A; // Windows start panel (New start menu) for Whistler.
  741. REST_NODISPLAYAPPEARANCEPAGE = $4000005B; // disable Themes and Appearance tabs in the Display Control Panel.
  742. REST_NOTHEMESTAB = $4000005C; // disable the Themes tab in the Display Control Panel.
  743. REST_NOVISUALSTYLECHOICE = $4000005D; // disable the visual style drop down in the Appearance tab of the Display Control Panel.
  744. REST_NOSIZECHOICE = $4000005E; // disable the size drop down in the Appearance tab of the Display Control Panel.
  745. REST_NOCOLORCHOICE = $4000005F; // disable the color drop down in the Appearance tab of the Display Control Panel.
  746. REST_SETVISUALSTYLE = $40000060; // Load the specified file as the visual style.
  747. REST_STARTRUNNOHOMEPATH = $40000061; // dont use the %HOMEPATH% env var for the Start-Run dialog
  748. REST_NOUSERNAMEINSTARTPANEL = $40000062; // don't show the username is the startpanel.
  749. REST_NOMYCOMPUTERICON = $40000063; // don't show my computer anywhere, hide its contents
  750. REST_NOSMNETWORKPLACES = $40000064; // don't show network places in startpanel.
  751. REST_NOSMPINNEDLIST = $40000065; // don't show the pinned list in startpanel.
  752. REST_NOSMMYMUSIC = $40000066; // don't show MyMusic folder in startpanel
  753. REST_NOSMEJECTPC = $40000067; // don't show "Undoc PC" command in startmenu
  754. REST_NOSMMOREPROGRAMS = $40000068; // don't show "More Programs" button in StartPanel.
  755. REST_NOSMMFUPROGRAMS = $40000069; // don't show the MFU programs list in StartPanel.
  756. REST_NOTRAYITEMSDISPLAY = $4000006A; // disables the display of the system tray
  757. REST_NOTOOLBARSONTASKBAR = $4000006B; // disables toolbar display on the taskbar
  758. REST_NOSMCONFIGUREPROGRAMS = $4000006F; // No Configure Programs on Settings Menu
  759. REST_HIDECLOCK = $40000070; // don't show the clock
  760. REST_NOLOWDISKSPACECHECKS = $40000071; // disable the low disk space checking
  761. REST_NOENTIRENETWORK = $40000072; // removes the "Entire Network" link (i.e. from "My Network Places")
  762. REST_NODESKTOPCLEANUP = $40000073; // disable the desktop cleanup wizard
  763. REST_BITBUCKNUKEONDELETE = $40000074; // disables recycling of files
  764. REST_BITBUCKCONFIRMDELETE = $40000075; // always show the delete confirmation dialog when deleting files
  765. REST_BITBUCKNOPROP = $40000076; // disables Properties on Recycle Bin's context menu
  766. REST_NODISPBACKGROUND = $40000077; // disables the Desktop tab in the Display CP);
  767. REST_NODISPSCREENSAVEPG = $40000078; // disables the Screen Saver tab in the Display CP);
  768. REST_NODISPSETTINGSPG = $40000079; // disables the Settings tab in the Display CP);
  769. REST_NODISPSCREENSAVEPREVIEW = $4000007A; // disables the screen saver on the Screen Saver tab in the Display CP);
  770. REST_NODISPLAYCPL = $4000007B; // disables the Display CPL
  771. REST_HIDERUNASVERB = $4000007C; // hides the "Run As..." context menu item
  772. REST_NOTHUMBNAILCACHE = $4000007D; // disables use of the thumbnail cache
  773. REST_NOSTRCMPLOGICAL = $4000007E; // dont use StrCmpLogical() instead use default CompareString()
  774. REST_NOPUBLISHWIZARD = $4000007F; // disables publishing wizard (WPW)
  775. REST_NOONLINEPRINTSWIZARD = $40000080; // disables online prints wizard (OPW)
  776. REST_NOWEBSERVICES = $40000081; // disables the web specified services for both OPW and WPW
  777. REST_ALLOWUNHASHEDWEBVIEW = $40000082; // allow the user to be promted to accept web view templates that don't already have an md5 hash in the registry
  778. REST_ALLOWLEGACYWEBVIEW = $40000083; // allow legacy webview template to be shown.
  779. REST_REVERTWEBVIEWSECURITY = $40000084; // disable added webview security measures (revert to w2k functionality).
  780. REST_INHERITCONSOLEHANDLES = $40000086; // ShellExec() will check for the current process and target process being console processes to inherit handles
  781. REST_SORTMAXITEMCOUNT = $40000087; // Do not sort views with more items than this key. Useful for viewing big amount of files in one folder.
  782. REST_NOREMOTERECURSIVEEVENTS = $40000089; // Dont register network change events recursively to avoid network traffic
  783. REST_NOREMOTECHANGENOTIFY = $40000091; // Do not register for remote change notifies
  784. REST_NOSIMPLENETIDLIST = $40000092; // No simple network IDLists
  785. REST_NOENUMENTIRENETWORK = $40000093; // Don't enumerate entire network if we happen to get to it (in conjunction with REST_NOENTIRENETWORK)
  786. REST_NODETAILSTHUMBNAILONNETWORK= $40000094; // Disable Thumbnail for Network files in DUI Details pane
  787. REST_NOINTERNETOPENWITH = $40000095; // dont allow looking on the internet for file associations
  788. REST_ALLOWLEGACYLMZBEHAVIOR = $4000009A; // allowable LMZ behavior for ActiveX objects changed in XPSP2, this policy gets the pre-XPSP2 behavior
  789. REST_DONTRETRYBADNETNAME = $4000009B; // In Network Places: if provider returns ERROR_BAD_NET_NAME, give up
  790. REST_ALLOWFILECLSIDJUNCTIONS = $4000009C; // re-enable legacy support for file.{guid} junctions in FileSystem Folder
  791. REST_NOUPNPINSTALL = $4000009D; // disable "install UPnP" task in My Net Places
  792. REST_NODISCONNECT = $41000001; // No Disconnect option in Start menu
  793. REST_NOSECURITY = $41000002; // No Security option in start menu
  794. REST_NOFILEASSOCIATE = $41000003; // Do not allow user to change file association
  795. REST_ALLOWCOMMENTTOGGLE = $41000004; // Allow the user to toggle the positions of the Comment and the Computer Name
  796. REST_USEDESKTOPINICACHE = $41000005; // Cache desktop.ini entries from network folders
  797. //
  798. // Path processing function
  799. //
  800. PPCF_ADDQUOTES = $00000001; // return a quoted name if required
  801. PPCF_ADDARGUMENTS = $00000003; // appends arguments (and wraps in quotes if required)
  802. PPCF_NODIRECTORIES = $00000010; // don't match to directories
  803. PPCF_FORCEQUALIFY = $00000040; // qualify even non-relative names
  804. PPCF_LONGESTPOSSIBLE = $00000080; // always find the longest possible name
  805. VALIDATEUNC_NOUI = $0002; // don't bring up UI
  806. VALIDATEUNC_CONNECT = $0001; // connect a drive letter
  807. VALIDATEUNC_PRINT = $0004; // validate as print share instead of disk share
  808. VALIDATEUNC_VALID = $0007; // valid flags
  809. OPENPROPS_NONE = $0000;
  810. OPENPROPS_INHIBITPIF = $8000;
  811. GETPROPS_NONE = $0000;
  812. SETPROPS_NONE = $0000;
  813. CLOSEPROPS_NONE = $0000;
  814. CLOSEPROPS_DISCARD = $0001;
  815. PIFNAMESIZE = 30;
  816. PIFSTARTLOCSIZE = 63;
  817. PIFDEFPATHSIZE = 64;
  818. PIFPARAMSSIZE = 64;
  819. PIFSHPROGSIZE = 64;
  820. PIFSHDATASIZE = 64;
  821. PIFDEFFILESIZE = 80;
  822. PIFMAXFILEPATH = 260;
  823. TBIF_APPEND = 0;
  824. TBIF_PREPEND = 1;
  825. TBIF_REPLACE = 2;
  826. TBIF_DEFAULT = $00000000;
  827. TBIF_INTERNETBAR = $00010000;
  828. TBIF_STANDARDTOOLBAR = $00020000;
  829. TBIF_NOTOOLBAR = $00030000;
  830. // uMsg wParam lParam
  831. SFVM_MERGEMENU = 1; // - LPQCMINFO
  832. SFVM_INVOKECOMMAND = 2; // idCmd -
  833. SFVM_GETHELPTEXT = 3; // idCmd,cchMax pszText
  834. SFVM_GETTOOLTIPTEXT = 4; // idCmd,cchMax pszText
  835. SFVM_GETBUTTONINFO = 5; // - LPTBINFO
  836. SFVM_GETBUTTONS = 6; // idCmdFirst,cbtnMax LPTBBUTTON
  837. SFVM_INITMENUPOPUP = 7; // idCmdFirst,nIndex hmenu
  838. SFVM_FSNOTIFY = 14; // LPCITEMIDLIST* lEvent
  839. SFVM_WINDOWCREATED = 15; // hwnd -
  840. SFVM_GETDETAILSOF = 23; // iColumn DETAILSINFO*
  841. SFVM_COLUMNCLICK = 24; // iColumn -
  842. SFVM_QUERYFSNOTIFY = 25; // - SHChangeNotifyEntry *
  843. SFVM_DEFITEMCOUNT = 26; // - UINT*
  844. SFVM_DEFVIEWMODE = 27; // - FOLDERVIEWMODE*
  845. SFVM_UNMERGEMENU = 28; // - hmenu
  846. SFVM_UPDATESTATUSBAR = 31; // fInitialize -
  847. SFVM_BACKGROUNDENUM = 32; // - -
  848. SFVM_DIDDRAGDROP = 36; // dwEffect IDataObject *
  849. SFVM_SETISFV = 39; // - IShellFolderView*
  850. SFVM_THISIDLIST = 41; // - LPITMIDLIST*
  851. SFVM_ADDPROPERTYPAGES = 47; // - SFVM_PROPPAGE_DATA *
  852. SFVM_BACKGROUNDENUMDONE = 48; // - -
  853. SFVM_GETNOTIFY = 49; // LPITEMIDLIST* LONG*
  854. SFVM_GETSORTDEFAULTS = 53; // iDirection iParamSort
  855. SFVM_SIZE = 57; // - -
  856. SFVM_GETZONE = 58; // - DWORD*
  857. SFVM_GETPANE = 59; // Pane ID DWORD*
  858. SFVM_GETHELPTOPIC = 63; // - SFVM_HELPTOPIC_DATA *
  859. SFVM_GETANIMATION = 68; // HINSTANCE * WCHAR *
  860. // uMsg wParam lParam
  861. DFM_MERGECONTEXTMENU = 1; // uFlags LPQCMINFO
  862. DFM_INVOKECOMMAND = 2; // idCmd pszArgs
  863. DFM_GETDEFSTATICID = 14; // idCmd * 0
  864. // Commands from DFM_INVOKECOMMAND when strings are passed in
  865. DFM_CMD_PROPERTIES = dword(-5);
  866. SFVM_REARRANGE = $00000001;
  867. SFVM_ADDOBJECT = $00000003;
  868. SFVM_REMOVEOBJECT = $00000006;
  869. SFVM_UPDATEOBJECT = $00000007;
  870. SFVM_GETSELECTEDOBJECTS = $00000009;
  871. SFVM_SETITEMPOS = $0000000e;
  872. SFVM_SETCLIPBOARD = $00000010;
  873. SFVM_SETPOINTS = $00000017;
  874. PID_IS_URL = 2;
  875. PID_IS_NAME = 4;
  876. PID_IS_WORKINGDIR = 5;
  877. PID_IS_HOTKEY = 6;
  878. PID_IS_SHOWCMD = 7;
  879. PID_IS_ICONINDEX = 8;
  880. PID_IS_ICONFILE = 9;
  881. PID_IS_WHATSNEW = 10;
  882. PID_IS_AUTHOR = 11;
  883. PID_IS_DESCRIPTION = 12;
  884. PID_IS_COMMENT = 13;
  885. PID_INTSITE_WHATSNEW = 2;
  886. PID_INTSITE_AUTHOR = 3;
  887. PID_INTSITE_LASTVISIT = 4;
  888. PID_INTSITE_LASTMOD = 5;
  889. PID_INTSITE_VISITCOUNT = 6;
  890. PID_INTSITE_DESCRIPTION = 7;
  891. PID_INTSITE_COMMENT = 8;
  892. PID_INTSITE_FLAGS = 9;
  893. PID_INTSITE_CONTENTLEN = 10;
  894. PID_INTSITE_CONTENTCODE = 11;
  895. PID_INTSITE_RECURSE = 12;
  896. PID_INTSITE_WATCH = 13;
  897. PID_INTSITE_SUBSCRIPTION = 14;
  898. PID_INTSITE_URL = 15;
  899. PID_INTSITE_TITLE = 16;
  900. PID_INTSITE_CODEPAGE = 18;
  901. PID_INTSITE_TRACKING = 19;
  902. PID_INTSITE_ICONINDEX = 20;
  903. PID_INTSITE_ICONFILE = 21;
  904. // Flags for PID_IS_FLAGS
  905. PIDISF_RECENTLYCHANGED = $00000001;
  906. PIDISF_CACHEDSTICKY = $00000002;
  907. PIDISF_CACHEIMAGES = $00000010;
  908. PIDISF_FOLLOWALLLINKS = $00000020;
  909. // Values for PID_INTSITE_WATCH
  910. PIDISM_GLOBAL = 0; // Monitor based on global setting
  911. PIDISM_WATCH = 1; // User says watch
  912. PIDISM_DONTWATCH = 2; // User says don't watch
  913. SSF_SHOWALLOBJECTS = $00000001;
  914. SSF_SHOWEXTENSIONS = $00000002;
  915. SSF_HIDDENFILEEXTS = $00000004;
  916. SSF_SERVERADMINUI = $00000004;
  917. SSF_SHOWCOMPCOLOR = $00000008;
  918. SSF_SORTCOLUMNS = $00000010;
  919. SSF_SHOWSYSFILES = $00000020;
  920. SSF_DOUBLECLICKINWEBVIEW = $00000080;
  921. SSF_SHOWATTRIBCOL = $00000100;
  922. SSF_DESKTOPHTML = $00000200;
  923. SSF_WIN95CLASSIC = $00000400;
  924. SSF_DONTPRETTYPATH = $00000800;
  925. SSF_SHOWINFOTIP = $00002000;
  926. SSF_MAPNETDRVBUTTON = $00001000;
  927. SSF_NOCONFIRMRECYCLE = $00008000;
  928. SSF_HIDEICONS = $00004000;
  929. SSF_FILTER = $00010000;
  930. SSF_WEBVIEW = $00020000;
  931. SSF_SHOWSUPERHIDDEN = $00040000;
  932. SSF_SEPPROCESS = $00080000;
  933. SSF_NONETCRAWLING = $00100000;
  934. SSF_STARTPANELON = $00200000;
  935. SSF_SHOWSTARTPAGE = $00400000;
  936. SHPPFW_NONE = $00000000;
  937. SHPPFW_DIRCREATE = $00000001; // Create the directory if it doesn't exist without asking the user.
  938. SHPPFW_DEFAULT = SHPPFW_DIRCREATE; // May change
  939. SHPPFW_ASKDIRCREATE = $00000002; // Create the directory if it doesn't exist after asking the user.
  940. SHPPFW_IGNOREFILENAME = $00000004; // Ignore the last item in pszPath because it's a file. Example: pszPath="C:\DirA\DirB", only use "C:\DirA".
  941. SHPPFW_NOWRITECHECK = $00000008; // Caller only needs to read from the drive, so don't check if it's READ ONLY.
  942. SHPPFW_MEDIACHECKONLY = $00000010; // do the retrys on the media (or net path), return errors if the file can't be found
  943. Type
  944. HDROP = THandle;
  945. PHIcon = ^HIcon;
  946. STARTUPINFOW = record // a guess. Omission should get fixed in Windows.
  947. cb : DWORD;
  948. lpReserved : LPTSTR;
  949. lpDesktop : LPTSTR;
  950. lpTitle : LPTSTR;
  951. dwX : DWORD;
  952. dwY : DWORD;
  953. dwXSize : DWORD;
  954. dwYSize : DWORD;
  955. dwXCountChars : DWORD;
  956. dwYCountChars : DWORD;
  957. dwFillAttribute : DWORD;
  958. dwFlags : DWORD;
  959. wShowWindow : WORD;
  960. cbReserved2 : WORD;
  961. lpReserved2 : LPBYTE;
  962. hStdInput : HANDLE;
  963. hStdOutput : HANDLE;
  964. hStdError : HANDLE;
  965. end;
  966. LPSTARTUPINFOW = ^STARTUPINFOW;
  967. _STARTUPINFOW = STARTUPINFOW;
  968. TSTARTUPINFOW = STARTUPINFOW;
  969. PSTARTUPINFOW = ^STARTUPINFOW;
  970. {unicode}
  971. Function DragQueryFileA(arg1 : HDROP; arg2 : UINT;arg3 : LPSTR ; arg4 : UINT):UINT;external shell32 name 'DragQueryFileA';
  972. Function DragQueryFileW(arg1 : HDROP; arg2 : UINT;arg3 : LPWSTR; arg4 : UINT):UINT;external shell32 name 'DragQueryFileW';
  973. Function DragQueryFile(arg1 : HDROP; arg2 : UINT;arg3 : LPSTR ; arg4 : UINT):UINT;external shell32 name 'DragQueryFileA';
  974. Function DragQueryFile(arg1 : HDROP; arg2 : UINT;arg3 : LPWSTR; arg4 : UINT):UINT;external shell32 name 'DragQueryFileW';
  975. Function DragQueryPoint(arg1 : HDROP; arg2 :LPPOINT):BOOL; external shell32 name 'DragQueryPoint';
  976. Procedure DragFinish(arg1 : HDROP); external shell32 name 'DragFinish';
  977. Procedure DragAcceptFiles(hwnd : HWND;arg2: BOOL); external shell32 name 'DragAcceptFiles';
  978. Function ShellExecuteA(HWND: hwnd;lpOperation : LPCSTR ; lpFile : LPCSTR ; lpParameters : LPCSTR; lpDirectory: LPCSTR; nShowCmd:LONGINT):HInst; external shell32 name 'ShellExecuteA';
  979. Function ShellExecuteW(hwnd: HWND;lpOperation : LPCWSTR ; lpFile : LPCWSTR ; lpParameters : LPCWSTR; lpDirectory: LPCWSTR; nShowCmd:LONGINT):HInst; external shell32 name 'ShellExecuteW';
  980. Function ShellExecute(HWND: hwnd;lpOperation : LPCSTR ; lpFile : LPCSTR ; lpParameters : LPCSTR; lpDirectory: LPCSTR; nShowCmd:LONGINT):HInst; external shell32 name 'ShellExecuteA';
  981. Function ShellExecute(hwnd: HWND;lpOperation : LPCWSTR ; lpFile : LPCWSTR ; lpParameters : LPCWSTR; lpDirectory: LPCWSTR; nShowCmd:LONGINT):HInst; external shell32 name 'ShellExecuteW';
  982. Function FindExecutableA(lpFile : LPCSTR ;lpDirectory : LPCSTR ; lpResult : LPSTR):HInst;external shell32 name 'FindExecutableA';
  983. Function FindExecutableW(lpFile : LPCWSTR;lpDirectory : LPCWSTR; lpResult : LPWSTR):HInst;external shell32 name 'FindExecutableW';
  984. Function FindExecutable(lpFile : LPCSTR ;lpDirectory : LPCSTR ; lpResult : LPSTR):HInst;external shell32 name 'FindExecutableA';
  985. Function FindExecutable(lpFile : LPCWSTR;lpDirectory : LPCWSTR; lpResult : LPWSTR):HInst;external shell32 name 'FindExecutableW';
  986. Function CommandLineToArgvW(lpCmdLine : LPCWSTR;pNumArgs : plongint):pLPWSTR;external shell32 name 'CommandLineToArgvW';
  987. Function ShellAboutA(HWND: hWnd; szApp : LPCSTR; szOtherStuff : LPCSTR; HICON : hIcon):Longint; external shell32 name 'ShellAboutA';
  988. Function ShellAboutW(HWND: hWnd; szApp : LPCWSTR; szOtherStuff : LPCWSTR; HICON : hIcon):Longint; external shell32 name 'ShellAboutW';
  989. Function ShellAbout(HWND: hWnd; szApp : LPCSTR; szOtherStuff : LPCSTR; HICON : hIcon):Longint; external shell32 name 'ShellAboutA';
  990. Function ShellAbout(HWND: hWnd; szApp : LPCWSTR; szOtherStuff : LPCWSTR; HICON : hIcon):Longint; external shell32 name 'ShellAboutW';
  991. Function DuplicateIcon(hinst : HINST; HICON: hIcon):HIcon; external shell32 name 'DuplicateIcon';
  992. Function ExtractAssociatedIconA(hInst : HINST; lpIconPath : LPSTR; lpiIcon : LPWORD):HICON;external shell32 name 'ExtractAssociatedIconA';
  993. Function ExtractAssociatedIconW(hInst : HINST; lpIconPath : LPWSTR; lpiIcon : LPWORD):HICON;external shell32 name 'ExtractAssociatedIconW';
  994. Function ExtractAssociatedIcon(hInst : HINST; lpIconPath : LPSTR; lpiIcon : LPWORD):HICON;external shell32 name 'ExtractAssociatedIconA';
  995. Function ExtractAssociatedIcon(hInst : HINST; lpIconPath : LPWSTR; lpiIcon : LPWORD):HICON;external shell32 name 'ExtractAssociatedIconW';
  996. Function ExtractIconA(hInst: HINST; lpszExeFileName :LPCSTR ; nIconIndex : UINT):HICON;external shell32 name 'ExtractIconA';
  997. Function ExtractIconW(hInst: HINST; lpszExeFileName :LPCWSTR ; nIconIndex : UINT):HICON;external shell32 name 'ExtractIconW';
  998. Function ExtractIcon(hInst: HINST; lpszExeFileName :LPCSTR ; nIconIndex : UINT):HICON;external shell32 name 'ExtractIconA';
  999. Function ExtractIcon(hInst: HINST; lpszExeFileName :LPCWSTR ; nIconIndex : UINT):HICON;external shell32 name 'ExtractIconW';
  1000. // if(WINVER >= 0x0400)
  1001. Type
  1002. { init with sizeof(DRAGINFO) }
  1003. _DRAGINFOA = Record
  1004. uSize : UINT;
  1005. pt : POINT;
  1006. fNC : BOOL;
  1007. lpFileList : LPSTR;
  1008. grfKeyState : DWORD;
  1009. end;
  1010. DRAGINFOA = _DRAGINFOA;
  1011. TDRAGINFOA = _DRAGINFOA;
  1012. LPDRAGINFOA = ^_DRAGINFOA;
  1013. { init with sizeof(DRAGINFO) }
  1014. _DRAGINFOW = Record
  1015. uSize : UINT;
  1016. pt : POINT;
  1017. fNC : BOOL;
  1018. lpFileList : LPWSTR;
  1019. grfKeyState : DWORD;
  1020. end;
  1021. DRAGINFOW = _DRAGINFOW;
  1022. TDRAGINFOW = _DRAGINFOW;
  1023. LPDRAGINFOW = ^_DRAGINFOW;
  1024. {$ifdef UNICODE}
  1025. DRAGINFO = DRAGINFOW;
  1026. TDRAGINFO = DRAGINFOW;
  1027. LPDRAGINFO = LPDRAGINFOW;
  1028. {$else}
  1029. DRAGINFO = DRAGINFOA;
  1030. TDRAGINFO = DRAGINFOW;
  1031. LPDRAGINFO = LPDRAGINFOA;
  1032. {$endif}
  1033. Const
  1034. ABM_NEW = $00000000;
  1035. ABM_REMOVE = $00000001;
  1036. ABM_QUERYPOS = $00000002;
  1037. ABM_SETPOS = $00000003;
  1038. ABM_GETSTATE = $00000004;
  1039. ABM_GETTASKBARPOS = $00000005;
  1040. ABM_ACTIVATE = $00000006; { lParam == TRUE/FALSE means activate/deactivate }
  1041. ABM_GETAUTOHIDEBAR = $00000007;
  1042. ABM_SETAUTOHIDEBAR = $00000008; { this can fail at any time. MUST check the result }
  1043. { lParam = TRUE/FALSE Set/Unset }
  1044. { uEdge = what edge }
  1045. ABM_WINDOWPOSCHANGED = $0000009;
  1046. ABM_SETSTATE = $0000000a;
  1047. ABN_STATECHANGE = $0000000; { these are put in the wparam of callback messages }
  1048. ABN_POSCHANGED = $0000001;
  1049. ABN_FULLSCREENAPP = $0000002;
  1050. ABN_WINDOWARRANGE = $0000003; { lParam == TRUE means hide }
  1051. { flags for get state }
  1052. ABS_AUTOHIDE = $0000001;
  1053. ABS_ALWAYSONTOP = $0000002;
  1054. ABE_LEFT = 0;
  1055. ABE_TOP = 1;
  1056. ABE_RIGHT = 2;
  1057. ABE_BOTTOM = 3;
  1058. Type
  1059. _AppBarData = Record
  1060. cbSize : DWORD;
  1061. hWnd : HWND;
  1062. uCallbackMessage : UINT;
  1063. uEdge : UINT;
  1064. rc : RECT;
  1065. lParam : LPARAM; { message specific }
  1066. end;
  1067. APPBARDATA = _AppBarData;
  1068. TAPPBARDATA = _AppBarData;
  1069. PAPPBARDATA = ^_AppBarData;
  1070. Function SHAppBarMessage(dwMessage : DWORD; pData : pAPPBARDATA):UINT_PTR;external shell32 name 'SHAppBarMessage';
  1071. //
  1072. // EndAppBar
  1073. //
  1074. Function DoEnvironmentSubstA(szString: LPSTR; cchString:UINT):DWORD;external shell32 name 'DoEnvironmentSubstA';
  1075. Function DoEnvironmentSubstW(szString: LPWSTR; cchString:UINT):DWORD;external shell32 name 'DoEnvironmentSubstW';
  1076. Function DoEnvironmentSubst(szString: LPSTR; cchString:UINT):DWORD;external shell32 name 'DoEnvironmentSubstA';
  1077. Function DoEnvironmentSubst(szString: LPWSTR; cchString:UINT):DWORD;external shell32 name 'DoEnvironmentSubstW';
  1078. {Macro}
  1079. function EIRESID(x : longint) : longint;
  1080. Function ExtractIconExA(lpszFile : LPCSTR; nIconIndex:Longint; phiconLarge:pHICON; phiconSmall:pHIcon; nIcons:UINT):UINT; external shell32 name 'ExtractIconExA';
  1081. Function ExtractIconExW(lpszFile : LPCWSTR; nIconIndex:Longint; phiconLarge:pHICON; phiconSmall:pHIcon; nIcons:UINT):UINT; external shell32 name 'ExtractIconExW';
  1082. Function ExtractIconExA(lpszFile : LPCSTR; nIconIndex:Longint; var phiconLarge:HICON;var phiconSmall:HIcon; nIcons:UINT):UINT; external shell32 name 'ExtractIconExA';
  1083. Function ExtractIconExW(lpszFile : LPCWSTR; nIconIndex:Longint; var phiconLarge:HICON;var phiconSmall:HIcon; nIcons:UINT):UINT; external shell32 name 'ExtractIconExW';
  1084. Function ExtractIconEx (lpszFile : LPCSTR; nIconIndex:Longint; phiconLarge:pHICON; phiconSmall:pHIcon; nIcons:UINT):UINT; external shell32 name 'ExtractIconExA';
  1085. Function ExtractIconEx (lpszFile : LPCWSTR; nIconIndex:Longint; phiconLarge:pHICON; phiconSmall:pHIcon; nIcons:UINT):UINT; external shell32 name 'ExtractIconExW';
  1086. Function ExtractIconEx (lpszFile : LPCSTR; nIconIndex:Longint; var phiconLarge:HICON;var phiconSmall:HIcon; nIcons:UINT):UINT; external shell32 name 'ExtractIconExA';
  1087. Function ExtractIconEx (lpszFile : LPCWSTR; nIconIndex:Longint; var phiconLarge:HICON;var phiconSmall:HIcon; nIcons:UINT):UINT; external shell32 name 'ExtractIconExW';
  1088. //
  1089. // Shell File Operations
  1090. //
  1091. //ifndef FO_MOVE //these need to be kept in sync with the ones in shlobj.h}
  1092. Const
  1093. FO_MOVE = $0001;
  1094. FO_COPY = $0002;
  1095. FO_DELETE = $0003;
  1096. FO_RENAME = $0004;
  1097. FOF_MULTIDESTFILES = $0001;
  1098. FOF_CONFIRMMOUSE = $0002;
  1099. FOF_SILENT = $0004; { don't create progress/report }
  1100. FOF_RENAMEONCOLLISION = $0008;
  1101. FOF_NOCONFIRMATION = $0010; { Don't prompt the user. }
  1102. FOF_WANTMAPPINGHANDLE = $0020; { Fill in SHFILEOPSTRUCT.hNameMappings }
  1103. FOF_ALLOWUNDO = $0040; { Must be freed using SHFreeNameMappings }
  1104. FOF_FILESONLY = $0080; { on *.*, do only files }
  1105. FOF_SIMPLEPROGRESS = $0100; { means don't show names of files }
  1106. FOF_NOCONFIRMMKDIR = $0200; { don't confirm making any needed dirs }
  1107. FOF_NOERRORUI = $0400; { don't put up error UI }
  1108. FOF_NOCOPYSECURITYATTRIBS= $0800; { dont copy NT file Security Attributes }
  1109. FOF_NORECURSION = $1000; { don't recurse into directories. }
  1110. //if (_WIN32_IE >= 0x0500)
  1111. FOF_NO_CONNECTED_ELEMENTS= $2000; { don't operate on connected elements. }
  1112. FOF_WANTNUKEWARNING = $4000; { during delete operation, warn if nuking instead of recycling (partially overrides FOF_NOCONFIRMATION) }
  1113. //endif
  1114. //if (_WIN32_WINNT >= 0x0501)
  1115. FOF_NORECURSEREPARSE = $8000; { treat reparse points as objects, not containers }
  1116. //endif
  1117. Type
  1118. FILEOP_FLAGS = WORD;
  1119. Const
  1120. PO_DELETE = $0013; { printer is being deleted }
  1121. PO_RENAME = $0014; { printer is being renamed }
  1122. PO_PORTCHANGE = $0020; { port this printer connected to is being changed }
  1123. { if this id is set, the strings received by }
  1124. { the copyhook are a doubly-null terminated }
  1125. { list of strings. The first is the printer }
  1126. { name and the second is the printer port. }
  1127. PO_REN_PORT = $0034; { PO_RENAME and PO_PORTCHANGE at same time. }
  1128. { no POF_ flags currently defined }
  1129. Type
  1130. PRINTEROP_FLAGS = WORD;
  1131. //endif}
  1132. { FO_MOVE }
  1133. { implicit parameters are: }
  1134. { if pFrom or pTo are unqualified names the current directories are }
  1135. { taken from the global current drive/directory settings managed }
  1136. { by Get/SetCurrentDrive/Directory }
  1137. { }
  1138. { the global confirmation settings }
  1139. { only used if FOF_SIMPLEPROGRESS }
  1140. Type
  1141. _SHFILEOPSTRUCTA = Record
  1142. wnd : HWND;
  1143. wFunc : UINT;
  1144. pFrom : LPCSTR;
  1145. pTo : LPCSTR;
  1146. fFlags : FILEOP_FLAGS;
  1147. fAnyOperationsAborted : BOOL;
  1148. hNameMappings : LPVOID;
  1149. lpszProgressTitle : LPCSTR; { only used if FOF_SIMPLEPROGRESS }
  1150. end;
  1151. SHFILEOPSTRUCTA = _SHFILEOPSTRUCTA;
  1152. TSHFILEOPSTRUCTA = _SHFILEOPSTRUCTA;
  1153. LPSHFILEOPSTRUCTA = ^_SHFILEOPSTRUCTA;
  1154. _SHFILEOPSTRUCTW = record
  1155. wnd : HWND;
  1156. wFunc : UINT;
  1157. pFrom : LPCWSTR;
  1158. pTo : LPCWSTR;
  1159. fFlags : FILEOP_FLAGS;
  1160. fAnyOperationsAborted : BOOL;
  1161. hNameMappings : LPVOID;
  1162. lpszProgressTitle : LPCWSTR;
  1163. end;
  1164. SHFILEOPSTRUCTW = _SHFILEOPSTRUCTW;
  1165. TSHFILEOPSTRUCTW = _SHFILEOPSTRUCTW;
  1166. LPSHFILEOPSTRUCTW = ^_SHFILEOPSTRUCTW;
  1167. {$ifdef UNICODE}
  1168. SHFILEOPSTRUCT = SHFILEOPSTRUCTW;
  1169. TSHFILEOPSTRUCT = SHFILEOPSTRUCTW;
  1170. LPSHFILEOPSTRUCT = LPSHFILEOPSTRUCTW;
  1171. {$else}
  1172. SHFILEOPSTRUCT = SHFILEOPSTRUCTA;
  1173. TSHFILEOPSTRUCT = SHFILEOPSTRUCTA;
  1174. LPSHFILEOPSTRUCT = LPSHFILEOPSTRUCTA;
  1175. {$endif}
  1176. Function SHFileOperationA(lpFileOp:LPSHFILEOPSTRUCTA ):Longint;external shell32 name 'SHFileOperationA';
  1177. Function SHFileOperationW(lpFileOp:LPSHFILEOPSTRUCTW ):Longint;external shell32 name 'SHFileOperationW';
  1178. Function SHFileOperation(lpFileOp:LPSHFILEOPSTRUCTA ):Longint;external shell32 name 'SHFileOperationA';
  1179. Function SHFileOperation(var lpFileOp:SHFILEOPSTRUCTA ):Longint;external shell32 name 'SHFileOperationA';
  1180. Function SHFileOperation(lpFileOp:LPSHFILEOPSTRUCTW ):Longint;external shell32 name 'SHFileOperationW';
  1181. Procedure SHFreeNameMappings(hNameMappings : THandle);external shell32 name 'SHFreeNameMappings';
  1182. Type
  1183. _SHNAMEMAPPINGA = Record
  1184. pszOldPath : LPSTR;
  1185. pszNewPath : LPSTR;
  1186. cchOldPath : longint;
  1187. cchNewPath : longint;
  1188. end;
  1189. SHNAMEMAPPINGA = _SHNAMEMAPPINGA;
  1190. TSHNAMEMAPPINGA = _SHNAMEMAPPINGA;
  1191. LPSHNAMEMAPPINGA = ^_SHNAMEMAPPINGA;
  1192. _SHNAMEMAPPINGW = Record
  1193. pszOldPath : LPWSTR;
  1194. pszNewPath : LPWSTR;
  1195. cchOldPath : longint;
  1196. cchNewPath : longint;
  1197. end;
  1198. SHNAMEMAPPINGW = _SHNAMEMAPPINGW;
  1199. TSHNAMEMAPPINGW = _SHNAMEMAPPINGW;
  1200. LPSHNAMEMAPPINGW = ^_SHNAMEMAPPINGW;
  1201. {$ifndef UNICODE}
  1202. SHNAMEMAPPING = SHNAMEMAPPINGW;
  1203. TSHNAMEMAPPING = SHNAMEMAPPINGW;
  1204. LPSHNAMEMAPPING = LPSHNAMEMAPPINGW;
  1205. {$else}
  1206. SHNAMEMAPPING = SHNAMEMAPPINGA;
  1207. TSHNAMEMAPPING = SHNAMEMAPPINGA;
  1208. LPSHNAMEMAPPING = LPSHNAMEMAPPINGA;
  1209. {$endif}
  1210. //
  1211. // End Shell File Operations
  1212. //
  1213. //
  1214. // Begin ShellExecuteEx and family
  1215. //
  1216. { ShellExecute() and ShellExecuteEx() error codes }
  1217. { regular WinExec() codes }
  1218. const
  1219. SE_ERR_FNF = 2; { file not found }
  1220. SE_ERR_PNF = 3; { path not found }
  1221. SE_ERR_ACCESSDENIED = 5; { access denied }
  1222. SE_ERR_OOM = 8; { out of memory }
  1223. SE_ERR_DLLNOTFOUND = 32;
  1224. // endif WINVER >= 0x0400
  1225. { error values for ShellExecute() beyond the regular WinExec() codes }
  1226. SE_ERR_SHARE = 26;
  1227. SE_ERR_ASSOCINCOMPLETE = 27;
  1228. SE_ERR_DDETIMEOUT = 28;
  1229. SE_ERR_DDEFAIL = 29;
  1230. SE_ERR_DDEBUSY = 30;
  1231. SE_ERR_NOASSOC = 31;
  1232. //if(WINVER >= 0x0400)}
  1233. { Note CLASSKEY overrides CLASSNAME }
  1234. SEE_MASK_CLASSNAME = $00000001;
  1235. SEE_MASK_CLASSKEY = $00000003;
  1236. { Note INVOKEIDLIST overrides IDLIST }
  1237. SEE_MASK_IDLIST = $00000004;
  1238. SEE_MASK_INVOKEIDLIST = $0000000c;
  1239. SEE_MASK_ICON = $00000010;
  1240. SEE_MASK_HOTKEY = $00000020;
  1241. SEE_MASK_NOCLOSEPROCESS = $00000040;
  1242. SEE_MASK_CONNECTNETDRV = $00000080;
  1243. SEE_MASK_FLAG_DDEWAIT = $00000100;
  1244. SEE_MASK_DOENVSUBST = $00000200;
  1245. SEE_MASK_FLAG_NO_UI = $00000400;
  1246. SEE_MASK_UNICODE = $00004000;
  1247. SEE_MASK_NO_CONSOLE = $00008000;
  1248. SEE_MASK_ASYNCOK = $00100000;
  1249. SEE_MASK_HMONITOR = $00200000;
  1250. //if (_WIN32_IE >= 0x0500)
  1251. SEE_MASK_NOQUERYCLASSSTORE= $01000000;
  1252. SEE_MASK_WAITFORINPUTIDLE= $02000000;
  1253. //endif (_WIN32_IE >= 0x500)
  1254. //if (_WIN32_IE >= 0x0560)
  1255. SEE_MASK_FLAG_LOG_USAGE = $04000000;
  1256. //endif
  1257. { (_WIN32_IE >= 0x560) }
  1258. type
  1259. _SHELLEXECUTEINFOA = record
  1260. cbSize : DWORD;
  1261. fMask : ULONG;
  1262. wnd : HWND;
  1263. lpVerb : LPCSTR;
  1264. lpFile : LPCSTR;
  1265. lpParameters : LPCSTR;
  1266. lpDirectory : LPCSTR;
  1267. nShow : longint;
  1268. hInstApp : HINST;
  1269. lpIDList : LPVOID;
  1270. lpClass : LPCSTR;
  1271. hkeyClass : HKEY;
  1272. dwHotKey : DWORD;
  1273. DUMMYUNIONNAME : record
  1274. case longint of
  1275. 0 : ( hIcon : HANDLE );
  1276. 1 : ( hMonitor : HANDLE );
  1277. end;
  1278. hProcess : HANDLE;
  1279. end;
  1280. SHELLEXECUTEINFOA = _SHELLEXECUTEINFOA;
  1281. TSHELLEXECUTEINFOA = _SHELLEXECUTEINFOA;
  1282. LPSHELLEXECUTEINFOA = ^_SHELLEXECUTEINFOA;
  1283. _SHELLEXECUTEINFOW = record
  1284. cbSize : DWORD;
  1285. fMask : ULONG;
  1286. wnd : HWND;
  1287. lpVerb : lpcwstr;
  1288. lpFile : lpcwstr;
  1289. lpParameters : lpcwstr;
  1290. lpDirectory : lpcwstr;
  1291. nShow : longint;
  1292. hInstApp : HINST;
  1293. lpIDList : LPVOID;
  1294. lpClass : LPCWSTR;
  1295. hkeyClass : HKEY;
  1296. dwHotKey : DWORD;
  1297. DUMMYUNIONNAME : record
  1298. case longint of
  1299. 0 : ( hIcon : HANDLE );
  1300. 1 : ( hMonitor : HANDLE );
  1301. end;
  1302. hProcess : HANDLE;
  1303. end;
  1304. SHELLEXECUTEINFOW = _SHELLEXECUTEINFOW;
  1305. TSHELLEXECUTEINFOW = _SHELLEXECUTEINFOW;
  1306. LPSHELLEXECUTEINFOW = ^_SHELLEXECUTEINFOW;
  1307. {$ifdef UNICODE}
  1308. SHELLEXECUTEINFO = SHELLEXECUTEINFOW;
  1309. TSHELLEXECUTEINFO = SHELLEXECUTEINFOW;
  1310. LPSHELLEXECUTEINFO = LPSHELLEXECUTEINFOW;
  1311. {$else}
  1312. SHELLEXECUTEINFO = SHELLEXECUTEINFOA;
  1313. TSHELLEXECUTEINFO = SHELLEXECUTEINFOA;
  1314. LPSHELLEXECUTEINFO = LPSHELLEXECUTEINFOA;
  1315. {$endif}
  1316. Function ShellExecuteExA(lpExecInfo: LPSHELLEXECUTEINFOA):Bool;external shell32 name 'ShellExecuteExA';
  1317. Function ShellExecuteExW(lpExecInfo: LPSHELLEXECUTEINFOW):Bool;external shell32 name 'ShellExecuteExW';
  1318. Function ShellExecuteEx(lpExecInfo: LPSHELLEXECUTEINFOA):Bool;external shell32 name 'ShellExecuteExA';
  1319. Function ShellExecuteEx(lpExecInfo: LPSHELLEXECUTEINFOW):Bool;external shell32 name 'ShellExecuteExW';
  1320. Procedure WinExecErrorA(HWND : hwnd; error : Longint;lpstrFileName:LPCSTR; lpstrTitle:LPCSTR); external shell32 name 'WinExecErrorA';
  1321. Procedure WinExecErrorW(HWND : hwnd; error : Longint;lpstrFileName:LPCWSTR; lpstrTitle:LPCWSTR); external shell32 name 'WinExecErrorW';
  1322. Procedure WinExecError(HWND : hwnd; error : Longint;lpstrFileName:LPCSTR; lpstrTitle:LPCSTR); external shell32 name 'WinExecErrorA';
  1323. Procedure WinExecError(HWND : hwnd; error : Longint;lpstrFileName:LPCWSTR; lpstrTitle:LPCWSTR); external shell32 name 'WinExecErrorW';
  1324. type
  1325. _SHCREATEPROCESSINFOW = record
  1326. cbSize : DWORD;
  1327. fMask : ULONG;
  1328. hwnd : HWND;
  1329. pszFile : LPCWSTR;
  1330. pszParameters : LPCWSTR;
  1331. pszCurrentDirectory : LPCWSTR;
  1332. {in} hUserToken : HANDLE;
  1333. {in} lpProcessAttributes : LPSECURITY_ATTRIBUTES;
  1334. {in} lpThreadAttributes : LPSECURITY_ATTRIBUTES;
  1335. {in} bInheritHandles : BOOL;
  1336. {in} dwCreationFlags : DWORD;
  1337. {in} lpStartupInfo : LPSTARTUPINFOW;
  1338. {out} lpProcessInformation : LPPROCESS_INFORMATION;
  1339. end;
  1340. SHCREATEPROCESSINFOW = _SHCREATEPROCESSINFOW;
  1341. TSHCREATEPROCESSINFOW = _SHCREATEPROCESSINFOW;
  1342. PSHCREATEPROCESSINFOW = ^_SHCREATEPROCESSINFOW;
  1343. Function SHCreateProcessAsUserW(pscpi : PSHCREATEPROCESSINFOW):Bool;external shell32 name 'SHCreateProcessAsUserW';
  1344. //
  1345. // End ShellExecuteEx and family }
  1346. //
  1347. //
  1348. // RecycleBin
  1349. //
  1350. { struct for query recycle bin info }
  1351. Type
  1352. _SHQUERYRBINFO = record
  1353. cbSize : DWORD;
  1354. i64Size : int64;
  1355. i64NumItems : int64;
  1356. end;
  1357. SHQUERYRBINFO = _SHQUERYRBINFO;
  1358. TSHQUERYRBINFO = _SHQUERYRBINFO;
  1359. LPSHQUERYRBINFO = ^_SHQUERYRBINFO;
  1360. { flags for SHEmptyRecycleBin }
  1361. const
  1362. SHERB_NOCONFIRMATION = $00000001;
  1363. SHERB_NOPROGRESSUI = $00000002;
  1364. SHERB_NOSOUND = $00000004;
  1365. function SHQueryRecycleBinA(pszRootPath:LPCSTR; pSHQueryRBInfo:LPSHQUERYRBINFO):HRESULT;external shell32 name 'SHQueryRecycleBinA';
  1366. function SHQueryRecycleBinW(pszRootPath:LPCWSTR; pSHQueryRBInfo:LPSHQUERYRBINFO):HRESULT;external shell32 name 'SHQueryRecycleBinW';
  1367. function SHQueryRecycleBin(pszRootPath:LPCSTR; pSHQueryRBInfo:LPSHQUERYRBINFO):HRESULT;external shell32 name 'SHQueryRecycleBinA';
  1368. function SHQueryRecycleBin(pszRootPath:LPCWSTR; pSHQueryRBInfo:LPSHQUERYRBINFO):HRESULT;external shell32 name 'SHQueryRecycleBinW';
  1369. function SHEmptyRecycleBinA(hwnd:HWND; pszRootPath:LPCSTR; dwFlags:DWORD):HRESULT;external shell32 name 'SHEmptyRecycleBinA';
  1370. function SHEmptyRecycleBinW(hwnd:HWND; pszRootPath:LPCWSTR; dwFlags:DWORD):HRESULT;external shell32 name 'SHEmptyRecycleBinW';
  1371. function SHEmptyRecycleBin(hwnd:HWND; pszRootPath:LPCSTR; dwFlags:DWORD):HRESULT;external shell32 name 'SHEmptyRecycleBinA';
  1372. function SHEmptyRecycleBin(hwnd:HWND; pszRootPath:LPCWSTR; dwFlags:DWORD):HRESULT;external shell32 name 'SHEmptyRecycleBinW';
  1373. //
  1374. // end of RecycleBin
  1375. //
  1376. //
  1377. // Tray notification definitions
  1378. //
  1379. Type
  1380. _NOTIFYICONDATAA = record
  1381. cbSize : DWORD;
  1382. hWnd : HWND;
  1383. uID : UINT;
  1384. uFlags : UINT;
  1385. uCallbackMessage : UINT;
  1386. hIcon : HICON;
  1387. {$ifdef IELower5}
  1388. szTip : array[0..63] of CHAR;
  1389. {$else}
  1390. szTip : array[0..127] of CHAR;
  1391. {$endif}
  1392. {$ifdef IEhigherEqual5}
  1393. dwState : DWORD;
  1394. dwStateMask : DWORD;
  1395. szInfo : array[0..255] of CHAR;
  1396. DUMMYUNIONNAME : record
  1397. case longint of
  1398. 0 : ( uTimeout : UINT );
  1399. 1 : ( uVersion : UINT );
  1400. end;
  1401. szInfoTitle : array[0..63] of CHAR;
  1402. dwInfoFlags : DWORD;
  1403. {$endif}
  1404. {$ifdef IEHighEq6}
  1405. guidItem : GUID;
  1406. {$endif}
  1407. end;
  1408. NOTIFYICONDATAA = _NOTIFYICONDATAA;
  1409. TNOTIFYICONDATAA = _NOTIFYICONDATAA;
  1410. PNOTIFYICONDATAA = ^_NOTIFYICONDATAA;
  1411. _NOTIFYICONDATAW = record
  1412. cbSize : DWORD;
  1413. hWnd : HWND;
  1414. uID : UINT;
  1415. uFlags : UINT;
  1416. uCallbackMessage : UINT;
  1417. hIcon : HICON;
  1418. {$ifdef IELower5}
  1419. szTip : array[0..63] of WCHAR;
  1420. {$else}
  1421. szTip : array[0..127] of WCHAR;
  1422. {$endif}
  1423. {$ifdef IEhigherEqual5}
  1424. dwState : DWORD;
  1425. dwStateMask : DWORD;
  1426. szInfo : array[0..255] of WCHAR;
  1427. DUMMYUNIONNAME : record
  1428. case longint of
  1429. 0 : ( uTimeout : UINT );
  1430. 1 : ( uVersion : UINT );
  1431. end;
  1432. szInfoTitle : array[0..63] of CHAR;
  1433. dwInfoFlags : DWORD;
  1434. {$endif}
  1435. {$ifdef IEHighEq6}
  1436. guidItem : GUID;
  1437. {$endif}
  1438. end;
  1439. NOTIFYICONDATAW = _NOTIFYICONDATAW;
  1440. TNOTIFYICONDATAW = _NOTIFYICONDATAW;
  1441. PNOTIFYICONDATAW = ^_NOTIFYICONDATAW;
  1442. {$ifdef UNICODE}
  1443. NOTIFYICONDATA = NOTIFYICONDATAW;
  1444. TNOTIFYICONDATA = NOTIFYICONDATAW;
  1445. PNOTIFYICONDATA = PNOTIFYICONDATAW;
  1446. {$else}
  1447. NOTIFYICONDATA = NOTIFYICONDATAA;
  1448. TNOTIFYICONDATA = NOTIFYICONDATAA;
  1449. PNOTIFYICONDATA = PNOTIFYICONDATAA;
  1450. {$endif}
  1451. { UNICODE }
  1452. {
  1453. #define NOTIFYICONDATAA_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAA, szTip[64])
  1454. #define NOTIFYICONDATAW_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAW, szTip[64])
  1455. #ifdef UNICODE
  1456. #define NOTIFYICONDATA_V1_SIZE NOTIFYICONDATAW_V1_SIZE
  1457. #else
  1458. #define NOTIFYICONDATA_V1_SIZE NOTIFYICONDATAA_V1_SIZE
  1459. #endif
  1460. #define NOTIFYICONDATAA_V2_SIZE FIELD_OFFSET(NOTIFYICONDATAA, guidItem)
  1461. #define NOTIFYICONDATAW_V2_SIZE FIELD_OFFSET(NOTIFYICONDATAW, guidItem)
  1462. #ifdef UNICODE
  1463. #define NOTIFYICONDATA_V2_SIZE NOTIFYICONDATAW_V2_SIZE
  1464. #else
  1465. #define NOTIFYICONDATA_V2_SIZE NOTIFYICONDATAA_V2_SIZE
  1466. #endif
  1467. }
  1468. const
  1469. NIN_SELECT = WM_USER + 0;
  1470. NINF_KEY = $1;
  1471. NIN_KEYSELECT = NIN_SELECT or NINF_KEY;
  1472. // if (_WIN32_IE >= 0x0501)}
  1473. NIN_BALLOONSHOW = WM_USER + 2;
  1474. NIN_BALLOONHIDE = WM_USER + 3;
  1475. NIN_BALLOONTIMEOUT = WM_USER + 4;
  1476. NIN_BALLOONUSERCLICK = WM_USER + 5;
  1477. NIM_ADD = $00000000;
  1478. NIM_MODIFY = $00000001;
  1479. NIM_DELETE = $00000002;
  1480. //if (_WIN32_IE >= 0x0500)}
  1481. NIM_SETFOCUS = $00000003;
  1482. NIM_SETVERSION = $00000004;
  1483. NOTIFYICON_VERSION = 3;
  1484. NIF_MESSAGE = $00000001;
  1485. NIF_ICON = $00000002;
  1486. NIF_TIP = $00000004;
  1487. // if (_WIN32_IE >= 0x0500)}
  1488. NIF_STATE = $00000008;
  1489. NIF_INFO = $00000010;
  1490. //if (_WIN32_IE >= 0x600)}
  1491. NIF_GUID = $00000020;
  1492. //if (_WIN32_IE >= 0x0500)}
  1493. NIS_HIDDEN = $00000001;
  1494. NIS_SHAREDICON = $00000002;
  1495. { says this is the source of a shared icon }
  1496. { Notify Icon Infotip flags }
  1497. NIIF_NONE = $00000000;
  1498. { icon flags are mutually exclusive }
  1499. { and take only the lowest 2 bits }
  1500. NIIF_INFO = $00000001;
  1501. NIIF_WARNING = $00000002;
  1502. NIIF_ERROR = $00000003;
  1503. NIIF_ICON_MASK = $0000000F;
  1504. //if (_WIN32_IE >= 0x0501)}
  1505. NIIF_NOSOUND = $00000010;
  1506. Function Shell_NotifyIconA( dwMessage: Dword;lpData: PNOTIFYICONDATAA):Bool;external shell32 name 'Shell_NotifyIconA';
  1507. Function Shell_NotifyIconW( dwMessage: Dword;lpData: PNOTIFYICONDATAW):Bool;external shell32 name 'Shell_NotifyIconW';
  1508. Function Shell_NotifyIcon( dwMessage: Dword;lpData: PNOTIFYICONDATAA):Bool;external shell32 name 'Shell_NotifyIconA';
  1509. Function Shell_NotifyIcon( dwMessage: Dword;lpData: PNOTIFYICONDATAW):Bool;external shell32 name 'Shell_NotifyIconW';
  1510. //
  1511. // End Tray Notification Icons
  1512. //
  1513. //
  1514. // Begin SHGetFileInfo
  1515. //
  1516. {
  1517. The SHGetFileInfo API provides an easy way to get attributes
  1518. for a file given a pathname.
  1519. PARAMETERS
  1520. pszPath file name to get info about
  1521. dwFileAttributes file attribs, only used with SHGFI_USEFILEATTRIBUTES
  1522. psfi place to return file info
  1523. cbFileInfo size of structure
  1524. uFlags flags
  1525. RETURN
  1526. TRUE if things worked
  1527. }
  1528. { out: icon }
  1529. { out: icon index }
  1530. { out: SFGAO_ flags }
  1531. { out: display name (or path) }
  1532. { out: type name }
  1533. type
  1534. _SHFILEINFOA = record
  1535. hIcon : HICON; { out: icon }
  1536. iIcon : longint; { out: icon index }
  1537. dwAttributes : DWORD; { out: SFGAO_ flags }
  1538. szDisplayName : array[0..(MAX_PATH)-1] of CHAR; { out: display name (or path) }
  1539. szTypeName : array[0..79] of CHAR; { out: type name }
  1540. end;
  1541. SHFILEINFOA = _SHFILEINFOA;
  1542. TSHFILEINFOA = _SHFILEINFOA;
  1543. pSHFILEINFOA = ^_SHFILEINFOA;
  1544. _SHFILEINFOW = record
  1545. hIcon : HICON; { out: icon }
  1546. iIcon : longint; { out: icon index }
  1547. dwAttributes : DWORD; { out: SFGAO_ flags }
  1548. szDisplayName : array[0..(MAX_PATH)-1] of WCHAR;{ out: display name (or path) }
  1549. szTypeName : array[0..79] of WCHAR; { out: type name }
  1550. end;
  1551. SHFILEINFOW = _SHFILEINFOW;
  1552. TSHFILEINFOW = _SHFILEINFOW;
  1553. pSHFILEINFOW = ^_SHFILEINFOW;
  1554. {$ifdef UNICODE}
  1555. SHFILEINFO = SHFILEINFOW;
  1556. TSHFILEINFO = SHFILEINFOW;
  1557. pFILEINFO = SHFILEINFOW;
  1558. {$else}
  1559. SHFILEINFO = SHFILEINFOA;
  1560. TSHFILEINFO = SHFILEINFOA;
  1561. pFILEINFO = SHFILEINFOA;
  1562. {$endif}
  1563. { NOTE: This is also in shlwapi.h. Please keep in synch. }
  1564. const
  1565. SHGFI_ICON = $000000100; { get Icon}
  1566. SHGFI_DISPLAYNAME = $000000200; { get display name }
  1567. SHGFI_TYPENAME = $000000400; { get type name }
  1568. SHGFI_ATTRIBUTES = $000000800; { get attributes }
  1569. SHGFI_ICONLOCATION = $000001000; { get icon location}
  1570. SHGFI_EXETYPE = $000002000; { return exe type }
  1571. SHGFI_SYSICONINDEX = $000004000; { get system icon index }
  1572. SHGFI_LINKOVERLAY = $000008000; { put a link overlay on icon }
  1573. SHGFI_SELECTED = $000010000; { show icon in selected state }
  1574. SHGFI_ATTR_SPECIFIED = $000020000; { get only specified attributes }
  1575. SHGFI_LARGEICON = $000000000; { get large icon }
  1576. SHGFI_SMALLICON = $000000001; { get small icon }
  1577. SHGFI_OPENICON = $000000002; { get open icon }
  1578. SHGFI_SHELLICONSIZE = $000000004; { get shell size icon }
  1579. SHGFI_PIDL = $000000008; { pszPath is a pidl }
  1580. SHGFI_USEFILEATTRIBUTES = $000000010; { use passed dwFileAttribute }
  1581. //if (_WIN32_IE >= 0x0500)}
  1582. SHGFI_ADDOVERLAYS = $000000020; { apply the appropriate overlays }
  1583. SHGFI_OVERLAYINDEX = $000000040; { Get the index of the overlay }
  1584. { in the upper 8 bits of the iIcon }
  1585. Function SHGetFileInfoA(pszPath: LPCSTR; dwFileAttributes : DWORD; psfi: pSHFILEINFOA; cbFileInfo,UFlags: UINT):DWORD_PTR;external shell32 name 'SHGetFileInfoA';
  1586. Function SHGetFileInfoW(pszPath: LPCWSTR; dwFileAttributes : DWORD; psfi: pSHFILEINFOW; cbFileInfo,UFlags: UINT):DWORD_PTR;external shell32 name 'SHGetFileInfoW';
  1587. Function SHGetFileInfo(pszPath: LPCSTR; dwFileAttributes : DWORD; psfi: pSHFILEINFOA; cbFileInfo,UFlags: UINT):DWORD_PTR;external shell32 name 'SHGetFileInfoA';
  1588. Function SHGetFileInfoA(pszPath: LPCSTR; dwFileAttributes : DWORD; var psfi: TSHFILEINFOA; cbFileInfo,UFlags: UINT):DWORD_PTR;external shell32 name 'SHGetFileInfoA';
  1589. Function SHGetFileInfoW(pszPath: LPCWSTR; dwFileAttributes : DWORD; var psfi: TSHFILEINFOW; cbFileInfo,UFlags: UINT):DWORD_PTR;external shell32 name 'SHGetFileInfoW';
  1590. Function SHGetFileInfo(pszPath: LPCSTR; dwFileAttributes : DWORD; var psfi: TSHFILEINFOA; cbFileInfo,UFlags: UINT):DWORD_PTR;external shell32 name 'SHGetFileInfoA';
  1591. Function SHGetFileInfo(pszPath: LPCWSTR; dwFileAttributes : DWORD; var psfi: TSHFILEINFOW; cbFileInfo,UFlags: UINT):DWORD_PTR;external shell32 name 'SHGetFileInfoW';
  1592. Function SHGetDiskFreeSpaceExA( pszDirectoryName : LPCSTR; pulFreeBytesAvailableToCaller : pULARGE_INTEGER; pulTotalNumberOfBytes : pULARGE_INTEGER;pulTotalNumberOfFreeBytes: pULARGE_INTEGER):Bool;external shell32 name 'SHGetDiskFreeSpaceExA';
  1593. Function SHGetDiskFreeSpaceExW( pszDirectoryName : LPCWSTR; pulFreeBytesAvailableToCaller : pULARGE_INTEGER; pulTotalNumberOfBytes : pULARGE_INTEGER;pulTotalNumberOfFreeBytes: pULARGE_INTEGER):Bool;external shell32 name 'SHGetDiskFreeSpaceExW';
  1594. Function SHGetDiskFreeSpaceEx( pszDirectoryName : LPCSTR; pulFreeBytesAvailableToCaller : pULARGE_INTEGER; pulTotalNumberOfBytes : pULARGE_INTEGER;pulTotalNumberOfFreeBytes: pULARGE_INTEGER):Bool;external shell32 name 'SHGetDiskFreeSpaceExA';
  1595. Function SHGetDiskFreeSpace( pszDirectoryName : LPCSTR; pulFreeBytesAvailableToCaller : pULARGE_INTEGER; pulTotalNumberOfBytes : pULARGE_INTEGER;pulTotalNumberOfFreeBytes: pULARGE_INTEGER):Bool;external shell32 name 'SHGetDiskFreeSpaceExA';
  1596. Function SHGetDiskFreeSpaceEx( pszDirectoryName : LPCWSTR; pulFreeBytesAvailableToCaller : pULARGE_INTEGER; pulTotalNumberOfBytes : pULARGE_INTEGER;pulTotalNumberOfFreeBytes: pULARGE_INTEGER):Bool;external shell32 name 'SHGetDiskFreeSpaceExW';
  1597. Function SHGetDiskFreeSpace( pszDirectoryName : LPCWSTR; pulFreeBytesAvailableToCaller : pULARGE_INTEGER; pulTotalNumberOfBytes : pULARGE_INTEGER;pulTotalNumberOfFreeBytes: pULARGE_INTEGER):Bool;external shell32 name 'SHGetDiskFreeSpaceExW';
  1598. Function SHGetNewLinkInfoA(pszLinkTo:LPCSTR;pszDir:LPCSTR; pszName:LPSTR; pfMustCopy: pBool; uFlags:UINT):Bool;external shell32 name 'SHGetNewLinkInfoA';
  1599. Function SHGetNewLinkInfoW(pszLinkTo:LPCWSTR;pszDir:LPCWSTR; pszName:LPWSTR; pfMustCopy: pBool; uFlags:UINT):Bool;external shell32 name 'SHGetNewLinkInfoW';
  1600. Function SHGetNewLinkInfo (pszLinkTo:LPCSTR;pszDir:LPCSTR; pszName:LPSTR; pfMustCopy: pBool; uFlags:UINT):Bool;external shell32 name 'SHGetNewLinkInfoA';
  1601. Function SHGetNewLinkInfo (pszLinkTo:LPCWSTR;pszDir:LPCWSTR; pszName:LPWSTR; pfMustCopy: pBool; uFlags:UINT):Bool;external shell32 name 'SHGetNewLinkInfoW';
  1602. const
  1603. SHGNLI_PIDL = $000000001; { pszLinkTo is a pidl }
  1604. SHGNLI_PREFIXNAME = $000000002; { Make name "Shortcut to xxx" }
  1605. SHGNLI_NOUNIQUE = $000000004; { don't do the unique name generation }
  1606. // {if (_WIN32_IE >= 0x0501)}
  1607. SHGNLI_NOLNK = $000000008; { don't add ".lnk" extension }
  1608. // {$endif}
  1609. { _WIN2_IE >= 0x0501 }
  1610. //
  1611. // End SHGetFileInfo
  1612. //
  1613. { Printer stuff }
  1614. PRINTACTION_OPEN = 0;
  1615. PRINTACTION_PROPERTIES = 1;
  1616. PRINTACTION_NETINSTALL = 2;
  1617. PRINTACTION_NETINSTALLLINK = 3;
  1618. PRINTACTION_TESTPAGE = 4;
  1619. PRINTACTION_OPENNETPRN = 5;
  1620. {$ifdef WINNT}
  1621. PRINTACTION_DOCUMENTDEFAULTS = 6;
  1622. PRINTACTION_SERVERPROPERTIES = 7;
  1623. {$endif}
  1624. Function SHInvokePrinterCommandA(HWND: hwnd; uAction:UINT; lpBuf1: LPCSTR; lpBuf2: LPCSTR; fModal:Bool):Bool;external shell32 name 'SHInvokePrinterCommandA';
  1625. Function SHInvokePrinterCommandW(HWND: hwnd; uAction:UINT; lpBuf1: LPCWSTR; lpBuf2: LPCWSTR; fModal:Bool):Bool;external shell32 name 'SHInvokePrinterCommandW';
  1626. Function SHInvokePrinterCommand(HWND: hwnd; uAction:UINT; lpBuf1: LPCSTR; lpBuf2: LPCSTR; fModal:Bool):Bool;external shell32 name 'SHInvokePrinterCommandA';
  1627. Function SHInvokePrinterCommand(HWND: hwnd; uAction:UINT; lpBuf1: LPCWSTR; lpBuf2: LPCWSTR; fModal:Bool):Bool;external shell32 name 'SHInvokePrinterCommandW';
  1628. // WINVER >= 0x0400
  1629. //if (_WIN32_WINNT >= 0x0500) || (_WIN32_WINDOWS >= 0x0500)
  1630. //
  1631. // The SHLoadNonloadedIconOverlayIdentifiers API causes the shell's
  1632. // icon overlay manager to load any registered icon overlay
  1633. // identifers that are not currently loaded. This is useful if an
  1634. // overlay identifier did not load at shell startup but is needed
  1635. // and can be loaded at a later time. Identifiers already loaded
  1636. // are not affected. Overlay identifiers implement the
  1637. // IShellIconOverlayIdentifier interface.
  1638. //
  1639. // Returns:
  1640. // S_OK
  1641. //
  1642. function SHLoadNonloadedIconOverlayIdentifiers:HResult; external shell32 name 'SHLoadNonloadedIconOverlayIdentifiers';
  1643. //
  1644. // The SHIsFileAvailableOffline API determines whether a file
  1645. // or folder is available for offline use.
  1646. //
  1647. // Parameters:
  1648. // pwszPath file name to get info about
  1649. // pdwStatus (optional) OFFLINE_STATUS_* flags returned here
  1650. //
  1651. // Returns:
  1652. // S_OK File/directory is available offline, unless
  1653. // OFFLINE_STATUS_INCOMPLETE is returned.
  1654. // E_INVALIDARG Path is invalid, or not a net path
  1655. // E_FAIL File/directory is not available offline
  1656. //
  1657. // Notes:
  1658. // OFFLINE_STATUS_INCOMPLETE is never returned for directories.
  1659. // Both OFFLINE_STATUS_LOCAL and OFFLINE_STATUS_REMOTE may be returned,
  1660. // indicating "open in both places." This is common when the server is online.
  1661. //
  1662. function SHIsFileAvailableOffline(pwszPath:LPCWSTR; pdwStatus:LPDWORD):HRESULT; external shell32 name 'SHIsFileAvailableOffline';
  1663. const
  1664. OFFLINE_STATUS_LOCAL = $0001; { If open, it's open locally }
  1665. OFFLINE_STATUS_REMOTE = $0002; { If open, it's open remotely }
  1666. OFFLINE_STATUS_INCOMPLETE = $0004; { The local copy is currently incomplete. }
  1667. { The file will not be available offline }
  1668. { until it has been synchronized. }
  1669. { sets the specified path to use the string resource }
  1670. { as the UI instead of the file system name }
  1671. function SHSetLocalizedName(pszPath:LPWSTR; pszResModule:LPCWSTR; idsRes:longint):HRESULT;external shell32 name 'SHSetLocalizedName';
  1672. //if _WIN32_IE >= 0x0600}
  1673. function SHEnumerateUnreadMailAccountsA(hKeyUser:HKEY; dwIndex:DWORD; pszMailAddress:LPSTR; cchMailAddress:longint):HRESULT;external shell32 name 'SHEnumerateUnreadMailAccountsA';
  1674. function SHEnumerateUnreadMailAccountsW(hKeyUser:HKEY; dwIndex:DWORD; pszMailAddress:LPWSTR; cchMailAddress:longint):HRESULT;external shell32 name 'SHEnumerateUnreadMailAccountsW';
  1675. function SHEnumerateUnreadMailAccounts(hKeyUser:HKEY; dwIndex:DWORD; pszMailAddress:LPWSTR; cchMailAddress:longint):HRESULT;external shell32 name 'SHEnumerateUnreadMailAccountsW';
  1676. function SHGetUnreadMailCountA(hKeyUser:HKEY; pszMailAddress:LPCSTR; pdwCount:PDWORD; pFileTime:PFILETIME; pszShellExecuteCommand:LPSTR;cchShellExecuteCommand:longint):HRESULT;external shell32 name 'SHGetUnreadMailCountA';
  1677. function SHGetUnreadMailCountW(hKeyUser:HKEY; pszMailAddress:LPCWSTR; pdwCount:PDWORD; pFileTime:PFILETIME; pszShellExecuteCommand:LPWSTR;cchShellExecuteCommand:longint):HRESULT;external shell32 name 'SHGetUnreadMailCountW';
  1678. function SHGetUnreadMailCount(hKeyUser:HKEY; pszMailAddress:LPCSTR; pdwCount:PDWORD; pFileTime:PFILETIME; pszShellExecuteCommand:LPSTR;cchShellExecuteCommand:longint):HRESULT;external shell32 name 'SHGetUnreadMailCountA';
  1679. function SHGetUnreadMailCount(hKeyUser:HKEY; pszMailAddress:LPCWSTR; pdwCount:PDWORD; pFileTime:PFILETIME; pszShellExecuteCommand:LPWSTR;cchShellExecuteCommand:longint):HRESULT;external shell32 name 'SHGetUnreadMailCountW';
  1680. function SHSetUnreadMailCountA(pszMailAddress:LPCSTR; dwCount:DWORD; pszShellExecuteCommand:LPCSTR):HRESULT;external shell32 name 'SHSetUnreadMailCountA';
  1681. function SHSetUnreadMailCountW(pszMailAddress:LPCWSTR; dwCount:DWORD; pszShellExecuteCommand:LPCWSTR):HRESULT;external shell32 name 'SHSetUnreadMailCountW';
  1682. function SHSetUnreadMailCount(pszMailAddress:LPCSTR; dwCount:DWORD; pszShellExecuteCommand:LPCSTR):HRESULT;external shell32 name 'SHSetUnreadMailCountA';
  1683. function SHSetUnreadMailCount(pszMailAddress:LPCWSTR; dwCount:DWORD; pszShellExecuteCommand:LPCWSTR):HRESULT;external shell32 name 'SHSetUnreadMailCountW';
  1684. // _WIN32_IE >= 0x0600 }
  1685. // if _WIN32_IE >= 0x0600}
  1686. function SHGetImageList(iImageList:longint;CONST riid:TIID; ppvObj:Ppointer):HRESULT;external shell32 name 'SHGetImageList';
  1687. Const
  1688. SHIL_LARGE = 0; { normally 32x32 }
  1689. SHIL_SMALL = 1; { normally 16x16 }
  1690. SHIL_EXTRALARGE = 2;
  1691. SHIL_SYSSMALL = 3; { like SHIL_SMALL, but tracks system small icon metric correctly }
  1692. SHIL_LAST = SHIL_SYSSMALL;
  1693. { Function call types for ntshrui folder sharing helpers }
  1694. //typedef HRESULT (STDMETHODCALLTYPE *PFNSHOWSHAREFOLDERUIW)(IN HWND hwndParent, IN LPCSTR pszPath);
  1695. //typedef HRESULT (STDMETHODCALLTYPE *PFNSHOWSHAREFOLDERUIW)(IN HWND hwndParent, IN LPCWSTR pszPath);
  1696. implementation
  1697. function EIRESID(x : longint) : longint;
  1698. Begin
  1699. EIRESID:=-x;
  1700. End;
  1701. end.