Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenfactory.c
Go to the documentation of this file.
00001 /* 00002 * Class factory interface for Queue Manager (BITS) 00003 * 00004 * Copyright (C) 2007 Google (Roy Shea) 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00019 */ 00020 00021 #define COBJMACROS 00022 00023 #include "qmgr.h" 00024 #include "wine/debug.h" 00025 00026 WINE_DEFAULT_DEBUG_CHANNEL(qmgr); 00027 00028 static ULONG WINAPI 00029 BITS_IClassFactory_AddRef(LPCLASSFACTORY iface) 00030 { 00031 return 2; 00032 } 00033 00034 static HRESULT WINAPI 00035 BITS_IClassFactory_QueryInterface(LPCLASSFACTORY iface, REFIID riid, 00036 LPVOID *ppvObj) 00037 { 00038 ClassFactoryImpl *This = (ClassFactoryImpl *) iface; 00039 00040 if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IClassFactory)) 00041 { 00042 *ppvObj = &This->lpVtbl; 00043 return S_OK; 00044 } 00045 00046 *ppvObj = NULL; 00047 return E_NOINTERFACE; 00048 } 00049 00050 static ULONG WINAPI 00051 BITS_IClassFactory_Release(LPCLASSFACTORY iface) 00052 { 00053 return 1; 00054 } 00055 00056 static HRESULT WINAPI 00057 BITS_IClassFactory_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pUnkOuter, 00058 REFIID riid, LPVOID *ppvObj) 00059 { 00060 HRESULT res; 00061 IUnknown *punk = NULL; 00062 00063 TRACE("IID: %s\n", debugstr_guid(riid)); 00064 00065 if (pUnkOuter) 00066 return CLASS_E_NOAGGREGATION; 00067 00068 res = BackgroundCopyManagerConstructor(pUnkOuter, (LPVOID*) &punk); 00069 if (FAILED(res)) 00070 return res; 00071 00072 res = IUnknown_QueryInterface(punk, riid, ppvObj); 00073 IUnknown_Release(punk); 00074 return res; 00075 } 00076 00077 static HRESULT WINAPI 00078 BITS_IClassFactory_LockServer(LPCLASSFACTORY iface, BOOL fLock) 00079 { 00080 FIXME("Not implemented\n"); 00081 return E_NOTIMPL; 00082 } 00083 00084 static const IClassFactoryVtbl BITS_IClassFactory_Vtbl = 00085 { 00086 BITS_IClassFactory_QueryInterface, 00087 BITS_IClassFactory_AddRef, 00088 BITS_IClassFactory_Release, 00089 BITS_IClassFactory_CreateInstance, 00090 BITS_IClassFactory_LockServer 00091 }; 00092 00093 ClassFactoryImpl BITS_ClassFactory = 00094 { 00095 &BITS_IClassFactory_Vtbl 00096 }; Generated on Sun May 27 2012 04:21:28 for ReactOS by
1.7.6.1
|