2014-02-04 12:11:51 +00:00
|
|
|
|
2014-04-07 10:12:41 +00:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
|
|
|
|
// Disabling spammy warnings when compiling with /W4 or /Wall
|
|
|
|
#pragma warning(disable:4100) // unreferenced formal parameter
|
|
|
|
#pragma warning(disable:4201) // nonstandard extension used
|
|
|
|
#pragma warning(disable:4265) // class has virtual functions, but destructor is not virtual
|
|
|
|
#pragma warning(disable:4365) // signed/unsigned mismatch
|
|
|
|
#pragma warning(disable:4514) // unreferenced inline function
|
|
|
|
#pragma warning(disable:4710) // function was not inlined
|
|
|
|
#pragma warning(disable:4820) // padding added
|
|
|
|
#pragma warning(disable:4946) // reinterpret_cast between related classes
|
|
|
|
|
|
|
|
// Disable some warnings in headers only
|
|
|
|
#pragma warning(push)
|
|
|
|
#pragma warning(disable:4244) // possible loss of data
|
|
|
|
#pragma warning(disable:4512) // assignment operator could not be gernerated
|
|
|
|
#endif
|
|
|
|
|
2014-02-04 12:11:51 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <tchar.h>
|
|
|
|
|
|
|
|
#define WIN32_NO_STATUS
|
|
|
|
#define _INC_WINDOWS
|
|
|
|
#define COM_NO_WINDOWS_H
|
|
|
|
|
|
|
|
#define COBJMACROS
|
|
|
|
|
2014-10-28 01:27:02 +00:00
|
|
|
//#define DEBUG_CCOMOBJECT
|
2014-10-28 21:40:50 +00:00
|
|
|
#define DEBUG_CCOMOBJECT_CREATION 1
|
|
|
|
#define DEBUG_CCOMOBJECT_DESTRUCTION 1
|
|
|
|
#define DEBUG_CCOMOBJECT_REFCOUNTING 1
|
2014-10-28 01:27:02 +00:00
|
|
|
|
2014-02-04 12:11:51 +00:00
|
|
|
#include <windef.h>
|
|
|
|
#include <winbase.h>
|
|
|
|
#include <winreg.h>
|
|
|
|
#include <wingdi.h>
|
|
|
|
#include <winnls.h>
|
|
|
|
#include <wincon.h>
|
|
|
|
#include <shellapi.h>
|
|
|
|
#include <shlobj.h>
|
|
|
|
#include <shlobj_undoc.h>
|
|
|
|
#include <shlwapi.h>
|
|
|
|
#include <shlguid_undoc.h>
|
|
|
|
#include <uxtheme.h>
|
|
|
|
#include <strsafe.h>
|
|
|
|
|
|
|
|
#include <atlbase.h>
|
|
|
|
#include <atlcom.h>
|
2014-11-11 01:05:39 +00:00
|
|
|
#include <atlwin.h>
|
2014-10-20 21:09:55 +00:00
|
|
|
#include <undocshell.h>
|
2014-11-27 20:27:19 +00:00
|
|
|
#include <undocuser.h>
|
2014-10-20 21:09:55 +00:00
|
|
|
|
2014-11-27 20:27:19 +00:00
|
|
|
#include <shellutils.h>
|
2014-11-11 01:05:39 +00:00
|
|
|
#include <rosctrls.h>
|
2015-08-19 11:17:08 +00:00
|
|
|
#include "../shresdef.h"
|
2014-11-11 01:05:39 +00:00
|
|
|
|
2014-02-04 12:11:51 +00:00
|
|
|
#include <wine/debug.h>
|
|
|
|
|
2014-04-07 10:12:41 +00:00
|
|
|
#if _MSC_VER
|
|
|
|
// Restore warnings
|
|
|
|
#pragma warning(pop)
|
|
|
|
#endif
|
|
|
|
|
2017-06-19 14:27:51 +00:00
|
|
|
#define USE_SYSTEM_MENUDESKBAR 0
|
|
|
|
#define USE_SYSTEM_MENUSITE 0
|
|
|
|
#define USE_SYSTEM_MENUBAND 0
|
|
|
|
#define USE_SYSTEM_MERGED_FOLDERS 0
|
|
|
|
|
|
|
|
#define MERGE_FOLDERS 1
|
|
|
|
|
|
|
|
#if USE_SYSTEM_MENUDESKBAR
|
|
|
|
#define CMenuDeskBar_CreateInstance(riid, ppv) (CoCreateInstance(CLSID_MenuDeskBar, NULL, CLSCTX_INPROC_SERVER,riid, ppv))
|
|
|
|
#else
|
|
|
|
#define CMenuDeskBar_CreateInstance RSHELL_CMenuDeskBar_CreateInstance
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if USE_SYSTEM_MENUBAND
|
|
|
|
#define CMenuBand_CreateInstance(riid, ppv) (CoCreateInstance(CLSID_MenuBand, NULL, CLSCTX_INPROC_SERVER,riid, ppv))
|
|
|
|
#else
|
|
|
|
#define CMenuBand_CreateInstance RSHELL_CMenuBand_CreateInstance
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if USE_SYSTEM_MENUSITE
|
|
|
|
#define CMenuSite_CreateInstance(riid, ppv) (CoCreateInstance(CLSID_MenuBandSite, NULL, CLSCTX_INPROC_SERVER,riid, ppv))
|
|
|
|
#else
|
|
|
|
#define CMenuSite_CreateInstance RSHELL_CMenuSite_CreateInstance
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if USE_SYSTEM_MERGED_FOLDERS
|
|
|
|
#define CMergedFolder_CreateInstance(riid, ppv) (CoCreateInstance(CLSID_MergedFolder, NULL, CLSCTX_INPROC_SERVER,riid, ppv))
|
|
|
|
#else
|
|
|
|
#define CMergedFolder_CreateInstance RSHELL_CMergedFolder_CreateInstance
|
|
|
|
#endif
|
|
|
|
|
2015-08-19 15:43:13 +00:00
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
extern HINSTANCE shell32_hInstance;
|
|
|
|
|
2017-06-19 14:27:51 +00:00
|
|
|
HRESULT WINAPI RSHELL_CStartMenu_CreateInstance(REFIID riid, void **ppv);
|
|
|
|
HRESULT WINAPI RSHELL_CMenuDeskBar_CreateInstance(REFIID riid, LPVOID *ppv);
|
|
|
|
HRESULT WINAPI RSHELL_CMenuSite_CreateInstance(REFIID riid, LPVOID *ppv);
|
|
|
|
HRESULT WINAPI RSHELL_CMenuBand_CreateInstance(REFIID riid, LPVOID *ppv);
|
|
|
|
HRESULT WINAPI RSHELL_CMergedFolder_CreateInstance(REFIID riid, LPVOID *ppv);
|
2015-08-19 15:43:13 +00:00
|
|
|
|
|
|
|
}
|