blob: 4b6083a1fc69fe1f7518eeec3057ec0d3fdafaf3 [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
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 * NOTES ON FILE:
22 * - Private file where devenum globals are declared
23 */
24
Alexandre Julliarde37c6e12003-09-05 23:08:26 +000025#include <stdarg.h>
26
Robert Shearmand38cce82003-07-01 04:30:30 +000027#include "windef.h"
28#include "winbase.h"
Maarten Lankhorst8a7960c2005-04-27 11:07:55 +000029#include "wingdi.h"
Robert Shearmand38cce82003-07-01 04:30:30 +000030#include "winuser.h"
31#include "winreg.h"
32#include "winerror.h"
33
Francois Gouget486d0202004-10-07 03:06:48 +000034#define COBJMACROS
Robert Shearmand38cce82003-07-01 04:30:30 +000035#define COM_NO_WINDOWS_H
Francois Gouget486d0202004-10-07 03:06:48 +000036
Robert Shearmand38cce82003-07-01 04:30:30 +000037#include "ole2.h"
38#include "strmif.h"
Alexandre Julliard81c31702003-09-03 00:16:28 +000039#include "olectl.h"
Robert Shearmand38cce82003-07-01 04:30:30 +000040#include "wine/unicode.h"
41#include "uuids.h"
42
43/**********************************************************************
44 * Dll lifetime tracking declaration for devenum.dll
45 */
Robert Shearmane7110f02004-12-07 14:37:11 +000046extern LONG dll_refs;
47static inline void DEVENUM_LockModule(void) { InterlockedIncrement(&dll_refs); }
48static inline void DEVENUM_UnlockModule(void) { InterlockedDecrement(&dll_refs); }
49
Robert Shearmand38cce82003-07-01 04:30:30 +000050
51/**********************************************************************
52 * ClassFactory declaration for devenum.dll
53 */
54typedef struct
55{
Dmitry Timoshkov247246e2005-05-30 10:01:08 +000056 const IClassFactoryVtbl *lpVtbl;
Robert Shearmand38cce82003-07-01 04:30:30 +000057} ClassFactoryImpl;
58
59typedef struct
60{
Dmitry Timoshkov247246e2005-05-30 10:01:08 +000061 const ICreateDevEnumVtbl *lpVtbl;
Robert Shearmand38cce82003-07-01 04:30:30 +000062} CreateDevEnumImpl;
63
64typedef struct
65{
Dmitry Timoshkov247246e2005-05-30 10:01:08 +000066 const IParseDisplayNameVtbl *lpVtbl;
Robert Shearmane7110f02004-12-07 14:37:11 +000067} ParseDisplayNameImpl;
68
69typedef struct
70{
Dmitry Timoshkov247246e2005-05-30 10:01:08 +000071 const IEnumMonikerVtbl *lpVtbl;
Mike McCormack2d7ea232005-07-11 13:21:17 +000072 LONG ref;
Robert Shearmand38cce82003-07-01 04:30:30 +000073 DWORD index;
74 HKEY hkey;
75} EnumMonikerImpl;
76
77typedef struct
78{
Dmitry Timoshkov247246e2005-05-30 10:01:08 +000079 const IMonikerVtbl *lpVtbl;
Mike McCormack2d7ea232005-07-11 13:21:17 +000080 LONG ref;
Robert Shearmand38cce82003-07-01 04:30:30 +000081 HKEY hkey;
82} MediaCatMoniker;
83
Eric Pouech4056d7e2004-12-13 21:19:01 +000084MediaCatMoniker * DEVENUM_IMediaCatMoniker_Construct(void);
Robert Shearmane7110f02004-12-07 14:37:11 +000085HRESULT DEVENUM_IEnumMoniker_Construct(HKEY hkey, IEnumMoniker ** ppEnumMoniker);
Robert Shearmand38cce82003-07-01 04:30:30 +000086HRESULT WINAPI DEVENUM_ICreateDevEnum_CreateClassEnumerator(
87 ICreateDevEnum * iface,
88 REFCLSID clsidDeviceClass,
89 IEnumMoniker **ppEnumMoniker,
90 DWORD dwFlags);
91
92extern ClassFactoryImpl DEVENUM_ClassFactory;
93extern CreateDevEnumImpl DEVENUM_CreateDevEnum;
94extern ParseDisplayNameImpl DEVENUM_ParseDisplayName;
95
96/**********************************************************************
97 * Global string constant declarations
98 */
99extern const WCHAR clsid_keyname[6];
100extern const WCHAR wszInstanceKeyName[];
Robert Shearmand38cce82003-07-01 04:30:30 +0000101#define CLSID_STR_LEN (sizeof(clsid_keyname) / sizeof(WCHAR))
102
103/**********************************************************************
104 * Resource IDs
105 */
106#define IDS_DEVENUM_DSDEFAULT 7
107#define IDS_DEVENUM_DS 8
108#define IDS_DEVENUM_WODEFAULT 9
109#define IDS_DEVENUM_MIDEFAULT 10
110#define IDS_DEVENUM_KSDEFAULT 11
111#define IDS_DEVENUM_KS 12