Module: wine Branch: master Commit: bd9c265cc26a4cf2c9141a99dadb2f9ccf4b6f8c URL: http://source.winehq.org/git/wine.git/?a=commit;h=bd9c265cc26a4cf2c9141a99da...
Author: Hans Leidekker hans@codeweavers.com Date: Mon Jan 26 11:03:50 2009 +0100
setupapi: Implement SetupInstallFileExA/W.
---
dlls/setupapi/queue.c | 42 +++++++++++++++++++++++++++++++----------- dlls/setupapi/setupapi.spec | 4 ++-- 2 files changed, 33 insertions(+), 13 deletions(-)
diff --git a/dlls/setupapi/queue.c b/dlls/setupapi/queue.c index da20e6c..64eacbe 100644 --- a/dlls/setupapi/queue.c +++ b/dlls/setupapi/queue.c @@ -1063,17 +1063,17 @@ static BOOL do_file_copyW( LPCWSTR source, LPCWSTR target, DWORD style, }
/*********************************************************************** - * SetupInstallFileA (SETUPAPI.@) + * SetupInstallFileExA (SETUPAPI.@) */ -BOOL WINAPI SetupInstallFileA( HINF hinf, PINFCONTEXT inf_context, PCSTR source, PCSTR root, - PCSTR dest, DWORD style, PSP_FILE_CALLBACK_A handler, PVOID context ) +BOOL WINAPI SetupInstallFileExA( HINF hinf, PINFCONTEXT inf_context, PCSTR source, PCSTR root, + PCSTR dest, DWORD style, PSP_FILE_CALLBACK_A handler, PVOID context, PBOOL in_use ) { BOOL ret = FALSE; struct callback_WtoA_context ctx; UNICODE_STRING sourceW, rootW, destW;
- TRACE("%p %p %s %s %s %x %p %p\n", hinf, inf_context, debugstr_a(source), debugstr_a(root), - debugstr_a(dest), style, handler, context); + TRACE("%p %p %s %s %s %x %p %p %p\n", hinf, inf_context, debugstr_a(source), debugstr_a(root), + debugstr_a(dest), style, handler, context, in_use);
sourceW.Buffer = rootW.Buffer = destW.Buffer = NULL; if (source && !RtlCreateUnicodeStringFromAsciiz( &sourceW, source )) @@ -1095,7 +1095,7 @@ BOOL WINAPI SetupInstallFileA( HINF hinf, PINFCONTEXT inf_context, PCSTR source, ctx.orig_context = context; ctx.orig_handler = handler;
- ret = SetupInstallFileW( hinf, inf_context, sourceW.Buffer, rootW.Buffer, destW.Buffer, style, QUEUE_callback_WtoA, &ctx ); + ret = SetupInstallFileExW( hinf, inf_context, sourceW.Buffer, rootW.Buffer, destW.Buffer, style, QUEUE_callback_WtoA, &ctx, in_use );
exit: RtlFreeUnicodeString( &sourceW ); @@ -1105,10 +1105,19 @@ exit: }
/*********************************************************************** - * SetupInstallFileW (SETUPAPI.@) + * SetupInstallFileA (SETUPAPI.@) */ -BOOL WINAPI SetupInstallFileW( HINF hinf, PINFCONTEXT inf_context, PCWSTR source, PCWSTR root, - PCWSTR dest, DWORD style, PSP_FILE_CALLBACK_W handler, PVOID context ) +BOOL WINAPI SetupInstallFileA( HINF hinf, PINFCONTEXT inf_context, PCSTR source, PCSTR root, + PCSTR dest, DWORD style, PSP_FILE_CALLBACK_A handler, PVOID context ) +{ + return SetupInstallFileExA( hinf, inf_context, source, root, dest, style, handler, context, NULL ); +} + +/*********************************************************************** + * SetupInstallFileExW (SETUPAPI.@) + */ +BOOL WINAPI SetupInstallFileExW( HINF hinf, PINFCONTEXT inf_context, PCWSTR source, PCWSTR root, + PCWSTR dest, DWORD style, PSP_FILE_CALLBACK_W handler, PVOID context, PBOOL in_use ) { static const WCHAR CopyFiles[] = {'C','o','p','y','F','i','l','e','s',0};
@@ -1116,8 +1125,10 @@ BOOL WINAPI SetupInstallFileW( HINF hinf, PINFCONTEXT inf_context, PCWSTR source WCHAR *buffer, *p, *inf_source = NULL; unsigned int len;
- TRACE("%p %p %s %s %s %x %p %p\n", hinf, inf_context, debugstr_w(source), debugstr_w(root), - debugstr_w(dest), style, handler, context); + TRACE("%p %p %s %s %s %x %p %p %p\n", hinf, inf_context, debugstr_w(source), debugstr_w(root), + debugstr_w(dest), style, handler, context, in_use); + + if (in_use) FIXME("no file in use support\n");
if (hinf) { @@ -1170,6 +1181,15 @@ BOOL WINAPI SetupInstallFileW( HINF hinf, PINFCONTEXT inf_context, PCWSTR source }
/*********************************************************************** + * SetupInstallFileW (SETUPAPI.@) + */ +BOOL WINAPI SetupInstallFileW( HINF hinf, PINFCONTEXT inf_context, PCWSTR source, PCWSTR root, + PCWSTR dest, DWORD style, PSP_FILE_CALLBACK_W handler, PVOID context ) +{ + return SetupInstallFileExW( hinf, inf_context, source, root, dest, style, handler, context, NULL ); +} + +/*********************************************************************** * SetupCommitFileQueueW (SETUPAPI.@) */ BOOL WINAPI SetupCommitFileQueueW( HWND owner, HSPFILEQ handle, PSP_FILE_CALLBACK_W handler, diff --git a/dlls/setupapi/setupapi.spec b/dlls/setupapi/setupapi.spec index 6c86043..724b143 100644 --- a/dlls/setupapi/setupapi.spec +++ b/dlls/setupapi/setupapi.spec @@ -437,8 +437,8 @@ @ stdcall SetupInitializeFileLogA (str long) @ stdcall SetupInitializeFileLogW (wstr long) @ stdcall SetupInstallFileA(ptr ptr str str str long ptr ptr) -@ stub SetupInstallFileExA -@ stub SetupInstallFileExW +@ stdcall SetupInstallFileExA(ptr ptr str str str long ptr ptr ptr) +@ stdcall SetupInstallFileExW(ptr ptr wstr wstr wstr long ptr ptr ptr) @ stdcall SetupInstallFileW(ptr ptr wstr wstr wstr long ptr ptr) @ stdcall SetupInstallFilesFromInfSectionA(long long long str str long) @ stdcall SetupInstallFilesFromInfSectionW(long long long wstr wstr long)