shellapi.pp 102 KB

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