#define RFF_NOLABEL 0x08
#define RFF_NOSEPARATEMEM 0x20 /* NT only */
-#define DE_SAMEFILE 0x71
+#define DE_SAMEFILE 0x71
+#define DE_DESTSAMETREE 0x7D
/* RunFileFlg notification structure */
typedef struct
#include <stdio.h>
#define SMC_EXEC 4
-extern "C" INT WINAPI Shell_GetCachedImageIndex(LPCWSTR szPath, INT nIndex, UINT bSimulateDoc);
+INT WINAPI Shell_GetCachedImageIndex(LPCWSTR szPath, INT nIndex, UINT bSimulateDoc);
static inline ULONG
Win32DbgPrint(const char *filename, int line, const char *lpFormat, ...)
static inline void DbgDumpMenuInternal(HMENU hmenu, char* padding, int padlevel)
{
WCHAR label[128];
+ int i;
+ int count = GetMenuItemCount(hmenu);
padding[padlevel] = '.';
padding[padlevel + 1] = '.';
padding[padlevel + 2] = 0;
- int count = GetMenuItemCount(hmenu);
- for (int i = 0; i < count; i++)
+ for (i = 0; i < count; i++)
{
MENUITEMINFOW mii = { 0 };
return S_OK;
}
+template<class T, class T1>
+HRESULT inline ShellObjectCreatorInit(T1 initArg1, REFIID riid, void ** ppv)
+{
+ CComPtr<T> obj;
+ HRESULT hResult;
+
+ if (ppv == NULL)
+ return E_POINTER;
+ *ppv = NULL;
+ ATLTRY(obj = new _CComObject<T>);
+ if (obj.p == NULL)
+ return E_OUTOFMEMORY;
+ hResult = obj->QueryInterface(riid, ppv);
+ if (FAILED(hResult))
+ return hResult;
+
+ hResult = obj->Initialize(initArg1);
+ if (FAILED(hResult))
+ return hResult;
+
+ return S_OK;
+}
+
template<class T, class T1, class R>
HRESULT inline ShellObjectCreatorInit(T1 initArg1, REFIID riid, R ** ppv)
{
return S_OK;
}
+
+template<class T, class T1, class T2, class T3, class T4, class T5, class R>
+HRESULT inline ShellObjectCreatorInit(T1 initArg1, T2 initArg2, T3 initArg3, T4 initArg4, T5 initArg5, REFIID riid, R ** ppv)
+{
+ CComPtr<T> obj;
+ CComPtr<R> result;
+ HRESULT hResult;
+
+ if (ppv == NULL)
+ return E_POINTER;
+ *ppv = NULL;
+ ATLTRY(obj = new _CComObject<T>);
+ if (obj.p == NULL)
+ return E_OUTOFMEMORY;
+ hResult = obj->QueryInterface(riid, reinterpret_cast<void **>(&result));
+ if (FAILED(hResult))
+ return hResult;
+
+ hResult = obj->Initialize(initArg1, initArg2, initArg3, initArg4, initArg5);
+ if (FAILED(hResult))
+ return hResult;
+
+ *ppv = result.Detach();
+
+ return S_OK;
+}
#endif /* __cplusplus */
#endif /* __WINE_UNDOCSHELL_H */