wined3d: Merge volumetexture_init() and texture_init().
[wine.git] / dlls / mstask / mstask_main.c
blobeae85562f552f3b934b27c3b6c7db3d24309c7f6
1 /*
2 * Copyright (C) 2008 Google (Roy Shea)
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.
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.
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
19 #include <stdarg.h>
21 #define COBJMACROS
23 #include "windef.h"
24 #include "winbase.h"
25 #include "objbase.h"
26 #include "rpcproxy.h"
27 #include "taskschd.h"
28 #include "mstask.h"
29 #include "mstask_private.h"
30 #include "wine/debug.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(mstask);
34 static HINSTANCE hInst;
35 LONG dll_ref = 0;
37 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
39 TRACE("(%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
41 switch (fdwReason)
43 case DLL_WINE_PREATTACH:
44 return FALSE;
45 case DLL_PROCESS_ATTACH:
46 DisableThreadLibraryCalls(hinstDLL);
47 hInst = hinstDLL;
48 break;
51 return TRUE;
54 HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
56 TRACE("(%s %s %p)\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv);
58 if (IsEqualGUID(rclsid, &CLSID_CTaskScheduler)) {
59 return IClassFactory_QueryInterface((LPCLASSFACTORY)&MSTASK_ClassFactory, iid, ppv);
62 FIXME("Not supported class: %s\n", debugstr_guid(rclsid));
63 return CLASS_E_CLASSNOTAVAILABLE;
66 HRESULT WINAPI DllCanUnloadNow(void)
68 return dll_ref != 0 ? S_FALSE : S_OK;
71 HRESULT WINAPI DllRegisterServer(void)
73 return __wine_register_resources( hInst );
76 HRESULT WINAPI DllUnregisterServer(void)
78 return __wine_unregister_resources( hInst );