Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1463 lines
21 KiB

  1. #include "shellpch.h"
  2. #pragma hdrstop
  3. #define _SHELL32_
  4. #include <shellapi.h>
  5. #include <shlobj.h>
  6. #include <shlobjp.h>
  7. #undef SHSTDAPI
  8. #define SHSTDAPI HRESULT STDAPICALLTYPE
  9. #undef SHSTDAPI_
  10. #define SHSTDAPI_(type) type STDAPICALLTYPE
  11. static
  12. WINSHELLAPI
  13. UINT
  14. WINAPI
  15. ExtractIconExW (
  16. LPCWSTR lpszFile,
  17. int nIconIndex,
  18. HICON FAR *phiconLarge,
  19. HICON FAR *phiconSmall,
  20. UINT nIcons)
  21. {
  22. return 0;
  23. }
  24. static
  25. WINSHELLAPI
  26. UINT
  27. WINAPI
  28. ExtractIconExA (
  29. LPCSTR lpszFile,
  30. int nIconIndex,
  31. HICON FAR *phiconLarge,
  32. HICON FAR *phiconSmall,
  33. UINT nIcons)
  34. {
  35. return 0;
  36. }
  37. static
  38. HINSTANCE
  39. WINAPI
  40. FindExecutableA (
  41. LPCSTR lpFile,
  42. LPCSTR lpDirectory,
  43. LPSTR lpResult
  44. )
  45. {
  46. return 0;
  47. }
  48. static
  49. HINSTANCE
  50. WINAPI
  51. FindExecutableW (
  52. LPCWSTR lpFile,
  53. LPCWSTR lpDirectory,
  54. LPWSTR lpResult
  55. )
  56. {
  57. return 0;
  58. }
  59. static
  60. int
  61. WINAPI
  62. RestartDialog (
  63. HWND hParent,
  64. LPCTSTR lpPrompt,
  65. DWORD dwReturn
  66. )
  67. {
  68. return IDNO;
  69. }
  70. static
  71. int
  72. WINAPI
  73. RestartDialogEx (
  74. HWND hParent,
  75. LPCTSTR lpPrompt,
  76. DWORD dwReturn,
  77. DWORD ReasonCode
  78. )
  79. {
  80. return IDNO;
  81. }
  82. static
  83. LPITEMIDLIST
  84. WINAPI
  85. SHBrowseForFolderW (
  86. LPBROWSEINFOW lpbi
  87. )
  88. {
  89. return NULL;
  90. }
  91. static
  92. LPITEMIDLIST
  93. WINAPI
  94. SHBrowseForFolderA (
  95. LPBROWSEINFOA lpbi
  96. )
  97. {
  98. return NULL;
  99. }
  100. static
  101. void
  102. STDAPICALLTYPE
  103. SHChangeNotify(
  104. LONG wEventId,
  105. UINT uFlags,
  106. LPCVOID dwItem1,
  107. LPCVOID dwItem2)
  108. {
  109. }
  110. static
  111. HRESULT
  112. STDAPICALLTYPE
  113. SHGetFolderPathA (
  114. HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPSTR pszPath
  115. )
  116. {
  117. *pszPath = 0;
  118. return E_FAIL;
  119. }
  120. static
  121. HRESULT
  122. STDAPICALLTYPE
  123. SHGetFolderPathW (
  124. HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath
  125. )
  126. {
  127. *pszPath = 0;
  128. return E_FAIL;
  129. }
  130. static
  131. HRESULT
  132. STDAPICALLTYPE
  133. SHGetMalloc (
  134. LPMALLOC * ppMalloc
  135. )
  136. {
  137. return E_FAIL;
  138. }
  139. static
  140. BOOL
  141. STDAPICALLTYPE
  142. SHGetPathFromIDListW (
  143. LPCITEMIDLIST pidl,
  144. LPWSTR pszPath
  145. )
  146. {
  147. return FALSE;
  148. }
  149. static
  150. BOOL
  151. STDAPICALLTYPE
  152. SHGetPathFromIDListA (
  153. LPCITEMIDLIST pidl,
  154. LPSTR pszPath
  155. )
  156. {
  157. return FALSE;
  158. }
  159. static
  160. HRESULT
  161. STDAPICALLTYPE
  162. SHGetSpecialFolderLocation (
  163. HWND hwnd,
  164. int csidl,
  165. LPITEMIDLIST *ppidl
  166. )
  167. {
  168. return E_FAIL;
  169. }
  170. static
  171. BOOL
  172. STDAPICALLTYPE
  173. SHGetSpecialFolderPathW(
  174. HWND hwnd,
  175. LPWSTR pszPath,
  176. int csidl,
  177. BOOL fCreate)
  178. {
  179. return FALSE;
  180. }
  181. static
  182. WINSHELLAPI
  183. INT
  184. WINAPI
  185. ShellAboutW(
  186. HWND hwnd,
  187. LPCWSTR szApp,
  188. LPCWSTR szOtherStuff,
  189. HICON hIcon
  190. )
  191. {
  192. return FALSE;
  193. }
  194. static
  195. WINSHELLAPI
  196. HINSTANCE
  197. APIENTRY
  198. ShellExecuteA (
  199. HWND hwnd,
  200. LPCSTR lpOperation,
  201. LPCSTR lpFile,
  202. LPCSTR lpParameters,
  203. LPCSTR lpDirectory,
  204. INT nShowCmd
  205. )
  206. {
  207. return NULL;
  208. }
  209. static
  210. WINSHELLAPI
  211. BOOL
  212. WINAPI
  213. ShellExecuteExW(LPSHELLEXECUTEINFOW lpExecInfo)
  214. {
  215. return FALSE;
  216. }
  217. static
  218. WINSHELLAPI
  219. BOOL
  220. WINAPI
  221. ShellExecuteExA(LPSHELLEXECUTEINFOA lpExecInfo)
  222. {
  223. return FALSE;
  224. }
  225. static
  226. WINSHELLAPI
  227. HINSTANCE
  228. APIENTRY
  229. ShellExecuteW (
  230. HWND hwnd,
  231. LPCWSTR lpOperation,
  232. LPCWSTR lpFile,
  233. LPCWSTR lpParameters,
  234. LPCWSTR lpDirectory,
  235. INT nShowCmd
  236. )
  237. {
  238. return NULL;
  239. }
  240. static
  241. int
  242. ShellMessageBoxW(
  243. HINSTANCE hInst,
  244. HWND hWnd,
  245. LPCWSTR pszMsg,
  246. LPCWSTR pszTitle,
  247. UINT fuStyle,
  248. ...
  249. )
  250. {
  251. return -1;
  252. }
  253. static
  254. BOOL
  255. WINAPI
  256. LinkWindow_RegisterClass()
  257. {
  258. return FALSE;
  259. }
  260. static
  261. BOOL
  262. WINAPI
  263. LinkWindow_UnregisterClass(
  264. HINSTANCE hInst
  265. )
  266. {
  267. return FALSE;
  268. }
  269. static
  270. UINT
  271. WINAPI
  272. DragQueryFileA(
  273. HDROP hDrop,
  274. UINT wFile,
  275. LPSTR lpFile,
  276. UINT cb
  277. )
  278. {
  279. return wFile;
  280. }
  281. static
  282. UINT
  283. WINAPI
  284. DragQueryFileW(
  285. HDROP hDrop,
  286. UINT wFile,
  287. LPWSTR lpFile,
  288. UINT cb
  289. )
  290. {
  291. return wFile;
  292. }
  293. static
  294. HRESULT
  295. WINAPI
  296. SHDefExtractIconA(
  297. LPCSTR pszIconFile,
  298. int iIndex,
  299. UINT uFlags,
  300. HICON *phiconLarge,
  301. HICON *phiconSmall,
  302. UINT nIconSize
  303. )
  304. {
  305. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  306. }
  307. static
  308. HRESULT
  309. WINAPI
  310. SHDefExtractIconW(
  311. LPCWSTR pszIconFile,
  312. int iIndex,
  313. UINT uFlags,
  314. HICON *phiconLarge,
  315. HICON *phiconSmall,
  316. UINT nIconSize
  317. )
  318. {
  319. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  320. }
  321. static
  322. BOOL
  323. WINAPI
  324. SHGetNewLinkInfoA(
  325. LPCSTR pszLinkTo,
  326. LPCSTR pszDir,
  327. LPSTR pszName,
  328. BOOL* pfMustCopy,
  329. UINT uFlags
  330. )
  331. {
  332. return FALSE;
  333. }
  334. static
  335. BOOL
  336. WINAPI
  337. SHGetNewLinkInfoW(
  338. LPCWSTR pszLinkTo,
  339. LPCWSTR pszDir,
  340. LPWSTR pszName,
  341. BOOL* pfMustCopy,
  342. UINT uFlags
  343. )
  344. {
  345. return FALSE;
  346. }
  347. static
  348. HICON
  349. WINAPI
  350. ExtractIconA(
  351. HINSTANCE hInst,
  352. LPCSTR lpszExeFileName,
  353. UINT nIconIndex
  354. )
  355. {
  356. return NULL;
  357. }
  358. static
  359. HICON
  360. WINAPI
  361. ExtractIconW(
  362. HINSTANCE hInst,
  363. LPCWSTR lpszExeFileName,
  364. UINT nIconIndex
  365. )
  366. {
  367. return NULL;
  368. }
  369. static
  370. DWORD_PTR
  371. WINAPI
  372. SHGetFileInfoA(
  373. LPCSTR pszPath,
  374. DWORD dwFileAttributes,
  375. SHFILEINFOA *psfi,
  376. UINT cbFileInfo,
  377. UINT uFlags
  378. )
  379. {
  380. return 0;
  381. }
  382. static
  383. DWORD_PTR
  384. WINAPI
  385. SHGetFileInfoW(
  386. LPCWSTR pszPath,
  387. DWORD dwFileAttributes,
  388. SHFILEINFOW *psfi,
  389. UINT cbFileInfo,
  390. UINT uFlags
  391. )
  392. {
  393. return 0;
  394. }
  395. static
  396. DWORD
  397. WINAPI
  398. SHFormatDrive(
  399. HWND hwnd,
  400. UINT drive,
  401. UINT fmtID,
  402. UINT options
  403. )
  404. {
  405. return SHFMT_ERROR;
  406. }
  407. static
  408. int
  409. WINAPI
  410. DriveType(
  411. int iDrive
  412. )
  413. {
  414. return DRIVE_UNKNOWN;
  415. }
  416. static
  417. int
  418. WINAPI
  419. RealDriveType(
  420. int iDrive,
  421. BOOL fOKToHitNet
  422. )
  423. {
  424. return DRIVE_UNKNOWN;
  425. }
  426. static
  427. void
  428. WINAPI
  429. ILFree(
  430. LPITEMIDLIST pidl
  431. )
  432. {
  433. }
  434. static
  435. LPITEMIDLIST
  436. WINAPI
  437. ILClone(
  438. LPCITEMIDLIST pidl
  439. )
  440. {
  441. return NULL;
  442. }
  443. static
  444. BOOL
  445. WINAPI
  446. ILIsEqual(
  447. LPCITEMIDLIST pidl1,
  448. LPCITEMIDLIST pidl2
  449. )
  450. {
  451. return (pidl1 == pidl2);
  452. }
  453. static
  454. HRESULT
  455. WINAPI
  456. SHGetDesktopFolder(
  457. IShellFolder** ppshf
  458. )
  459. {
  460. *ppshf = NULL;
  461. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  462. }
  463. static
  464. int
  465. WINAPI
  466. Shell_GetCachedImageIndex(
  467. LPCTSTR pszIconPath,
  468. int iIconIndex,
  469. UINT uIconFlags
  470. )
  471. {
  472. return -1;
  473. }
  474. static
  475. int
  476. WINAPI
  477. SHFileOperationA(
  478. LPSHFILEOPSTRUCTA lpFileOp
  479. )
  480. {
  481. return ERROR_PROC_NOT_FOUND;
  482. }
  483. static
  484. int
  485. WINAPI
  486. SHFileOperationW(
  487. LPSHFILEOPSTRUCTW lpFileOp
  488. )
  489. {
  490. return ERROR_PROC_NOT_FOUND;
  491. }
  492. static
  493. int
  494. WINAPI
  495. IsNetDrive(
  496. int iDrive
  497. )
  498. {
  499. return 0;
  500. }
  501. static
  502. UINT
  503. WINAPI
  504. ILGetSize(
  505. LPCITEMIDLIST pidl
  506. )
  507. {
  508. return 0;
  509. }
  510. static
  511. void
  512. WINAPI
  513. SHFlushSFCache()
  514. {
  515. }
  516. static
  517. HRESULT
  518. WINAPI
  519. SHCoCreateInstance(
  520. LPCTSTR pszCLSID,
  521. const CLSID *pclsid,
  522. IUnknown *pUnkOuter,
  523. REFIID riid,
  524. void** ppv
  525. )
  526. {
  527. *ppv = NULL;
  528. return E_FAIL;
  529. }
  530. static
  531. HRESULT
  532. WINAPI
  533. SHGetInstanceExplorer(
  534. IUnknown** ppunk
  535. )
  536. {
  537. *ppunk = NULL;
  538. return E_FAIL;
  539. }
  540. static
  541. HRESULT
  542. WINAPI
  543. SHGetDataFromIDListW(
  544. IShellFolder *psf,
  545. LPCITEMIDLIST pidl,
  546. int nFormat,
  547. void* pv,
  548. int cb
  549. )
  550. {
  551. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  552. }
  553. static
  554. HRESULT
  555. WINAPI
  556. SHBindToParent(
  557. LPCITEMIDLIST pidl,
  558. REFIID riid,
  559. void** ppv,
  560. LPCITEMIDLIST* ppidlLast
  561. )
  562. {
  563. *ppv = NULL;
  564. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  565. }
  566. static
  567. SHSTDAPI_(void)
  568. SHFree(
  569. void* pv
  570. )
  571. {
  572. }
  573. static
  574. SHSTDAPI_(void)
  575. SHGetSetSettings(
  576. LPSHELLSTATE lpss,
  577. DWORD dwMask,
  578. BOOL bSet
  579. )
  580. {
  581. ZeroMemory(lpss, sizeof(SHELLSTATE));
  582. }
  583. static
  584. SHSTDAPI_(BOOL)
  585. Shell_GetImageLists(
  586. HIMAGELIST *phiml,
  587. HIMAGELIST *phimlSmall
  588. )
  589. {
  590. if (phiml)
  591. {
  592. *phiml = NULL;
  593. }
  594. if (phimlSmall)
  595. {
  596. *phimlSmall = NULL;
  597. }
  598. return FALSE;
  599. }
  600. static
  601. SHSTDAPI_(BOOL)
  602. Shell_NotifyIconW(
  603. DWORD dwMessage,
  604. NOTIFYICONDATAW *pnid
  605. )
  606. {
  607. return FALSE;
  608. }
  609. static
  610. SHSTDAPI_(BOOL)
  611. DAD_DragEnterEx2(
  612. HWND hwndTarget,
  613. const POINT ptStart,
  614. IDataObject *pdtObject
  615. )
  616. {
  617. return FALSE;
  618. }
  619. static
  620. SHSTDAPI_(BOOL)
  621. DAD_DragMove(
  622. POINT pt
  623. )
  624. {
  625. return FALSE;
  626. }
  627. static
  628. SHSTDAPI
  629. SHGetDataFromIDListA(
  630. IShellFolder *psf,
  631. LPCITEMIDLIST pidl,
  632. int nFormat,
  633. void* pv,
  634. int cb
  635. )
  636. {
  637. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  638. }
  639. static
  640. SHSTDAPI_(LPITEMIDLIST)
  641. ILCombine(
  642. LPCITEMIDLIST pidl1,
  643. LPCITEMIDLIST pidl2
  644. )
  645. {
  646. return NULL;
  647. }
  648. static
  649. SHSTDAPI
  650. SHDoDragDrop(
  651. HWND hwnd,
  652. IDataObject *pdata,
  653. IDropSource *pdsrc,
  654. DWORD dwEffect,
  655. DWORD *pdwEffect
  656. )
  657. {
  658. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  659. }
  660. static
  661. SHSTDAPI
  662. SHLoadOLE(
  663. LPARAM lParam
  664. )
  665. {
  666. return S_OK;
  667. }
  668. static
  669. SHSTDAPI_(void)
  670. SHSetInstanceExplorer(
  671. IUnknown *punk
  672. )
  673. {
  674. }
  675. static
  676. SHSTDAPI
  677. SHCreateStdEnumFmtEtc(
  678. UINT cfmt,
  679. const FORMATETC afmt[],
  680. IEnumFORMATETC **ppenumFormatEtc
  681. )
  682. {
  683. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  684. }
  685. static
  686. SHSTDAPI
  687. ILLoadFromStream(
  688. IStream *pstm,
  689. LPITEMIDLIST *pidl
  690. )
  691. {
  692. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  693. }
  694. static
  695. SHSTDAPI_(UINT)
  696. Shell_MergeMenus(
  697. HMENU hmDst,
  698. HMENU hmSrc,
  699. UINT uInsert,
  700. UINT uIDAdjust,
  701. UINT uIDAdjustMax,
  702. ULONG uFlags
  703. )
  704. {
  705. return uIDAdjust;
  706. }
  707. static
  708. SHSTDAPI_(LPITEMIDLIST)
  709. ILCloneFirst(
  710. LPCITEMIDLIST pidl
  711. )
  712. {
  713. return NULL;
  714. }
  715. static
  716. SHSTDAPI_(DWORD)
  717. SHRestricted(
  718. RESTRICTIONS rest
  719. )
  720. {
  721. return 0;
  722. }
  723. static
  724. SHSTDAPI
  725. SHStartNetConnectionDialogW(
  726. HWND hwnd,
  727. LPCWSTR pszRemoteName,
  728. DWORD dwType
  729. )
  730. {
  731. return S_OK;
  732. }
  733. static
  734. SHSTDAPI_(BOOL)
  735. SHChangeNotifyDeregister(
  736. unsigned long ulID
  737. )
  738. {
  739. return FALSE;
  740. }
  741. static
  742. SHSTDAPI
  743. SHFlushClipboard()
  744. {
  745. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  746. }
  747. static
  748. SHSTDAPI_(LPITEMIDLIST)
  749. ILFindChild(
  750. LPCITEMIDLIST pidlParent,
  751. LPCITEMIDLIST pidlChild
  752. )
  753. {
  754. return NULL;
  755. }
  756. static
  757. SHSTDAPI_(BOOL)
  758. ILIsParent(
  759. LPCITEMIDLIST pidl1,
  760. LPCITEMIDLIST pidl2,
  761. BOOL fImmediate
  762. )
  763. {
  764. return FALSE;
  765. }
  766. static
  767. SHSTDAPI_(BOOL)
  768. ILRemoveLastID(
  769. LPITEMIDLIST pidl
  770. )
  771. {
  772. return FALSE;
  773. }
  774. static
  775. SHSTDAPI_(IContextMenu*)
  776. SHFind_InitMenuPopup(
  777. HMENU hmenu,
  778. HWND hwndOwner,
  779. UINT idCmdFirst,
  780. UINT idCmdLast
  781. )
  782. {
  783. return NULL;
  784. }
  785. static
  786. SHSTDAPI_(BOOL)
  787. SHChangeNotification_Unlock(
  788. HANDLE hLock
  789. )
  790. {
  791. return FALSE;
  792. }
  793. static
  794. SHSTDAPI_(HANDLE)
  795. SHChangeNotification_Lock(
  796. HANDLE hChangeNotification,
  797. DWORD dwProcessId,
  798. LPITEMIDLIST **pppidl,
  799. LONG *plEvent
  800. )
  801. {
  802. return NULL;
  803. }
  804. static
  805. SHSTDAPI
  806. SHGetRealIDL(
  807. IShellFolder *psf,
  808. LPCITEMIDLIST pidlSimple,
  809. LPITEMIDLIST * ppidlReal
  810. )
  811. {
  812. *ppidlReal = NULL;
  813. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  814. }
  815. static
  816. SHSTDAPI
  817. ILSaveToStream(
  818. IStream *pstm,
  819. LPCITEMIDLIST pidl
  820. )
  821. {
  822. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  823. }
  824. static
  825. SHSTDAPI_(BOOL)
  826. DAD_ShowDragImage(
  827. BOOL fShow
  828. )
  829. {
  830. return FALSE;
  831. }
  832. static
  833. SHSTDAPI_(BOOL)
  834. SignalFileOpen(
  835. LPCITEMIDLIST pidl
  836. )
  837. {
  838. return FALSE;
  839. }
  840. static
  841. SHSTDAPI_(int)
  842. SHMapPIDLToSystemImageListIndex(
  843. IShellFolder *pshf,
  844. LPCITEMIDLIST pidl,
  845. int *piIndexSel
  846. )
  847. {
  848. return -1;
  849. }
  850. static
  851. SHSTDAPI_(LPITEMIDLIST)
  852. ILGetNext(
  853. LPCITEMIDLIST pidl
  854. )
  855. {
  856. return NULL;
  857. }
  858. static
  859. SHSTDAPI_(BOOL)
  860. PathIsExe(
  861. LPCTSTR pszPath
  862. )
  863. {
  864. return FALSE;
  865. }
  866. static
  867. SHSTDAPI_(BOOL)
  868. DAD_DragLeave()
  869. {
  870. return FALSE;
  871. }
  872. static
  873. SHSTDAPI_(UINT_PTR)
  874. SHAppBarMessage(
  875. DWORD dwMessage,
  876. PAPPBARDATA pData
  877. )
  878. {
  879. return FALSE;
  880. }
  881. static
  882. SHSTDAPI_(HICON)
  883. ExtractAssociatedIconW(
  884. HINSTANCE hInst,
  885. LPWSTR lpIconPath,
  886. LPWORD lpiIconIndex
  887. )
  888. {
  889. return NULL;
  890. }
  891. static
  892. SHSTDAPI_(HICON)
  893. ExtractAssociatedIconExW(
  894. HINSTANCE hInst,
  895. LPWSTR lpIconPath,
  896. LPWORD lpiIconIndex,
  897. LPWORD lpiIconId
  898. )
  899. {
  900. return NULL;
  901. }
  902. static
  903. SHSTDAPI_(BOOL)
  904. DAD_AutoScroll(
  905. HWND hwnd,
  906. AUTO_SCROLL_DATA *pad,
  907. const POINT *pptNow
  908. )
  909. {
  910. return FALSE;
  911. }
  912. static
  913. SHSTDAPI_(BOOL)
  914. DAD_SetDragImage(
  915. HIMAGELIST him,
  916. POINT * pptOffset
  917. )
  918. {
  919. return TRUE;
  920. }
  921. static
  922. SHSTDAPI_(LPITEMIDLIST)
  923. ILAppendID(
  924. LPITEMIDLIST pidl,
  925. LPCSHITEMID pmkid,
  926. BOOL fAppend
  927. )
  928. {
  929. return NULL;
  930. }
  931. static
  932. SHSTDAPI_(int)
  933. SHHandleUpdateImage(
  934. LPCITEMIDLIST pidlExtra
  935. )
  936. {
  937. return -1;
  938. }
  939. static
  940. SHSTDAPI_(LPITEMIDLIST)
  941. SHCloneSpecialIDList(
  942. HWND hwnd,
  943. int csidl,
  944. BOOL fCreate
  945. )
  946. {
  947. return NULL;
  948. }
  949. static
  950. SHSTDAPI_(INT)
  951. ShellAboutA(
  952. HWND hWnd,
  953. LPCSTR szApp,
  954. LPCSTR szOtherStuff,
  955. HICON hIcon
  956. )
  957. {
  958. return 0;
  959. }
  960. static
  961. SHSTDAPI_(int)
  962. SHCreateDirectory(
  963. HWND hwnd,
  964. LPCTSTR pszPath
  965. )
  966. {
  967. return ERROR_PROC_NOT_FOUND;
  968. }
  969. static
  970. SHSTDAPI_(int)
  971. PathCleanupSpec(
  972. LPCTSTR pszDir,
  973. LPTSTR pszSpec
  974. )
  975. {
  976. return 0;
  977. }
  978. static
  979. SHSTDAPI_(void *)
  980. SHAlloc(
  981. SIZE_T cb
  982. )
  983. {
  984. return NULL;
  985. }
  986. static
  987. SHSTDAPI_(BOOL)
  988. ReadCabinetState(
  989. LPCABINETSTATE lpState,
  990. int iSize
  991. )
  992. {
  993. return FALSE;
  994. }
  995. static
  996. SHSTDAPI_(LPITEMIDLIST)
  997. ILCreateFromPathA(
  998. LPCSTR pszPath
  999. )
  1000. {
  1001. return NULL;
  1002. }
  1003. static
  1004. SHSTDAPI_(LPITEMIDLIST)
  1005. ILCreateFromPathW(
  1006. LPCWSTR pszPath
  1007. )
  1008. {
  1009. return NULL;
  1010. }
  1011. static
  1012. SHSTDAPI_(LPITEMIDLIST)
  1013. ILFindLastID(
  1014. LPCITEMIDLIST pidl
  1015. )
  1016. {
  1017. return NULL;
  1018. }
  1019. static
  1020. SHSTDAPI_(BOOL)
  1021. WriteCabinetState(
  1022. LPCABINETSTATE lpState
  1023. )
  1024. {
  1025. return FALSE;
  1026. }
  1027. static
  1028. SHSTDAPI_(void)
  1029. SHUpdateImageW(
  1030. LPCWSTR pszHashItem,
  1031. int iIndex,
  1032. UINT uFlags,
  1033. int iImageIndex
  1034. )
  1035. {
  1036. }
  1037. static
  1038. SHSTDAPI
  1039. SHLimitInputEdit(
  1040. HWND hwndEdit,
  1041. IShellFolder *psf
  1042. )
  1043. {
  1044. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  1045. }
  1046. static
  1047. SHSTDAPI
  1048. SHPathPrepareForWriteW(
  1049. HWND hwnd,
  1050. IUnknown *punkEnableModless,
  1051. LPCWSTR pszPath,
  1052. DWORD dwFlags
  1053. )
  1054. {
  1055. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  1056. }
  1057. static
  1058. SHSTDAPI
  1059. SHSetLocalizedName(
  1060. LPWSTR pszPath,
  1061. LPCWSTR pszResModule,
  1062. int idsRes
  1063. )
  1064. {
  1065. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  1066. }
  1067. static
  1068. SHSTDAPI
  1069. SHLoadInProc(
  1070. REFCLSID rclsid
  1071. )
  1072. {
  1073. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  1074. }
  1075. static
  1076. SHSTDAPI_(LONG)
  1077. PathProcessCommand(
  1078. LPCTSTR lpSrc,
  1079. LPTSTR lpDest,
  1080. int iMax,
  1081. DWORD dwFlags
  1082. )
  1083. {
  1084. return -1;
  1085. }
  1086. static
  1087. WINSHELLAPI
  1088. HRESULT
  1089. STDAPICALLTYPE
  1090. SHCLSIDFromString(
  1091. LPCTSTR lpsz,
  1092. LPCLSID lpclsid
  1093. )
  1094. {
  1095. ZeroMemory(lpclsid, sizeof(CLSID));
  1096. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  1097. }
  1098. static
  1099. SHSTDAPI
  1100. SHILCreateFromPath(
  1101. LPCTSTR szPath,
  1102. LPITEMIDLIST *ppidl,
  1103. DWORD *rgfInOut
  1104. )
  1105. {
  1106. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  1107. }
  1108. static
  1109. SHSTDAPI_(LPITEMIDLIST)
  1110. SHSimpleIDListFromPath(
  1111. LPCTSTR pszPath
  1112. )
  1113. {
  1114. return NULL;
  1115. }
  1116. static
  1117. SHSTDAPI_(BOOL)
  1118. GetFileNameFromBrowse(
  1119. HWND hwnd,
  1120. LPTSTR pszFilePath,
  1121. UINT cbFilePath,
  1122. LPCTSTR pszWorkingDir,
  1123. LPCTSTR pszDefExt,
  1124. LPCTSTR pszFilters,
  1125. LPCTSTR pszTitle
  1126. )
  1127. {
  1128. return FALSE;
  1129. }
  1130. static
  1131. SHSTDAPI_(IStream*)
  1132. OpenRegStream(
  1133. HKEY hkey,
  1134. LPCTSTR pszSubkey,
  1135. LPCTSTR pszValue,
  1136. DWORD grfMode
  1137. )
  1138. {
  1139. return NULL;
  1140. }
  1141. static
  1142. SHSTDAPI_(BOOL)
  1143. PathYetAnotherMakeUniqueName(
  1144. LPTSTR pszUniqueName,
  1145. LPCTSTR pszPath,
  1146. LPCTSTR pszShort,
  1147. LPCTSTR pszFileSpec
  1148. )
  1149. {
  1150. return FALSE;
  1151. }
  1152. static
  1153. WINSHELLAPI
  1154. int
  1155. WINAPI
  1156. PickIconDlg(
  1157. HWND hwnd,
  1158. LPTSTR pszIconPath,
  1159. UINT cbIconPath,
  1160. int *piIconIndex
  1161. )
  1162. {
  1163. return 0;
  1164. }
  1165. static
  1166. SHSTDAPI_(LRESULT)
  1167. SHShellFolderView_Message(
  1168. HWND hwndMain,
  1169. UINT uMsg,
  1170. LPARAM lParam
  1171. )
  1172. {
  1173. return 0;
  1174. }
  1175. static
  1176. SHSTDAPI
  1177. SHCreateShellFolderViewEx(
  1178. LPCSFV pcsfv,
  1179. IShellView** ppsv
  1180. )
  1181. {
  1182. *ppsv = NULL;
  1183. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  1184. }
  1185. static
  1186. SHSTDAPI_(BOOL)
  1187. SHFindFiles(
  1188. LPCITEMIDLIST pidlFolder,
  1189. LPCITEMIDLIST pidlSaveFile
  1190. )
  1191. {
  1192. return FALSE;
  1193. }
  1194. static
  1195. SHSTDAPI_(BOOL)
  1196. DAD_DragEnterEx(
  1197. HWND hwndTarget,
  1198. const POINT ptStart
  1199. )
  1200. {
  1201. return FALSE;
  1202. }
  1203. //
  1204. // !! WARNING !! The entries below must be in order by ORDINAL
  1205. //
  1206. DEFINE_ORDINAL_ENTRIES(shell32)
  1207. {
  1208. DLOENTRY(3, SHDefExtractIconA)
  1209. DLOENTRY(4, SHChangeNotifyDeregister)
  1210. DLOENTRY(6, SHDefExtractIconW)
  1211. DLOENTRY(14, SHStartNetConnectionDialogW)
  1212. DLOENTRY(16, ILFindLastID)
  1213. DLOENTRY(17, ILRemoveLastID)
  1214. DLOENTRY(18, ILClone)
  1215. DLOENTRY(19, ILCloneFirst)
  1216. DLOENTRY(21, ILIsEqual)
  1217. DLOENTRY(22, DAD_DragEnterEx2)
  1218. DLOENTRY(23, ILIsParent)
  1219. DLOENTRY(24, ILFindChild)
  1220. DLOENTRY(25, ILCombine)
  1221. DLOENTRY(26, ILLoadFromStream)
  1222. DLOENTRY(27, ILSaveToStream)
  1223. DLOENTRY(28, SHILCreateFromPath)
  1224. DLOENTRY(43, PathIsExe)
  1225. DLOENTRY(59, RestartDialog)
  1226. DLOENTRY(62, PickIconDlg)
  1227. DLOENTRY(63, GetFileNameFromBrowse)
  1228. DLOENTRY(64, DriveType)
  1229. DLOENTRY(66, IsNetDrive)
  1230. DLOENTRY(67, Shell_MergeMenus)
  1231. DLOENTRY(68, SHGetSetSettings)
  1232. DLOENTRY(71, Shell_GetImageLists)
  1233. DLOENTRY(72, Shell_GetCachedImageIndex)
  1234. DLOENTRY(73, SHShellFolderView_Message)
  1235. DLOENTRY(74, SHCreateStdEnumFmtEtc)
  1236. DLOENTRY(75, PathYetAnotherMakeUniqueName)
  1237. DLOENTRY(77, SHMapPIDLToSystemImageListIndex)
  1238. DLOENTRY(85, OpenRegStream)
  1239. DLOENTRY(88, SHDoDragDrop)
  1240. DLOENTRY(89, SHCloneSpecialIDList)
  1241. DLOENTRY(90, SHFindFiles)
  1242. DLOENTRY(98, SHGetRealIDL)
  1243. DLOENTRY(100, SHRestricted)
  1244. DLOENTRY(102, SHCoCreateInstance)
  1245. DLOENTRY(103, SignalFileOpen)
  1246. DLOENTRY(121, SHFlushClipboard)
  1247. DLOENTRY(129, DAD_AutoScroll)
  1248. DLOENTRY(131, DAD_DragEnterEx)
  1249. DLOENTRY(132, DAD_DragLeave)
  1250. DLOENTRY(134, DAD_DragMove)
  1251. DLOENTRY(136, DAD_SetDragImage)
  1252. DLOENTRY(137, DAD_ShowDragImage)
  1253. DLOENTRY(147, SHCLSIDFromString)
  1254. DLOENTRY(149, SHFind_InitMenuPopup)
  1255. DLOENTRY(151, SHLoadOLE)
  1256. DLOENTRY(152, ILGetSize)
  1257. DLOENTRY(153, ILGetNext)
  1258. DLOENTRY(154, ILAppendID)
  1259. DLOENTRY(155, ILFree)
  1260. DLOENTRY(157, ILCreateFromPathW)
  1261. DLOENTRY(162, SHSimpleIDListFromPath)
  1262. DLOENTRY(165, SHCreateDirectory)
  1263. DLOENTRY(171, PathCleanupSpec)
  1264. DLOENTRY(174, SHCreateShellFolderViewEx)
  1265. DLOENTRY(175, SHGetSpecialFolderPathW)
  1266. DLOENTRY(176, SHSetInstanceExplorer)
  1267. DLOENTRY(179, SHGetNewLinkInfoA)
  1268. DLOENTRY(180, SHGetNewLinkInfoW)
  1269. DLOENTRY(182, ShellMessageBoxW)
  1270. DLOENTRY(189, ILCreateFromPathA)
  1271. DLOENTRY(190, ILCreateFromPathW)
  1272. DLOENTRY(192, SHUpdateImageW)
  1273. DLOENTRY(193, SHHandleUpdateImage)
  1274. DLOENTRY(195, SHFree)
  1275. DLOENTRY(196, SHAlloc)
  1276. DLOENTRY(258, LinkWindow_RegisterClass)
  1277. DLOENTRY(259, LinkWindow_UnregisterClass)
  1278. DLOENTRY(524, RealDriveType)
  1279. DLOENTRY(526, SHFlushSFCache)
  1280. DLOENTRY(644, SHChangeNotification_Lock)
  1281. DLOENTRY(645, SHChangeNotification_Unlock)
  1282. DLOENTRY(652, WriteCabinetState)
  1283. DLOENTRY(653, PathProcessCommand)
  1284. DLOENTRY(654, ReadCabinetState)
  1285. DLOENTRY(730, RestartDialogEx)
  1286. DLOENTRY(747, SHLimitInputEdit)
  1287. };
  1288. DEFINE_ORDINAL_MAP(shell32)
  1289. //
  1290. // !! WARNING !! The entries below must be in alphabetical order, and are CASE SENSITIVE (eg lower case comes last!)
  1291. //
  1292. DEFINE_PROCNAME_ENTRIES(shell32)
  1293. {
  1294. DLPENTRY(DragQueryFileA)
  1295. DLPENTRY(DragQueryFileW)
  1296. DLPENTRY(ExtractAssociatedIconExW)
  1297. DLPENTRY(ExtractAssociatedIconW)
  1298. DLPENTRY(ExtractIconA)
  1299. DLPENTRY(ExtractIconExA)
  1300. DLPENTRY(ExtractIconExW)
  1301. DLPENTRY(ExtractIconW)
  1302. DLPENTRY(FindExecutableA)
  1303. DLPENTRY(FindExecutableW)
  1304. DLPENTRY(SHAppBarMessage)
  1305. DLPENTRY(SHBindToParent)
  1306. DLPENTRY(SHBrowseForFolderA)
  1307. DLPENTRY(SHBrowseForFolderW)
  1308. DLPENTRY(SHChangeNotify)
  1309. DLPENTRY(SHFileOperationA)
  1310. DLPENTRY(SHFileOperationW)
  1311. DLPENTRY(SHFormatDrive)
  1312. DLPENTRY(SHGetDataFromIDListA)
  1313. DLPENTRY(SHGetDataFromIDListW)
  1314. DLPENTRY(SHGetDesktopFolder)
  1315. DLPENTRY(SHGetFileInfoA)
  1316. DLPENTRY(SHGetFileInfoW)
  1317. DLPENTRY(SHGetFolderPathA)
  1318. DLPENTRY(SHGetFolderPathW)
  1319. DLPENTRY(SHGetInstanceExplorer)
  1320. DLPENTRY(SHGetMalloc)
  1321. DLPENTRY(SHGetPathFromIDListA)
  1322. DLPENTRY(SHGetPathFromIDListW)
  1323. DLPENTRY(SHGetSpecialFolderLocation)
  1324. DLPENTRY(SHGetSpecialFolderPathW)
  1325. DLPENTRY(SHLoadInProc)
  1326. DLPENTRY(SHPathPrepareForWriteW)
  1327. DLPENTRY(SHSetLocalizedName)
  1328. DLPENTRY(ShellAboutA)
  1329. DLPENTRY(ShellAboutW)
  1330. DLPENTRY(ShellExecuteA)
  1331. DLPENTRY(ShellExecuteExA)
  1332. DLPENTRY(ShellExecuteExW)
  1333. DLPENTRY(ShellExecuteW)
  1334. DLPENTRY(Shell_NotifyIconW)
  1335. };
  1336. DEFINE_PROCNAME_MAP(shell32)