Robert Shearman | d38cce8 | 2003-07-01 04:30:30 +0000 | [diff] [blame] | 1 | /* |
| 2 | * includes for devenum.dll |
| 3 | * |
| 4 | * Copyright (C) 2002 John K. Hohm |
| 5 | * Copyright (C) 2002 Robert Shearman |
| 6 | * |
| 7 | * This library is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU Lesser General Public |
| 9 | * License as published by the Free Software Foundation; either |
| 10 | * version 2.1 of the License, or (at your option) any later version. |
| 11 | * |
| 12 | * This library is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | * Lesser General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU Lesser General Public |
| 18 | * License along with this library; if not, write to the Free Software |
Jonathan Ernst | 360a3f9 | 2006-05-18 14:49:52 +0200 | [diff] [blame] | 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA |
Robert Shearman | d38cce8 | 2003-07-01 04:30:30 +0000 | [diff] [blame] | 20 | * |
| 21 | * NOTES ON FILE: |
| 22 | * - Private file where devenum globals are declared |
| 23 | */ |
| 24 | |
Michael Stefaniuc | 8cf14ed | 2010-05-28 01:39:56 +0200 | [diff] [blame] | 25 | #ifndef RC_INVOKED |
Alexandre Julliard | e37c6e1 | 2003-09-05 23:08:26 +0000 | [diff] [blame] | 26 | #include <stdarg.h> |
Michael Stefaniuc | 8cf14ed | 2010-05-28 01:39:56 +0200 | [diff] [blame] | 27 | #endif |
Alexandre Julliard | e37c6e1 | 2003-09-05 23:08:26 +0000 | [diff] [blame] | 28 | |
Robert Shearman | d38cce8 | 2003-07-01 04:30:30 +0000 | [diff] [blame] | 29 | #include "windef.h" |
| 30 | #include "winbase.h" |
Maarten Lankhorst | 8a7960c | 2005-04-27 11:07:55 +0000 | [diff] [blame] | 31 | #include "wingdi.h" |
Robert Shearman | d38cce8 | 2003-07-01 04:30:30 +0000 | [diff] [blame] | 32 | #include "winuser.h" |
| 33 | #include "winreg.h" |
| 34 | #include "winerror.h" |
| 35 | |
Francois Gouget | 486d020 | 2004-10-07 03:06:48 +0000 | [diff] [blame] | 36 | #define COBJMACROS |
Francois Gouget | 486d020 | 2004-10-07 03:06:48 +0000 | [diff] [blame] | 37 | |
Robert Shearman | d38cce8 | 2003-07-01 04:30:30 +0000 | [diff] [blame] | 38 | #include "ole2.h" |
| 39 | #include "strmif.h" |
Alexandre Julliard | 81c3170 | 2003-09-03 00:16:28 +0000 | [diff] [blame] | 40 | #include "olectl.h" |
Robert Shearman | d38cce8 | 2003-07-01 04:30:30 +0000 | [diff] [blame] | 41 | #include "uuids.h" |
| 42 | |
Michael Stefaniuc | 8cf14ed | 2010-05-28 01:39:56 +0200 | [diff] [blame] | 43 | #ifndef RC_INVOKED |
| 44 | #include "wine/unicode.h" |
| 45 | #endif |
| 46 | |
Robert Shearman | d38cce8 | 2003-07-01 04:30:30 +0000 | [diff] [blame] | 47 | /********************************************************************** |
| 48 | * Dll lifetime tracking declaration for devenum.dll |
| 49 | */ |
Marcus Meissner | 455ef03 | 2011-05-13 16:43:26 +0200 | [diff] [blame] | 50 | extern LONG dll_refs DECLSPEC_HIDDEN; |
Robert Shearman | e7110f0 | 2004-12-07 14:37:11 +0000 | [diff] [blame] | 51 | static inline void DEVENUM_LockModule(void) { InterlockedIncrement(&dll_refs); } |
| 52 | static inline void DEVENUM_UnlockModule(void) { InterlockedDecrement(&dll_refs); } |
| 53 | |
Robert Shearman | d38cce8 | 2003-07-01 04:30:30 +0000 | [diff] [blame] | 54 | |
| 55 | /********************************************************************** |
| 56 | * ClassFactory declaration for devenum.dll |
| 57 | */ |
| 58 | typedef struct |
| 59 | { |
Michael Stefaniuc | aa591dc | 2011-08-01 10:34:09 +0200 | [diff] [blame] | 60 | IClassFactory IClassFactory_iface; |
Robert Shearman | d38cce8 | 2003-07-01 04:30:30 +0000 | [diff] [blame] | 61 | } ClassFactoryImpl; |
| 62 | |
| 63 | typedef struct |
| 64 | { |
Michael Stefaniuc | 25aa60b | 2012-04-03 00:18:39 +0200 | [diff] [blame] | 65 | IMoniker IMoniker_iface; |
Mike McCormack | 2d7ea23 | 2005-07-11 13:21:17 +0000 | [diff] [blame] | 66 | LONG ref; |
Robert Shearman | d38cce8 | 2003-07-01 04:30:30 +0000 | [diff] [blame] | 67 | HKEY hkey; |
| 68 | } MediaCatMoniker; |
| 69 | |
Marcus Meissner | 455ef03 | 2011-05-13 16:43:26 +0200 | [diff] [blame] | 70 | MediaCatMoniker * DEVENUM_IMediaCatMoniker_Construct(void) DECLSPEC_HIDDEN; |
| 71 | HRESULT DEVENUM_IEnumMoniker_Construct(HKEY hkey, IEnumMoniker ** ppEnumMoniker) DECLSPEC_HIDDEN; |
Robert Shearman | d38cce8 | 2003-07-01 04:30:30 +0000 | [diff] [blame] | 72 | |
Marcus Meissner | 455ef03 | 2011-05-13 16:43:26 +0200 | [diff] [blame] | 73 | extern ClassFactoryImpl DEVENUM_ClassFactory DECLSPEC_HIDDEN; |
Jacek Caban | 9940756 | 2012-04-04 10:43:12 +0200 | [diff] [blame] | 74 | extern ICreateDevEnum DEVENUM_CreateDevEnum DECLSPEC_HIDDEN; |
| 75 | extern IParseDisplayName DEVENUM_ParseDisplayName DECLSPEC_HIDDEN; |
Robert Shearman | d38cce8 | 2003-07-01 04:30:30 +0000 | [diff] [blame] | 76 | |
| 77 | /********************************************************************** |
Alexander Dorofeyev | de70686 | 2008-06-29 15:07:32 +0300 | [diff] [blame] | 78 | * Private helper function to get AM filter category key location |
| 79 | */ |
Marcus Meissner | 455ef03 | 2011-05-13 16:43:26 +0200 | [diff] [blame] | 80 | HRESULT DEVENUM_GetCategoryKey(REFCLSID clsidDeviceClass, HKEY *pBaseKey, WCHAR *wszRegKeyName, UINT maxLen) DECLSPEC_HIDDEN; |
Alexander Dorofeyev | de70686 | 2008-06-29 15:07:32 +0300 | [diff] [blame] | 81 | |
| 82 | /********************************************************************** |
Robert Shearman | d38cce8 | 2003-07-01 04:30:30 +0000 | [diff] [blame] | 83 | * Global string constant declarations |
| 84 | */ |
| 85 | extern const WCHAR clsid_keyname[6]; |
| 86 | extern const WCHAR wszInstanceKeyName[]; |
Robert Shearman | d38cce8 | 2003-07-01 04:30:30 +0000 | [diff] [blame] | 87 | #define CLSID_STR_LEN (sizeof(clsid_keyname) / sizeof(WCHAR)) |
| 88 | |
| 89 | /********************************************************************** |
| 90 | * Resource IDs |
| 91 | */ |
| 92 | #define IDS_DEVENUM_DSDEFAULT 7 |
| 93 | #define IDS_DEVENUM_DS 8 |
| 94 | #define IDS_DEVENUM_WODEFAULT 9 |
| 95 | #define IDS_DEVENUM_MIDEFAULT 10 |
| 96 | #define IDS_DEVENUM_KSDEFAULT 11 |
| 97 | #define IDS_DEVENUM_KS 12 |