2015-02-21 21:21:02 +00:00
|
|
|
/*
|
2015-02-23 16:28:13 +00:00
|
|
|
* PROJECT: ReactOS shell extensions
|
2015-02-21 21:21:02 +00:00
|
|
|
* LICENSE: GPL - See COPYING in the top level directory
|
2015-09-27 18:40:24 +00:00
|
|
|
* FILE: dll/shellext/ntobjshex/ntobjshex.cpp
|
2015-02-23 16:28:13 +00:00
|
|
|
* PURPOSE: NT Object Namespace shell extension
|
|
|
|
* PROGRAMMERS: David Quintana <gigaherz@gmail.com>
|
2015-02-21 21:21:02 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "precomp.h"
|
|
|
|
|
|
|
|
#include <atlwin.h>
|
|
|
|
|
|
|
|
BEGIN_OBJECT_MAP(ObjectMap)
|
|
|
|
OBJECT_ENTRY(CLSID_NtObjectFolder, CNtObjectFolder)
|
2015-03-15 00:00:13 +00:00
|
|
|
OBJECT_ENTRY(CLSID_RegistryFolder, CRegistryFolder)
|
2015-02-21 21:21:02 +00:00
|
|
|
END_OBJECT_MAP()
|
|
|
|
|
|
|
|
HINSTANCE g_hInstance;
|
|
|
|
CComModule g_Module;
|
|
|
|
|
|
|
|
STDAPI_(BOOL)
|
|
|
|
DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
|
|
|
|
{
|
|
|
|
if (fdwReason == DLL_PROCESS_ATTACH)
|
|
|
|
{
|
|
|
|
g_hInstance = hinstDLL;
|
|
|
|
DisableThreadLibraryCalls(g_hInstance);
|
|
|
|
|
|
|
|
g_Module.Init(ObjectMap, g_hInstance, NULL);
|
|
|
|
}
|
|
|
|
else if (fdwReason == DLL_PROCESS_DETACH)
|
|
|
|
{
|
|
|
|
g_hInstance = NULL;
|
|
|
|
g_Module.Term();
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
STDAPI
|
|
|
|
DllRegisterServer(void)
|
|
|
|
{
|
|
|
|
return g_Module.DllRegisterServer(FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
STDAPI
|
|
|
|
DllUnregisterServer(void)
|
|
|
|
{
|
|
|
|
return g_Module.DllUnregisterServer(FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
STDAPI
|
|
|
|
DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
|
|
|
{
|
|
|
|
return g_Module.DllGetClassObject(rclsid, riid, ppv);
|
|
|
|
}
|
|
|
|
|
|
|
|
STDAPI
|
|
|
|
DllCanUnloadNow(void)
|
|
|
|
{
|
|
|
|
return g_Module.DllCanUnloadNow();
|
|
|
|
}
|