2002-03-10 00:29:33 +01:00
|
|
|
/*
|
|
|
|
* Copyright 2001 Andreas Mohr
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2002-03-10 00:29:33 +01:00
|
|
|
*/
|
|
|
|
|
2001-04-17 19:39:35 +02:00
|
|
|
#ifndef __SETUPAPI_PRIVATE_H
|
|
|
|
#define __SETUPAPI_PRIVATE_H
|
2000-12-13 22:31:37 +01:00
|
|
|
|
2009-07-02 12:33:26 +02:00
|
|
|
#include <windef.h>
|
|
|
|
#include <winuser.h>
|
|
|
|
|
2001-04-17 19:39:35 +02:00
|
|
|
#define COPYFILEDLGORD 1000
|
|
|
|
#define SOURCESTRORD 500
|
|
|
|
#define DESTSTRORD 501
|
|
|
|
#define PROGRESSORD 502
|
|
|
|
|
2009-02-18 09:44:15 +01:00
|
|
|
#define IDPROMPTFORDISK 1001
|
|
|
|
#define IDC_FILENEEDED 503
|
|
|
|
#define IDC_INFO 504
|
|
|
|
#define IDC_COPYFROM 505
|
|
|
|
#define IDC_PATH 506
|
|
|
|
#define IDC_RUNDLG_BROWSE 507
|
|
|
|
|
|
|
|
#define IDS_PROMPTDISK 508
|
|
|
|
#define IDS_UNKNOWN 509
|
|
|
|
#define IDS_COPYFROM 510
|
|
|
|
#define IDS_INFO 511
|
2001-04-17 19:39:35 +02:00
|
|
|
|
|
|
|
#define REG_INSTALLEDFILES "System\\CurrentControlSet\\Control\\InstalledFiles"
|
|
|
|
#define REGPART_RENAME "\\Rename"
|
|
|
|
#define REG_VERSIONCONFLICT "Software\\Microsoft\\VersionConflictManager"
|
|
|
|
|
2009-02-18 09:39:40 +01:00
|
|
|
extern HINSTANCE SETUPAPI_hInstance;
|
|
|
|
|
2008-04-16 12:21:09 +02:00
|
|
|
static inline WCHAR *strdupW( const WCHAR *str )
|
|
|
|
{
|
|
|
|
WCHAR *ret = NULL;
|
|
|
|
if (str)
|
|
|
|
{
|
|
|
|
int len = (lstrlenW(str) + 1) * sizeof(WCHAR);
|
|
|
|
if ((ret = HeapAlloc( GetProcessHeap(), 0, len ))) memcpy( ret, str, len );
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline char *strdupWtoA( const WCHAR *str )
|
|
|
|
{
|
|
|
|
char *ret = NULL;
|
|
|
|
if (str)
|
|
|
|
{
|
|
|
|
DWORD len = WideCharToMultiByte( CP_ACP, 0, str, -1, NULL, 0, NULL, NULL );
|
|
|
|
if ((ret = HeapAlloc( GetProcessHeap(), 0, len )))
|
|
|
|
WideCharToMultiByte( CP_ACP, 0, str, -1, ret, len, NULL, NULL );
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2007-03-19 20:48:48 +01:00
|
|
|
static inline WCHAR *strdupAtoW( const char *str )
|
2006-11-13 21:04:32 +01:00
|
|
|
{
|
|
|
|
WCHAR *ret = NULL;
|
|
|
|
if (str)
|
|
|
|
{
|
|
|
|
DWORD len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 );
|
|
|
|
if ((ret = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) )))
|
|
|
|
MultiByteToWideChar( CP_ACP, 0, str, -1, ret, len );
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2002-04-02 04:57:50 +02:00
|
|
|
/* string substitutions */
|
|
|
|
|
|
|
|
struct inf_file;
|
2006-02-07 16:08:19 +01:00
|
|
|
extern const WCHAR *DIRID_get_string( int dirid );
|
2007-08-27 17:09:06 +02:00
|
|
|
extern unsigned int PARSER_string_substA( const struct inf_file *file, const WCHAR *text,
|
2002-04-02 04:57:50 +02:00
|
|
|
char *buffer, unsigned int size );
|
2006-02-07 16:08:19 +01:00
|
|
|
extern const WCHAR *PARSER_get_inf_filename( HINF hinf );
|
|
|
|
extern WCHAR *PARSER_get_src_root( HINF hinf );
|
2004-02-27 01:47:10 +01:00
|
|
|
extern WCHAR *PARSER_get_dest_dir( INFCONTEXT *context );
|
2002-04-02 04:57:50 +02:00
|
|
|
|
|
|
|
/* support for Ascii queue callback functions */
|
|
|
|
|
|
|
|
struct callback_WtoA_context
|
|
|
|
{
|
|
|
|
void *orig_context;
|
|
|
|
PSP_FILE_CALLBACK_A orig_handler;
|
|
|
|
};
|
|
|
|
|
|
|
|
UINT CALLBACK QUEUE_callback_WtoA( void *context, UINT notification, UINT_PTR, UINT_PTR );
|
|
|
|
|
2003-08-28 01:12:36 +02:00
|
|
|
/* from msvcrt/sys/stat.h */
|
|
|
|
#define _S_IWRITE 0x0080
|
|
|
|
#define _S_IREAD 0x0100
|
|
|
|
|
2005-02-03 14:34:50 +01:00
|
|
|
extern OSVERSIONINFOW OsVersionInfo;
|
|
|
|
|
2006-03-21 11:30:48 +01:00
|
|
|
extern BOOL create_fake_dll( const WCHAR *name, const WCHAR *source );
|
|
|
|
|
2001-04-17 19:39:35 +02:00
|
|
|
#endif /* __SETUPAPI_PRIVATE_H */
|