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
27 #define IDPROMPTFORDISK 1001
28 #define IDC_FILENEEDED 503
30 #define IDC_COPYFROM 505
32 #define IDC_RUNDLG_BROWSE 507
34 #define IDS_PROMPTDISK 508
35 #define IDS_UNKNOWN 509
36 #define IDS_COPYFROM 510
39 #define REG_INSTALLEDFILES "System\\CurrentControlSet\\Control\\InstalledFiles"
40 #define REGPART_RENAME "\\Rename"
41 #define REG_VERSIONCONFLICT "Software\\Microsoft\\VersionConflictManager"
43 extern HINSTANCE SETUPAPI_hInstance
;
45 static inline WCHAR
*strdupW( const WCHAR
*str
)
50 int len
= (lstrlenW(str
) + 1) * sizeof(WCHAR
);
51 if ((ret
= HeapAlloc( GetProcessHeap(), 0, len
))) memcpy( ret
, str
, len
);
56 static inline char *strdupWtoA( const WCHAR
*str
)
61 DWORD len
= WideCharToMultiByte( CP_ACP
, 0, str
, -1, NULL
, 0, NULL
, NULL
);
62 if ((ret
= HeapAlloc( GetProcessHeap(), 0, len
)))
63 WideCharToMultiByte( CP_ACP
, 0, str
, -1, ret
, len
, NULL
, NULL
);
68 static inline WCHAR
*strdupAtoW( const char *str
)
73 DWORD len
= MultiByteToWideChar( CP_ACP
, 0, str
, -1, NULL
, 0 );
74 if ((ret
= HeapAlloc( GetProcessHeap(), 0, len
* sizeof(WCHAR
) )))
75 MultiByteToWideChar( CP_ACP
, 0, str
, -1, ret
, len
);
80 /* string substitutions */
83 extern const WCHAR
*DIRID_get_string( int dirid
);
84 extern unsigned int PARSER_string_substA( const struct inf_file
*file
, const WCHAR
*text
,
85 char *buffer
, unsigned int size
);
86 extern const WCHAR
*PARSER_get_inf_filename( HINF hinf
);
87 extern WCHAR
*PARSER_get_src_root( HINF hinf
);
88 extern WCHAR
*PARSER_get_dest_dir( INFCONTEXT
*context
);
90 /* support for Ascii queue callback functions */
92 struct callback_WtoA_context
95 PSP_FILE_CALLBACK_A orig_handler
;
98 UINT CALLBACK
QUEUE_callback_WtoA( void *context
, UINT notification
, UINT_PTR
, UINT_PTR
);
100 /* from msvcrt/sys/stat.h */
101 #define _S_IWRITE 0x0080
102 #define _S_IREAD 0x0100
104 extern OSVERSIONINFOW OsVersionInfo
;
106 extern BOOL
create_fake_dll( const WCHAR
*name
, const WCHAR
*source
);
108 #endif /* __SETUPAPI_PRIVATE_H */