[EXPLORER-NEW]
[reactos.git] / base / shell / rshell / precomp.h
1
2 #define USE_SYSTEM_MENUDESKBAR 0
3 #define USE_SYSTEM_MENUSITE 0
4 #define USE_SYSTEM_MENUBAND 0
5
6 #define WRAP_MENUDESKBAR 0
7 #define WRAP_MENUSITE 0
8 #define WRAP_MENUBAND 0
9
10 #define MERGE_FOLDERS 0
11
12 #include <stdio.h>
13 #include <tchar.h>
14
15 #define WIN32_NO_STATUS
16 #define _INC_WINDOWS
17 #define COM_NO_WINDOWS_H
18
19 #define COBJMACROS
20
21 #include <windef.h>
22 #include <winbase.h>
23 #include <winreg.h>
24 #include <wingdi.h>
25 #include <winnls.h>
26 #include <wincon.h>
27 #include <shellapi.h>
28 #include <shlobj.h>
29 #include <shlobj_undoc.h>
30 #include <shlwapi.h>
31 #include <shlguid_undoc.h>
32 #include <uxtheme.h>
33 #include <strsafe.h>
34
35 #include <atlbase.h>
36 #include <atlcom.h>
37 #include <wine/debug.h>
38
39 #define shell32_hInstance 0
40 #define SMC_EXEC 4
41 extern "C" INT WINAPI Shell_GetCachedImageIndex(LPCWSTR szPath, INT nIndex, UINT bSimulateDoc);
42
43 extern "C" HRESULT CMenuDeskBar_Constructor(REFIID riid, LPVOID *ppv);
44 extern "C" HRESULT CMenuSite_Constructor(REFIID riid, LPVOID *ppv);
45 extern "C" HRESULT CMenuBand_Constructor(REFIID riid, LPVOID *ppv);
46 extern "C" HRESULT CMenuDeskBar_Wrapper(IDeskBar * db, REFIID riid, LPVOID *ppv);
47 extern "C" HRESULT CMenuSite_Wrapper(IBandSite * bs, REFIID riid, LPVOID *ppv);
48 extern "C" HRESULT CMenuBand_Wrapper(IShellMenu * sm, REFIID riid, LPVOID *ppv);
49 extern "C" HRESULT CMergedFolder_Constructor(IShellFolder* userLocal, IShellFolder* allUsers, REFIID riid, LPVOID *ppv);
50
51 static __inline ULONG
52 Win32DbgPrint(const char *filename, int line, const char *lpFormat, ...)
53 {
54 char szMsg[512];
55 char *szMsgStart;
56 const char *fname;
57 va_list vl;
58 ULONG uRet;
59
60 fname = strrchr(filename, '\\');
61 if (fname == NULL)
62 {
63 fname = strrchr(filename, '/');
64 if (fname != NULL)
65 fname++;
66 }
67 else
68 fname++;
69
70 if (fname == NULL)
71 fname = filename;
72
73 szMsgStart = szMsg + sprintf(szMsg, "%s:%d: ", fname, line);
74
75 va_start(vl, lpFormat);
76 uRet = (ULONG) vsprintf(szMsgStart, lpFormat, vl);
77 va_end(vl);
78
79 OutputDebugStringA(szMsg);
80
81 return uRet;
82 }
83
84 #define DbgPrint(fmt, ...) \
85 Win32DbgPrint(__FILE__, __LINE__, fmt, ##__VA_ARGS__)