Changes in crossover-wine-src-6.1.0 except for configure
[wine/hacks.git] / dlls / setupapi / setupapi_private.h
blob3e2ab686fd80ca310201f5a918b4fc1787c19f68
1 /*
2 * Copyright 2001 Andreas Mohr
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __SETUPAPI_PRIVATE_H
20 #define __SETUPAPI_PRIVATE_H
22 #define COPYFILEDLGORD 1000
23 #define SOURCESTRORD 500
24 #define DESTSTRORD 501
25 #define PROGRESSORD 502
28 #define REG_INSTALLEDFILES "System\\CurrentControlSet\\Control\\InstalledFiles"
29 #define REGPART_RENAME "\\Rename"
30 #define REG_VERSIONCONFLICT "Software\\Microsoft\\VersionConflictManager"
32 static inline WCHAR *strdupAtoW( const char *str )
34 WCHAR *ret = NULL;
35 if (str)
37 DWORD len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 );
38 if ((ret = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) )))
39 MultiByteToWideChar( CP_ACP, 0, str, -1, ret, len );
41 return ret;
44 /* string substitutions */
46 struct inf_file;
47 extern const WCHAR *DIRID_get_string( int dirid );
48 extern unsigned int PARSER_string_substA( struct inf_file *file, const WCHAR *text,
49 char *buffer, unsigned int size );
50 extern unsigned int PARSER_string_substW( struct inf_file *file, const WCHAR *text,
51 WCHAR *buffer, unsigned int size );
52 extern const WCHAR *PARSER_get_inf_filename( HINF hinf );
53 extern WCHAR *PARSER_get_src_root( HINF hinf );
54 extern WCHAR *PARSER_get_dest_dir( INFCONTEXT *context );
56 /* support for Ascii queue callback functions */
58 struct callback_WtoA_context
60 void *orig_context;
61 PSP_FILE_CALLBACK_A orig_handler;
64 UINT CALLBACK QUEUE_callback_WtoA( void *context, UINT notification, UINT_PTR, UINT_PTR );
66 /* from msvcrt/sys/stat.h */
67 #define _S_IWRITE 0x0080
68 #define _S_IREAD 0x0100
70 typedef BOOL WINAPI *device_registry_fn (
71 LPVOID node,
72 DWORD Property,
73 PDWORD PropertyRegDataType,
74 PBYTE PropertyBuffer,
75 DWORD PropertyBufferSize,
76 PDWORD RequiredSize,
77 BOOL unicode);
79 typedef struct devnode_tag{
80 WCHAR enumerator[20];
81 WCHAR devicePath[MAX_PATH*2];
82 DWORD flags;
83 GUID guid;
84 WCHAR vendor[20];
85 DWORD iVendor;
86 WCHAR product[20];
87 DWORD iProduct;
88 WCHAR revision[5];
89 WCHAR serial[50];
90 WCHAR devicetype[20];
91 WCHAR deviceId[MAX_PATH];
92 LPWSTR hardwareid;
93 LPVOID reserved;
94 device_registry_fn *registry_fn;
95 } devnode;
97 typedef struct devinfo_struct_tag {
98 /* from the winehq structure */
99 DWORD magic;
100 GUID ClassGuid;
101 HWND hwndParent;
102 /* our Crossover structure */
103 DWORD flags;
104 BOOL unicode;
105 int count;
106 devnode *devices;
107 } devinfo_struct;
109 /* some custome device properties */
110 #define SPDRP_DEVICE_PATH (SPDRP_MAXIMUM_PROPERTY + 1)
111 #define SPDRP_DEVICEINST (SPDRP_MAXIMUM_PROPERTY + 2)
112 #define SPDRP_DEVICE_ID (SPDRP_MAXIMUM_PROPERTY + 3)
114 UINT USB_GetDeviceDevs(devinfo_struct *devinfo, CONST GUID *class,
115 LPCSTR enumstr);
117 extern OSVERSIONINFOW OsVersionInfo;
119 extern BOOL create_fake_dll( const WCHAR *name, const WCHAR *source );
121 #endif /* __SETUPAPI_PRIVATE_H */