ChangeSet ID: 21107 CVSROOT: /opt/cvs-commit Module name: wine Changes by: julliard@winehq.org 2005/11/04 05:15:18
Modified files: dlls/advapi32 : advapi32.spec advapi.c
Log message: Mike McCormack mike@codeweavers.com Implement advapi32.CommandLineFromMsiDescriptor. It's a wrapper for msi.MsiProvideComponentFromDescriptor.
Patch: http://cvs.winehq.org/patch.py?id=21107
Old revision New revision Changes Path 1.79 1.80 +1 -1 wine/dlls/advapi32/advapi32.spec 1.33 1.34 +19 -4 wine/dlls/advapi32/advapi.c
Index: wine/dlls/advapi32/advapi32.spec diff -u -p wine/dlls/advapi32/advapi32.spec:1.79 wine/dlls/advapi32/advapi32.spec:1.80 --- wine/dlls/advapi32/advapi32.spec:1.79 4 Nov 2005 11:15:18 -0000 +++ wine/dlls/advapi32/advapi32.spec 4 Nov 2005 11:15:18 -0000 @@ -62,7 +62,7 @@ @ stdcall CloseEventLog (long) @ stdcall CloseServiceHandle(long) # @ stub CloseTrace -@ stdcall CommandLineFromMsiDescriptor(wstr wstr ptr) +@ stdcall CommandLineFromMsiDescriptor(wstr ptr ptr) # @ stub ComputeAccessTokenFromCodeAuthzLevel @ stdcall ControlService(long long ptr) # @ stub ControlTraceA Index: wine/dlls/advapi32/advapi.c diff -u -p wine/dlls/advapi32/advapi.c:1.33 wine/dlls/advapi32/advapi.c:1.34 --- wine/dlls/advapi32/advapi.c:1.33 4 Nov 2005 11:15:18 -0000 +++ wine/dlls/advapi32/advapi.c 4 Nov 2005 11:15:18 -0000 @@ -266,9 +266,24 @@ BOOL WINAPI LogonUserW( LPCWSTR lpszUser return TRUE; }
-DWORD WINAPI CommandLineFromMsiDescriptor(WCHAR *Descriptor, WCHAR *CommandLine, - DWORD *CommandLineLength) +typedef UINT (WINAPI *fnMsiProvideComponentFromDescriptor)(LPCWSTR,LPWSTR,DWORD*,DWORD*); + +DWORD WINAPI CommandLineFromMsiDescriptor( WCHAR *szDescriptor, + WCHAR *szCommandLine, DWORD *pcchCommandLine ) { - FIXME("stub (%s)\n", debugstr_w(Descriptor)); - return ERROR_CALL_NOT_IMPLEMENTED; + static const WCHAR szMsi[] = { 'm','s','i',0 }; + fnMsiProvideComponentFromDescriptor mpcfd; + HMODULE hmsi; + UINT r = ERROR_CALL_NOT_IMPLEMENTED; + + TRACE("%s %p %p\n", debugstr_w(szDescriptor), szCommandLine, pcchCommandLine); + + hmsi = LoadLibraryW( szMsi ); + if (!hmsi) + return r; + mpcfd = (void*) GetProcAddress( hmsi, "MsiProvideComponentFromDescriptorW" ); + if (mpcfd) + r = mpcfd( szDescriptor, szCommandLine, pcchCommandLine, NULL ); + FreeLibrary( hmsi ); + return r; }