comcat: Fix mixing of HRESULT and LSTATUS types in COMCAT_CLSID_IEnumGUID_Next, COMCA...
[wine] / dlls / comcat / comcat_main.c
1 /*
2  *      exported dll functions for comcat.dll
3  *
4  * Copyright (C) 2002-2003 John K. Hohm
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20
21 #include "comcat_private.h"
22
23 #include "wine/debug.h"
24
25 WINE_DEFAULT_DEBUG_CHANNEL(ole);
26
27 LONG dll_ref = 0;
28
29 /***********************************************************************
30  *              Global string constant definitions
31  */
32 const WCHAR clsid_keyname[6] = { 'C', 'L', 'S', 'I', 'D', 0 };
33
34 /***********************************************************************
35  *              DllGetClassObject (COMCAT.@)
36  */
37 HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
38 {
39     *ppv = NULL;
40     if (IsEqualGUID(rclsid, &CLSID_StdComponentCategoriesMgr)) {
41         return IClassFactory_QueryInterface((LPCLASSFACTORY)&COMCAT_ClassFactory, iid, ppv);
42     }
43     FIXME("\n\tCLSID:\t%s,\n\tIID:\t%s\n",debugstr_guid(rclsid),debugstr_guid(iid));
44     return CLASS_E_CLASSNOTAVAILABLE;
45 }
46
47 /***********************************************************************
48  *              DllCanUnloadNow (COMCAT.@)
49  */
50 HRESULT WINAPI DllCanUnloadNow(void)
51 {
52     return dll_ref != 0 ? S_FALSE : S_OK;
53 }
54
55 /* NOTE: DllRegisterServer and DllUnregisterServer are in regsvr.c */