Add simple implementation of advpack.DoInfInstall.

This commit is contained in:
Dmitry Timoshkov 2004-11-01 21:07:53 +00:00 committed by Alexandre Julliard
parent 99a6afcd6c
commit 5656ca0d6c
2 changed files with 42 additions and 1 deletions

View File

@ -19,8 +19,12 @@
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "setupapi.h"
#include "advpub.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(advpack);
@ -51,3 +55,40 @@ void WINAPI LaunchINFSectionEx( HWND hWnd, HINSTANCE hInst, LPCSTR cmdline, INT
{
FIXME("%p %p %s %d\n", hWnd, hInst, debugstr_a(cmdline), show );
}
/* this structure very closely resembles parameters of RunSetupCommand() */
typedef struct
{
HWND hwnd;
LPCSTR title;
LPCSTR inf_name;
LPCSTR dir;
LPCSTR section_name;
} SETUPCOMMAND_PARAMS;
/***********************************************************************
* DoInfInstall (ADVPACK.@)
*/
BOOL WINAPI DoInfInstall(const SETUPCOMMAND_PARAMS *setup)
{
BOOL ret;
HINF hinf;
void *callback_context;
TRACE("%p %s %s %s %s\n", setup->hwnd, debugstr_a(setup->title),
debugstr_a(setup->inf_name), debugstr_a(setup->dir),
debugstr_a(setup->section_name));
hinf = SetupOpenInfFileA(setup->inf_name, NULL, INF_STYLE_WIN4, NULL);
if (hinf == INVALID_HANDLE_VALUE) return FALSE;
callback_context = SetupInitDefaultQueueCallback(setup->hwnd);
ret = SetupInstallFromInfSectionA(NULL, hinf, setup->section_name, SPINST_ALL,
NULL, NULL, 0, SetupDefaultQueueCallbackA,
callback_context, NULL, NULL);
SetupTermDefaultQueueCallback(callback_context);
SetupCloseInfFile(hinf);
return ret;
}

View File

@ -4,7 +4,7 @@
@ stub DelNode
@ stub DelNodeRunDLL32
@ stub DllMain
@ stub DoInfInstall
@ stdcall DoInfInstall(ptr)
@ stub ExecuteCab
@ stub ExtractFiles
@ stub FileSaveMarkNotExist