blob: 17e89a5314ace17dd6210118b582233fb1049625 [file] [log] [blame]
Robert Shearmand38cce82003-07-01 04:30:30 +00001/*
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 Ernst360a3f92006-05-18 14:49:52 +020019 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Robert Shearmand38cce82003-07-01 04:30:30 +000020 *
21 * NOTES ON FILE:
22 * - Private file where devenum globals are declared
23 */
24
Michael Stefaniuc8cf14ed2010-05-28 01:39:56 +020025#ifndef RC_INVOKED
Alexandre Julliarde37c6e12003-09-05 23:08:26 +000026#include <stdarg.h>
Michael Stefaniuc8cf14ed2010-05-28 01:39:56 +020027#endif
Alexandre Julliarde37c6e12003-09-05 23:08:26 +000028
Robert Shearmand38cce82003-07-01 04:30:30 +000029#include "windef.h"
30#include "winbase.h"
Maarten Lankhorst8a7960c2005-04-27 11:07:55 +000031#include "wingdi.h"
Robert Shearmand38cce82003-07-01 04:30:30 +000032#include "winuser.h"
33#include "winreg.h"
34#include "winerror.h"
35
Francois Gouget486d0202004-10-07 03:06:48 +000036#define COBJMACROS
Francois Gouget486d0202004-10-07 03:06:48 +000037
Robert Shearmand38cce82003-07-01 04:30:30 +000038#include "ole2.h"
39#include "strmif.h"
Alexandre Julliard81c31702003-09-03 00:16:28 +000040#include "olectl.h"
Robert Shearmand38cce82003-07-01 04:30:30 +000041#include "uuids.h"
42
Michael Stefaniuc8cf14ed2010-05-28 01:39:56 +020043#ifndef RC_INVOKED
44#include "wine/unicode.h"
45#endif
46
Robert Shearmand38cce82003-07-01 04:30:30 +000047/**********************************************************************
48 * Dll lifetime tracking declaration for devenum.dll
49 */
Marcus Meissner455ef032011-05-13 16:43:26 +020050extern LONG dll_refs DECLSPEC_HIDDEN;
Robert Shearmane7110f02004-12-07 14:37:11 +000051static inline void DEVENUM_LockModule(void) { InterlockedIncrement(&dll_refs); }
52static inline void DEVENUM_UnlockModule(void) { InterlockedDecrement(&dll_refs); }
53
Robert Shearmand38cce82003-07-01 04:30:30 +000054
55/**********************************************************************
56 * ClassFactory declaration for devenum.dll
57 */
58typedef struct
59{
Michael Stefaniucaa591dc2011-08-01 10:34:09 +020060 IClassFactory IClassFactory_iface;
Robert Shearmand38cce82003-07-01 04:30:30 +000061} ClassFactoryImpl;
62
63typedef struct
64{
Michael Stefaniuc25aa60b2012-04-03 00:18:39 +020065 IMoniker IMoniker_iface;
Mike McCormack2d7ea232005-07-11 13:21:17 +000066 LONG ref;
Robert Shearmand38cce82003-07-01 04:30:30 +000067 HKEY hkey;
68} MediaCatMoniker;
69
Marcus Meissner455ef032011-05-13 16:43:26 +020070MediaCatMoniker * DEVENUM_IMediaCatMoniker_Construct(void) DECLSPEC_HIDDEN;
71HRESULT DEVENUM_IEnumMoniker_Construct(HKEY hkey, IEnumMoniker ** ppEnumMoniker) DECLSPEC_HIDDEN;
Robert Shearmand38cce82003-07-01 04:30:30 +000072
Marcus Meissner455ef032011-05-13 16:43:26 +020073extern ClassFactoryImpl DEVENUM_ClassFactory DECLSPEC_HIDDEN;
Jacek Caban99407562012-04-04 10:43:12 +020074extern ICreateDevEnum DEVENUM_CreateDevEnum DECLSPEC_HIDDEN;
75extern IParseDisplayName DEVENUM_ParseDisplayName DECLSPEC_HIDDEN;
Robert Shearmand38cce82003-07-01 04:30:30 +000076
77/**********************************************************************
Alexander Dorofeyevde706862008-06-29 15:07:32 +030078 * Private helper function to get AM filter category key location
79 */
Marcus Meissner455ef032011-05-13 16:43:26 +020080HRESULT DEVENUM_GetCategoryKey(REFCLSID clsidDeviceClass, HKEY *pBaseKey, WCHAR *wszRegKeyName, UINT maxLen) DECLSPEC_HIDDEN;
Alexander Dorofeyevde706862008-06-29 15:07:32 +030081
82/**********************************************************************
Robert Shearmand38cce82003-07-01 04:30:30 +000083 * Global string constant declarations
84 */
85extern const WCHAR clsid_keyname[6];
86extern const WCHAR wszInstanceKeyName[];
Robert Shearmand38cce82003-07-01 04:30:30 +000087#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