ReactOS  0.4.14-dev-1034-g1e60116
stobject.cpp
Go to the documentation of this file.
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)
15 
18 
20 DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
21 {
22  if (fdwReason == DLL_PROCESS_ATTACH)
23  {
24  g_hInstance = hinstDLL;
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
39 {
41 }
42 
43 STDAPI
45 {
47 }
48 
49 STDAPI
51 {
52  return g_Module.DllGetClassObject(rclsid, riid, ppv);
53 }
54 
55 STDAPI
57 {
58  return g_Module.DllCanUnloadNow();
59 }
#define STDAPI
Definition: basetyps.h:41
HRESULT DllCanUnloadNow()
Definition: atlbase.h:928
#define REFIID
Definition: guiddef.h:118
#define TRUE
Definition: types.h:120
HRESULT DllRegisterServer(BOOL bRegTypeLib=TRUE)
Definition: atlbase.h:940
#define OBJECT_ENTRY(clsid, class)
Definition: atlcom.h:653
REFIID riid
Definition: precomp.h:44
#define REFCLSID
Definition: guiddef.h:117
const GUID CLSID_SysTray
REFIID LPVOID * ppv
Definition: atlbase.h:39
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
#define DLL_PROCESS_ATTACH
Definition: compat.h:120
void Term()
Definition: atlbase.h:820
DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
Definition: stobject.cpp:20
HINSTANCE g_hInstance
Definition: stobject.cpp:16
HRESULT Init(_ATL_OBJMAP_ENTRY *p, HINSTANCE, const GUID *plibid)
Definition: atlbase.h:797
STDAPI DllUnregisterServer(void)
Definition: stobject.cpp:44
unsigned int BOOL
Definition: ntddk_ex.h:94
#define STDAPI_(t)
Definition: basetyps.h:42
HRESULT DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: atlbase.h:935
smooth NULL
Definition: ftsmooth.c:416
CComModule g_Module
Definition: stobject.cpp:17
#define DLL_PROCESS_DETACH
Definition: compat.h:119
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: stobject.cpp:50
STDAPI DllCanUnloadNow(void)
Definition: stobject.cpp:56
unsigned long DWORD
Definition: ntddk_ex.h:95
STDAPI DllRegisterServer(void)
Definition: stobject.cpp:38
DWORD LPVOID fImpLoad
Definition: misc.cpp:155
#define BEGIN_OBJECT_MAP(x)
Definition: atlcom.h:649
HRESULT DllUnregisterServer(BOOL bUnRegTypeLib=TRUE)
Definition: atlbase.h:945
#define END_OBJECT_MAP()
Definition: atlcom.h:651