Commit 5068347b authored by Alexandre Julliard's avatar Alexandre Julliard

Implemented a large number of the 32-bit setupapi functions.

Fixed a number of setupx functions by making them call the setupapi equivalents.
parent f6662576
......@@ -5,13 +5,18 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = setupapi.dll
ALTNAMES = setupx.dll
EXTRALIBS = $(LIBUNICODE)
LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o
C_SRCS = \
devinst.c \
dirid.c \
infparse.c \
install.c \
parser.c \
queue.c \
setupx_main.c \
stubs.c \
virtcopy.c
......
/*
* Directory id handling
*
* Copyright 2002 Alexandre Julliard for CodeWeavers
*
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "windef.h"
#include "winbase.h"
#include "ntddk.h"
#include "winerror.h"
#include "setupapi.h"
#include "wine/unicode.h"
#include "setupapi_private.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(setupapi);
#define MAX_SYSTEM_DIRID DIRID_PRINTPROCESSOR
struct user_dirid
{
int id;
WCHAR *str;
};
static int nb_user_dirids; /* number of user dirids in use */
static int alloc_user_dirids; /* number of allocated user dirids */
static struct user_dirid *user_dirids;
static const WCHAR *system_dirids[MAX_SYSTEM_DIRID+1];
/* retrieve the string for unknown dirids */
static const WCHAR *get_unknown_dirid(void)
{
static WCHAR *unknown_dirid;
static const WCHAR unknown_str[] = {'\\','u','n','k','n','o','w','n',0};
if (!unknown_dirid)
{
UINT len = GetSystemDirectoryW( NULL, 0 ) + strlenW(unknown_str);
if (!(unknown_dirid = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) return NULL;
GetSystemDirectoryW( unknown_dirid, len );
strcatW( unknown_dirid, unknown_str );
}
return unknown_dirid;
}
/* create the string for a system dirid */
static const WCHAR *create_system_dirid( int dirid )
{
static const WCHAR Null[] = {0};
static const WCHAR C_Root[] = {'C',':','\\',0};
static const WCHAR Drivers[] = {'\\','d','r','i','v','e','r','s',0};
static const WCHAR Inf[] = {'\\','i','n','f',0};
static const WCHAR Help[] = {'\\','h','e','l','p',0};
static const WCHAR Fonts[] = {'\\','f','o','n','t','s',0};
static const WCHAR Viewers[] = {'\\','v','i','e','w','e','r','s',0};
static const WCHAR System[] = {'\\','s','y','s','t','e','m',0};
static const WCHAR Spool[] = {'\\','s','p','o','o','l',0};
WCHAR buffer[MAX_PATH+16], *str;
int len;
switch(dirid)
{
case DIRID_NULL:
return Null;
case DIRID_WINDOWS:
GetWindowsDirectoryW( buffer, MAX_PATH );
break;
case DIRID_SYSTEM:
GetSystemDirectoryW( buffer, MAX_PATH );
break;
case DIRID_DRIVERS:
GetSystemDirectoryW( buffer, MAX_PATH );
strcatW( buffer, Drivers );
break;
case DIRID_INF:
GetWindowsDirectoryW( buffer, MAX_PATH );
strcatW( buffer, Inf );
break;
case DIRID_HELP:
GetWindowsDirectoryW( buffer, MAX_PATH );
strcatW( buffer, Help );
break;
case DIRID_FONTS:
GetWindowsDirectoryW( buffer, MAX_PATH );
strcatW( buffer, Fonts );
break;
case DIRID_VIEWERS:
GetSystemDirectoryW( buffer, MAX_PATH );
strcatW( buffer, Viewers );
break;
case DIRID_APPS:
return C_Root; /* FIXME */
case DIRID_SHARED:
GetWindowsDirectoryW( buffer, MAX_PATH );
break;
case DIRID_BOOT:
return C_Root; /* FIXME */
case DIRID_SYSTEM16:
GetWindowsDirectoryW( buffer, MAX_PATH );
strcatW( buffer, System );
break;
case DIRID_SPOOL:
case DIRID_SPOOLDRIVERS: /* FIXME */
GetWindowsDirectoryW( buffer, MAX_PATH );
strcatW( buffer, Spool );
break;
case DIRID_LOADER:
return C_Root; /* FIXME */
case DIRID_USERPROFILE: /* FIXME */
case DIRID_COLOR: /* FIXME */
case DIRID_PRINTPROCESSOR: /* FIXME */
default:
FIXME( "unknwon dirid %d\n", dirid );
return get_unknown_dirid();
}
len = (strlenW(buffer) + 1) * sizeof(WCHAR);
if ((str = HeapAlloc( GetProcessHeap(), 0, len ))) memcpy( str, buffer, len );
return str;
}
/* retrieve the string corresponding to a dirid, or NULL if none */
const WCHAR *DIRID_get_string( HINF hinf, int dirid )
{
int i;
if (dirid == DIRID_ABSOLUTE || dirid == DIRID_ABSOLUTE_16BIT) dirid = DIRID_NULL;
if (dirid >= DIRID_USER)
{
for (i = 0; i < nb_user_dirids; i++)
if (user_dirids[i].id == dirid) return user_dirids[i].str;
ERR("user id %d not found\n", dirid );
return NULL;
}
else
{
if (dirid > MAX_SYSTEM_DIRID) return get_unknown_dirid();
if (dirid == DIRID_SRCPATH) return PARSER_get_src_root( hinf );
if (!system_dirids[dirid]) system_dirids[dirid] = create_system_dirid( dirid );
return system_dirids[dirid];
}
}
/* store a user dirid string */
static BOOL store_user_dirid( HINF hinf, int id, WCHAR *str )
{
int i;
for (i = 0; i < nb_user_dirids; i++) if (user_dirids[i].id == id) break;
if (i < nb_user_dirids) HeapFree( GetProcessHeap(), 0, user_dirids[i].str );
else
{
if (nb_user_dirids >= alloc_user_dirids)
{
int new_size = max( 32, alloc_user_dirids * 2 );
struct user_dirid *new = HeapReAlloc( GetProcessHeap(), 0, user_dirids,
new_size * sizeof(*new) );
if (!new) return FALSE;
user_dirids = new;
alloc_user_dirids = new_size;
}
nb_user_dirids++;
}
user_dirids[i].id = id;
user_dirids[i].str = str;
TRACE("id %d -> %s\n", id, debugstr_w(str) );
return TRUE;
}
/***********************************************************************
* SetupSetDirectoryIdW (SETUPAPI.@)
*/
BOOL WINAPI SetupSetDirectoryIdA( HINF hinf, DWORD id, PCSTR dir )
{
UNICODE_STRING dirW;
int i;
if (!id) /* clear everything */
{
for (i = 0; i < nb_user_dirids; i++) HeapFree( GetProcessHeap(), 0, user_dirids[i].str );
nb_user_dirids = 0;
return TRUE;
}
if (id < DIRID_USER)
{
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
}
/* duplicate the string */
if (!RtlCreateUnicodeStringFromAsciiz( &dirW, dir ))
{
SetLastError( ERROR_NOT_ENOUGH_MEMORY );
return FALSE;
}
return store_user_dirid( hinf, id, dirW.Buffer );
}
/***********************************************************************
* SetupSetDirectoryIdW (SETUPAPI.@)
*/
BOOL WINAPI SetupSetDirectoryIdW( HINF hinf, DWORD id, PCWSTR dir )
{
int i, len;
WCHAR *str;
if (!id) /* clear everything */
{
for (i = 0; i < nb_user_dirids; i++) HeapFree( GetProcessHeap(), 0, user_dirids[i].str );
nb_user_dirids = 0;
return TRUE;
}
if (id < DIRID_USER)
{
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
}
/* duplicate the string */
len = (strlenW(dir)+1) * sizeof(WCHAR);
if (!(str = HeapAlloc( GetProcessHeap(), 0, len ))) return FALSE;
memcpy( str, dir, len );
return store_user_dirid( hinf, id, str );
}
......@@ -26,114 +26,198 @@
*/
#include <string.h>
#include "wine/debug.h"
#include "windef.h"
#include "winbase.h"
#include "ntddk.h"
#include "wine/winbase16.h"
#include "setupapi.h"
#include "setupx16.h"
#include "setupapi_private.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(setupapi);
WORD InfNumEntries = 0;
INF_FILE *InfList = NULL;
HINF16 IP_curr_handle = 0;
RETERR16 IP_OpenInf(LPCSTR lpInfFileName, HINF16 *lphInf)
{
HFILE hFile = _lopen(lpInfFileName, OF_READ);
#define MAX_HANDLES 16384
#define FIRST_HANDLE 32
if (!lphInf)
return IP_ERROR;
static HINF handles[MAX_HANDLES];
/* this could be improved by checking for already freed handles */
if (IP_curr_handle == 0xffff)
return ERR_IP_OUT_OF_HANDLES;
if (hFile != HFILE_ERROR)
static RETERR16 alloc_hinf16( HINF hinf, HINF16 *hinf16 )
{
int i;
for (i = 0; i < MAX_HANDLES; i++)
{
InfList = HeapReAlloc(GetProcessHeap(), 0, InfList, InfNumEntries+1);
InfList[InfNumEntries].hInf = IP_curr_handle++;
InfList[InfNumEntries].hInfFile = hFile;
InfList[InfNumEntries].lpInfFileName = HeapAlloc( GetProcessHeap(), 0,
strlen(lpInfFileName)+1);
strcpy( InfList[InfNumEntries].lpInfFileName, lpInfFileName );
*lphInf = InfList[InfNumEntries].hInf;
InfNumEntries++;
TRACE("ret handle %d.\n", *lphInf);
return OK;
if (!handles[i])
{
handles[i] = hinf;
*hinf16 = i + FIRST_HANDLE;
return OK;
}
}
*lphInf = 0xffff;
return ERR_IP_INVALID_INFFILE;
return ERR_IP_OUT_OF_HANDLES;
}
BOOL IP_FindInf(HINF16 hInf, WORD *ret)
static HINF get_hinf( HINF16 hinf16 )
{
WORD n;
for (n=0; n < InfNumEntries; n++)
if (InfList[n].hInf == hInf)
{
*ret = n;
return TRUE;
}
return FALSE;
int idx = hinf16 - FIRST_HANDLE;
if (idx < 0 || idx >= MAX_HANDLES) return 0;
return handles[idx];
}
LPCSTR IP_GetFileName(HINF16 hInf)
static HINF free_hinf16( HINF16 hinf16 )
{
WORD n;
if (IP_FindInf(hInf, &n))
{
return InfList[n].lpInfFileName;
}
return NULL;
HINF ret;
int idx = hinf16 - FIRST_HANDLE;
if (idx < 0 || idx >= MAX_HANDLES) return 0;
ret = handles[idx];
handles[idx] = 0;
return ret;
}
RETERR16 IP_CloseInf(HINF16 hInf)
/* convert last error code to a RETERR16 value */
static RETERR16 get_last_error(void)
{
int i;
WORD n;
RETERR16 res = ERR_IP_INVALID_HINF;
if (IP_FindInf(hInf, &n))
switch(GetLastError())
{
_lclose(InfList[n].hInfFile);
HeapFree(GetProcessHeap(), 0, InfList[n].lpInfFileName);
for (i=n; i < InfNumEntries-1; i++)
InfList[i] = InfList[i+1];
InfNumEntries--;
InfList = HeapReAlloc(GetProcessHeap(), 0, InfList, InfNumEntries);
res = OK;
case ERROR_EXPECTED_SECTION_NAME:
case ERROR_BAD_SECTION_NAME_LINE:
case ERROR_SECTION_NAME_TOO_LONG: return ERR_IP_INVALID_SECT_NAME;
case ERROR_SECTION_NOT_FOUND: return ERR_IP_SECT_NOT_FOUND;
case ERROR_LINE_NOT_FOUND: return ERR_IP_LINE_NOT_FOUND;
default: return IP_ERROR; /* FIXME */
}
return res;
}
/***********************************************************************
* IpOpen (SETUPX.2)
*
*/
RETERR16 WINAPI IpOpen16(LPCSTR lpInfFileName, HINF16 *lphInf)
RETERR16 WINAPI IpOpen16( LPCSTR filename, HINF16 *hinf16 )
{
TRACE("('%s', %p)\n", lpInfFileName, lphInf);
return IP_OpenInf(lpInfFileName, lphInf);
HINF hinf = SetupOpenInfFileA( filename, NULL, INF_STYLE_WIN4, NULL );
if (hinf == (HINF)INVALID_HANDLE_VALUE) return get_last_error();
return alloc_hinf16( hinf, hinf16 );
}
/***********************************************************************
* IpClose (SETUPX.4)
*/
RETERR16 WINAPI IpClose16(HINF16 hInf)
RETERR16 WINAPI IpClose16( HINF16 hinf16 )
{
return IP_CloseInf(hInf);
HINF hinf = free_hinf16( hinf16 );
if (!hinf) return ERR_IP_INVALID_HINF;
SetupCloseInfFile( hinf );
return OK;
}
/***********************************************************************
* IpGetProfileString (SETUPX.210)
*/
RETERR16 WINAPI IpGetProfileString16(HINF16 hInf, LPCSTR section, LPCSTR entry, LPSTR buffer, WORD buflen)
RETERR16 WINAPI IpGetProfileString16( HINF16 hinf16, LPCSTR section, LPCSTR entry,
LPSTR buffer, WORD buflen )
{
DWORD required_size;
HINF hinf = get_hinf( hinf16 );
if (!hinf) return ERR_IP_INVALID_HINF;
if (!SetupGetLineTextA( NULL, hinf, section, entry, buffer, buflen, &required_size ))
return get_last_error();
TRACE("%p: section %s entry %s ret %s\n",
hinf, debugstr_a(section), debugstr_a(entry), debugstr_a(buffer) );
return OK;
}
/***********************************************************************
* GenFormStrWithoutPlaceHolders (SETUPX.103)
*
* ought to be pretty much implemented, I guess...
*/
void WINAPI GenFormStrWithoutPlaceHolders16( LPSTR dst, LPCSTR src, HINF16 hinf16 )
{
UNICODE_STRING srcW;
HINF hinf = get_hinf( hinf16 );
if (!hinf) return;
if (!RtlCreateUnicodeStringFromAsciiz( &srcW, src )) return;
PARSER_string_substA( hinf, srcW.Buffer, dst, MAX_INF_STRING_LENGTH );
RtlFreeUnicodeString( &srcW );
TRACE( "%s -> %s\n", debugstr_a(src), debugstr_a(dst) );
}
/***********************************************************************
* GenInstall (SETUPX.101)
*
* generic installer function for .INF file sections
*
* This is not perfect - patch whenever you can !
*
* wFlags == GENINSTALL_DO_xxx
* e.g. NetMeeting:
* first call GENINSTALL_DO_REGSRCPATH | GENINSTALL_DO_FILES,
* second call GENINSTALL_DO_LOGCONFIG | CFGAUTO | INI2REG | REG | INI
*/
RETERR16 WINAPI GenInstall16( HINF16 hinf16, LPCSTR section, WORD genflags )
{
TRACE("'%s': section '%s' entry '%s'\n", IP_GetFileName(hInf), section, entry);
GetPrivateProfileStringA(section, entry, "", buffer, buflen, IP_GetFileName(hInf));
return 0;
UINT flags = 0;
HINF hinf = get_hinf( hinf16 );
RETERR16 ret = OK;
void *context;
if (!hinf) return ERR_IP_INVALID_HINF;
if (genflags & GENINSTALL_DO_FILES) flags |= SPINST_FILES;
if (genflags & GENINSTALL_DO_INI) flags |= SPINST_INIFILES;
if (genflags & GENINSTALL_DO_REG) flags |= SPINST_REGISTRY;
if (genflags & GENINSTALL_DO_INI2REG) flags |= SPINST_INI2REG;
if (genflags & GENINSTALL_DO_LOGCONFIG) flags |= SPINST_LOGCONFIG;
if (genflags & (GENINSTALL_DO_REGSRCPATH|GENINSTALL_DO_CFGAUTO|GENINSTALL_DO_PERUSER))
FIXME( "unsupported flags %x\n", genflags );
context = SetupInitDefaultQueueCallback( 0 );
if (!SetupInstallFromInfSectionA( 0, hinf, section, flags, 0, NULL, 0,
SetupDefaultQueueCallbackA, context, 0, 0 ))
ret = get_last_error();
SetupTermDefaultQueueCallback( context );
return ret;
}
WORD InfNumEntries = 0;
INF_FILE *InfList = NULL;
HINF16 IP_curr_handle = 0;
BOOL IP_FindInf(HINF16 hInf, WORD *ret)
{
WORD n;
for (n=0; n < InfNumEntries; n++)
if (InfList[n].hInf == hInf)
{
*ret = n;
return TRUE;
}
return FALSE;
}
LPCSTR IP_GetFileName(HINF16 hInf)
{
WORD n;
if (IP_FindInf(hInf, &n))
{
return InfList[n].lpInfFileName;
}
return NULL;
}
......@@ -20,6 +20,7 @@
#define __SETUPAPI_PRIVATE_H
#include "wine/windef16.h"
#include "setupx16.h"
#define COPYFILEDLGORD 1000
#define SOURCESTRORD 500
......@@ -54,4 +55,24 @@ extern WORD InfNumEntries;
extern LPCSTR IP_GetFileName(HINF16 hInf);
/* string substitutions */
struct inf_file;
extern const WCHAR *DIRID_get_string( HINF hinf, int dirid );
extern unsigned int PARSER_string_substA( struct inf_file *file, const WCHAR *text,
char *buffer, unsigned int size );
extern unsigned int PARSER_string_substW( struct inf_file *file, const WCHAR *text,
WCHAR *buffer, unsigned int size );
extern const WCHAR *PARSER_get_src_root( HINF hinf );
/* 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 );
#endif /* __SETUPAPI_PRIVATE_H */
......@@ -59,8 +59,8 @@ owner setupapi
55 stub SURegLoadKey #(word str str)
56 stub SURegUnLoadKey #(word str)
60 stub DiskInfoFromLdid #(word ptr)
61 stub suErrorToIds #(word word)
62 stub TPWriteProfileString #(str str str)
61 pascal suErrorToIds(word word) suErrorToIds16
62 pascal16 TPWriteProfileString(str str str) TPWriteProfileString16
63 stub SURPLSETUP
# does SUSTORELDIDPATH set the path of an LDID in the registry ?
64 stub SUSTORELDIDPATH
......
/* -*- tab-width: 8; c-basic-offset: 8 -*- */
/*
* SetupAPI stubs
*
......@@ -27,25 +26,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(setupapi);
/***********************************************************************
* SetupCloseFileQueue (SETUPAPI.56)
*/
VOID WINAPI SetupCloseFileQueue(HSPFILEQ QueueHandle)
{
FIXME("not implemented (setupapi.dll) \n");
}
/***********************************************************************
* SetupCommitFileQueueA (SETUPAPI.59)
*/
BOOL WINAPI SetupCommitFileQueueA(HWND Owner, HSPFILEQ QueueHandle,
PSP_FILE_CALLBACK_A MsgHandler,
PVOID Context)
{
FIXME("not implemented (setupapi.dll) \n");
return FALSE;
}
/***********************************************************************
* SetupIterateCabinetA (SETUPAPI.205)
*/
BOOL WINAPI SetupIterateCabinetA(PCSTR CabinetFile, DWORD Reserved,
......@@ -67,171 +47,20 @@ BOOL WINAPI SetupIterateCabinetW(PWSTR CabinetFile, DWORD Reserved,
/***********************************************************************
* SetupGetLineTextA (SETUPAPI.177)
* TPWriteProfileString16 (SETUPX.62)
*/
BOOL WINAPI SetupGetLineTextA (PINFCONTEXT Context, HINF InfHandle,
PCSTR Section, PCSTR Key, LPSTR ReturnBuffer,
DWORD ReturnBufferSize, PDWORD RequiredSize)
BOOL WINAPI TPWriteProfileString16( LPCSTR section, LPCSTR entry, LPCSTR string )
{
FIXME("not implemented (setupapi.dll) \n");
return 0;
}
/***********************************************************************
* SetupGetStringFieldA (SETUPAPI.187)
*/
BOOL WINAPI SetupGetStringFieldA(PINFCONTEXT Context, DWORD FieldIndex,
LPSTR ReturnBuffer, DWORD ReturnBufferSize,
PDWORD RequiredSize)
{
FIXME("not implemented (setupapi.dll) \n");
return 0;
FIXME( "%s %s %s: stub\n", debugstr_a(section), debugstr_a(entry), debugstr_a(string) );
return TRUE;
}
/***********************************************************************
* SetupFindNextLine (SETUPAPI.159)
* suErrorToIds16 (SETUPX.61)
*/
BOOL WINAPI SetupFindNextLine (PINFCONTEXT ContextIn, PINFCONTEXT ContextOut)
DWORD WINAPI suErrorToIds16( WORD w1, WORD w2 )
{
FIXME("not implemented (setupapi.dll) \n");
return 0;
FIXME( "%x %x: stub\n", w1, w2 );
return 0;
}
/***********************************************************************
* SetupInitDefaultQueueCallback (SETUPAPI.191)
*/
PVOID WINAPI SetupInitDefaultQueueCallback(HWND OwnerWindow)
{
FIXME("not implemented (setupapi.dll) \n");
return 0;
}
/***********************************************************************
* SetupInitDefaultQueueCallbackEx (SETUPAPI.192)
*/
PVOID WINAPI SetupInitDefaultQueueCallbackEx(HWND OwnerWindow,
HWND AlternativeProgressWindow,
UINT ProgressMessage,
DWORD res1,
PVOID res2)
{
FIXME("not implemented (setupapi.dll) \n");
return 0;
}
/***********************************************************************
* SetupCloseInfFile (SETUPAPI.57)
*/
VOID WINAPI SetupCloseInfFile (HINF InfHandle)
{
FIXME("not implemented (setupapi.dll) \n");
}
/***********************************************************************
* SetupDefaultQueueCallbackA (SETUPAPI.68)
*/
UINT WINAPI SetupDefaultQueueCallbackA (PVOID Context, UINT Notification,
UINT Param1, UINT Param2)
{
FIXME("not implemented (setupapi.dll) \n");
return 0;
}
/***********************************************************************
* SetupFindFirstLineA (SETUPAPI.157)
*/
BOOL WINAPI SetupFindFirstLineA (HINF InfHandle, PCSTR Section, PCSTR Key,
PINFCONTEXT Context)
{
FIXME("not implemented (setupapi.dll) \n");
return 0;
}
/***********************************************************************
* SetupGetLineByIndexA (SETUPAPI.173)
*/
BOOL WINAPI SetupGetLineByIndexA (HINF InfHandle, PCSTR Section, DWORD Index,
PINFCONTEXT Context)
{
FIXME("not implemented (setupapi.dll) \n");
return FALSE;
}
/***********************************************************************
* SetupInstallFromInfSectionA (SETUPAPI.201)
*/
BOOL WINAPI SetupInstallFromInfSectionA (HWND Owner, HINF InfHandle, PCSTR SectionName,
UINT Flags, HKEY RelativeKeyRoot, PCSTR SourceRootPath,
UINT CopyFlags, PSP_FILE_CALLBACK_A MsgHandler,
PVOID Context, HDEVINFO DeviceInfoSet,
PSP_DEVINFO_DATA DeviceInfoData)
{
FIXME("not implemented (setupapi.dll) \n");
return 0;
}
/***********************************************************************
* SetupOpenAppendInfFileA (SETUPAPI.209)
*/
BOOL WINAPI SetupOpenAppendInfFileA (PCSTR FileName, HINF InfHandle,
PUINT ErrorLine)
{
FIXME("not implemented (setupapi.dll) \n");
return FALSE;
}
/***********************************************************************
* SetupOpenFileQueue (SETUPAPI.211)
*/
HSPFILEQ WINAPI SetupOpenFileQueue (VOID)
{
FIXME("not implemented (setupapi.dll) \n");
return (HSPFILEQ) INVALID_HANDLE_VALUE;
}
/***********************************************************************
* SetupOpenInfFileA (SETUPAPI.212)
*/
HINF WINAPI SetupOpenInfFileA (PCSTR FileName, PCSTR InfClass, DWORD InfStyle,
PUINT ErrorLine)
{
FIXME("not implemented (setupapi.dll) \n");
return 0;
}
/***********************************************************************
* SetupQueueCopyA (SETUPAPI.230)
*/
BOOL WINAPI SetupQueueCopyA (HSPFILEQ QueueHandle, PCSTR SourceRootPath, PCSTR SourcePath,
PCSTR SourceFileName, PCSTR SourceDescription, PCSTR SourceTagFile,
PCSTR TargetDirectory, PCSTR TargetFileName, DWORD CopyStyle)
{
FIXME("not implemented (setupapi.dll) \n");
return FALSE;
}
/***********************************************************************
* SetupSetDirectoryIdA (SETUPAPI.259)
*/
BOOL WINAPI SetupSetDirectoryIdA (HINF InfHandle,
DWORD Id,
PCSTR Directory)
{
FIXME("not implemented (setupapi.dll) \n");
return FALSE;
}
/***********************************************************************
* SetupTermDefaultQueueCallback (SETUPAPI.267)
*/
VOID WINAPI SetupTermDefaultQueueCallback (PVOID Callback)
{
FIXME("not implemented (setupapi.dll) \n");
}
......@@ -24,8 +24,9 @@
#include <string.h>
#include "winbase.h"
#include "winuser.h"
#include "setupx16.h"
#include "winreg.h"
#include "setupapi.h"
#include "setupx16.h"
#include "setupapi_private.h"
#include "wine/debug.h"
......@@ -660,12 +661,15 @@ RETERR16 VCP_UI_CopyStart(void)
if (!(VCP_UI_GetDialogTemplate(&template32)))
return VCPN_FAIL;
hDlgCopy = CreateDialogIndirectParamA(SETUPAPI_hInstance, template32, 0,
VCP_UI_FileCopyDlgProc, 0);
if (!hDlgCopy)
return VCPN_FAIL;
SetDlgItemTextA(hDlgCopy, SOURCESTRORD, "Scanning ...");
SetDlgItemTextA(hDlgCopy, DESTSTRORD, "NOT_IMPLEMENTED_YET");
if (vn_num > 10) /* hack */
{
hDlgCopy = CreateDialogIndirectParamA(SETUPAPI_hInstance, template32, 0,
VCP_UI_FileCopyDlgProc, 0);
if (!hDlgCopy)
return VCPN_FAIL;
SetDlgItemTextA(hDlgCopy, SOURCESTRORD, "Scanning ...");
SetDlgItemTextA(hDlgCopy, DESTSTRORD, "NOT_IMPLEMENTED_YET");
}
strcpy(buf, REG_INSTALLEDFILES);
if (RegCreateKeyA(HKEY_LOCAL_MACHINE, buf, &hKeyFiles))
return VCPN_FAIL;
......@@ -749,7 +753,7 @@ RETERR16 WINAPI vcpUICallbackProc16(LPVOID lpvObj, UINT16 uMsg, WPARAM wParam,
res = VCP_UI_CopyStart();
break;
case VCPM_VSTATCOPYEND:
DestroyWindow(hDlgCopy);
if (hDlgCopy) DestroyWindow(hDlgCopy);
break;
default:
FIXME("unhandled msg 0x%04x\n", uMsg);
......
......@@ -212,6 +212,13 @@
#define OPTIONAL
#endif
/* Error Masks */
#define APPLICATION_ERROR_MASK 0x20000000
#define ERROR_SEVERITY_SUCCESS 0x00000000
#define ERROR_SEVERITY_INFORMATIONAL 0x40000000
#define ERROR_SEVERITY_WARNING 0x80000000
#define ERROR_SEVERITY_ERROR 0xC0000000
/* Standard data types */
typedef const void *PCVOID, *LPCVOID;
typedef int BOOL, *PBOOL, *LPBOOL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment