From 8a20c82e2db729e0b37522e75d743419e988c34a Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Wed, 22 Oct 2008 17:19:14 -0500 Subject: [PATCH] setupapi: add minimal implementation of ProfileItems --- dlls/setupapi/Makefile.in | 2 +- dlls/setupapi/install.c | 136 ++++++++++++++++++++++++++++++++++++++++- dlls/setupapi/tests/install.c | 4 +- 3 files changed, 138 insertions(+), 4 deletions(-) diff --git a/dlls/setupapi/Makefile.in b/dlls/setupapi/Makefile.in index 1f633a4..91bc87b 100644 --- a/dlls/setupapi/Makefile.in +++ b/dlls/setupapi/Makefile.in @@ -6,7 +6,7 @@ VPATH = @srcdir@ MODULE = setupapi.dll IMPORTLIB = setupapi IMPORTS = uuid user32 version advapi32 rpcrt4 kernel32 ntdll -DELAYIMPORTS = shell32 wintrust +DELAYIMPORTS = shell32 wintrust ole32 C_SRCS = \ devinst.c \ diff --git a/dlls/setupapi/install.c b/dlls/setupapi/install.c index 321d4d4..aa0c6cb 100644 --- a/dlls/setupapi/install.c +++ b/dlls/setupapi/install.c @@ -20,6 +20,8 @@ #include +#define COBJMACROS + #include "windef.h" #include "winbase.h" #include "winreg.h" @@ -29,6 +31,9 @@ #include "winuser.h" #include "winnls.h" #include "winsvc.h" +#include "shlobj.h" +#include "objidl.h" +#include "objbase.h" #include "setupapi.h" #include "setupapi_private.h" #include "wine/unicode.h" @@ -79,6 +84,8 @@ static const WCHAR UpdateIniFields[] = {'U','p','d','a','t','e','I','n','i','F', static const WCHAR RegisterDlls[] = {'R','e','g','i','s','t','e','r','D','l','l','s',0}; static const WCHAR UnregisterDlls[] = {'U','n','r','e','g','i','s','t','e','r','D','l','l','s',0}; static const WCHAR ProfileItems[] = {'P','r','o','f','i','l','e','I','t','e','m','s',0}; +static const WCHAR Name[] = {'N','a','m','e',0}; +static const WCHAR CmdLine[] = {'C','m','d','L','i','n','e',0}; static const WCHAR WineFakeDlls[] = {'W','i','n','e','F','a','k','e','D','l','l','s',0}; static const WCHAR DisplayName[] = {'D','i','s','p','l','a','y','N','a','m','e',0}; static const WCHAR Description[] = {'D','e','s','c','r','i','p','t','i','o','n',0}; @@ -773,9 +780,136 @@ static BOOL bitreg_callback( HINF hinf, PCWSTR field, void *arg ) return TRUE; } +static LPCWSTR pathsepW( LPCWSTR path ) +{ + static const WCHAR backslash[] = {'\\',0}; + + if (path && path[0] && path[strlenW(path)-1] != '\\') + return backslash; + else + return NULL; +} + +static LPWSTR join_stringsW(DWORD count, ...) +{ + size_t len=0; + va_list va; + int i; + LPWSTR result, end; + + va_start(va, count); + for (i=0; i