[INTRIN]
[reactos.git] / reactos / 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 "aclmulti.h"
37 #include "addressband.h"
38 #include "addresseditbox.h"
39 #include "CAutoComplete.h"
40 #include "bandproxy.h"
41 #include "bandsite.h"
42 #include "bandsitemenu.h"
43 #include "brandband.h"
44 #include "internettoolbar.h"
45 #include "commonbrowser.h"
46 #include "globalfoldersettings.h"
47 #include "regtreeoptions.h"
48 #include "explorerband.h"
49 #include "CProgressDialog.h"
50 #include <stdio.h>
51
52 WINE_DEFAULT_DEBUG_CHANNEL(browseui);
53
54
55 #define USE_CUSTOM_MENUBAND 1
56
57 typedef HRESULT(WINAPI * PMENUBAND_CONSTRUCTOR)(REFIID riid, void **ppv);
58 typedef HRESULT(WINAPI * PMERGEDFOLDER_CONSTRUCTOR)(REFIID riid, void **ppv);
59
60 static inline
61 HRESULT CreateMergedFolder(REFIID riid, void **ppv)
62 {
63 #if 1
64 HMODULE hRShell = GetModuleHandle(L"rshell.dll");
65 if (!hRShell)
66 hRShell = LoadLibrary(L"rshell.dll");
67
68 PMERGEDFOLDER_CONSTRUCTOR pCMergedFolder_Constructor = (PMERGEDFOLDER_CONSTRUCTOR)
69 GetProcAddress(hRShell, "CMergedFolder_Constructor");
70
71 if (pCMergedFolder_Constructor)
72 {
73 return pCMergedFolder_Constructor(riid, ppv);
74 }
75 #endif
76 return CoCreateInstance(CLSID_MergedFolder, NULL, CLSCTX_INPROC_SERVER, riid, ppv);
77 }
78
79 static inline
80 HRESULT CreateMenuBand(REFIID iid, LPVOID *ppv)
81 {
82 #if USE_CUSTOM_MENUBAND
83 HMODULE hRShell = GetModuleHandleW(L"rshell.dll");
84
85 if (!hRShell)
86 hRShell = LoadLibraryW(L"rshell.dll");
87
88 PMENUBAND_CONSTRUCTOR func = (PMENUBAND_CONSTRUCTOR) GetProcAddress(hRShell, "CMenuBand_Constructor");
89 if (func)
90 {
91 return func(iid , ppv);
92 }
93 #endif
94 return CoCreateInstance(CLSID_MenuBand, NULL, CLSCTX_INPROC_SERVER, iid, ppv);
95 }
96
97 #endif /* _BROWSEUI_PCH_ */