2 * Implementation of the Microsoft Installer (msi.dll)
4 * Copyright 2002,2003,2004,2005 Mike McCormack for CodeWeavers
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 #define NONAMELESSUNION
31 #include "wine/debug.h"
38 #include "wine/unicode.h"
40 WINE_DEFAULT_DEBUG_CHANNEL(msi);
43 * The MSVC headers define the MSIDBOPEN_* macros cast to LPCTSTR,
44 * which is a problem because LPCTSTR isn't defined when compiling wine.
45 * To work around this problem, we need to define LPCTSTR as LPCWSTR here,
46 * and make sure to only use it in W functions.
48 #define LPCTSTR LPCWSTR
51 INSTALLUILEVEL gUILevel = INSTALLUILEVEL_BASIC;
53 INSTALLUI_HANDLERA gUIHandlerA = NULL;
54 INSTALLUI_HANDLERW gUIHandlerW = NULL;
56 LPVOID gUIContext = NULL;
57 WCHAR gszLogFile[MAX_PATH];
58 HINSTANCE msi_hInstance;
60 UINT WINAPI MsiOpenProductA(LPCSTR szProduct, MSIHANDLE *phProduct)
63 LPWSTR szwProd = NULL;
65 TRACE("%s %p\n",debugstr_a(szProduct), phProduct);
69 szwProd = strdupAtoW( szProduct );
71 return ERROR_OUTOFMEMORY;
74 r = MsiOpenProductW( szwProd, phProduct );
76 HeapFree( GetProcessHeap(), 0, szwProd );
81 UINT WINAPI MsiOpenProductW(LPCWSTR szProduct, MSIHANDLE *phProduct)
83 static const WCHAR szLocalPackage[] = {
84 'L','o','c','a','l','P','a','c','k','a','g','e', 0
88 HKEY hKeyProduct = NULL;
91 TRACE("%s %p\n",debugstr_w(szProduct), phProduct);
93 r = MSIREG_OpenUninstallKey(szProduct,&hKeyProduct,FALSE);
94 if( r != ERROR_SUCCESS )
96 r = ERROR_UNKNOWN_PRODUCT;
100 /* find the size of the path */
102 r = RegQueryValueExW( hKeyProduct, szLocalPackage,
103 NULL, &type, NULL, &count );
104 if( r != ERROR_SUCCESS )
106 r = ERROR_UNKNOWN_PRODUCT;
110 /* now alloc and fetch the path of the database to open */
111 path = HeapAlloc( GetProcessHeap(), 0, count );
115 r = RegQueryValueExW( hKeyProduct, szLocalPackage,
116 NULL, &type, (LPBYTE) path, &count );
117 if( r != ERROR_SUCCESS )
119 r = ERROR_UNKNOWN_PRODUCT;
123 r = MsiOpenPackageW( path, phProduct );
126 HeapFree( GetProcessHeap(), 0, path );
128 RegCloseKey( hKeyProduct );
133 UINT WINAPI MsiAdvertiseProductA(LPCSTR szPackagePath, LPCSTR szScriptfilePath,
134 LPCSTR szTransforms, LANGID lgidLanguage)
136 FIXME("%s %s %s %08x\n",debugstr_a(szPackagePath),
137 debugstr_a(szScriptfilePath), debugstr_a(szTransforms), lgidLanguage);
138 return ERROR_CALL_NOT_IMPLEMENTED;
141 UINT WINAPI MsiAdvertiseProductW(LPCWSTR szPackagePath, LPCWSTR szScriptfilePath,
142 LPCWSTR szTransforms, LANGID lgidLanguage)
144 FIXME("%s %s %s %08x\n",debugstr_w(szPackagePath),
145 debugstr_w(szScriptfilePath), debugstr_w(szTransforms), lgidLanguage);
146 return ERROR_CALL_NOT_IMPLEMENTED;
149 UINT WINAPI MsiAdvertiseProductExA(LPCSTR szPackagePath, LPCSTR szScriptfilePath,
150 LPCSTR szTransforms, LANGID lgidLanguage, DWORD dwPlatform, DWORD dwOptions)
152 FIXME("%s %s %s %08x %08lx %08lx\n", debugstr_a(szPackagePath),
153 debugstr_a(szScriptfilePath), debugstr_a(szTransforms),
154 lgidLanguage, dwPlatform, dwOptions);
155 return ERROR_CALL_NOT_IMPLEMENTED;
158 UINT WINAPI MsiAdvertiseProductExW( LPCWSTR szPackagePath, LPCWSTR szScriptfilePath,
159 LPCWSTR szTransforms, LANGID lgidLanguage, DWORD dwPlatform, DWORD dwOptions)
161 FIXME("%s %s %s %08x %08lx %08lx\n", debugstr_w(szPackagePath),
162 debugstr_w(szScriptfilePath), debugstr_w(szTransforms),
163 lgidLanguage, dwPlatform, dwOptions);
164 return ERROR_CALL_NOT_IMPLEMENTED;
167 UINT WINAPI MsiInstallProductA(LPCSTR szPackagePath, LPCSTR szCommandLine)
169 LPWSTR szwPath = NULL, szwCommand = NULL;
170 UINT r = ERROR_OUTOFMEMORY;
172 TRACE("%s %s\n",debugstr_a(szPackagePath), debugstr_a(szCommandLine));
176 szwPath = strdupAtoW( szPackagePath );
183 szwCommand = strdupAtoW( szCommandLine );
188 r = MsiInstallProductW( szwPath, szwCommand );
191 HeapFree( GetProcessHeap(), 0, szwPath );
192 HeapFree( GetProcessHeap(), 0, szwCommand );
197 UINT WINAPI MsiInstallProductW(LPCWSTR szPackagePath, LPCWSTR szCommandLine)
199 MSIPACKAGE *package = NULL;
203 FIXME("%s %s\n",debugstr_w(szPackagePath), debugstr_w(szCommandLine));
205 r = MsiVerifyPackageW(szPackagePath);
206 if (r != ERROR_SUCCESS)
209 r = MSI_OpenPackageW(szPackagePath,&package);
210 if (r != ERROR_SUCCESS)
213 handle = alloc_msihandle( &package->hdr );
215 r = ACTION_DoTopLevelINSTALL(package, szPackagePath, szCommandLine);
217 MsiCloseHandle(handle);
218 msiobj_release( &package->hdr );
222 UINT WINAPI MsiReinstallProductA(LPCSTR szProduct, DWORD dwReinstallMode)
224 FIXME("%s %08lx\n", debugstr_a(szProduct), dwReinstallMode);
225 return ERROR_CALL_NOT_IMPLEMENTED;
228 UINT WINAPI MsiReinstallProductW(LPCWSTR szProduct, DWORD dwReinstallMode)
230 FIXME("%s %08lx\n", debugstr_w(szProduct), dwReinstallMode);
231 return ERROR_CALL_NOT_IMPLEMENTED;
234 UINT WINAPI MsiApplyPatchA(LPCSTR szPatchPackage, LPCSTR szInstallPackage,
235 INSTALLTYPE eInstallType, LPCSTR szCommandLine)
237 FIXME("%s %s %d %s\n", debugstr_a(szPatchPackage), debugstr_a(szInstallPackage),
238 eInstallType, debugstr_a(szCommandLine));
239 return ERROR_CALL_NOT_IMPLEMENTED;
242 UINT WINAPI MsiApplyPatchW(LPCWSTR szPatchPackage, LPCWSTR szInstallPackage,
243 INSTALLTYPE eInstallType, LPCWSTR szCommandLine)
245 FIXME("%s %s %d %s\n", debugstr_w(szPatchPackage), debugstr_w(szInstallPackage),
246 eInstallType, debugstr_w(szCommandLine));
247 return ERROR_CALL_NOT_IMPLEMENTED;
250 UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
251 INSTALLSTATE eInstallState, LPCWSTR szCommandLine)
258 static const WCHAR szSouceList[] = {
259 'S','o','u','r','c','e','L','i','s','t',0};
260 static const WCHAR szLUS[] = {
261 'L','a','s','t','U','s','e','d','S','o','u','r','c','e',0};
262 WCHAR sourcepath[0x200];
263 static const WCHAR szInstalled[] = {
264 ' ','I','n','s','t','a','l','l','e','d','=','1',0};
267 FIXME("%s %d %d %s\n",debugstr_w(szProduct), iInstallLevel, eInstallState,
268 debugstr_w(szCommandLine));
270 if (eInstallState != INSTALLSTATE_LOCAL &&
271 eInstallState != INSTALLSTATE_DEFAULT)
273 FIXME("Not implemented for anything other than local installs\n");
274 return ERROR_CALL_NOT_IMPLEMENTED;
277 rc = MSIREG_OpenUserProductsKey(szProduct,&hkey,FALSE);
278 if (rc != ERROR_SUCCESS)
281 rc = RegOpenKeyW(hkey,szSouceList,&hkey1);
282 if (rc != ERROR_SUCCESS)
285 sz = sizeof(sourcepath);
286 rc = RegQueryValueExW(hkey1, szLUS, NULL, NULL,(LPBYTE)sourcepath, &sz);
287 if (rc != ERROR_SUCCESS)
292 * ok 1, we need to find the msi file for this product.
293 * 2, find the source dir for the files
294 * 3, do the configure/install.
295 * 4, cleanupany runonce entry.
298 rc = MsiOpenProductW(szProduct,&handle);
299 if (rc != ERROR_SUCCESS)
302 package = msihandle2msiinfo(handle, MSIHANDLETYPE_PACKAGE);
305 rc = ERROR_INVALID_HANDLE;
309 sz = lstrlenW(szInstalled);
312 sz += lstrlenW(szCommandLine);
314 commandline = HeapAlloc(GetProcessHeap(),0,sz * sizeof(WCHAR));
317 lstrcpyW(commandline,szCommandLine);
321 if (MsiQueryProductStateW(szProduct) != INSTALLSTATE_UNKNOWN)
322 lstrcatW(commandline,szInstalled);
324 rc = ACTION_DoTopLevelINSTALL(package, sourcepath, commandline);
326 msiobj_release( &package->hdr );
328 HeapFree(GetProcessHeap(),0,commandline);
335 UINT WINAPI MsiConfigureProductExA(LPCSTR szProduct, int iInstallLevel,
336 INSTALLSTATE eInstallState, LPCSTR szCommandLine)
338 LPWSTR szwProduct = NULL;
339 LPWSTR szwCommandLine = NULL;
340 UINT r = ERROR_OUTOFMEMORY;
344 szwProduct = strdupAtoW( szProduct );
351 szwCommandLine = strdupAtoW( szCommandLine );
356 r = MsiConfigureProductExW( szwProduct, iInstallLevel, eInstallState,
359 HeapFree( GetProcessHeap(), 0, szwProduct );
360 HeapFree( GetProcessHeap(), 0, szwCommandLine);
365 UINT WINAPI MsiConfigureProductA(LPCSTR szProduct, int iInstallLevel,
366 INSTALLSTATE eInstallState)
368 LPWSTR szwProduct = NULL;
371 TRACE("%s %d %d\n",debugstr_a(szProduct), iInstallLevel, eInstallState);
375 szwProduct = strdupAtoW( szProduct );
377 return ERROR_OUTOFMEMORY;
380 r = MsiConfigureProductW( szwProduct, iInstallLevel, eInstallState );
381 HeapFree( GetProcessHeap(), 0, szwProduct );
386 UINT WINAPI MsiConfigureProductW(LPCWSTR szProduct, int iInstallLevel,
387 INSTALLSTATE eInstallState)
389 FIXME("%s %d %d\n", debugstr_w(szProduct), iInstallLevel, eInstallState);
391 return MsiConfigureProductExW(szProduct, iInstallLevel, eInstallState, NULL);
394 UINT WINAPI MsiGetProductCodeA(LPCSTR szComponent, LPSTR szBuffer)
396 LPWSTR szwComponent = NULL;
398 WCHAR szwBuffer[GUID_SIZE];
400 TRACE("%s %s\n",debugstr_a(szComponent), debugstr_a(szBuffer));
404 szwComponent = strdupAtoW( szComponent );
406 return ERROR_OUTOFMEMORY;
409 r = MsiGetProductCodeW( szwComponent, szwBuffer );
411 if( ERROR_SUCCESS == r )
412 WideCharToMultiByte(CP_ACP, 0, szwBuffer, -1, szBuffer, GUID_SIZE, NULL, NULL);
414 HeapFree( GetProcessHeap(), 0, szwComponent );
419 UINT WINAPI MsiGetProductCodeW(LPCWSTR szComponent, LPWSTR szBuffer)
421 FIXME("%s %p\n",debugstr_w(szComponent), szBuffer);
423 if (NULL == szComponent)
424 return ERROR_INVALID_PARAMETER;
425 return ERROR_CALL_NOT_IMPLEMENTED;
428 UINT WINAPI MsiGetProductInfoA(LPCSTR szProduct, LPCSTR szAttribute,
429 LPSTR szBuffer, DWORD *pcchValueBuf)
431 LPWSTR szwProduct = NULL, szwAttribute = NULL, szwBuffer = NULL;
432 UINT r = ERROR_OUTOFMEMORY;
434 TRACE("%s %s %p %p\n", debugstr_a(szProduct), debugstr_a(szAttribute),
435 szBuffer, pcchValueBuf);
439 szwProduct = strdupAtoW( szProduct );
446 szwAttribute = strdupAtoW( szAttribute );
453 szwBuffer = HeapAlloc( GetProcessHeap(), 0, (*pcchValueBuf) * sizeof(WCHAR) );
458 r = MsiGetProductInfoW( szwProduct, szwAttribute, szwBuffer, pcchValueBuf );
460 if( ERROR_SUCCESS == r )
461 WideCharToMultiByte(CP_ACP, 0, szwBuffer, -1, szBuffer, *pcchValueBuf, NULL, NULL);
464 HeapFree( GetProcessHeap(), 0, szwProduct );
465 HeapFree( GetProcessHeap(), 0, szwAttribute );
466 HeapFree( GetProcessHeap(), 0, szwBuffer );
471 UINT WINAPI MsiGetProductInfoW(LPCWSTR szProduct, LPCWSTR szAttribute,
472 LPWSTR szBuffer, DWORD *pcchValueBuf)
476 static const WCHAR szPackageCode[] =
477 {'P','a','c','k','a','g','e','C','o','d','e',0};
478 static const WCHAR szVersionString[] =
479 {'V','e','r','s','i','o','n','S','t','r','i','n','g',0};
480 static const WCHAR szProductVersion[] =
481 {'P','r','o','d','u','c','t','V','e','r','s','i','o','n',0};
482 static const WCHAR szAssignmentType[] =
483 {'A','s','s','i','g','n','m','e','n','t','T','y','p','e',0};
485 FIXME("%s %s %p %p\n",debugstr_w(szProduct), debugstr_w(szAttribute),
486 szBuffer, pcchValueBuf);
488 if (NULL != szBuffer && NULL == pcchValueBuf)
489 return ERROR_INVALID_PARAMETER;
490 if (NULL == szProduct || NULL == szAttribute)
491 return ERROR_INVALID_PARAMETER;
493 /* check for special properties */
494 if (strcmpW(szAttribute, szPackageCode)==0)
497 WCHAR squished[GUID_SIZE];
499 DWORD sz = sizeof(squished);
501 r = MSIREG_OpenUserProductsKey(szProduct, &hkey, FALSE);
502 if (r != ERROR_SUCCESS)
503 return ERROR_UNKNOWN_PRODUCT;
505 r = RegQueryValueExW(hkey, szPackageCode, NULL, NULL,
506 (LPBYTE)squished, &sz);
507 if (r != ERROR_SUCCESS)
510 return ERROR_UNKNOWN_PRODUCT;
513 unsquash_guid(squished, package);
514 *pcchValueBuf = strlenW(package);
515 if (strlenW(package) > *pcchValueBuf)
518 return ERROR_MORE_DATA;
521 strcpyW(szBuffer, package);
526 else if (strcmpW(szAttribute, szVersionString)==0)
528 r = MsiOpenProductW(szProduct, &hProduct);
529 if (ERROR_SUCCESS != r)
532 r = MsiGetPropertyW(hProduct, szProductVersion, szBuffer, pcchValueBuf);
533 MsiCloseHandle(hProduct);
535 else if (strcmpW(szAttribute, szAssignmentType)==0)
537 FIXME("0 (zero) if advertised, 1(one) if per machine.\n");
544 r = MsiOpenProductW(szProduct, &hProduct);
545 if (ERROR_SUCCESS != r)
548 r = MsiGetPropertyW(hProduct, szAttribute, szBuffer, pcchValueBuf);
549 MsiCloseHandle(hProduct);
555 UINT WINAPI MsiEnableLogA(DWORD dwLogMode, LPCSTR szLogFile, DWORD attributes)
557 LPWSTR szwLogFile = NULL;
560 TRACE("%08lx %s %08lx\n", dwLogMode, debugstr_a(szLogFile), attributes);
564 szwLogFile = strdupAtoW( szLogFile );
566 return ERROR_OUTOFMEMORY;
568 r = MsiEnableLogW( dwLogMode, szwLogFile, attributes );
569 HeapFree( GetProcessHeap(), 0, szwLogFile );
573 UINT WINAPI MsiEnableLogW(DWORD dwLogMode, LPCWSTR szLogFile, DWORD attributes)
575 HANDLE file = INVALID_HANDLE_VALUE;
577 TRACE("%08lx %s %08lx\n", dwLogMode, debugstr_w(szLogFile), attributes);
579 lstrcpyW(gszLogFile,szLogFile);
580 if (!(attributes & INSTALLLOGATTRIBUTES_APPEND))
581 DeleteFileW(szLogFile);
582 file = CreateFileW(szLogFile, GENERIC_WRITE, 0, NULL, OPEN_ALWAYS,
583 FILE_ATTRIBUTE_NORMAL, NULL);
584 if (file != INVALID_HANDLE_VALUE)
587 ERR("Unable to enable log %s\n",debugstr_w(szLogFile));
589 return ERROR_SUCCESS;
592 INSTALLSTATE WINAPI MsiQueryProductStateA(LPCSTR szProduct)
594 LPWSTR szwProduct = NULL;
599 szwProduct = strdupAtoW( szProduct );
601 return ERROR_OUTOFMEMORY;
603 r = MsiQueryProductStateW( szwProduct );
604 HeapFree( GetProcessHeap(), 0, szwProduct );
608 INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct)
611 INSTALLSTATE rrc = INSTALLSTATE_UNKNOWN;
613 static const WCHAR szWindowsInstaller[] = {
614 'W','i','n','d','o','w','s','I','n','s','t','a','l','l','e','r',0 };
617 TRACE("%s\n", debugstr_w(szProduct));
619 rc = MSIREG_OpenUserProductsKey(szProduct,&hkey,FALSE);
620 if (rc != ERROR_SUCCESS)
625 rc = MSIREG_OpenUninstallKey(szProduct,&hkey,FALSE);
626 if (rc != ERROR_SUCCESS)
630 rc = RegQueryValueExW(hkey,szWindowsInstaller,NULL,NULL,(LPVOID)&rrc, &sz);
631 if (rc != ERROR_SUCCESS)
638 rrc = INSTALLSTATE_DEFAULT;
641 FIXME("Unknown install state read from registry (%i)\n",rrc);
642 rrc = INSTALLSTATE_UNKNOWN;
650 INSTALLUILEVEL WINAPI MsiSetInternalUI(INSTALLUILEVEL dwUILevel, HWND *phWnd)
652 INSTALLUILEVEL old = gUILevel;
653 HWND oldwnd = gUIhwnd;
655 TRACE("%08x %p\n", dwUILevel, phWnd);
657 gUILevel = dwUILevel;
666 INSTALLUI_HANDLERA WINAPI MsiSetExternalUIA(INSTALLUI_HANDLERA puiHandler,
667 DWORD dwMessageFilter, LPVOID pvContext)
669 INSTALLUI_HANDLERA prev = gUIHandlerA;
671 TRACE("%p %lx %p\n",puiHandler, dwMessageFilter,pvContext);
672 gUIHandlerA = puiHandler;
673 gUIFilter = dwMessageFilter;
674 gUIContext = pvContext;
679 INSTALLUI_HANDLERW WINAPI MsiSetExternalUIW(INSTALLUI_HANDLERW puiHandler,
680 DWORD dwMessageFilter, LPVOID pvContext)
682 INSTALLUI_HANDLERW prev = gUIHandlerW;
684 TRACE("%p %lx %p\n",puiHandler,dwMessageFilter,pvContext);
685 gUIHandlerW = puiHandler;
686 gUIFilter = dwMessageFilter;
687 gUIContext = pvContext;
692 /******************************************************************
693 * MsiLoadStringW [MSI.@]
695 * Loads a string from MSI's string resources.
699 * handle [I] only -1 is handled currently
700 * id [I] id of the string to be loaded
701 * lpBuffer [O] buffer for the string to be written to
702 * nBufferMax [I] maximum size of the buffer in characters
703 * lang [I] the preferred language for the string
707 * If successful, this function returns the language id of the string loaded
708 * If the function fails, the function returns zero.
712 * The type of the first parameter is unknown. LoadString's prototype
713 * suggests that it might be a module handle. I have made it an MSI handle
714 * for starters, as -1 is an invalid MSI handle, but not an invalid module
715 * handle. Maybe strings can be stored in an MSI database somehow.
717 LANGID WINAPI MsiLoadStringW( MSIHANDLE handle, UINT id, LPWSTR lpBuffer,
718 int nBufferMax, LANGID lang )
725 TRACE("%ld %u %p %d %d\n", handle, id, lpBuffer, nBufferMax, lang);
728 FIXME("don't know how to deal with handle = %08lx\n", handle);
731 lang = GetUserDefaultLangID();
733 hres = FindResourceExW( msi_hInstance, (LPCWSTR) RT_STRING,
737 hResData = LoadResource( msi_hInstance, hres );
740 p = LockResource( hResData );
744 for (i = 0; i < (id&0xf); i++)
748 if( nBufferMax <= len )
751 memcpy( lpBuffer, p+1, len * sizeof(WCHAR));
754 TRACE("found -> %s\n", debugstr_w(lpBuffer));
759 LANGID WINAPI MsiLoadStringA( MSIHANDLE handle, UINT id, LPSTR lpBuffer,
760 int nBufferMax, LANGID lang )
766 bufW = HeapAlloc(GetProcessHeap(), 0, nBufferMax*sizeof(WCHAR));
767 r = MsiLoadStringW(handle, id, bufW, nBufferMax, lang);
770 len = WideCharToMultiByte(CP_ACP, 0, bufW, -1, NULL, 0, NULL, NULL );
771 if( len <= nBufferMax )
772 WideCharToMultiByte( CP_ACP, 0, bufW, -1,
773 lpBuffer, nBufferMax, NULL, NULL );
777 HeapFree(GetProcessHeap(), 0, bufW);
781 INSTALLSTATE WINAPI MsiLocateComponentA(LPCSTR szComponent, LPSTR lpPathBuf,
784 FIXME("%s %p %08lx\n", debugstr_a(szComponent), lpPathBuf, *pcchBuf);
785 return INSTALLSTATE_UNKNOWN;
788 INSTALLSTATE WINAPI MsiLocateComponentW(LPCWSTR szComponent, LPSTR lpPathBuf,
791 FIXME("%s %p %08lx\n", debugstr_w(szComponent), lpPathBuf, *pcchBuf);
792 return INSTALLSTATE_UNKNOWN;
795 UINT WINAPI MsiMessageBoxA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType,
796 WORD wLanguageId, DWORD f)
798 FIXME("%p %s %s %u %08x %08lx\n",hWnd,debugstr_a(lpText),debugstr_a(lpCaption),
799 uType,wLanguageId,f);
800 return ERROR_CALL_NOT_IMPLEMENTED;
803 UINT WINAPI MsiMessageBoxW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType,
804 WORD wLanguageId, DWORD f)
806 FIXME("%p %s %s %u %08x %08lx\n",hWnd,debugstr_w(lpText),debugstr_w(lpCaption),
807 uType,wLanguageId,f);
808 return ERROR_CALL_NOT_IMPLEMENTED;
811 UINT WINAPI MsiProvideAssemblyA( LPCSTR szAssemblyName, LPCSTR szAppContext,
812 DWORD dwInstallMode, DWORD dwAssemblyInfo, LPSTR lpPathBuf,
815 FIXME("%s %s %08lx %08lx %p %p\n", debugstr_a(szAssemblyName),
816 debugstr_a(szAppContext), dwInstallMode, dwAssemblyInfo, lpPathBuf,
818 return ERROR_CALL_NOT_IMPLEMENTED;
821 UINT WINAPI MsiProvideAssemblyW( LPCWSTR szAssemblyName, LPCWSTR szAppContext,
822 DWORD dwInstallMode, DWORD dwAssemblyInfo, LPWSTR lpPathBuf,
825 FIXME("%s %s %08lx %08lx %p %p\n", debugstr_w(szAssemblyName),
826 debugstr_w(szAppContext), dwInstallMode, dwAssemblyInfo, lpPathBuf,
828 return ERROR_CALL_NOT_IMPLEMENTED;
831 UINT WINAPI MsiProvideComponentFromDescriptorA( LPCSTR szDescriptor,
832 LPSTR szPath, DWORD *pcchPath, DWORD *pcchArgs )
834 FIXME("%s %p %p %p\n", debugstr_a(szDescriptor), szPath, pcchPath, pcchArgs );
835 return ERROR_CALL_NOT_IMPLEMENTED;
838 UINT WINAPI MsiProvideComponentFromDescriptorW( LPCWSTR szDescriptor,
839 LPWSTR szPath, DWORD *pcchPath, DWORD *pcchArgs )
841 FIXME("%s %p %p %p\n", debugstr_w(szDescriptor), szPath, pcchPath, pcchArgs );
842 return ERROR_CALL_NOT_IMPLEMENTED;
845 HRESULT WINAPI MsiGetFileSignatureInformationA( LPCSTR szSignedObjectPath,
846 DWORD dwFlags, PCCERT_CONTEXT* ppcCertContext, BYTE* pbHashData,
849 FIXME("%s %08lx %p %p %p\n", debugstr_a(szSignedObjectPath), dwFlags,
850 ppcCertContext, pbHashData, pcbHashData);
851 return ERROR_CALL_NOT_IMPLEMENTED;
854 HRESULT WINAPI MsiGetFileSignatureInformationW( LPCWSTR szSignedObjectPath,
855 DWORD dwFlags, PCCERT_CONTEXT* ppcCertContext, BYTE* pbHashData,
858 FIXME("%s %08lx %p %p %p\n", debugstr_w(szSignedObjectPath), dwFlags,
859 ppcCertContext, pbHashData, pcbHashData);
860 return ERROR_CALL_NOT_IMPLEMENTED;
863 UINT WINAPI MsiGetProductPropertyA( MSIHANDLE hProduct, LPCSTR szProperty,
864 LPSTR szValue, DWORD *pccbValue )
866 FIXME("%ld %s %p %p\n", hProduct, debugstr_a(szProperty), szValue, pccbValue);
867 return ERROR_CALL_NOT_IMPLEMENTED;
870 UINT WINAPI MsiGetProductPropertyW( MSIHANDLE hProduct, LPCWSTR szProperty,
871 LPWSTR szValue, DWORD *pccbValue )
873 FIXME("%ld %s %p %p\n", hProduct, debugstr_w(szProperty), szValue, pccbValue);
874 return ERROR_CALL_NOT_IMPLEMENTED;
877 UINT WINAPI MsiVerifyPackageA( LPCSTR szPackage )
880 LPWSTR szPack = NULL;
882 TRACE("%s\n", debugstr_a(szPackage) );
886 szPack = strdupAtoW( szPackage );
888 return ERROR_OUTOFMEMORY;
891 r = MsiVerifyPackageW( szPack );
893 HeapFree( GetProcessHeap(), 0, szPack );
898 UINT WINAPI MsiVerifyPackageW( LPCWSTR szPackage )
903 TRACE("%s\n", debugstr_w(szPackage) );
905 r = MsiOpenDatabaseW( szPackage, MSIDBOPEN_READONLY, &handle );
906 MsiCloseHandle( handle );
911 INSTALLSTATE WINAPI MsiGetComponentPathA(LPCSTR szProduct, LPCSTR szComponent,
912 LPSTR lpPathBuf, DWORD* pcchBuf)
914 LPWSTR szwProduct = NULL, szwComponent = NULL, lpwPathBuf= NULL;
920 szwProduct = strdupAtoW( szProduct );
922 return ERROR_OUTOFMEMORY;
927 szwComponent = strdupAtoW( szComponent );
930 HeapFree( GetProcessHeap(), 0, szwProduct);
931 return ERROR_OUTOFMEMORY;
935 if( pcchBuf && *pcchBuf > 0 )
936 lpwPathBuf = HeapAlloc( GetProcessHeap(), 0, *pcchBuf * sizeof(WCHAR));
940 incoming_len = *pcchBuf;
941 rc = MsiGetComponentPathW(szwProduct, szwComponent, lpwPathBuf, pcchBuf);
943 HeapFree( GetProcessHeap(), 0, szwProduct);
944 HeapFree( GetProcessHeap(), 0, szwComponent);
947 if (rc != INSTALLSTATE_UNKNOWN)
948 WideCharToMultiByte(CP_ACP, 0, lpwPathBuf, incoming_len,
949 lpPathBuf, incoming_len, NULL, NULL);
950 HeapFree( GetProcessHeap(), 0, lpwPathBuf);
956 INSTALLSTATE WINAPI MsiGetComponentPathW(LPCWSTR szProduct, LPCWSTR szComponent,
957 LPWSTR lpPathBuf, DWORD* pcchBuf)
959 WCHAR squished_pc[GUID_SIZE];
961 INSTALLSTATE rrc = INSTALLSTATE_UNKNOWN;
966 TRACE("%s %s %p %p\n", debugstr_w(szProduct),
967 debugstr_w(szComponent), lpPathBuf, pcchBuf);
969 if( lpPathBuf && !pcchBuf )
970 return INSTALLSTATE_INVALIDARG;
972 squash_guid(szProduct,squished_pc);
974 rc = MSIREG_OpenProductsKey( szProduct, &hkey, FALSE);
975 if( rc != ERROR_SUCCESS )
980 rc = MSIREG_OpenComponentsKey( szComponent, &hkey, FALSE);
981 if( rc != ERROR_SUCCESS )
986 rc = RegQueryValueExW( hkey, squished_pc, NULL, &type, NULL, &sz );
987 if( rc != ERROR_SUCCESS )
993 path = HeapAlloc( GetProcessHeap(), 0, sz );
997 rc = RegQueryValueExW( hkey, squished_pc, NULL, NULL, (LPVOID) path, &sz );
998 if( rc != ERROR_SUCCESS )
1001 TRACE("found path of (%s:%s)(%s)\n", debugstr_w(szComponent),
1002 debugstr_w(szProduct), debugstr_w(path));
1006 FIXME("Registry entry.. check entry\n");
1007 rrc = INSTALLSTATE_LOCAL;
1011 /* PROBABLY a file */
1012 if ( GetFileAttributesW(path) != INVALID_FILE_ATTRIBUTES )
1013 rrc = INSTALLSTATE_LOCAL;
1015 rrc = INSTALLSTATE_ABSENT;
1020 sz = sz / sizeof(WCHAR);
1021 if( *pcchBuf >= sz )
1022 lstrcpyW( lpPathBuf, path );
1027 HeapFree(GetProcessHeap(), 0, path );
1032 /******************************************************************
1033 * MsiQueryFeatureStateA [MSI.@]
1035 INSTALLSTATE WINAPI MsiQueryFeatureStateA(LPCSTR szProduct, LPCSTR szFeature)
1038 LPWSTR szwProduct= NULL;
1039 LPWSTR szwFeature= NULL;
1043 szwProduct = strdupAtoW( szProduct );
1045 return ERROR_OUTOFMEMORY;
1050 szwFeature = strdupAtoW( szFeature );
1053 HeapFree( GetProcessHeap(), 0, szwProduct);
1054 return ERROR_OUTOFMEMORY;
1058 rc = MsiQueryFeatureStateW(szwProduct, szwFeature);
1060 HeapFree( GetProcessHeap(), 0, szwProduct);
1061 HeapFree( GetProcessHeap(), 0, szwFeature);
1066 /******************************************************************
1067 * MsiQueryFeatureStateW [MSI.@]
1069 * This does not verify that the Feature is functional. So i am only going to
1070 * check the existence of the key in the registry. This should tell me if it is
1073 INSTALLSTATE WINAPI MsiQueryFeatureStateW(LPCWSTR szProduct, LPCWSTR szFeature)
1079 TRACE("%s %s\n", debugstr_w(szProduct), debugstr_w(szFeature));
1081 rc = MSIREG_OpenFeaturesKey(szProduct, &hkey, FALSE);
1082 if (rc != ERROR_SUCCESS)
1083 return INSTALLSTATE_UNKNOWN;
1085 rc = RegQueryValueExW( hkey, szFeature, NULL, NULL, NULL, &sz);
1088 if (rc == ERROR_SUCCESS)
1089 return INSTALLSTATE_LOCAL;
1091 return INSTALLSTATE_ABSENT;
1094 /******************************************************************
1095 * MsiGetFileVersionA [MSI.@]
1097 UINT WINAPI MsiGetFileVersionA(LPCSTR szFilePath, LPSTR lpVersionBuf,
1098 DWORD* pcchVersionBuf, LPSTR lpLangBuf, DWORD* pcchLangBuf)
1100 LPWSTR szwFilePath = NULL, lpwVersionBuff = NULL, lpwLangBuff = NULL;
1101 UINT ret = ERROR_OUTOFMEMORY;
1105 szwFilePath = strdupAtoW( szFilePath );
1110 if( lpVersionBuf && pcchVersionBuf && *pcchVersionBuf )
1112 lpwVersionBuff = HeapAlloc(GetProcessHeap(), 0, *pcchVersionBuf*sizeof(WCHAR));
1113 if( !lpwVersionBuff )
1117 if( lpLangBuf && pcchLangBuf && *pcchLangBuf )
1119 lpwLangBuff = HeapAlloc(GetProcessHeap(), 0, *pcchVersionBuf*sizeof(WCHAR));
1124 ret = MsiGetFileVersionW(szwFilePath, lpwVersionBuff, pcchVersionBuf,
1125 lpwLangBuff, pcchLangBuf);
1127 if( lpwVersionBuff )
1128 WideCharToMultiByte(CP_ACP, 0, lpwVersionBuff, -1,
1129 lpVersionBuf, *pcchVersionBuf, NULL, NULL);
1131 WideCharToMultiByte(CP_ACP, 0, lpwLangBuff, -1,
1132 lpLangBuf, *pcchLangBuf, NULL, NULL);
1135 HeapFree(GetProcessHeap(), 0, szwFilePath);
1136 HeapFree(GetProcessHeap(), 0, lpwVersionBuff);
1137 HeapFree(GetProcessHeap(), 0, lpwLangBuff);
1142 /******************************************************************
1143 * MsiGetFileVersionW [MSI.@]
1145 UINT WINAPI MsiGetFileVersionW(LPCWSTR szFilePath, LPWSTR lpVersionBuf,
1146 DWORD* pcchVersionBuf, LPWSTR lpLangBuf, DWORD* pcchLangBuf)
1148 static const WCHAR szVersionResource[] = {'\\',0};
1149 static const WCHAR szVersionFormat[] = {
1150 '%','d','.','%','d','.','%','d','.','%','d',0};
1151 static const WCHAR szLangFormat[] = {'%','d',0};
1154 LPVOID lpVer = NULL;
1155 VS_FIXEDFILEINFO *ffi;
1159 TRACE("%s %p %ld %p %ld\n", debugstr_w(szFilePath),
1160 lpVersionBuf, pcchVersionBuf?*pcchVersionBuf:0,
1161 lpLangBuf, pcchLangBuf?*pcchLangBuf:0);
1163 dwVerLen = GetFileVersionInfoSizeW(szFilePath, NULL);
1165 return GetLastError();
1167 lpVer = HeapAlloc(GetProcessHeap(), 0, dwVerLen);
1170 ret = ERROR_OUTOFMEMORY;
1174 if( !GetFileVersionInfoW(szFilePath, 0, dwVerLen, lpVer) )
1176 ret = GetLastError();
1179 if( lpVersionBuf && pcchVersionBuf && *pcchVersionBuf )
1181 if( VerQueryValueW(lpVer, szVersionResource, (LPVOID*)&ffi, &puLen) &&
1184 wsprintfW(tmp, szVersionFormat,
1185 HIWORD(ffi->dwFileVersionMS), LOWORD(ffi->dwFileVersionMS),
1186 HIWORD(ffi->dwFileVersionLS), LOWORD(ffi->dwFileVersionLS));
1187 lstrcpynW(lpVersionBuf, tmp, *pcchVersionBuf);
1188 *pcchVersionBuf = lstrlenW(lpVersionBuf);
1193 *pcchVersionBuf = 0;
1197 if( lpLangBuf && pcchLangBuf && *pcchLangBuf )
1199 DWORD lang = GetUserDefaultLangID();
1201 FIXME("Retrieve language from file\n");
1202 wsprintfW(tmp, szLangFormat, lang);
1203 lstrcpynW(lpLangBuf, tmp, *pcchLangBuf);
1204 *pcchLangBuf = lstrlenW(lpLangBuf);
1208 HeapFree(GetProcessHeap(), 0, lpVer);
1213 /******************************************************************
1216 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
1220 case DLL_PROCESS_ATTACH:
1221 msi_hInstance = hinstDLL;
1222 DisableThreadLibraryCalls(hinstDLL);
1223 msi_dialog_register_class();
1225 case DLL_PROCESS_DETACH:
1226 msi_dialog_unregister_class();
1227 /* FIXME: Cleanup */
1233 typedef struct tagIClassFactoryImpl
1235 IClassFactoryVtbl *lpVtbl;
1236 } IClassFactoryImpl;
1238 static HRESULT WINAPI MsiCF_QueryInterface(LPCLASSFACTORY iface,
1239 REFIID riid,LPVOID *ppobj)
1241 IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
1242 FIXME("%p %s %p\n",This,debugstr_guid(riid),ppobj);
1243 return E_NOINTERFACE;
1246 static ULONG WINAPI MsiCF_AddRef(LPCLASSFACTORY iface)
1251 static ULONG WINAPI MsiCF_Release(LPCLASSFACTORY iface)
1256 static HRESULT WINAPI MsiCF_CreateInstance(LPCLASSFACTORY iface,
1257 LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
1259 IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
1261 FIXME("%p %p %s %p\n", This, pOuter, debugstr_guid(riid), ppobj);
1265 static HRESULT WINAPI MsiCF_LockServer(LPCLASSFACTORY iface, BOOL dolock)
1267 IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
1269 FIXME("%p %d\n", This, dolock);
1273 static IClassFactoryVtbl MsiCF_Vtbl =
1275 MsiCF_QueryInterface,
1278 MsiCF_CreateInstance,
1282 static IClassFactoryImpl Msi_CF = { &MsiCF_Vtbl };
1284 /******************************************************************
1285 * DllGetClassObject [MSI.@]
1287 HRESULT WINAPI MSI_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
1289 TRACE("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
1291 if( IsEqualCLSID (rclsid, &CLSID_IMsiServer) ||
1292 IsEqualCLSID (rclsid, &CLSID_IMsiServerMessage) ||
1293 IsEqualCLSID (rclsid, &CLSID_IMsiServerX1) ||
1294 IsEqualCLSID (rclsid, &CLSID_IMsiServerX2) ||
1295 IsEqualCLSID (rclsid, &CLSID_IMsiServerX3) )
1297 *ppv = (LPVOID) &Msi_CF;
1300 return CLASS_E_CLASSNOTAVAILABLE;
1303 /******************************************************************
1304 * DllGetVersion [MSI.@]
1306 HRESULT WINAPI MSI_DllGetVersion(DLLVERSIONINFO *pdvi)
1310 if (pdvi->cbSize != sizeof(DLLVERSIONINFO))
1311 return E_INVALIDARG;
1313 pdvi->dwMajorVersion = MSI_MAJORVERSION;
1314 pdvi->dwMinorVersion = MSI_MINORVERSION;
1315 pdvi->dwBuildNumber = MSI_BUILDNUMBER;
1316 pdvi->dwPlatformID = 1;
1321 /******************************************************************
1322 * DllCanUnloadNow [MSI.@]
1324 BOOL WINAPI MSI_DllCanUnloadNow(void)
1329 UINT WINAPI MsiGetFeatureUsageW(LPCWSTR szProduct, LPCWSTR szFeature,
1330 DWORD* pdwUseCount, WORD* pwDateUsed)
1332 FIXME("%s %s %p %p\n",debugstr_w(szProduct), debugstr_w(szFeature),
1333 pdwUseCount, pwDateUsed);
1334 return ERROR_CALL_NOT_IMPLEMENTED;
1337 UINT WINAPI MsiGetFeatureUsageA(LPCSTR szProduct, LPCSTR szFeature,
1338 DWORD* pdwUseCount, WORD* pwDateUsed)
1340 FIXME("%s %s %p %p\n", debugstr_a(szProduct), debugstr_a(szFeature),
1341 pdwUseCount, pwDateUsed);
1342 return ERROR_CALL_NOT_IMPLEMENTED;
1345 INSTALLSTATE WINAPI MsiUseFeatureExW(LPCWSTR szProduct, LPCWSTR szFeature,
1346 DWORD dwInstallMode, DWORD dwReserved)
1348 FIXME("%s %s %li %li\n", debugstr_w(szProduct), debugstr_w(szFeature),
1349 dwInstallMode, dwReserved);
1352 * Polls all the components of the feature to find install state and then
1354 * Software\\Microsoft\\Windows\\CurrentVersion\\
1355 * Installer\\Products\\<squishguid>\\<feature>
1356 * "Usage"=dword:........
1359 return INSTALLSTATE_LOCAL;
1362 /***********************************************************************
1363 * MsiUseFeatureExA [MSI.@]
1365 INSTALLSTATE WINAPI MsiUseFeatureExA(LPCSTR szProduct, LPCSTR szFeature,
1366 DWORD dwInstallMode, DWORD dwReserved)
1368 FIXME("%s %s %li %li\n", debugstr_a(szProduct), debugstr_a(szFeature),
1369 dwInstallMode, dwReserved);
1371 return INSTALLSTATE_LOCAL;
1374 INSTALLSTATE WINAPI MsiUseFeatureW(LPCWSTR szProduct, LPCWSTR szFeature)
1376 FIXME("%s %s\n", debugstr_w(szProduct), debugstr_w(szFeature));
1378 return INSTALLSTATE_LOCAL;
1381 INSTALLSTATE WINAPI MsiUseFeatureA(LPCSTR szProduct, LPCSTR szFeature)
1383 FIXME("%s %s\n", debugstr_a(szProduct), debugstr_a(szFeature));
1385 return INSTALLSTATE_LOCAL;
1388 UINT WINAPI MsiProvideQualifiedComponentExW(LPCWSTR szComponent,
1389 LPCWSTR szQualifier, DWORD dwInstallMode, LPWSTR szProduct,
1390 DWORD Unused1, DWORD Unused2, LPWSTR lpPathBuf,
1397 LPWSTR product = NULL;
1398 LPWSTR component = NULL;
1402 TRACE("%s %s %li %s %li %li %p %p\n", debugstr_w(szComponent),
1403 debugstr_w(szQualifier), dwInstallMode, debugstr_w(szProduct),
1404 Unused1, Unused2, lpPathBuf, pcchPathBuf);
1406 rc = MSIREG_OpenUserComponentsKey(szComponent, &hkey, FALSE);
1407 if (rc != ERROR_SUCCESS)
1408 return ERROR_INDEX_ABSENT;
1411 rc = RegQueryValueExW( hkey, szQualifier, NULL, NULL, NULL, &sz);
1415 return ERROR_INDEX_ABSENT;
1418 info = HeapAlloc(GetProcessHeap(),0,sz);
1419 rc = RegQueryValueExW( hkey, szQualifier, NULL, NULL, (LPBYTE)info, &sz);
1420 if (rc != ERROR_SUCCESS)
1423 HeapFree(GetProcessHeap(),0,info);
1424 return ERROR_INDEX_ABSENT;
1427 /* find the component */
1428 ptr = strchrW(&info[20],'>');
1434 HeapFree(GetProcessHeap(),0,info);
1435 return ERROR_INDEX_ABSENT;
1440 decode_base85_guid(info,&clsid);
1441 StringFromCLSID(&clsid, &product);
1443 decode_base85_guid(ptr,&clsid);
1444 StringFromCLSID(&clsid, &component);
1447 rc = MsiGetComponentPathW(product, component, lpPathBuf, pcchPathBuf);
1449 rc = MsiGetComponentPathW(szProduct, component, lpPathBuf, pcchPathBuf);
1452 HeapFree(GetProcessHeap(),0,info);
1453 HeapFree(GetProcessHeap(),0,product);
1454 HeapFree(GetProcessHeap(),0,component);
1456 if (rc == INSTALLSTATE_LOCAL)
1457 return ERROR_SUCCESS;
1459 return ERROR_FILE_NOT_FOUND;
1462 /***********************************************************************
1463 * MsiProvideQualifiedComponentW [MSI.@]
1465 UINT WINAPI MsiProvideQualifiedComponentW( LPCWSTR szComponent,
1466 LPCWSTR szQualifier, DWORD dwInstallMode, LPWSTR lpPathBuf,
1469 return MsiProvideQualifiedComponentExW(szComponent, szQualifier,
1470 dwInstallMode, NULL, 0, 0, lpPathBuf, pcchPathBuf);
1473 /***********************************************************************
1474 * MsiProvideQualifiedComponentA [MSI.@]
1476 UINT WINAPI MsiProvideQualifiedComponentA( LPCSTR szComponent,
1477 LPCSTR szQualifier, DWORD dwInstallMode, LPSTR lpPathBuf,
1480 LPWSTR szwComponent, szwQualifier, lpwPathBuf;
1484 TRACE("%s %s %li %p %p\n",szComponent, szQualifier,
1485 dwInstallMode, lpPathBuf, pcchPathBuf);
1487 szwComponent= strdupAtoW( szComponent);
1488 szwQualifier= strdupAtoW( szQualifier);
1490 lpwPathBuf = HeapAlloc(GetProcessHeap(),0,*pcchPathBuf * sizeof(WCHAR));
1492 pcchwPathBuf = *pcchPathBuf;
1494 rc = MsiProvideQualifiedComponentW(szwComponent, szwQualifier,
1495 dwInstallMode, lpwPathBuf, &pcchwPathBuf);
1497 HeapFree(GetProcessHeap(),0,szwComponent);
1498 HeapFree(GetProcessHeap(),0,szwQualifier);
1499 *pcchPathBuf = WideCharToMultiByte(CP_ACP, 0, lpwPathBuf, pcchwPathBuf,
1500 lpPathBuf, *pcchPathBuf, NULL, NULL);
1502 HeapFree(GetProcessHeap(),0,lpwPathBuf);
1506 USERINFOSTATE WINAPI MsiGetUserInfoW(LPCWSTR szProduct, LPWSTR lpUserNameBuf,
1507 DWORD* pcchUserNameBuf, LPWSTR lpOrgNameBuf,
1508 DWORD* pcchOrgNameBuf, LPWSTR lpSerialBuf, DWORD* pcchSerialBuf)
1510 FIXME("%s %p %p %p %p %p %p\n",debugstr_w(szProduct), lpUserNameBuf,
1511 pcchUserNameBuf, lpOrgNameBuf, pcchOrgNameBuf, lpSerialBuf,
1514 return USERINFOSTATE_UNKNOWN;
1517 USERINFOSTATE WINAPI MsiGetUserInfoA(LPCSTR szProduct, LPSTR lpUserNameBuf,
1518 DWORD* pcchUserNameBuf, LPSTR lpOrgNameBuf,
1519 DWORD* pcchOrgNameBuf, LPSTR lpSerialBuf, DWORD* pcchSerialBuf)
1521 FIXME("%s %p %p %p %p %p %p\n",debugstr_a(szProduct), lpUserNameBuf,
1522 pcchUserNameBuf, lpOrgNameBuf, pcchOrgNameBuf, lpSerialBuf,
1525 return USERINFOSTATE_UNKNOWN;
1528 UINT WINAPI MsiCollectUserInfoW(LPCWSTR szProduct)
1530 FIXME("%s\n",debugstr_w(szProduct));
1531 return ERROR_CALL_NOT_IMPLEMENTED;
1534 UINT WINAPI MsiCollectUserInfoA(LPCSTR szProduct)
1536 FIXME("%s\n",debugstr_a(szProduct));
1537 return ERROR_CALL_NOT_IMPLEMENTED;
1540 UINT WINAPI MsiCreateAndVerifyInstallerDirectory(DWORD dwReserved)
1542 FIXME("%ld\n", dwReserved);
1543 return ERROR_CALL_NOT_IMPLEMENTED;
1546 UINT WINAPI MsiGetShortcutTargetA( LPCSTR szShortcutTarget,
1547 LPSTR szProductCode, LPSTR szFeatureId,
1548 LPSTR szComponentCode )
1551 return ERROR_CALL_NOT_IMPLEMENTED;
1554 UINT WINAPI MsiGetShortcutTargetW( LPCWSTR szShortcutTarget,
1555 LPWSTR szProductCode, LPWSTR szFeatureId,
1556 LPWSTR szComponentCode )
1559 return ERROR_CALL_NOT_IMPLEMENTED;
1562 UINT WINAPI MsiReinstallFeatureW( LPCWSTR szProduct, LPCWSTR szFeature,
1563 DWORD dwReinstallMode )
1565 FIXME("%s %s %li\n", debugstr_w(szProduct), debugstr_w(szFeature),
1567 return ERROR_SUCCESS;
1570 UINT WINAPI MsiReinstallFeatureA( LPCSTR szProduct, LPCSTR szFeature,
1571 DWORD dwReinstallMode )
1573 FIXME("%s %s %li\n", debugstr_a(szProduct), debugstr_a(szFeature),
1575 return ERROR_SUCCESS;