shellapi.pp 102 KB

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