dbghelp: Remove DMT_ entries for .DBG and .PDB files.
[wine.git] / dlls / netprofm / main.c
blobdc925049a311f065be0c2028cd688b18ee2ed5c8
1 /*
2 * Copyright 2014 Hans Leidekker for CodeWeavers
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>
20 #include "windef.h"
21 #include "winbase.h"
22 #define COBJMACROS
23 #include "objbase.h"
24 #include "rpcproxy.h"
25 #include "netlistmgr.h"
27 #include "wine/debug.h"
28 #include "netprofm_private.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(netprofm);
32 struct netprofm_cf
34 IClassFactory IClassFactory_iface;
35 HRESULT (*create_instance)(void **);
38 static inline struct netprofm_cf *impl_from_IClassFactory( IClassFactory *iface )
40 return CONTAINING_RECORD( iface, struct netprofm_cf, IClassFactory_iface );
43 static HRESULT WINAPI netprofm_cf_QueryInterface( IClassFactory *iface, REFIID riid, LPVOID *ppobj )
45 if (IsEqualGUID( riid, &IID_IUnknown ) || IsEqualGUID( riid, &IID_IClassFactory ))
47 IClassFactory_AddRef( iface );
48 *ppobj = iface;
49 return S_OK;
51 FIXME( "interface %s not implemented\n", debugstr_guid(riid) );
52 return E_NOINTERFACE;
55 static ULONG WINAPI netprofm_cf_AddRef( IClassFactory *iface )
57 return 2;
60 static ULONG WINAPI netprofm_cf_Release( IClassFactory *iface )
62 return 1;
65 static HRESULT WINAPI netprofm_cf_CreateInstance( IClassFactory *iface, LPUNKNOWN outer,
66 REFIID riid, LPVOID *obj )
68 struct netprofm_cf *factory = impl_from_IClassFactory( iface );
69 IUnknown *unk;
70 HRESULT r;
72 TRACE( "%p %s %p\n", outer, debugstr_guid(riid), obj );
74 *obj = NULL;
75 if (outer) return CLASS_E_NOAGGREGATION;
77 r = factory->create_instance( (void **)&unk );
78 if (FAILED( r ))
79 return r;
81 r = IUnknown_QueryInterface( unk, riid, obj );
82 IUnknown_Release( unk );
83 return r;
86 static HRESULT WINAPI netprofm_cf_LockServer( IClassFactory *iface, BOOL dolock )
88 FIXME( "%p, %d\n", iface, dolock );
89 return S_OK;
92 static const struct IClassFactoryVtbl netprofm_cf_vtbl =
94 netprofm_cf_QueryInterface,
95 netprofm_cf_AddRef,
96 netprofm_cf_Release,
97 netprofm_cf_CreateInstance,
98 netprofm_cf_LockServer
101 static struct netprofm_cf list_manager_cf = { { &netprofm_cf_vtbl }, list_manager_create };
103 /***********************************************************************
104 * DllGetClassObject (NETPROFM.@)
106 HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID iid, LPVOID *ppv )
108 IClassFactory *cf = NULL;
110 TRACE("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv);
112 if (IsEqualGUID( rclsid, &CLSID_NetworkListManager ))
114 cf = &list_manager_cf.IClassFactory_iface;
116 if (!cf) return CLASS_E_CLASSNOTAVAILABLE;
117 return IClassFactory_QueryInterface( cf, iid, ppv );