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
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20  *
21  * NOTES ON FILE:
22  * - Private file where devenum globals are declared
23  */
24 
25 #pragma once
26 
27 #ifndef RC_INVOKED
28 #include <stdarg.h>
29 #endif
30 
31 #include "windef.h"
32 #include "winbase.h"
33 #include "wingdi.h"
34 #include "winuser.h"
35 #include "winreg.h"
36 #include "winerror.h"
37 
38 #define COBJMACROS
39 
40 #include "ole2.h"
41 #include "strmif.h"
42 #include "olectl.h"
43 #include "uuids.h"
44 
45 #ifndef RC_INVOKED
46 #include "wine/unicode.h"
47 #endif
48 
49 /**********************************************************************
50  * Dll lifetime tracking declaration for devenum.dll
51  */
52 extern LONG dll_refs DECLSPEC_HIDDEN;
53 static inline void DEVENUM_LockModule(void) { InterlockedIncrement(&dll_refs); }
54 static inline void DEVENUM_UnlockModule(void) { InterlockedDecrement(&dll_refs); }
55 
56 
57 /**********************************************************************
58  * ClassFactory declaration for devenum.dll
59  */
60 typedef struct
61 {
62     IClassFactory IClassFactory_iface;
63 } ClassFactoryImpl;
64 
65 typedef struct
66 {
67     IMoniker IMoniker_iface;
68     LONG ref;
69     HKEY hkey;
70 } MediaCatMoniker;
71 
72 MediaCatMoniker * DEVENUM_IMediaCatMoniker_Construct(void) DECLSPEC_HIDDEN;
73 HRESULT DEVENUM_IEnumMoniker_Construct(HKEY hkey, HKEY special_hkey, IEnumMoniker ** ppEnumMoniker) DECLSPEC_HIDDEN;
74 
75 extern ClassFactoryImpl DEVENUM_ClassFactory DECLSPEC_HIDDEN;
76 extern ICreateDevEnum DEVENUM_CreateDevEnum DECLSPEC_HIDDEN;
77 extern IParseDisplayName DEVENUM_ParseDisplayName DECLSPEC_HIDDEN;
78 
79 /**********************************************************************
80  * Private helper function to get AM filter category key location
81  */
82 HRESULT DEVENUM_GetCategoryKey(REFCLSID clsidDeviceClass, HKEY *pBaseKey, WCHAR *wszRegKeyName, UINT maxLen) DECLSPEC_HIDDEN;
83 
84 /**********************************************************************
85  * Global string constant declarations
86  */
87 extern const WCHAR clsid_keyname[6] DECLSPEC_HIDDEN;
88 extern const WCHAR wszInstanceKeyName[] DECLSPEC_HIDDEN;
89 #define CLSID_STR_LEN (sizeof(clsid_keyname) / sizeof(WCHAR))
90 
91 /**********************************************************************
92  * Resource IDs
93  */
94 #define IDS_DEVENUM_DSDEFAULT 7
95 #define IDS_DEVENUM_DS        8
96 #define IDS_DEVENUM_WODEFAULT 9
97 #define IDS_DEVENUM_MIDEFAULT 10
98 #define IDS_DEVENUM_KSDEFAULT 11
99 #define IDS_DEVENUM_KS        12
100