Create the AHCI branch for Aman's work
[reactos.git] / dll / win32 / browseui / precomp.h
1 #ifndef _BROWSEUI_PCH_
2 #define _BROWSEUI_PCH_
3
4 #include <stdarg.h>
5
6 #define WIN32_NO_STATUS
7 #define _INC_WINDOWS
8 #define COM_NO_WINDOWS_H
9
10 #include <windef.h>
11 #include <winbase.h>
12 #include <wincon.h>
13 #include <wingdi.h>
14 #include <shlobj.h>
15 #include <tlogstg.h>
16 #include <shlobj_undoc.h>
17 #include <shlguid_undoc.h>
18 #include <shdeprecated.h>
19 #include <tchar.h>
20 #include <atlbase.h>
21 #include <atlcom.h>
22 #include <atlwin.h>
23 #include <undocuser.h>
24 #include <perhist.h>
25 #include <exdispid.h>
26 #include <strsafe.h>
27 #include <shlwapi.h>
28 #include <shlwapi_undoc.h>
29 #include <undocshell.h>
30 #include <shellutils.h>
31 #include <browseui_undoc.h>
32 #include <wine/debug.h>
33
34 #include "resource.h"
35
36 #include "aclistisf.h"
37 #include "aclmulti.h"
38 #include "addressband.h"
39 #include "addresseditbox.h"
40 #include "CAutoComplete.h"
41 #include "bandproxy.h"
42 #include "bandsite.h"
43 #include "bandsitemenu.h"
44 #include "brandband.h"
45 #include "internettoolbar.h"
46 #include "commonbrowser.h"
47 #include "globalfoldersettings.h"
48 #include "regtreeoptions.h"
49 #include "explorerband.h"
50 #include "CProgressDialog.h"
51 #include <stdio.h>
52
53 WINE_DEFAULT_DEBUG_CHANNEL(browseui);
54
55
56 #define USE_CUSTOM_MENUBAND 1
57
58 typedef HRESULT(WINAPI * PMENUBAND_CONSTRUCTOR)(REFIID riid, void **ppv);
59 typedef HRESULT(WINAPI * PMERGEDFOLDER_CONSTRUCTOR)(REFIID riid, void **ppv);
60
61 static inline
62 HRESULT CreateMergedFolder(REFIID riid, void **ppv)
63 {
64 #if 1
65 HMODULE hRShell = GetModuleHandle(L"rshell.dll");
66 if (!hRShell)
67 hRShell = LoadLibrary(L"rshell.dll");
68
69 if (hRShell)
70 {
71 PMERGEDFOLDER_CONSTRUCTOR pCMergedFolder_Constructor = (PMERGEDFOLDER_CONSTRUCTOR)
72 GetProcAddress(hRShell, "CMergedFolder_Constructor");
73
74 if (pCMergedFolder_Constructor)
75 {
76 return pCMergedFolder_Constructor(riid, ppv);
77 }
78 }
79 #endif
80 return CoCreateInstance(CLSID_MergedFolder, NULL, CLSCTX_INPROC_SERVER, riid, ppv);
81 }
82
83 static inline
84 HRESULT CreateMenuBand(REFIID iid, LPVOID *ppv)
85 {
86 #if USE_CUSTOM_MENUBAND
87 HMODULE hRShell = GetModuleHandleW(L"rshell.dll");
88
89 if (!hRShell)
90 hRShell = LoadLibraryW(L"rshell.dll");
91
92 if (hRShell)
93 {
94 PMENUBAND_CONSTRUCTOR func = (PMENUBAND_CONSTRUCTOR) GetProcAddress(hRShell, "CMenuBand_Constructor");
95 if (func)
96 {
97 return func(iid , ppv);
98 }
99 }
100 #endif
101 return CoCreateInstance(CLSID_MenuBand, NULL, CLSCTX_INPROC_SERVER, iid, ppv);
102 }
103
104 #endif /* _BROWSEUI_PCH_ */