ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

mstask_main.c
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2008 Google (Roy Shea)
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2.1 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
00017  */
00018 
00019 #include <stdio.h>
00020 
00021 #include "mstask_private.h"
00022 #include "objbase.h"
00023 #include "rpcproxy.h"
00024 
00025 #include "wine/debug.h"
00026 
00027 
00028 WINE_DEFAULT_DEBUG_CHANNEL(mstask);
00029 
00030 static HINSTANCE hInst;
00031 LONG dll_ref = 0;
00032 
00033 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
00034 {
00035     TRACE("(%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
00036 
00037     switch (fdwReason)
00038     {
00039         case DLL_WINE_PREATTACH:
00040             return FALSE;
00041         case DLL_PROCESS_ATTACH:
00042             DisableThreadLibraryCalls(hinstDLL);
00043             hInst = hinstDLL;
00044             break;
00045         case DLL_PROCESS_DETACH:
00046             break;
00047     }
00048 
00049     return TRUE;
00050 }
00051 
00052 HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
00053 {
00054     TRACE("(%s %s %p)\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv);
00055 
00056     if (IsEqualGUID(rclsid, &CLSID_CTaskScheduler)) {
00057         return IClassFactory_QueryInterface((LPCLASSFACTORY)&MSTASK_ClassFactory, iid, ppv);
00058     }
00059 
00060     FIXME("Not supported class: %s\n", debugstr_guid(rclsid));
00061     return CLASS_E_CLASSNOTAVAILABLE;
00062 }
00063 
00064 HRESULT WINAPI DllCanUnloadNow(void)
00065 {
00066     return dll_ref != 0 ? S_FALSE : S_OK;
00067 }
00068 
00069 HRESULT WINAPI DllRegisterServer(void)
00070 {
00071     return __wine_register_resources( hInst );
00072 }
00073 
00074 HRESULT WINAPI DllUnregisterServer(void)
00075 {
00076     return __wine_unregister_resources( hInst );
00077 }

Generated on Sat May 26 2012 04:23:53 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.