2 * Implementation of the Microsoft Installer (msi.dll)
4 * Copyright 2005 Aric Stewart 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 * Here are helper functions formally in action.c that are used by a variaty of
23 * actions and functions.
31 #include "wine/debug.h"
34 #include "wine/unicode.h"
37 WINE_DEFAULT_DEBUG_CHANNEL(msi);
39 static const WCHAR cszTargetDir[] = {'T','A','R','G','E','T','D','I','R',0};
40 static const WCHAR cszDatabase[]={'D','A','T','A','B','A','S','E',0};
42 const WCHAR cszSourceDir[] = {'S','o','u','r','c','e','D','i','r',0};
43 const WCHAR cszSOURCEDIR[] = {'S','O','U','R','C','E','D','I','R',0};
44 const WCHAR cszRootDrive[] = {'R','O','O','T','D','R','I','V','E',0};
45 const WCHAR cszbs[]={'\\',0};
47 LPWSTR build_icon_path(MSIPACKAGE *package, LPCWSTR icon_name )
49 LPWSTR SystemFolder, dest, FilePath;
51 static const WCHAR szInstaller[] =
52 {'M','i','c','r','o','s','o','f','t','\\',
53 'I','n','s','t','a','l','l','e','r','\\',0};
54 static const WCHAR szFolder[] =
55 {'A','p','p','D','a','t','a','F','o','l','d','e','r',0};
57 SystemFolder = msi_dup_property( package, szFolder );
59 dest = build_directory_name(3, SystemFolder, szInstaller, package->ProductCode);
61 create_full_pathW(dest);
63 FilePath = build_directory_name(2, dest, icon_name);
65 msi_free(SystemFolder);
70 LPWSTR msi_dup_record_field( MSIRECORD *row, INT index )
72 return strdupW( MSI_RecordGetString(row,index) );
75 MSICOMPONENT* get_loaded_component( MSIPACKAGE* package, LPCWSTR Component )
79 LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
81 if (lstrcmpW(Component,comp->Component)==0)
87 MSIFEATURE* get_loaded_feature(MSIPACKAGE* package, LPCWSTR Feature )
91 LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry )
93 if (lstrcmpW( Feature, feature->Feature )==0)
99 MSIFILE* get_loaded_file( MSIPACKAGE* package, LPCWSTR key )
103 LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry )
105 if (lstrcmpW( key, file->File )==0)
111 int track_tempfile( MSIPACKAGE *package, LPCWSTR path )
115 TRACE("%s\n", debugstr_w(path));
117 LIST_FOR_EACH_ENTRY( temp, &package->tempfiles, MSITEMPFILE, entry )
118 if (!lstrcmpW( path, temp->Path ))
121 temp = msi_alloc_zero( sizeof (MSITEMPFILE) );
125 list_add_head( &package->tempfiles, &temp->entry );
126 temp->Path = strdupW( path );
131 MSIFOLDER *get_loaded_folder( MSIPACKAGE *package, LPCWSTR dir )
135 LIST_FOR_EACH_ENTRY( folder, &package->folders, MSIFOLDER, entry )
137 if (lstrcmpW( dir, folder->Directory )==0)
143 static LPWSTR get_source_root( MSIPACKAGE *package )
147 path = msi_dup_property( package, cszSourceDir );
151 path = msi_dup_property( package, cszDatabase );
154 p = strrchrW(path,'\\');
162 * clean_spaces_from_path()
164 * removes spaces from the beginning and end of path segments
165 * removes multiple \\ characters
167 static void clean_spaces_from_path( LPWSTR p )
174 /* copy until the end of the string or a space */
175 while (*p != ' ' && (*q = *p))
178 /* reduce many backslashes to one */
179 if (*p != '\\' || *q != '\\')
183 /* quit at the end of the string */
187 /* count the number of spaces */
192 /* if it's leading or trailing space, skip it */
193 if ( len == 0 || p[-1] == '\\' || p[n] == '\\' )
195 else /* copy n spaces */
196 while (n && (*q++ = *p++)) n--;
200 LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source,
201 BOOL set_prop, MSIFOLDER **folder)
204 LPWSTR p, path = NULL;
206 TRACE("Working to resolve %s\n",debugstr_w(name));
211 f = get_loaded_folder( package, name );
215 /* special resolving for Target and Source root dir */
216 if (strcmpW(name,cszTargetDir)==0 || strcmpW(name,cszSourceDir)==0)
218 if (!f->ResolvedTarget && !f->Property)
221 check_path = msi_dup_property( package, cszTargetDir );
224 check_path = msi_dup_property( package, cszRootDrive );
226 MSI_SetPropertyW(package,cszTargetDir,check_path);
229 /* correct misbuilt target dir */
230 path = build_directory_name(2, check_path, NULL);
231 clean_spaces_from_path( path );
232 if (strcmpiW(path,check_path)!=0)
233 MSI_SetPropertyW(package,cszTargetDir,path);
234 msi_free(check_path);
236 f->ResolvedTarget = path;
239 if (!f->ResolvedSource)
240 f->ResolvedSource = get_source_root( package );
246 if (!source && f->ResolvedTarget)
248 path = strdupW( f->ResolvedTarget );
249 TRACE(" already resolved to %s\n",debugstr_w(path));
252 else if (source && f->ResolvedSource)
254 path = strdupW( f->ResolvedSource );
255 TRACE(" (source)already resolved to %s\n",debugstr_w(path));
258 else if (!source && f->Property)
260 path = build_directory_name( 2, f->Property, NULL );
262 TRACE(" internally set to %s\n",debugstr_w(path));
264 MSI_SetPropertyW( package, name, path );
270 LPWSTR parent = f->Parent->Directory;
272 TRACE(" ! Parent is %s\n", debugstr_w(parent));
274 p = resolve_folder(package, parent, source, set_prop, NULL);
277 TRACE(" TargetDefault = %s\n", debugstr_w(f->TargetDefault));
279 path = build_directory_name( 3, p, f->TargetDefault, NULL );
280 clean_spaces_from_path( path );
281 f->ResolvedTarget = strdupW( path );
282 TRACE("target -> %s\n", debugstr_w(path));
284 MSI_SetPropertyW(package,name,path);
288 /* source may be in a few different places ... check each of them */
291 /* try the long path directory */
292 if (f->SourceLongPath)
294 path = build_directory_name( 3, p, f->SourceLongPath, NULL );
295 if (INVALID_FILE_ATTRIBUTES == GetFileAttributesW( path ))
302 /* try the short path directory */
303 if (!path && f->SourceShortPath)
305 path = build_directory_name( 3, p, f->SourceShortPath, NULL );
306 if (INVALID_FILE_ATTRIBUTES == GetFileAttributesW( path ))
313 /* try the root of the install */
315 path = get_source_root( package );
317 TRACE("source -> %s\n", debugstr_w(path));
318 f->ResolvedSource = strdupW( path );
325 /* wrapper to resist a need for a full rewrite right now */
326 DWORD deformat_string(MSIPACKAGE *package, LPCWSTR ptr, WCHAR** data )
330 MSIRECORD *rec = MSI_CreateRecord(1);
333 MSI_RecordSetStringW(rec,0,ptr);
334 MSI_FormatRecordW(package,rec,NULL,&size);
338 *data = msi_alloc(size*sizeof(WCHAR));
340 MSI_FormatRecordW(package,rec,*data,&size);
343 msiobj_release( &rec->hdr );
344 return sizeof(WCHAR)*size;
346 msiobj_release( &rec->hdr );
353 UINT schedule_action(MSIPACKAGE *package, UINT script, LPCWSTR action)
356 LPWSTR *newbuf = NULL;
357 if (script >= TOTAL_SCRIPTS)
359 FIXME("Unknown script requested %i\n",script);
360 return ERROR_FUNCTION_FAILED;
362 TRACE("Scheduling Action %s in script %i\n",debugstr_w(action), script);
364 count = package->script->ActionCount[script];
365 package->script->ActionCount[script]++;
367 newbuf = msi_realloc( package->script->Actions[script],
368 package->script->ActionCount[script]* sizeof(LPWSTR));
370 newbuf = msi_alloc( sizeof(LPWSTR));
372 newbuf[count] = strdupW(action);
373 package->script->Actions[script] = newbuf;
375 return ERROR_SUCCESS;
378 void msi_free_action_script(MSIPACKAGE *package, UINT script)
381 for (i = 0; i < package->script->ActionCount[script]; i++)
382 msi_free(package->script->Actions[script][i]);
384 msi_free(package->script->Actions[script]);
385 package->script->Actions[script] = NULL;
386 package->script->ActionCount[script] = 0;
389 static void remove_tracked_tempfiles(MSIPACKAGE* package)
391 struct list *item, *cursor;
393 LIST_FOR_EACH_SAFE( item, cursor, &package->tempfiles )
395 MSITEMPFILE *temp = LIST_ENTRY( item, MSITEMPFILE, entry );
397 list_remove( &temp->entry );
398 TRACE("deleting temp file %s\n", debugstr_w( temp->Path ));
399 if (!DeleteFileW( temp->Path ))
400 ERR("failed to delete %s\n", debugstr_w( temp->Path ));
401 msi_free( temp->Path );
406 static void free_feature( MSIFEATURE *feature )
408 struct list *item, *cursor;
410 LIST_FOR_EACH_SAFE( item, cursor, &feature->Children )
412 FeatureList *fl = LIST_ENTRY( item, FeatureList, entry );
413 list_remove( &fl->entry );
417 LIST_FOR_EACH_SAFE( item, cursor, &feature->Components )
419 ComponentList *cl = LIST_ENTRY( item, ComponentList, entry );
420 list_remove( &cl->entry );
423 msi_free( feature->Feature );
424 msi_free( feature->Feature_Parent );
425 msi_free( feature->Directory );
426 msi_free( feature->Description );
427 msi_free( feature->Title );
431 static void free_extension( MSIEXTENSION *ext )
433 struct list *item, *cursor;
435 LIST_FOR_EACH_SAFE( item, cursor, &ext->verbs )
437 MSIVERB *verb = LIST_ENTRY( item, MSIVERB, entry );
439 list_remove( &verb->entry );
440 msi_free( verb->Verb );
441 msi_free( verb->Command );
442 msi_free( verb->Argument );
446 msi_free( ext->Extension );
447 msi_free( ext->ProgIDText );
451 /* Called when the package is being closed */
452 void ACTION_free_package_structures( MSIPACKAGE* package)
455 struct list *item, *cursor;
457 TRACE("Freeing package action data\n");
459 remove_tracked_tempfiles(package);
461 LIST_FOR_EACH_SAFE( item, cursor, &package->features )
463 MSIFEATURE *feature = LIST_ENTRY( item, MSIFEATURE, entry );
464 list_remove( &feature->entry );
465 free_feature( feature );
468 LIST_FOR_EACH_SAFE( item, cursor, &package->folders )
470 MSIFOLDER *folder = LIST_ENTRY( item, MSIFOLDER, entry );
472 list_remove( &folder->entry );
473 msi_free( folder->Directory );
474 msi_free( folder->TargetDefault );
475 msi_free( folder->SourceLongPath );
476 msi_free( folder->SourceShortPath );
477 msi_free( folder->ResolvedTarget );
478 msi_free( folder->ResolvedSource );
479 msi_free( folder->Property );
483 LIST_FOR_EACH_SAFE( item, cursor, &package->components )
485 MSICOMPONENT *comp = LIST_ENTRY( item, MSICOMPONENT, entry );
487 list_remove( &comp->entry );
488 msi_free( comp->Component );
489 msi_free( comp->ComponentId );
490 msi_free( comp->Directory );
491 msi_free( comp->Condition );
492 msi_free( comp->KeyPath );
493 msi_free( comp->FullKeypath );
497 LIST_FOR_EACH_SAFE( item, cursor, &package->files )
499 MSIFILE *file = LIST_ENTRY( item, MSIFILE, entry );
501 list_remove( &file->entry );
502 msi_free( file->File );
503 msi_free( file->FileName );
504 msi_free( file->ShortName );
505 msi_free( file->LongName );
506 msi_free( file->Version );
507 msi_free( file->Language );
508 msi_free( file->SourcePath );
509 msi_free( file->TargetPath );
513 /* clean up extension, progid, class and verb structures */
514 LIST_FOR_EACH_SAFE( item, cursor, &package->classes )
516 MSICLASS *cls = LIST_ENTRY( item, MSICLASS, entry );
518 list_remove( &cls->entry );
519 msi_free( cls->clsid );
520 msi_free( cls->Context );
521 msi_free( cls->Description );
522 msi_free( cls->FileTypeMask );
523 msi_free( cls->IconPath );
524 msi_free( cls->DefInprocHandler );
525 msi_free( cls->DefInprocHandler32 );
526 msi_free( cls->Argument );
527 msi_free( cls->ProgIDText );
531 LIST_FOR_EACH_SAFE( item, cursor, &package->extensions )
533 MSIEXTENSION *ext = LIST_ENTRY( item, MSIEXTENSION, entry );
535 list_remove( &ext->entry );
536 free_extension( ext );
539 LIST_FOR_EACH_SAFE( item, cursor, &package->progids )
541 MSIPROGID *progid = LIST_ENTRY( item, MSIPROGID, entry );
543 list_remove( &progid->entry );
544 msi_free( progid->ProgID );
545 msi_free( progid->Description );
546 msi_free( progid->IconPath );
550 LIST_FOR_EACH_SAFE( item, cursor, &package->mimes )
552 MSIMIME *mt = LIST_ENTRY( item, MSIMIME, entry );
554 list_remove( &mt->entry );
555 msi_free( mt->clsid );
556 msi_free( mt->ContentType );
560 LIST_FOR_EACH_SAFE( item, cursor, &package->appids )
562 MSIAPPID *appid = LIST_ENTRY( item, MSIAPPID, entry );
564 list_remove( &appid->entry );
565 msi_free( appid->AppID );
566 msi_free( appid->RemoteServerName );
567 msi_free( appid->LocalServer );
568 msi_free( appid->ServiceParameters );
569 msi_free( appid->DllSurrogate );
575 for (i = 0; i < TOTAL_SCRIPTS; i++)
576 msi_free_action_script(package, i);
578 for (i = 0; i < package->script->UniqueActionsCount; i++)
579 msi_free(package->script->UniqueActions[i]);
581 msi_free(package->script->UniqueActions);
582 msi_free(package->script);
585 msi_free(package->BaseURL);
586 msi_free(package->PackagePath);
587 msi_free(package->ProductCode);
588 msi_free(package->ActionFormat);
589 msi_free(package->LastAction);
591 /* cleanup control event subscriptions */
592 ControlEvent_CleanupSubscriptions(package);
596 * build_directory_name()
598 * This function is to save messing round with directory names
599 * It handles adding backslashes between path segments,
600 * and can add \ at the end of the directory name if told to.
602 * It takes a variable number of arguments.
603 * It always allocates a new string for the result, so make sure
604 * to free the return value when finished with it.
606 * The first arg is the number of path segments that follow.
607 * The arguments following count are a list of path segments.
608 * A path segment may be NULL.
610 * Path segments will be added with a \ separating them.
611 * A \ will not be added after the last segment, however if the
612 * last segment is NULL, then the last character will be a \
615 LPWSTR build_directory_name(DWORD count, ...)
622 for(i=0; i<count; i++)
624 LPCWSTR str = va_arg(va,LPCWSTR);
626 sz += strlenW(str) + 1;
630 dir = msi_alloc(sz*sizeof(WCHAR));
634 for(i=0; i<count; i++)
636 LPCWSTR str = va_arg(va,LPCWSTR);
640 if( ((i+1)!=count) && dir[strlenW(dir)-1]!='\\')
646 /***********************************************************************
649 * Recursively create all directories in the path.
651 * shamelessly stolen from setupapi/queue.c
653 BOOL create_full_pathW(const WCHAR *path)
659 new_path = msi_alloc( (strlenW(path) + 1) * sizeof(WCHAR));
661 strcpyW(new_path, path);
663 while((len = strlenW(new_path)) && new_path[len - 1] == '\\')
664 new_path[len - 1] = 0;
666 while(!CreateDirectoryW(new_path, NULL))
669 DWORD last_error = GetLastError();
670 if(last_error == ERROR_ALREADY_EXISTS)
673 if(last_error != ERROR_PATH_NOT_FOUND)
679 if(!(slash = strrchrW(new_path, '\\')))
685 len = slash - new_path;
687 if(!create_full_pathW(new_path))
692 new_path[len] = '\\';
699 void ui_progress(MSIPACKAGE *package, int a, int b, int c, int d )
703 row = MSI_CreateRecord(4);
704 MSI_RecordSetInteger(row,1,a);
705 MSI_RecordSetInteger(row,2,b);
706 MSI_RecordSetInteger(row,3,c);
707 MSI_RecordSetInteger(row,4,d);
708 MSI_ProcessMessage(package, INSTALLMESSAGE_PROGRESS, row);
709 msiobj_release(&row->hdr);
711 msi_dialog_check_messages(NULL);
714 void ui_actiondata(MSIPACKAGE *package, LPCWSTR action, MSIRECORD * record)
716 static const WCHAR Query_t[] =
717 {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
718 '`','A','c','t','i','o', 'n','T','e','x','t','`',' ',
719 'W','H','E','R','E',' ', '`','A','c','t','i','o','n','`',' ','=',
720 ' ','\'','%','s','\'',0};
725 if (!package->LastAction || strcmpW(package->LastAction,action))
727 row = MSI_QueryGetRecord(package->db, Query_t, action);
731 if (MSI_RecordIsNull(row,3))
733 msiobj_release(&row->hdr);
737 /* update the cached actionformat */
738 msi_free(package->ActionFormat);
739 package->ActionFormat = msi_dup_record_field(row,3);
741 msi_free(package->LastAction);
742 package->LastAction = strdupW(action);
744 msiobj_release(&row->hdr);
747 MSI_RecordSetStringW(record,0,package->ActionFormat);
749 MSI_FormatRecordW(package,record,message,&size);
751 row = MSI_CreateRecord(1);
752 MSI_RecordSetStringW(row,1,message);
754 MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, row);
756 msiobj_release(&row->hdr);
759 BOOL ACTION_VerifyComponentForAction( MSICOMPONENT* comp, INSTALLSTATE check )
764 if (comp->Installed == check)
767 if (comp->ActionRequest == check)
773 BOOL ACTION_VerifyFeatureForAction( MSIFEATURE* feature, INSTALLSTATE check )
778 if (feature->Installed == check)
781 if (feature->ActionRequest == check)
787 void reduce_to_longfilename(WCHAR* filename)
789 LPWSTR p = strchrW(filename,'|');
791 memmove(filename, p+1, (strlenW(p+1)+1)*sizeof(WCHAR));
794 void reduce_to_shortfilename(WCHAR* filename)
796 LPWSTR p = strchrW(filename,'|');
801 LPWSTR create_component_advertise_string(MSIPACKAGE* package,
802 MSICOMPONENT* component, LPCWSTR feature)
804 static const WCHAR fmt[] = {'%','s','%','s','%','c','%','s',0};
805 WCHAR productid_85[21], component_85[21];
806 LPWSTR output = NULL;
810 /* > is used if there is a component GUID and < if not. */
815 CLSIDFromString(package->ProductCode, &clsid);
816 encode_base85_guid(&clsid, productid_85);
820 CLSIDFromString(component->ComponentId, &clsid);
821 encode_base85_guid(&clsid, component_85);
824 TRACE("prod=%s feat=%s comp=%s\n", debugstr_w(productid_85),
825 debugstr_w(feature), debugstr_w(component_85));
827 sz = 20 + lstrlenW(feature) + 20 + 3;
829 output = msi_alloc_zero(sz*sizeof(WCHAR));
831 sprintfW(output, fmt, productid_85, feature,
832 component?'>':'<', component_85);
837 /* update compoennt state based on a feature change */
838 void ACTION_UpdateComponentStates(MSIPACKAGE *package, LPCWSTR szFeature)
840 INSTALLSTATE newstate;
844 feature = get_loaded_feature(package,szFeature);
848 newstate = feature->ActionRequest;
850 if (newstate == INSTALLSTATE_ABSENT)
851 newstate = INSTALLSTATE_UNKNOWN;
853 LIST_FOR_EACH_ENTRY( cl, &feature->Components, ComponentList, entry )
855 MSICOMPONENT* component = cl->component;
857 TRACE("MODIFYING(%i): Component %s (Installed %i, Action %i, Request %i)\n",
858 newstate, debugstr_w(component->Component), component->Installed,
859 component->Action, component->ActionRequest);
861 if (!component->Enabled)
864 if (newstate == INSTALLSTATE_LOCAL)
865 msi_component_set_state( component, INSTALLSTATE_LOCAL );
868 ComponentList *clist;
871 msi_component_set_state( component, newstate );
873 /*if any other feature wants is local we need to set it local*/
874 LIST_FOR_EACH_ENTRY( f, &package->features, MSIFEATURE, entry )
876 if ( f->ActionRequest != INSTALLSTATE_LOCAL &&
877 f->ActionRequest != INSTALLSTATE_SOURCE )
882 LIST_FOR_EACH_ENTRY( clist, &f->Components, ComponentList, entry )
884 if ( clist->component == component &&
885 (f->ActionRequest == INSTALLSTATE_LOCAL ||
886 f->ActionRequest == INSTALLSTATE_SOURCE) )
888 TRACE("Saved by %s\n", debugstr_w(f->Feature));
890 if (component->Attributes & msidbComponentAttributesOptional)
892 if (f->Attributes & msidbFeatureAttributesFavorSource)
893 msi_component_set_state( component, INSTALLSTATE_SOURCE );
895 msi_component_set_state( component, INSTALLSTATE_LOCAL );
897 else if (component->Attributes & msidbComponentAttributesSourceOnly)
898 msi_component_set_state( component, INSTALLSTATE_SOURCE );
900 msi_component_set_state( component, INSTALLSTATE_LOCAL );
905 TRACE("Result (%i): Component %s (Installed %i, Action %i, Request %i)\n",
906 newstate, debugstr_w(component->Component), component->Installed,
907 component->Action, component->ActionRequest);
911 UINT register_unique_action(MSIPACKAGE *package, LPCWSTR action)
914 LPWSTR *newbuf = NULL;
916 if (!package->script)
919 TRACE("Registering Action %s as having fun\n",debugstr_w(action));
921 count = package->script->UniqueActionsCount;
922 package->script->UniqueActionsCount++;
924 newbuf = msi_realloc( package->script->UniqueActions,
925 package->script->UniqueActionsCount* sizeof(LPWSTR));
927 newbuf = msi_alloc( sizeof(LPWSTR));
929 newbuf[count] = strdupW(action);
930 package->script->UniqueActions = newbuf;
932 return ERROR_SUCCESS;
935 BOOL check_unique_action(MSIPACKAGE *package, LPCWSTR action)
939 if (!package->script)
942 for (i = 0; i < package->script->UniqueActionsCount; i++)
943 if (!strcmpW(package->script->UniqueActions[i],action))
949 WCHAR* generate_error_string(MSIPACKAGE *package, UINT error, DWORD count, ... )
951 static const WCHAR query[] = {'S','E','L','E','C','T',' ','`','M','e','s','s','a','g','e','`',' ','F','R','O','M',' ','`','E','r','r','o','r','`',' ','W','H','E','R','E',' ','`','E','r','r','o','r','`',' ','=',' ','%','i',0};
961 row = MSI_QueryGetRecord(package->db, query, error);
965 rec = MSI_CreateRecord(count+2);
967 str = MSI_RecordGetString(row,1);
968 MSI_RecordSetStringW(rec,0,str);
969 msiobj_release( &row->hdr );
970 MSI_RecordSetInteger(rec,1,error);
973 for (i = 0; i < count; i++)
975 str = va_arg(va,LPCWSTR);
976 MSI_RecordSetStringW(rec,(i+2),str);
980 MSI_FormatRecordW(package,rec,NULL,&size);
984 data = msi_alloc(size*sizeof(WCHAR));
986 MSI_FormatRecordW(package,rec,data,&size);
989 msiobj_release( &rec->hdr );
993 msiobj_release( &rec->hdr );
998 void msi_ui_error( DWORD msg_id, DWORD type )
1002 static const WCHAR title[] = {
1003 'W','i','n','d','o','w','s',' ','I','n','s','t','a','l','l','e','r',0
1006 if (!MsiLoadStringW( -1, msg_id, text, sizeof(text) / sizeof(text[0]),
1007 MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL) ))
1010 MessageBoxW( NULL, text, title, type );