ReactOS  0.4.15-dev-1070-ge1a01de
mstask_main.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008 Google (Roy Shea)
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18 
19 #include <stdio.h>
20 
21 #include "mstask_private.h"
22 #include "objbase.h"
23 #include "rpcproxy.h"
24 
25 #include "wine/debug.h"
26 
27 
29 
32 
34 {
35  TRACE("(%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
36 
37  switch (fdwReason)
38  {
39  case DLL_WINE_PREATTACH:
40  return FALSE;
41  case DLL_PROCESS_ATTACH:
42  DisableThreadLibraryCalls(hinstDLL);
43  hInst = hinstDLL;
44  break;
45  }
46 
47  return TRUE;
48 }
49 
51 {
52  TRACE("(%s %s %p)\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv);
53 
54  if (IsEqualGUID(rclsid, &CLSID_CTaskScheduler)) {
55  return IClassFactory_QueryInterface((LPCLASSFACTORY)&MSTASK_ClassFactory, iid, ppv);
56  }
57 
58  FIXME("Not supported class: %s\n", debugstr_guid(rclsid));
60 }
61 
63 {
64  return dll_ref != 0 ? S_FALSE : S_OK;
65 }
66 
68 {
70 }
71 
73 {
75 }
#define REFIID
Definition: guiddef.h:118
HRESULT __wine_register_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:98
#define TRUE
Definition: types.h:120
#define REFCLSID
Definition: guiddef.h:117
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT WINAPI DllCanUnloadNow(void)
Definition: mstask_main.c:62
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
Definition: mstask_main.c:50
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663
static IN DWORD IN LPVOID lpvReserved
ClassFactoryImpl MSTASK_ClassFactory
Definition: factory.c:119
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
#define FIXME(fmt,...)
Definition: debug.h:111
#define S_FALSE
Definition: winerror.h:2357
static HINSTANCE hInst
Definition: mstask_main.c:30
WINE_DEFAULT_DEBUG_CHANNEL(mstask)
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
#define WINAPI
Definition: msvc.h:6
LONG dll_ref
Definition: mstask_main.c:31
unsigned long DWORD
Definition: ntddk_ex.h:95
HRESULT __wine_unregister_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:110
#define S_OK
Definition: intsafe.h:51
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
HRESULT WINAPI DllUnregisterServer(void)
Definition: mstask_main.c:72
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
Definition: mstask_main.c:33
HRESULT WINAPI DllRegisterServer(void)
Definition: mstask_main.c:67