1 /* 2 * PROJECT: ReactOS system libraries 3 * LICENSE: GPL - See COPYING in the top level directory 4 * FILE: dll/shellext/stobject/stobject.cpp 5 * PURPOSE: COM registration services for STobject.dll 6 * PROGRAMMERS: Robert Naumann 7 * David Quintana <gigaherz@gmail.com> 8 */ 9 10 #include "precomp.h" 11 12 BEGIN_OBJECT_MAP(ObjectMap) 13 OBJECT_ENTRY(CLSID_SysTray, CSysTray) 14 END_OBJECT_MAP() 15 16 HINSTANCE g_hInstance; 17 CComModule g_Module; 18 19 STDAPI_(BOOL) 20 DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) 21 { 22 if (fdwReason == DLL_PROCESS_ATTACH) 23 { 24 g_hInstance = hinstDLL; 25 DisableThreadLibraryCalls(g_hInstance); 26 27 g_Module.Init(ObjectMap, g_hInstance, NULL); 28 } 29 else if (fdwReason == DLL_PROCESS_DETACH) 30 { 31 g_hInstance = NULL; 32 g_Module.Term(); 33 } 34 return TRUE; 35 } 36 37 STDAPI 38 DllRegisterServer(void) 39 { 40 return g_Module.DllRegisterServer(FALSE); 41 } 42 43 STDAPI 44 DllUnregisterServer(void) 45 { 46 return g_Module.DllUnregisterServer(FALSE); 47 } 48 49 STDAPI 50 DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) 51 { 52 return g_Module.DllGetClassObject(rclsid, riid, ppv); 53 } 54 55 STDAPI 56 DllCanUnloadNow(void) 57 { 58 return g_Module.DllCanUnloadNow(); 59 } 60