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.

134 lines
3.4 KiB

  1. //
  2. // SHELL.DLL -> SHELL32.DLL thunks
  3. //
  4. // these routines are exported from shell.dll (16) and
  5. // implemented in shell32.dll (32)
  6. //
  7. __foldwin32sstuff __foldwin32sstuff;
  8. //foldstyleinitialization = true;
  9. win31compat = true; //Defers unloading of shell32 until process exit
  10. enablemapdirect1632 = true;
  11. //
  12. // 16 -> 32 thunks
  13. //
  14. // these routines are exported from shell.dll (16) and
  15. // implemented in shell32.dll (32)
  16. //
  17. //
  18. #include "..\types.thk"
  19. typedef HANDLE HINSTANCE;
  20. typedef HANDLE HMODULE;
  21. typedef LPSTR LPCSTR;
  22. int PickIconDlg(HWND hwnd, LPSTR pszIconPath, UINT cbIconPath, LPINT piIconIndex)
  23. {
  24. pszIconPath = inout;
  25. piIconIndex = inout;
  26. }
  27. int RestartDialog(HWND hwnd, LPSTR lpPrompt, DWORD dwReturn)
  28. {
  29. }
  30. // EXTRACT.C
  31. //
  32. HICON ExtractIcon(HINSTANCE hInst, LPSTR lpszExeFileName, int nIconIndex)
  33. {
  34. target = ExtractIconA;
  35. }
  36. UINT ExtractIconExA(LPCSTR lpszExeFileName, int nIconIndex, LPUINT phiconLarge, LPUINT phiconSmall, int nIcons)
  37. {
  38. phiconLarge = output;
  39. phiconSmall = output;
  40. }
  41. /*
  42. HANDLE InternalExtractIcon(HINSTANCE hInst, LPCSTR lpszExeFileName, int nIconIndex, UINT nIcons)
  43. {
  44. target = InternalExtractIconA;
  45. }
  46. */
  47. HICON ExtractAssociatedIcon(HANDLE hInst, LPSTR lpIconPath, LPINT lpiIcon)
  48. {
  49. target = ExtractAssociatedIconA;
  50. lpIconPath = inout;
  51. lpiIcon = inout;
  52. }
  53. HANDLE ShellExecute( HWND hwnd, LPSTR lpszOp, LPSTR lpszFile, LPSTR lpszParams, LPSTR lpszDir, int wShowCmd)
  54. {
  55. target = ShellExecuteA;
  56. }
  57. INT ShellAbout( HWND hWnd, LPSTR szApp, LPSTR szOtherStuff, HICON hIcon)
  58. {
  59. target = ShellAboutA;
  60. }
  61. /********
  62. BOOL GetFileNameFromBrowse(HWND hwnd, LPSTR szFilePath, UINT cbFilePath, LPSTR szWorkingDir, LPSTR szDefExt, LPSTR szFilters, LPSTR szTitle)
  63. {
  64. szFilePath = inout;
  65. }
  66. *********/
  67. HANDLE FindExecutable(LPSTR lpFile, LPSTR lpDirectory, LPSTR lpResult)
  68. {
  69. target = FindExecutableA;
  70. lpResult = inout;
  71. }
  72. int DriveType(int iDrive)
  73. {
  74. }
  75. // We should fix this structure not to require structure packing.
  76. typedef struct _SHFILEINFO
  77. {
  78. HICON hIcon; // out icon
  79. int iIcon; // out icon index
  80. DWORD dwAttributes; // in/out SFGAO_ flags
  81. char szDisplayName[260]; // out display name (or path)
  82. char szTypeName[80]; // out
  83. } SHFILEINFO;
  84. DWORD SHGetFileInfoA(LPSTR pszPath, DWORD dwFileAttributes, SHFILEINFO * psfi, UINT cbFileInfo, UINT uFlags)
  85. {
  86. psfi = inout;
  87. }
  88. typedef struct _HFILEINFO
  89. {
  90. HICON hIcon; // out icon
  91. int i;
  92. DWORD dwAttributes; // in/out SFGAO_ flags
  93. char szDisplayName[260]; // out display name (or path)
  94. char szTypeName[80]; // out
  95. } HFILEINFO;
  96. DWORD HGetFileInfo(LPSTR pszPath, DWORD dwFileAttributes, SHFILEINFO * hfi, UINT cbFileInfo, UINT uFlags) =
  97. DWORD SHGetFileInfoA(LPSTR pszPath, DWORD dwFileAttributes, SHFILEINFO * psfi, UINT cbFileInfo, UINT uFlags)
  98. {
  99. hfi = inout;
  100. }
  101. // Thunk to allow 16 bit code to do device IOCTLS from 32 bit side with
  102. // the win16 mutex being released.
  103. BOOL SH16To32DriveIOCTL(int iDrive, int cmd, LPVOID pv)
  104. {
  105. }
  106. int SH16To32Int2526(int iDrive, int iInt, LPVOID lpbuf, WORD count, DWORD ssector)
  107. {
  108. }