ReactOS 0.4.16-dev-340-g0540c21
icif.c File Reference
#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "rpcproxy.h"
#include "inseng.h"
#include "inseng_private.h"
#include "wine/list.h"
#include "wine/debug.h"
Include dependency graph for icif.c:

Go to the source code of this file.

Classes

struct  cifgroup
 
struct  ciffenum_components
 
struct  ciffenum_groups
 
struct  url_info
 
struct  dependency_info
 
struct  cifcomponent
 
struct  ciffile
 

Macros

#define COBJMACROS
 
#define DEFAULT_INSTALLER_DESC   "Active Setup Installation"
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (inseng)
 
static struct ciffileimpl_from_ICiffile (ICifFile *iface)
 
static struct cifcomponentimpl_from_ICifComponent (ICifComponent *iface)
 
static struct cifgroupimpl_from_ICifGroup (ICifGroup *iface)
 
static struct ciffenum_componentsimpl_from_IEnumCifComponents (IEnumCifComponents *iface)
 
static struct ciffenum_groupsimpl_from_IEnumCifGroups (IEnumCifGroups *iface)
 
static HRESULT enum_components_create (ICifFile *file, struct list *start, char *group_id, IEnumCifComponents **iface)
 
static HRESULT copy_substring_null (char *dest, int max_len, char *src)
 
static void url_entry_free (struct url_info *url)
 
static void dependency_entry_free (struct dependency_info *dependency)
 
static void component_free (struct cifcomponent *comp)
 
static void group_free (struct cifgroup *group)
 
static HRESULT WINAPI group_GetID (ICifGroup *iface, char *id, DWORD size)
 
static HRESULT WINAPI group_GetDescription (ICifGroup *iface, char *desc, DWORD size)
 
static DWORD WINAPI group_GetPriority (ICifGroup *iface)
 
static HRESULT WINAPI group_EnumComponents (ICifGroup *iface, IEnumCifComponents **enum_components, DWORD filter, LPVOID pv)
 
static DWORD WINAPI group_GetCurrentPriority (ICifGroup *iface)
 
void component_set_actual_download_size (ICifComponent *iface, DWORD size)
 
void component_set_downloaded (ICifComponent *iface, BOOL value)
 
void component_set_installed (ICifComponent *iface, BOOL value)
 
charcomponent_get_id (ICifComponent *iface)
 
static HRESULT WINAPI component_GetID (ICifComponent *iface, char *id, DWORD size)
 
static HRESULT WINAPI component_GetGUID (ICifComponent *iface, char *guid, DWORD size)
 
static HRESULT WINAPI component_GetDescription (ICifComponent *iface, char *desc, DWORD size)
 
static HRESULT WINAPI component_GetDetails (ICifComponent *iface, char *details, DWORD size)
 
static HRESULT WINAPI component_GetUrl (ICifComponent *iface, UINT index, char *url, DWORD size, DWORD *flags)
 
static HRESULT WINAPI component_GetFileExtractList (ICifComponent *iface, UINT index, char *list, DWORD size)
 
static HRESULT WINAPI component_GetUrlCheckRange (ICifComponent *iface, UINT index, DWORD *min, DWORD *max)
 
static HRESULT WINAPI component_GetCommand (ICifComponent *iface, UINT index, char *cmd, DWORD cmd_size, char *switches, DWORD switch_size, DWORD *type)
 
static HRESULT WINAPI component_GetVersion (ICifComponent *iface, DWORD *version, DWORD *build)
 
static HRESULT WINAPI component_GetLocale (ICifComponent *iface, char *locale, DWORD size)
 
static HRESULT WINAPI component_GetUninstallKey (ICifComponent *iface, char *key, DWORD size)
 
static HRESULT WINAPI component_GetInstalledSize (ICifComponent *iface, DWORD *win, DWORD *app)
 
static DWORD WINAPI component_GetDownloadSize (ICifComponent *iface)
 
static DWORD WINAPI component_GetExtractSize (ICifComponent *iface)
 
static HRESULT WINAPI component_GetSuccessKey (ICifComponent *iface, char *key, DWORD size)
 
static HRESULT WINAPI component_GetProgressKeys (ICifComponent *iface, char *progress, DWORD progress_size, char *cancel, DWORD cancel_size)
 
static HRESULT WINAPI component_IsActiveSetupAware (ICifComponent *iface)
 
static HRESULT WINAPI component_IsRebootRequired (ICifComponent *iface)
 
static HRESULT WINAPI component_RequiresAdminRights (ICifComponent *iface)
 
static DWORD WINAPI component_GetPriority (ICifComponent *iface)
 
static HRESULT WINAPI component_GetDependency (ICifComponent *iface, UINT index, char *id, DWORD id_size, char *type, DWORD *ver, DWORD *build)
 
static DWORD WINAPI component_GetPlatform (ICifComponent *iface)
 
static HRESULT WINAPI component_GetMode (ICifComponent *iface, UINT index, char *mode, DWORD size)
 
static HRESULT WINAPI component_GetGroup (ICifComponent *iface, char *id, DWORD size)
 
static HRESULT WINAPI component_IsUIVisible (ICifComponent *iface)
 
static HRESULT WINAPI component_GetPatchID (ICifComponent *iface, char *id, DWORD size)
 
static HRESULT WINAPI component_GetDetVersion (ICifComponent *iface, char *dll, DWORD dll_size, char *entry, DWORD entry_size)
 
static HRESULT WINAPI component_GetTreatAsOneComponents (ICifComponent *iface, UINT index, char *id, DWORD size)
 
static HRESULT WINAPI component_GetCustomData (ICifComponent *iface, char *key, char *data, DWORD size)
 
static DWORD WINAPI component_IsComponentInstalled (ICifComponent *iface)
 
static HRESULT WINAPI component_IsComponentDownloaded (ICifComponent *iface)
 
static DWORD WINAPI component_IsThisVersionInstalled (ICifComponent *iface, DWORD version, DWORD build, DWORD *ret_version, DWORD *ret_build)
 
static DWORD WINAPI component_GetInstallQueueState (ICifComponent *iface)
 
static HRESULT WINAPI component_SetInstallQueueState (ICifComponent *iface, DWORD state)
 
static DWORD WINAPI component_GetActualDownloadSize (ICifComponent *iface)
 
static DWORD WINAPI component_GetCurrentPriority (ICifComponent *iface)
 
static HRESULT WINAPI component_SetCurrentPriority (ICifComponent *iface, DWORD priority)
 
static HRESULT WINAPI enum_components_QueryInterface (IEnumCifComponents *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI enum_components_AddRef (IEnumCifComponents *iface)
 
static ULONG WINAPI enum_components_Release (IEnumCifComponents *iface)
 
static HRESULT WINAPI enum_components_Next (IEnumCifComponents *iface, ICifComponent **component)
 
static HRESULT WINAPI enum_components_Reset (IEnumCifComponents *iface)
 
static HRESULT WINAPI enum_groups_QueryInterface (IEnumCifGroups *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI enum_groups_AddRef (IEnumCifGroups *iface)
 
static ULONG WINAPI enum_groups_Release (IEnumCifGroups *iface)
 
static HRESULT WINAPI enum_groups_Next (IEnumCifGroups *iface, ICifGroup **group)
 
static HRESULT WINAPI enum_groups_Reset (IEnumCifGroups *iface)
 
static HRESULT enum_groups_create (ICifFile *file, struct list *start, IEnumCifGroups **iface)
 
static HRESULT WINAPI ciffile_QueryInterface (ICifFile *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI ciffile_AddRef (ICifFile *iface)
 
static ULONG WINAPI ciffile_Release (ICifFile *iface)
 
static HRESULT WINAPI ciffile_EnumComponents (ICifFile *iface, IEnumCifComponents **enum_components, DWORD filter, void *pv)
 
static HRESULT WINAPI ciffile_FindComponent (ICifFile *iface, const char *id, ICifComponent **component)
 
static HRESULT WINAPI ciffile_EnumGroups (ICifFile *iface, IEnumCifGroups **enum_groups, DWORD filter, void *pv)
 
static HRESULT WINAPI ciffile_FindGroup (ICifFile *iface, const char *id, ICifGroup **group)
 
static HRESULT WINAPI ciffile_EnumModes (ICifFile *iface, IEnumCifModes **cuf_modes, DWORD filter, void *pv)
 
static HRESULT WINAPI ciffile_FindMode (ICifFile *iface, const char *id, ICifMode **mode)
 
static HRESULT WINAPI ciffile_GetDescription (ICifFile *iface, char *desc, DWORD size)
 
static HRESULT WINAPI ciffile_GetDetDlls (ICifFile *iface, char *dlls, DWORD size)
 
static BOOL copy_string (char **dest, const char *source)
 
static BOOL section_get_str (struct inf_section *inf_sec, const char *key, char **value, const char *def)
 
static charnext_part (char **str, BOOL strip_quotes)
 
static BOOL value_get_str_field (struct inf_value *inf_val, int field, char **value, const char *def)
 
static BOOL section_get_dword (struct inf_section *inf_sec, const char *key, DWORD *value, DWORD def)
 
static BOOL value_get_dword_field (struct inf_value *inf_val, int field, DWORD *value, DWORD def)
 
static BOOL section_get_dword_field (struct inf_section *inf_sec, const char *key, int field, DWORD *value, DWORD def)
 
static HRESULT process_version (struct ciffile *file, struct inf_section *section)
 
static BOOL read_version_entry (struct inf_section *section, DWORD *ret_ver, DWORD *ret_build)
 
static BOOL read_platform_entry (struct inf_section *section, DWORD *ret_platform)
 
static BOOL read_dependencies (struct cifcomponent *component, struct inf_section *section)
 
static BOOL read_urls (struct cifcomponent *component, struct inf_section *section)
 
void add_component_by_priority (struct ciffile *file, struct cifcomponent *component)
 
static HRESULT process_component (struct ciffile *file, struct inf_section *section, const char *section_name)
 
static HRESULT process_group (struct ciffile *file, struct inf_section *section, const char *section_name)
 
static HRESULT process_section (struct ciffile *file, struct inf_section *section, const char *section_name)
 
static HRESULT process_inf (struct ciffile *file, struct inf_file *inf)
 
static HRESULT load_ciffile (const char *path, ICifFile **icif)
 
HRESULT WINAPI GetICifFileFromFile (ICifFile **icif, const char *path)
 
HRESULT WINAPI GetICifRWFileFromFile (ICifRWFile **icif, const char *path)
 

Variables

static const ICifGroupVtbl cifgroupVtbl
 
static const ICifComponentVtbl cifcomponentVtbl
 
static const IEnumCifComponentsVtbl enum_componentsVtbl
 
static const IEnumCifGroupsVtbl enum_groupsVtbl
 
static const ICifFileVtbl ciffileVtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 19 of file icif.c.

◆ DEFAULT_INSTALLER_DESC

#define DEFAULT_INSTALLER_DESC   "Active Setup Installation"

Definition at line 40 of file icif.c.

Function Documentation

◆ add_component_by_priority()

void add_component_by_priority ( struct ciffile file,
struct cifcomponent component 
)

Definition at line 1524 of file icif.c.

1525{
1526 struct cifcomponent *entry;
1527
1528 LIST_FOR_EACH_ENTRY(entry, &file->components, struct cifcomponent, entry)
1529 {
1530 if (entry->priority > component->priority)
1531 continue;
1532
1533 list_add_before(&entry->entry, &component->entry);
1534 return;
1535 }
1536
1537 list_add_tail(&file->components, &component->entry);
1538}
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
Definition: list.h:83
uint32_t entry
Definition: isohybrid.c:63
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
__WINE_SERVER_LIST_INLINE void list_add_before(struct list *elem, struct list *to_add)
Definition: list.h:87
struct list entry
Definition: icif.c:96
DWORD priority
Definition: icif.c:128
Definition: fci.c:127

Referenced by process_component().

◆ ciffile_AddRef()

static ULONG WINAPI ciffile_AddRef ( ICifFile iface)
static

Definition at line 1047 of file icif.c.

1048{
1049 struct ciffile *This = impl_from_ICiffile(iface);
1051
1052 TRACE("(%p) ref=%d\n", This, ref);
1053
1054 return ref;
1055}
#define InterlockedIncrement
Definition: armddk.h:53
static struct ciffile * impl_from_ICiffile(ICifFile *iface)
Definition: icif.c:158
long LONG
Definition: pedump.c:60
#define TRACE(s)
Definition: solgame.cpp:4
Definition: icif.c:148
LONG ref
Definition: icif.c:150
Definition: send.c:48

◆ ciffile_EnumComponents()

static HRESULT WINAPI ciffile_EnumComponents ( ICifFile iface,
IEnumCifComponents **  enum_components,
DWORD  filter,
void pv 
)
static

Definition at line 1089 of file icif.c.

1090{
1091 struct ciffile *This = impl_from_ICiffile(iface);
1092
1093 TRACE("(%p)->(%p, %u, %p)\n", This, enum_components, filter, pv);
1094
1095 if (filter)
1096 FIXME("filter (%x) not supported\n", filter);
1097 if (pv)
1098 FIXME("how to handle pv (%p)?\n", pv);
1099
1100 return enum_components_create(iface, &This->components, NULL, enum_components);
1101}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define NULL
Definition: types.h:112
static UINT enum_components(const WCHAR *usersid, DWORD ctx, DWORD index, DWORD *idx, WCHAR guid[39], MSIINSTALLCONTEXT *installed_ctx, LPWSTR sid, LPDWORD sid_len)
Definition: registry.c:1266
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7005
static HRESULT enum_components_create(ICifFile *file, struct list *start, char *group_id, IEnumCifComponents **iface)
Definition: icif.c:891

◆ ciffile_EnumGroups()

static HRESULT WINAPI ciffile_EnumGroups ( ICifFile iface,
IEnumCifGroups **  enum_groups,
DWORD  filter,
void pv 
)
static

Definition at line 1122 of file icif.c.

1123{
1124 struct ciffile *This = impl_from_ICiffile(iface);
1125
1126 TRACE("(%p)->(%p, %u, %p)\n", This, enum_groups, filter, pv);
1127
1128 if (filter)
1129 FIXME("filter (%x) not supported\n", filter);
1130 if (pv)
1131 FIXME("how to handle pv (%p)?\n", pv);
1132
1133 return enum_groups_create(iface, &This->groups, enum_groups);
1134}
static HRESULT enum_groups_create(ICifFile *file, struct list *start, IEnumCifGroups **iface)
Definition: icif.c:1003

◆ ciffile_EnumModes()

static HRESULT WINAPI ciffile_EnumModes ( ICifFile iface,
IEnumCifModes **  cuf_modes,
DWORD  filter,
void pv 
)
static

Definition at line 1155 of file icif.c.

1156{
1157 struct ciffile *This = impl_from_ICiffile(iface);
1158
1159 FIXME("(%p)->(%p, %u, %p): stub\n", This, cuf_modes, filter, pv);
1160
1161 return E_NOTIMPL;
1162}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ciffile_FindComponent()

static HRESULT WINAPI ciffile_FindComponent ( ICifFile iface,
const char id,
ICifComponent **  component 
)
static

Definition at line 1103 of file icif.c.

1104{
1105 struct ciffile *This = impl_from_ICiffile(iface);
1106 struct cifcomponent *comp;
1107
1108 TRACE("(%p)->(%s, %p)\n", This, debugstr_a(id), component);
1109
1110 LIST_FOR_EACH_ENTRY(comp, &This->components, struct cifcomponent, entry)
1111 {
1112 if (strcmp(comp->id, id) != 0)
1113 continue;
1114
1115 *component = &comp->ICifComponent_iface;
1116 return S_OK;
1117 }
1118
1119 return E_FAIL;
1120}
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
#define E_FAIL
Definition: ddrawi.h:102
#define S_OK
Definition: intsafe.h:52
#define debugstr_a
Definition: kernel32.h:31
char * id
Definition: icif.c:100
ICifComponent ICifComponent_iface
Definition: icif.c:94

◆ ciffile_FindGroup()

static HRESULT WINAPI ciffile_FindGroup ( ICifFile iface,
const char id,
ICifGroup **  group 
)
static

Definition at line 1136 of file icif.c.

1137{
1138 struct ciffile *This = impl_from_ICiffile(iface);
1139 struct cifgroup *gp;
1140
1141 TRACE("(%p)->(%s, %p)\n", This, debugstr_a(id), group);
1142
1143 LIST_FOR_EACH_ENTRY(gp, &This->groups, struct cifgroup, entry)
1144 {
1145 if (strcmp(gp->id, id) != 0)
1146 continue;
1147
1148 *group = &gp->ICifGroup_iface;
1149 return S_OK;
1150 }
1151
1152 return E_FAIL;
1153}
GLboolean GLuint group
Definition: glext.h:11120
Definition: icif.c:43
char * id
Definition: icif.c:50
ICifGroup ICifGroup_iface
Definition: icif.c:44

◆ ciffile_FindMode()

static HRESULT WINAPI ciffile_FindMode ( ICifFile iface,
const char id,
ICifMode **  mode 
)
static

Definition at line 1164 of file icif.c.

1165{
1166 struct ciffile *This = impl_from_ICiffile(iface);
1167
1168 FIXME("(%p)->(%s, %p): stub\n", This, debugstr_a(id), mode);
1169
1170 return E_NOTIMPL;
1171}
GLenum mode
Definition: glext.h:6217

◆ ciffile_GetDescription()

static HRESULT WINAPI ciffile_GetDescription ( ICifFile iface,
char desc,
DWORD  size 
)
static

Definition at line 1173 of file icif.c.

1174{
1175 struct ciffile *This = impl_from_ICiffile(iface);
1176
1177 TRACE("(%p)->(%p, %u)\n", This, desc, size);
1178
1179 return copy_substring_null(desc, size, This->name);
1180}
GLsizeiptr size
Definition: glext.h:5919
static HRESULT copy_substring_null(char *dest, int max_len, char *src)
Definition: icif.c:185
static const WCHAR desc[]
Definition: protectdata.c:36

◆ ciffile_GetDetDlls()

static HRESULT WINAPI ciffile_GetDetDlls ( ICifFile iface,
char dlls,
DWORD  size 
)
static

Definition at line 1182 of file icif.c.

1183{
1184 struct ciffile *This = impl_from_ICiffile(iface);
1185
1186 FIXME("(%p)->(%p, %u): stub\n", This, dlls, size);
1187
1188 return E_NOTIMPL;
1189}

◆ ciffile_QueryInterface()

static HRESULT WINAPI ciffile_QueryInterface ( ICifFile iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1022 of file icif.c.

1023{
1024 struct ciffile *This = impl_from_ICiffile(iface);
1025
1027 {
1028 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
1029 *ppv = &This->ICifFile_iface;
1030 }
1031 else if (IsEqualGUID(&IID_ICifFile, riid))
1032 {
1033 TRACE("(%p)->(IID_ICifFile %p)\n", This, ppv);
1034 *ppv = &This->ICifFile_iface;
1035 }
1036 else
1037 {
1038 FIXME("(%p)->(%s %p) not found\n", This, debugstr_guid(riid), ppv);
1039 *ppv = NULL;
1040 return E_NOINTERFACE;
1041 }
1042
1043 IUnknown_AddRef((IUnknown *)*ppv);
1044 return S_OK;
1045}
const GUID IID_IUnknown
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ ciffile_Release()

static ULONG WINAPI ciffile_Release ( ICifFile iface)
static

Definition at line 1057 of file icif.c.

1058{
1059 struct ciffile *This = impl_from_ICiffile(iface);
1061
1062 TRACE("(%p) ref=%d\n", This, ref);
1063
1064 if(!ref)
1065 {
1066 struct cifcomponent *comp, *comp_next;
1067 struct cifgroup *group, *group_next;
1068
1069 heap_free(This->name);
1070
1071 LIST_FOR_EACH_ENTRY_SAFE(comp, comp_next, &This->components, struct cifcomponent, entry)
1072 {
1073 list_remove(&comp->entry);
1074 component_free(comp);
1075 }
1076
1077 LIST_FOR_EACH_ENTRY_SAFE(group, group_next, &This->groups, struct cifgroup, entry)
1078 {
1079 list_remove(&group->entry);
1081 }
1082
1083 heap_free(This);
1084 }
1085
1086 return ref;
1087}
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define InterlockedDecrement
Definition: armddk.h:52
static void list_remove(struct list_entry *entry)
Definition: list.h:90
static void group_free(struct cifgroup *group)
Definition: icif.c:250
static void component_free(struct cifcomponent *comp)
Definition: icif.c:215
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204

◆ component_free()

static void component_free ( struct cifcomponent comp)
static

Definition at line 215 of file icif.c.

216{
217 struct dependency_info *dependency, *dependency_next;
218 struct url_info *url, *url_next;
219
220 heap_free(comp->id);
221 heap_free(comp->guid);
222 heap_free(comp->description);
223 heap_free(comp->details);
224 heap_free(comp->group);
225
226 heap_free(comp->patchid);
227
228 heap_free(comp->locale);
230
231 heap_free(comp->key_success);
232 heap_free(comp->key_progress);
233 heap_free(comp->key_cancel);
234
235 LIST_FOR_EACH_ENTRY_SAFE(dependency, dependency_next, &comp->dependencies, struct dependency_info, entry)
236 {
237 list_remove(&dependency->entry);
238 dependency_entry_free(dependency);
239 }
240
241 LIST_FOR_EACH_ENTRY_SAFE(url, url_next, &comp->urls, struct url_info, entry)
242 {
243 list_remove(&url->entry);
245 }
246
247 heap_free(comp);
248}
static void dependency_entry_free(struct dependency_info *dependency)
Definition: icif.c:209
static void url_entry_free(struct url_info *url)
Definition: icif.c:203
static const WCHAR url[]
Definition: encode.c:1432
char * key_cancel
Definition: icif.c:121
char * group
Definition: icif.c:104
char * key_progress
Definition: icif.c:120
char * locale
Definition: icif.c:111
char * description
Definition: icif.c:102
char * key_uninstall
Definition: icif.c:112
char * details
Definition: icif.c:103
char * patchid
Definition: icif.c:109
struct list urls
Definition: icif.c:132
char * guid
Definition: icif.c:101
char * key_success
Definition: icif.c:119
struct list dependencies
Definition: icif.c:131
struct list entry
Definition: icif.c:87
Definition: icif.c:78

Referenced by ciffile_Release(), and process_component().

◆ component_get_id()

char * component_get_id ( ICifComponent iface)

Definition at line 339 of file icif.c.

340{
342
343 return This->id;
344}
static struct cifcomponent * impl_from_ICifComponent(ICifComponent *iface)
Definition: icif.c:163

Referenced by InstallEngine_EnumDownloadIDs().

◆ component_GetActualDownloadSize()

static DWORD WINAPI component_GetActualDownloadSize ( ICifComponent iface)
static

Definition at line 717 of file icif.c.

718{
720
721 TRACE("(%p)\n", This);
722
723 return This->size_download;
724}

◆ component_GetCommand()

static HRESULT WINAPI component_GetCommand ( ICifComponent iface,
UINT  index,
char cmd,
DWORD  cmd_size,
char switches,
DWORD  switch_size,
DWORD type 
)
static

Definition at line 424 of file icif.c.

425{
427
428 FIXME("(%p)->(%u, %p, %u, %p, %u, %p): stub\n", This, index, cmd, cmd_size, switches, switch_size, type);
429
430 return E_NOTIMPL;
431}
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint index
Definition: glext.h:6031
Definition: ftp_var.h:139

◆ component_GetCurrentPriority()

static DWORD WINAPI component_GetCurrentPriority ( ICifComponent iface)
static

Definition at line 726 of file icif.c.

727{
729
730 TRACE("(%p)\n", This);
731
732 return This->current_priority;
733}

◆ component_GetCustomData()

static HRESULT WINAPI component_GetCustomData ( ICifComponent iface,
char key,
char data,
DWORD  size 
)
static

Definition at line 662 of file icif.c.

663{
665
666 FIXME("(%p)->(%s, %p, %u): stub\n", This, debugstr_a(key), data, size);
667
668 return E_NOTIMPL;
669}
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
Definition: copy.c:22

◆ component_GetDependency()

static HRESULT WINAPI component_GetDependency ( ICifComponent iface,
UINT  index,
char id,
DWORD  id_size,
char type,
DWORD ver,
DWORD build 
)
static

Definition at line 561 of file icif.c.

562{
564 struct dependency_info *entry;
565 ICifComponent *dependency;
566 int pos = 0;
567
568 TRACE("(%p)->(%u, %p, %u, %p, %p, %p)\n", This, index, id, id_size, type, ver, build);
569
570 if (!id || !ver || !build)
571 return E_FAIL;
572
573 LIST_FOR_EACH_ENTRY(entry, &This->dependencies, struct dependency_info, entry)
574 {
575 if (pos++ < index)
576 continue;
577
578 if (ICifFile_FindComponent(This->parent, entry->id, &dependency) == S_OK)
579 {
580 ICifComponent_GetVersion(dependency, ver, build);
581 }
582 else
583 {
584 *ver = -1;
585 *build = -1;
586 }
587
588 if (entry->type)
589 *type = *entry->type;
590 else
591 *type = 'I';
592
593 return copy_substring_null(id, id_size, entry->id);
594 }
595
596 return E_FAIL;
597}

◆ component_GetDescription()

static HRESULT WINAPI component_GetDescription ( ICifComponent iface,
char desc,
DWORD  size 
)
static

Definition at line 364 of file icif.c.

365{
367
368 TRACE("(%p)->(%p, %u)\n", This, desc, size);
369
370 return copy_substring_null(desc, size, This->description);
371}

◆ component_GetDetails()

static HRESULT WINAPI component_GetDetails ( ICifComponent iface,
char details,
DWORD  size 
)
static

Definition at line 373 of file icif.c.

374{
376
377 TRACE("(%p)->(%p, %u)\n", This, details, size);
378
379 return copy_substring_null(details, size, This->details);
380}
int details
Definition: msacm.c:1366

◆ component_GetDetVersion()

static HRESULT WINAPI component_GetDetVersion ( ICifComponent iface,
char dll,
DWORD  dll_size,
char entry,
DWORD  entry_size 
)
static

Definition at line 644 of file icif.c.

645{
647
648 FIXME("(%p)->(%p, %u, %p, %u): stub\n", This, dll, dll_size, entry, entry_size);
649
650 return E_NOTIMPL;
651}
static HMODULE dll
Definition: str.c:188

◆ component_GetDownloadSize()

static DWORD WINAPI component_GetDownloadSize ( ICifComponent iface)
static

Definition at line 481 of file icif.c.

482{
484
485 TRACE("(%p)\n", This);
486
487 return This->size_download;
488}

◆ component_GetExtractSize()

static DWORD WINAPI component_GetExtractSize ( ICifComponent iface)
static

Definition at line 490 of file icif.c.

491{
493
494 TRACE("(%p)\n", This);
495
496 return This->size_extracted;
497}

◆ component_GetFileExtractList()

static HRESULT WINAPI component_GetFileExtractList ( ICifComponent iface,
UINT  index,
char list,
DWORD  size 
)
static

Definition at line 406 of file icif.c.

407{
409
410 FIXME("(%p)->(%u, %p, %u): stub\n", This, index, list, size);
411
412 return E_NOTIMPL;
413}
Definition: list.h:37

◆ component_GetGroup()

static HRESULT WINAPI component_GetGroup ( ICifComponent iface,
char id,
DWORD  size 
)
static

Definition at line 617 of file icif.c.

618{
620
621 TRACE("(%p)->(%p, %u)\n", This, id, size);
622
623 return copy_substring_null(id, size, This->group);
624}

◆ component_GetGUID()

static HRESULT WINAPI component_GetGUID ( ICifComponent iface,
char guid,
DWORD  size 
)
static

Definition at line 355 of file icif.c.

356{
358
359 TRACE("(%p)->(%p, %u)\n", This, guid, size);
360
361 return copy_substring_null(guid, size, This->guid);
362}
const GUID * guid

◆ component_GetID()

static HRESULT WINAPI component_GetID ( ICifComponent iface,
char id,
DWORD  size 
)
static

Definition at line 346 of file icif.c.

347{
349
350 TRACE("(%p)->(%p, %u)\n", This, id, size);
351
352 return copy_substring_null(id, size, This->id);
353}

◆ component_GetInstalledSize()

static HRESULT WINAPI component_GetInstalledSize ( ICifComponent iface,
DWORD win,
DWORD app 
)
static

Definition at line 466 of file icif.c.

467{
469
470 TRACE("(%p)->(%p, %p)\n", This, win, app);
471
472 if (!win || !app)
473 return E_FAIL;
474
475 *win = This->size_win;
476 *app = This->size_app;
477
478 return S_OK;
479}
static real win[4][36]

◆ component_GetInstallQueueState()

static DWORD WINAPI component_GetInstallQueueState ( ICifComponent iface)
static

Definition at line 698 of file icif.c.

699{
701
702 TRACE("(%p)\n", This);
703
704 return This->queue_state;
705}

◆ component_GetLocale()

static HRESULT WINAPI component_GetLocale ( ICifComponent iface,
char locale,
DWORD  size 
)
static

Definition at line 448 of file icif.c.

449{
451
452 TRACE("(%p)->(%p, %u)\n", This, locale, size);
453
454 return copy_substring_null(locale, size, This->locale);
455}
Definition: _locale.h:75

◆ component_GetMode()

static HRESULT WINAPI component_GetMode ( ICifComponent iface,
UINT  index,
char mode,
DWORD  size 
)
static

Definition at line 608 of file icif.c.

609{
611
612 FIXME("(%p)->(%u, %p, %u): stub\n", This, index, mode, size);
613
614 return E_NOTIMPL;
615}

◆ component_GetPatchID()

static HRESULT WINAPI component_GetPatchID ( ICifComponent iface,
char id,
DWORD  size 
)
static

Definition at line 635 of file icif.c.

636{
638
639 TRACE("(%p)->(%p, %u)\n", This, id, size);
640
641 return copy_substring_null(id, size, This->patchid);
642}

◆ component_GetPlatform()

static DWORD WINAPI component_GetPlatform ( ICifComponent iface)
static

Definition at line 599 of file icif.c.

600{
602
603 TRACE("(%p)\n", This);
604
605 return This->platform;
606}

◆ component_GetPriority()

static DWORD WINAPI component_GetPriority ( ICifComponent iface)
static

Definition at line 552 of file icif.c.

553{
555
556 TRACE("(%p)\n", This);
557
558 return This->priority;
559}

◆ component_GetProgressKeys()

static HRESULT WINAPI component_GetProgressKeys ( ICifComponent iface,
char progress,
DWORD  progress_size,
char cancel,
DWORD  cancel_size 
)
static

Definition at line 508 of file icif.c.

510{
512 HRESULT hr;
513
514 TRACE("(%p)->(%p, %u, %p, %u): semi-stub\n", This, progress, progress_size, cancel, cancel_size);
515
516 hr = copy_substring_null(progress, progress_size, This->key_progress);
517 if (hr != S_OK) return hr;
518
519 if (cancel_size > 0 && cancel)
520 *cancel = 0;
521
522 return S_OK;
523}
cd_progress_ptr progress
Definition: cdjpeg.h:152
HRESULT hr
Definition: shlfolder.c:183

◆ component_GetSuccessKey()

static HRESULT WINAPI component_GetSuccessKey ( ICifComponent iface,
char key,
DWORD  size 
)
static

Definition at line 499 of file icif.c.

500{
502
503 TRACE("(%p)->(%p, %u)\n", This, key, size);
504
505 return copy_substring_null(key, size, This->key_success);
506}

◆ component_GetTreatAsOneComponents()

static HRESULT WINAPI component_GetTreatAsOneComponents ( ICifComponent iface,
UINT  index,
char id,
DWORD  size 
)
static

Definition at line 653 of file icif.c.

654{
656
657 FIXME("(%p)->(%u, %p, %u): stub\n", This, index, id, size);
658
659 return E_NOTIMPL;
660}

◆ component_GetUninstallKey()

static HRESULT WINAPI component_GetUninstallKey ( ICifComponent iface,
char key,
DWORD  size 
)
static

Definition at line 457 of file icif.c.

458{
460
461 TRACE("(%p)->(%p, %u)\n", This, key, size);
462
463 return copy_substring_null(key, size, This->key_uninstall);
464}

◆ component_GetUrl()

static HRESULT WINAPI component_GetUrl ( ICifComponent iface,
UINT  index,
char url,
DWORD  size,
DWORD flags 
)
static

Definition at line 382 of file icif.c.

383{
385 struct url_info *entry;
386
387 TRACE("(%p)->(%u, %p, %u, %p)\n", This, index, url, size, flags);
388
389 /* FIXME: check how functions behaves for url == NULL */
390
391 if (!flags)
392 return E_FAIL;
393
395 {
396 if (entry->index != index)
397 continue;
398
399 *flags = entry->flags;
400 return copy_substring_null(url, size, entry->url);
401 }
402
403 return E_FAIL;
404}
GLbitfield flags
Definition: glext.h:7161

◆ component_GetUrlCheckRange()

static HRESULT WINAPI component_GetUrlCheckRange ( ICifComponent iface,
UINT  index,
DWORD min,
DWORD max 
)
static

Definition at line 415 of file icif.c.

416{
418
419 FIXME("(%p)->(%u, %p, %p): stub\n", This, index, min, max);
420
421 return E_NOTIMPL;
422}
#define min(a, b)
Definition: monoChain.cc:55
#define max(a, b)
Definition: svc.c:63

◆ component_GetVersion()

static HRESULT WINAPI component_GetVersion ( ICifComponent iface,
DWORD version,
DWORD build 
)
static

Definition at line 433 of file icif.c.

434{
436
437 TRACE("(%p)->(%p, %p)\n", This, version, build);
438
439 if (!version || !build)
440 return E_FAIL;
441
442 *version = This->version;
443 *build = This->build;
444
445 return S_OK;
446}
static const WCHAR version[]
Definition: asmname.c:66
DWORD build
Definition: icif.c:108

◆ component_IsActiveSetupAware()

static HRESULT WINAPI component_IsActiveSetupAware ( ICifComponent iface)
static

Definition at line 525 of file icif.c.

526{
528
529 TRACE("(%p)\n", This);
530
531 return This->as_aware ? S_OK : S_FALSE;
532}
#define S_FALSE
Definition: winerror.h:2357

◆ component_IsComponentDownloaded()

static HRESULT WINAPI component_IsComponentDownloaded ( ICifComponent iface)
static

Definition at line 680 of file icif.c.

681{
683
684 TRACE("(%p)\n", This);
685
686 return This->downloaded ? S_OK : S_FALSE;
687}

◆ component_IsComponentInstalled()

static DWORD WINAPI component_IsComponentInstalled ( ICifComponent iface)
static

Definition at line 671 of file icif.c.

672{
674
675 TRACE("(%p)\n", This);
676
677 return This->installed;
678}

◆ component_IsRebootRequired()

static HRESULT WINAPI component_IsRebootRequired ( ICifComponent iface)
static

Definition at line 534 of file icif.c.

535{
537
538 TRACE("(%p)\n", This);
539
540 return This->reboot ? S_OK : S_FALSE;
541}

◆ component_IsThisVersionInstalled()

static DWORD WINAPI component_IsThisVersionInstalled ( ICifComponent iface,
DWORD  version,
DWORD  build,
DWORD ret_version,
DWORD ret_build 
)
static

Definition at line 689 of file icif.c.

690{
692
693 FIXME("(%p)->(%u, %u, %p, %p): stub\n", This, version, build, ret_version, ret_build);
694
695 return 0;
696}

◆ component_IsUIVisible()

static HRESULT WINAPI component_IsUIVisible ( ICifComponent iface)
static

Definition at line 626 of file icif.c.

627{
629
630 TRACE("(%p)\n", This);
631
632 return This->visibleui ? S_OK : S_FALSE;
633}

◆ component_RequiresAdminRights()

static HRESULT WINAPI component_RequiresAdminRights ( ICifComponent iface)
static

Definition at line 543 of file icif.c.

544{
546
547 TRACE("(%p)\n", This);
548
549 return This->admin ? S_OK : S_FALSE;
550}

◆ component_set_actual_download_size()

void component_set_actual_download_size ( ICifComponent iface,
DWORD  size 
)

Definition at line 318 of file icif.c.

319{
321
322 This->size_actual_download = size;
323}

◆ component_set_downloaded()

void component_set_downloaded ( ICifComponent iface,
BOOL  value 
)

Definition at line 325 of file icif.c.

326{
328
329 This->downloaded = value;
330}
Definition: pdh_main.c:94

Referenced by process_component().

◆ component_set_installed()

void component_set_installed ( ICifComponent iface,
BOOL  value 
)

Definition at line 332 of file icif.c.

333{
335
336 This->installed = value;
337}

◆ component_SetCurrentPriority()

static HRESULT WINAPI component_SetCurrentPriority ( ICifComponent iface,
DWORD  priority 
)
static

Definition at line 736 of file icif.c.

737{
739
740 TRACE("(%p)->(%u)\n", This, priority);
741
742 This->current_priority = priority;
743 return S_OK;
744}
static int priority
Definition: timer.c:163

◆ component_SetInstallQueueState()

static HRESULT WINAPI component_SetInstallQueueState ( ICifComponent iface,
DWORD  state 
)
static

Definition at line 707 of file icif.c.

708{
710
711 TRACE("(%p)->(%u)\n", This, state);
712
713 This->queue_state = state;
714 return S_OK;
715}
static int state
Definition: maze.c:121

◆ copy_string()

static BOOL copy_string ( char **  dest,
const char source 
)
static

Definition at line 1206 of file icif.c.

1207{
1208 if (!source)
1209 {
1210 *dest = NULL;
1211 return TRUE;
1212 }
1213
1214 *dest = strdupA(source);
1215 if (!dest) return FALSE;
1216 return TRUE;
1217}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static LPSTR strdupA(LPCSTR str)
Definition: mimeole.c:482
static char * dest
Definition: rtl.c:135

Referenced by section_get_str(), and value_get_str_field().

◆ copy_substring_null()

static HRESULT copy_substring_null ( char dest,
int  max_len,
char src 
)
static

Definition at line 185 of file icif.c.

186{
187 if (!src)
188 return E_FAIL;
189
190 if (max_len <= 0)
191 return S_OK;
192
193 if (!dest)
194 return E_FAIL;
195
196 while (*src && max_len-- > 1)
197 *dest++ = *src++;
198 *dest = 0;
199
200 return S_OK;
201}
GLenum src
Definition: glext.h:6340

Referenced by ciffile_GetDescription(), component_GetDependency(), component_GetDescription(), component_GetDetails(), component_GetGroup(), component_GetGUID(), component_GetID(), component_GetLocale(), component_GetPatchID(), component_GetProgressKeys(), component_GetSuccessKey(), component_GetUninstallKey(), component_GetUrl(), group_GetDescription(), and group_GetID().

◆ dependency_entry_free()

static void dependency_entry_free ( struct dependency_info dependency)
static

Definition at line 209 of file icif.c.

210{
211 heap_free(dependency->id);
212 heap_free(dependency);
213}
char * id
Definition: icif.c:88

Referenced by component_free().

◆ enum_components_AddRef()

static ULONG WINAPI enum_components_AddRef ( IEnumCifComponents iface)
static

Definition at line 814 of file icif.c.

815{
818
819 TRACE("(%p) ref=%d\n", This, ref);
820
821 return ref;
822}
static struct ciffenum_components * impl_from_IEnumCifComponents(IEnumCifComponents *iface)
Definition: icif.c:173

◆ enum_components_create()

static HRESULT enum_components_create ( ICifFile file,
struct list start,
char group_id,
IEnumCifComponents **  iface 
)
static

Definition at line 891 of file icif.c.

892{
893 struct ciffenum_components *enumerator;
894
895 enumerator = heap_alloc_zero(sizeof(*enumerator));
896 if (!enumerator) return E_OUTOFMEMORY;
897
898 enumerator->IEnumCifComponents_iface.lpVtbl = &enum_componentsVtbl;
899 enumerator->ref = 1;
900 enumerator->file = file;
901 enumerator->start = start;
902 enumerator->position = start;
903 enumerator->group_id = group_id;
904
905 ICifFile_AddRef(file);
906
907 *iface = &enumerator->IEnumCifComponents_iface;
908 return S_OK;
909}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
GLuint start
Definition: gl.h:1545
static const IEnumCifComponentsVtbl enum_componentsVtbl
Definition: icif.c:882
IEnumCifComponents IEnumCifComponents_iface
Definition: icif.c:57
char * group_id
Definition: icif.c:64
struct list * start
Definition: icif.c:61
ICifFile * file
Definition: icif.c:60
struct list * position
Definition: icif.c:62

Referenced by ciffile_EnumComponents(), and group_EnumComponents().

◆ enum_components_Next()

static HRESULT WINAPI enum_components_Next ( IEnumCifComponents iface,
ICifComponent **  component 
)
static

Definition at line 840 of file icif.c.

841{
843 struct cifcomponent *comp;
844
845 TRACE("(%p)->(%p)\n", This, component);
846
847 if (!component)
848 return E_FAIL;
849
850 if (!This->position)
851 {
852 *component = NULL;
853 return E_FAIL;
854 }
855
856 do
857 {
858 This->position = list_next(This->start, This->position);
859 if (!This->position)
860 {
861 *component = NULL;
862 return E_FAIL;
863 }
864
865 comp = CONTAINING_RECORD(This->position, struct cifcomponent, entry);
866 } while (This->group_id && (!comp->group || strcmp(This->group_id, comp->group)));
867
868 *component = &comp->ICifComponent_iface;
869 return S_OK;
870}
__WINE_SERVER_LIST_INLINE struct list * list_next(const struct list *list, const struct list *elem)
Definition: list.h:115
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

◆ enum_components_QueryInterface()

static HRESULT WINAPI enum_components_QueryInterface ( IEnumCifComponents iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 787 of file icif.c.

788{
790
792 {
793 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
794 *ppv = &This->IEnumCifComponents_iface;
795 }
796 /*
797 else if (IsEqualGUID(&IID_IEnumCifComponents, riid))
798 {
799 TRACE("(%p)->(IID_ICifFile %p)\n", This, ppv);
800 *ppv = &This->IEnumCifComponents_iface;
801 }
802 */
803 else
804 {
805 FIXME("(%p)->(%s %p) not found\n", This, debugstr_guid(riid), ppv);
806 *ppv = NULL;
807 return E_NOINTERFACE;
808 }
809
810 IUnknown_AddRef((IUnknown *)*ppv);
811 return S_OK;
812}

◆ enum_components_Release()

static ULONG WINAPI enum_components_Release ( IEnumCifComponents iface)
static

Definition at line 824 of file icif.c.

825{
828
829 TRACE("(%p) ref=%d\n", This, ref);
830
831 if(!ref)
832 {
833 ICifFile_Release(This->file);
835 }
836
837 return ref;
838}

◆ enum_components_Reset()

static HRESULT WINAPI enum_components_Reset ( IEnumCifComponents iface)
static

Definition at line 872 of file icif.c.

873{
875
876 TRACE("(%p)\n", This);
877
878 This->position = This->start;
879 return S_OK;
880}

◆ enum_groups_AddRef()

static ULONG WINAPI enum_groups_AddRef ( IEnumCifGroups iface)
static

Definition at line 938 of file icif.c.

939{
942
943 TRACE("(%p) ref=%d\n", This, ref);
944
945 return ref;
946}
static struct ciffenum_groups * impl_from_IEnumCifGroups(IEnumCifGroups *iface)
Definition: icif.c:178
LONG ref
Definition: icif.c:70

◆ enum_groups_create()

static HRESULT enum_groups_create ( ICifFile file,
struct list start,
IEnumCifGroups **  iface 
)
static

Definition at line 1003 of file icif.c.

1004{
1005 struct ciffenum_groups *enumerator;
1006
1007 enumerator = heap_alloc_zero(sizeof(*enumerator));
1008 if (!enumerator) return E_OUTOFMEMORY;
1009
1010 enumerator->IEnumCifGroups_iface.lpVtbl = &enum_groupsVtbl;
1011 enumerator->ref = 1;
1012 enumerator->file = file;
1013 enumerator->start = start;
1014 enumerator->position = start;
1015
1016 ICifFile_AddRef(file);
1017
1018 *iface = &enumerator->IEnumCifGroups_iface;
1019 return S_OK;
1020}
static const IEnumCifGroupsVtbl enum_groupsVtbl
Definition: icif.c:994
struct list * position
Definition: icif.c:74
ICifFile * file
Definition: icif.c:72
struct list * start
Definition: icif.c:73
IEnumCifGroups IEnumCifGroups_iface
Definition: icif.c:69

Referenced by ciffile_EnumGroups().

◆ enum_groups_Next()

static HRESULT WINAPI enum_groups_Next ( IEnumCifGroups iface,
ICifGroup **  group 
)
static

Definition at line 964 of file icif.c.

965{
967 struct cifgroup *gp;
968
969 TRACE("(%p)->(%p)\n", This, group);
970
971 if (!This->position || !group)
972 return E_FAIL;
973
974 This->position = list_next(This->start, This->position);
975
976 if (!This->position)
977 return E_FAIL;
978
979 gp = CONTAINING_RECORD(This->position, struct cifgroup, entry);
980 *group = &gp->ICifGroup_iface;
981 return S_OK;
982}

◆ enum_groups_QueryInterface()

static HRESULT WINAPI enum_groups_QueryInterface ( IEnumCifGroups iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 911 of file icif.c.

912{
914
916 {
917 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
918 *ppv = &This->IEnumCifGroups_iface;
919 }
920 /*
921 else if (IsEqualGUID(&IID_IEnumCifGroups, riid))
922 {
923 TRACE("(%p)->(IID_ICifFile %p)\n", This, ppv);
924 *ppv = &This->IEnumCifGroups_iface;
925 }
926 */
927 else
928 {
929 FIXME("(%p)->(%s %p) not found\n", This, debugstr_guid(riid), ppv);
930 *ppv = NULL;
931 return E_NOINTERFACE;
932 }
933
934 IUnknown_AddRef((IUnknown *)*ppv);
935 return S_OK;
936}

◆ enum_groups_Release()

static ULONG WINAPI enum_groups_Release ( IEnumCifGroups iface)
static

Definition at line 948 of file icif.c.

949{
952
953 TRACE("(%p) ref=%d\n", This, ref);
954
955 if(!ref)
956 {
957 ICifFile_Release(This->file);
959 }
960
961 return ref;
962}

◆ enum_groups_Reset()

static HRESULT WINAPI enum_groups_Reset ( IEnumCifGroups iface)
static

Definition at line 984 of file icif.c.

985{
987
988 TRACE("(%p)\n", This);
989
990 This->position = This->start;
991 return S_OK;
992}

◆ GetICifFileFromFile()

HRESULT WINAPI GetICifFileFromFile ( ICifFile **  icif,
const char path 
)

Definition at line 1732 of file icif.c.

1733{
1734 TRACE("(%p, %s)\n", icif, debugstr_a(path));
1735
1736 return load_ciffile(path, icif);
1737}
static HRESULT load_ciffile(const char *path, ICifFile **icif)
Definition: icif.c:1702

Referenced by InstallEngine2_SetLocalCif().

◆ GetICifRWFileFromFile()

HRESULT WINAPI GetICifRWFileFromFile ( ICifRWFile **  icif,
const char path 
)

Definition at line 1740 of file icif.c.

1741{
1742 FIXME("(%p, %s): stub\n", icif, debugstr_a(path));
1743
1744 return E_NOTIMPL;
1745}

◆ group_EnumComponents()

static HRESULT WINAPI group_EnumComponents ( ICifGroup iface,
IEnumCifComponents **  enum_components,
DWORD  filter,
LPVOID  pv 
)
static

Definition at line 284 of file icif.c.

285{
286 struct cifgroup *This = impl_from_ICifGroup(iface);
287 struct ciffile *file;
288
289 TRACE("(%p)->(%p, %u, %p)\n", This, enum_components, filter, pv);
290
291 if (filter)
292 FIXME("filter (%x) not supported\n", filter);
293 if (pv)
294 FIXME("how to handle pv (%p)?\n", pv);
295
296 file = impl_from_ICiffile(This->parent);
297 return enum_components_create(This->parent, &file->components, This->id, enum_components);
298}
static struct cifgroup * impl_from_ICifGroup(ICifGroup *iface)
Definition: icif.c:168

◆ group_free()

static void group_free ( struct cifgroup group)
static

Definition at line 250 of file icif.c.

251{
252 heap_free(group->id);
253 heap_free(group->description);
255}

Referenced by ciffile_Release(), and process_group().

◆ group_GetCurrentPriority()

static DWORD WINAPI group_GetCurrentPriority ( ICifGroup iface)
static

Definition at line 300 of file icif.c.

301{
302 struct cifgroup *This = impl_from_ICifGroup(iface);
303
304 FIXME("(%p): stub\n", This);
305
306 return 0;
307}

◆ group_GetDescription()

static HRESULT WINAPI group_GetDescription ( ICifGroup iface,
char desc,
DWORD  size 
)
static

Definition at line 266 of file icif.c.

267{
268 struct cifgroup *This = impl_from_ICifGroup(iface);
269
270 TRACE("(%p)->(%p, %u)\n", This, desc, size);
271
272 return copy_substring_null(desc, size, This->description);
273}

◆ group_GetID()

static HRESULT WINAPI group_GetID ( ICifGroup iface,
char id,
DWORD  size 
)
static

Definition at line 257 of file icif.c.

258{
259 struct cifgroup *This = impl_from_ICifGroup(iface);
260
261 TRACE("(%p)->(%p, %u)\n", This, id, size);
262
263 return copy_substring_null(id, size, This->id);
264}

◆ group_GetPriority()

static DWORD WINAPI group_GetPriority ( ICifGroup iface)
static

Definition at line 275 of file icif.c.

276{
277 struct cifgroup *This = impl_from_ICifGroup(iface);
278
279 TRACE("(%p)\n", This);
280
281 return This->priority;
282}

◆ impl_from_ICifComponent()

◆ impl_from_ICiffile()

◆ impl_from_ICifGroup()

static struct cifgroup * impl_from_ICifGroup ( ICifGroup iface)
inlinestatic

Definition at line 168 of file icif.c.

169{
170 return CONTAINING_RECORD(iface, struct cifgroup, ICifGroup_iface);
171}

Referenced by group_EnumComponents(), group_GetCurrentPriority(), group_GetDescription(), group_GetID(), and group_GetPriority().

◆ impl_from_IEnumCifComponents()

static struct ciffenum_components * impl_from_IEnumCifComponents ( IEnumCifComponents iface)
inlinestatic

Definition at line 173 of file icif.c.

174{
175 return CONTAINING_RECORD(iface, struct ciffenum_components, IEnumCifComponents_iface);
176}

Referenced by enum_components_AddRef(), enum_components_Next(), enum_components_QueryInterface(), enum_components_Release(), and enum_components_Reset().

◆ impl_from_IEnumCifGroups()

static struct ciffenum_groups * impl_from_IEnumCifGroups ( IEnumCifGroups iface)
inlinestatic

Definition at line 178 of file icif.c.

179{
180 return CONTAINING_RECORD(iface, struct ciffenum_groups, IEnumCifGroups_iface);
181}

Referenced by enum_groups_AddRef(), enum_groups_Next(), enum_groups_QueryInterface(), enum_groups_Release(), and enum_groups_Reset().

◆ load_ciffile()

static HRESULT load_ciffile ( const char path,
ICifFile **  icif 
)
static

Definition at line 1702 of file icif.c.

1703{
1704 struct inf_file *inf = NULL;
1705 struct ciffile *file;
1706 HRESULT hr = E_FAIL;
1707
1708 file = heap_alloc_zero(sizeof(*file));
1709 if(!file) return E_OUTOFMEMORY;
1710
1711 file->ICifFile_iface.lpVtbl = &ciffileVtbl;
1712 file->ref = 1;
1713
1714 list_init(&file->components);
1715 list_init(&file->groups);
1716
1717 hr = inf_load(path, &inf);
1718 if (FAILED(hr)) goto error;
1719
1720 hr = process_inf(file, inf);
1721 if (FAILED(hr)) goto error;
1722
1723 *icif = &file->ICifFile_iface;
1724 return S_OK;
1725
1726error:
1727 if (inf) inf_free(inf);
1728 ICifFile_Release(&file->ICifFile_iface);
1729 return hr;
1730}
static void list_init(struct list_entry *head)
Definition: list.h:51
static const ICifFileVtbl ciffileVtbl
Definition: icif.c:1191
static HRESULT process_inf(struct ciffile *file, struct inf_file *inf)
Definition: icif.c:1665
void inf_free(struct inf_file *inf)
Definition: inf.c:172
HRESULT inf_load(const char *path, struct inf_file **inf_file)
Definition: inf.c:405
#define FAILED(hr)
Definition: intsafe.h:51
#define error(str)
Definition: mkdosfs.c:1605
LONG ref
Definition: filesystem.c:120
Definition: inf.c:49

Referenced by GetICifFileFromFile().

◆ next_part()

static char * next_part ( char **  str,
BOOL  strip_quotes 
)
static

Definition at line 1232 of file icif.c.

1233{
1234 char *start = *str;
1235 char *next = *str;
1236
1237 while (*next && *next != ',')
1238 next++;
1239
1240 if (!*next)
1241 {
1243 return NULL;
1244 }
1245
1246 *next = 0;
1248 return ++next;
1249}
static void strip_quotes(WCHAR *word, WCHAR **end)
Definition: xcopy.c:701
char * trim(char *str, char **last_chr, BOOL strip_quotes)
Definition: inf.c:258
static unsigned __int64 next
Definition: rand_nt.c:6
const WCHAR * str

Referenced by read_dependencies(), read_platform_entry(), read_version_entry(), and value_get_str_field().

◆ process_component()

static HRESULT process_component ( struct ciffile file,
struct inf_section section,
const char section_name 
)
static

Definition at line 1540 of file icif.c.

1541{
1542 struct cifcomponent *component;
1544
1545 component = heap_alloc_zero(sizeof(*component));
1546 if (!component) return E_OUTOFMEMORY;
1547
1548 component->ICifComponent_iface.lpVtbl = &cifcomponentVtbl;
1549 component->parent = &file->ICifFile_iface;
1550
1551 list_init(&component->urls);
1552 list_init(&component->dependencies);
1553
1554 component->queue_state = ActionNone;
1555
1556 component->id = strdupA(section_name);
1557 if (!component->id) goto error;
1558
1559 if (!section_get_str(section, "DisplayName", &component->description, NULL))
1560 goto error;
1561 if (!section_get_str(section, "GUID", &component->guid, NULL))
1562 goto error;
1563 if (!section_get_str(section, "Details", &component->details, NULL))
1564 goto error;
1565 if (!section_get_str(section, "Group", &component->group, NULL))
1566 goto error;
1567 if (!section_get_str(section, "Locale", &component->locale, "en"))
1568 goto error;
1569 if (!section_get_str(section, "PatchID", &component->patchid, NULL))
1570 goto error;
1571
1572 if (!section_get_dword_field(section, "Size", 1, &component->size_download, 0))
1573 goto error;
1574 if (!section_get_dword_field(section, "Size", 2, &component->size_extracted, 0))
1575 goto error;
1576 if (!section_get_dword_field(section, "InstalledSize", 1, &component->size_app, 0))
1577 goto error;
1578 if (!section_get_dword_field(section, "InstalledSize", 2, &component->size_win, 0))
1579 goto error;
1580
1581 if (!section_get_str(section, "SuccessKey", &component->key_success, NULL))
1582 goto error;
1583 if (!section_get_str(section, "CancelKey", &component->key_cancel, NULL))
1584 goto error;
1585 if (!section_get_str(section, "ProgressKey", &component->key_progress, NULL))
1586 goto error;
1587 if (!section_get_str(section, "UninstallKey", &component->key_uninstall, NULL))
1588 goto error;
1589 if (!section_get_dword(section, "Reboot", &component->reboot, 0))
1590 goto error;
1591 if (!section_get_dword(section, "AdminCheck", &component->admin, 0))
1592 goto error;
1593 if (!section_get_dword(section, "UIVisible", &component->visibleui, 1))
1594 goto error;
1595 if (!section_get_dword(section, "ActiveSetupAware", &component->as_aware, 0))
1596 goto error;
1597 if (!section_get_dword(section, "Priority", &component->priority, 0))
1598 goto error;
1599
1600 if (!read_version_entry(section, &component->version, &component->build))
1601 goto error;
1602 if (!read_platform_entry(section, &component->platform))
1603 goto error;
1604 if (!read_urls(component, section))
1605 goto error;
1606 if (!read_dependencies(component, section))
1607 goto error;
1608
1609 component->current_priority = component->priority;
1610
1611 add_component_by_priority(file, component);
1612 return S_OK;
1613
1614error:
1615 component_free(component);
1616 return hr;
1617}
static BOOL section_get_dword(struct inf_section *inf_sec, const char *key, DWORD *value, DWORD def)
Definition: icif.c:1290
static BOOL section_get_dword_field(struct inf_section *inf_sec, const char *key, int field, DWORD *value, DWORD def)
Definition: icif.c:1330
static const ICifComponentVtbl cifcomponentVtbl
Definition: icif.c:746
static BOOL read_version_entry(struct inf_section *section, DWORD *ret_ver, DWORD *ret_build)
Definition: icif.c:1352
void add_component_by_priority(struct ciffile *file, struct cifcomponent *component)
Definition: icif.c:1524
static BOOL read_platform_entry(struct inf_section *section, DWORD *ret_platform)
Definition: icif.c:1389
static BOOL section_get_str(struct inf_section *inf_sec, const char *key, char **value, const char *def)
Definition: icif.c:1219
static BOOL read_urls(struct cifcomponent *component, struct inf_section *section)
Definition: icif.c:1471
static BOOL read_dependencies(struct cifcomponent *component, struct inf_section *section)
Definition: icif.c:1430
@ ActionNone
Definition: inseng.idl:86
DWORD queue_state
Definition: icif.c:140
DWORD size_download
Definition: icif.c:116
DWORD admin
Definition: icif.c:125
DWORD visibleui
Definition: icif.c:126
DWORD size_win
Definition: icif.c:114
DWORD reboot
Definition: icif.c:124
DWORD size_extracted
Definition: icif.c:117
DWORD platform
Definition: icif.c:129
ICifFile * parent
Definition: icif.c:98
DWORD as_aware
Definition: icif.c:123
DWORD version
Definition: icif.c:107
DWORD size_app
Definition: icif.c:115
DWORD current_priority
Definition: icif.c:141
Definition: parser.c:56

Referenced by process_section().

◆ process_group()

static HRESULT process_group ( struct ciffile file,
struct inf_section section,
const char section_name 
)
static

Definition at line 1619 of file icif.c.

1620{
1621 struct cifgroup *group;
1623
1624 group = heap_alloc_zero(sizeof(*group));
1625 if (!group) return E_OUTOFMEMORY;
1626
1627 group->ICifGroup_iface.lpVtbl = &cifgroupVtbl;
1628 group->parent = &file->ICifFile_iface;
1629
1630 group->id = strdupA(section_name);
1631 if (!group->id) goto error;
1632
1633 if (!section_get_str(section, "DisplayName", &group->description, NULL))
1634 goto error;
1635 if (!section_get_dword(section, "Priority", &group->priority, 0))
1636 goto error;
1637
1638 list_add_head(&file->groups, &group->entry);
1639 return S_OK;
1640
1641error:
1643 return hr;
1644}
static void list_add_head(struct list_entry *head, struct list_entry *entry)
Definition: list.h:76
static const ICifGroupVtbl cifgroupVtbl
Definition: icif.c:309
struct list entry
Definition: fci.c:128

Referenced by process_section(), and test_security_info().

◆ process_inf()

static HRESULT process_inf ( struct ciffile file,
struct inf_file inf 
)
static

Definition at line 1665 of file icif.c.

1666{
1667 struct inf_section *section = NULL;
1668 char *section_name;
1669 HRESULT hr = S_OK;
1670
1671 while (SUCCEEDED(hr) && inf_next_section(inf, &section))
1672 {
1673 section_name = inf_section_get_name(section);
1674 if (!section_name) return E_OUTOFMEMORY;
1675
1676 TRACE("start processing section %s\n", debugstr_a(section_name));
1677
1678 if (!strcasecmp(section_name, "Strings") ||
1679 !strncasecmp(section_name, "Strings.", strlen("Strings.")))
1680 {
1681 /* Ignore string sections */
1682 }
1683 else if (strcasecmp(section_name, "Version") == 0)
1685 else
1686 hr = process_section(file, section, section_name);
1687
1688 TRACE("finished processing section %s (%x)\n", debugstr_a(section_name), hr);
1689 heap_free(section_name);
1690 }
1691
1692 /* In case there was no version section, set the default installer description */
1693 if (SUCCEEDED(hr) && !file->name)
1694 {
1696 if (!file->name) hr = E_OUTOFMEMORY;
1697 }
1698
1699 return hr;
1700}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define strncasecmp
Definition: fake.h:10
#define strcasecmp
Definition: fake.h:9
static HRESULT process_version(struct ciffile *file, struct inf_section *section)
Definition: icif.c:1344
#define DEFAULT_INSTALLER_DESC
Definition: icif.c:40
static HRESULT process_section(struct ciffile *file, struct inf_section *section, const char *section_name)
Definition: icif.c:1646
char * inf_section_get_name(struct inf_section *section)
Definition: inf.c:214
BOOL inf_next_section(struct inf_file *inf, struct inf_section **sec)
Definition: inf.c:185
#define SUCCEEDED(hr)
Definition: intsafe.h:50
char name[1]
Definition: fci.c:135

Referenced by load_ciffile().

◆ process_section()

static HRESULT process_section ( struct ciffile file,
struct inf_section section,
const char section_name 
)
static

Definition at line 1646 of file icif.c.

1647{
1648 HRESULT hr;
1649 char *type;
1650
1651 if (!section_get_str(section, "SectionType", &type, "Component"))
1652 return E_OUTOFMEMORY;
1653
1654 if (!strcasecmp(type, "Component"))
1655 hr = process_component(file, section, section_name);
1656 else if (strcasecmp(type, "Group") == 0)
1657 hr = process_group(file, section, section_name);
1658 else
1659 FIXME("Don't know how to process %s\n", debugstr_a(type));
1660
1661 heap_free(type);
1662 return hr;
1663}
static HRESULT process_group(struct ciffile *file, struct inf_section *section, const char *section_name)
Definition: icif.c:1619
static HRESULT process_component(struct ciffile *file, struct inf_section *section, const char *section_name)
Definition: icif.c:1540

Referenced by process_inf().

◆ process_version()

static HRESULT process_version ( struct ciffile file,
struct inf_section section 
)
static

Definition at line 1344 of file icif.c.

1345{
1346 if (!section_get_str(section, "DisplayName", &file->name, DEFAULT_INSTALLER_DESC))
1347 return E_OUTOFMEMORY;
1348
1349 return S_OK;
1350}

Referenced by process_inf().

◆ read_dependencies()

static BOOL read_dependencies ( struct cifcomponent component,
struct inf_section section 
)
static

Definition at line 1430 of file icif.c.

1431{
1432 struct dependency_info *dependency;
1433 char *line, *str, *next;
1434 BOOL ret = TRUE;
1435
1436 if (!section_get_str(section, "Dependencies", &line, NULL))
1437 return E_OUTOFMEMORY;
1438 if (!line) goto done;
1439
1440 ret = FALSE;
1441 str = line;
1442 do
1443 {
1444 next = next_part(&str, TRUE);
1445
1446 dependency = heap_alloc_zero(sizeof(*dependency));
1447 if (!dependency) goto done;
1448
1449 dependency->id = strdupA(str);
1450 if (!dependency->id)
1451 {
1452 heap_free(dependency);
1453 goto done;
1454 }
1455
1456 dependency->type = strstr(dependency->id, ":");
1457 if (dependency->type) *dependency->type++ = 0;
1458
1459 list_add_tail(&component->dependencies, &dependency->entry);
1460
1461 str = next;
1462 } while (str);
1463
1464 ret = TRUE;
1465
1466done:
1467 heap_free(line);
1468 return ret;
1469}
char * strstr(char *String1, char *String2)
Definition: utclib.c:653
unsigned int BOOL
Definition: ntddk_ex.h:94
static char * next_part(char **str, BOOL strip_quotes)
Definition: icif.c:1232
char * type
Definition: icif.c:89
Definition: parser.c:49
int ret

Referenced by process_component().

◆ read_platform_entry()

static BOOL read_platform_entry ( struct inf_section section,
DWORD ret_platform 
)
static

Definition at line 1389 of file icif.c.

1390{
1391 DWORD platform = PLATFORM_ALL;
1392 char *line, *str, *next;
1393
1394 if (!section_get_str(section, "Platform", &line, NULL))
1395 return FALSE;
1396 if (!line) goto done;
1397
1398 platform = 0;
1399 str = line;
1400 do
1401 {
1402 next = next_part(&str, TRUE);
1403
1404 if (strcasecmp(str, "Win95") == 0)
1405 platform |= PLATFORM_WIN98;
1406 else if (strcasecmp(str, "Win98") == 0)
1407 platform |= PLATFORM_WIN98;
1408 else if (strcasecmp(str, "NT4") == 0)
1409 platform |= PLATFORM_NT4;
1410 else if (strcasecmp(str, "NT5") == 0)
1411 platform |= PLATFORM_NT5;
1412 else if (strcasecmp(str, "NT4Alpha") == 0)
1413 platform |= PLATFORM_NT4;
1414 else if (strcasecmp(str, "NT5Alpha") == 0)
1415 platform |= PLATFORM_NT5;
1416 else if (strcasecmp(str, "Millen") == 0)
1417 platform |= PLATFORM_MILLEN;
1418 else
1419 FIXME("Unknown platform: %s\n", debugstr_a(str));
1420
1421 str = next;
1422 } while (str);
1423
1424done:
1425 heap_free(line);
1426 *ret_platform = platform;
1427 return TRUE;
1428}
unsigned long DWORD
Definition: ntddk_ex.h:95
platform
Definition: msipriv.h:364

Referenced by process_component().

◆ read_urls()

static BOOL read_urls ( struct cifcomponent component,
struct inf_section section 
)
static

Definition at line 1471 of file icif.c.

1472{
1473 struct inf_value *inf_value = NULL;
1474 struct url_info *url_entry;
1475 char *str, *next;
1476 int index;
1477
1479 {
1481 if (!str) return E_OUTOFMEMORY;
1482
1483 if (strncasecmp(str, "URL", 3))
1484 goto next;
1485
1486 if (!str[3])
1487 goto next;
1488
1489 index = strtol(str+3, &next, 10);
1490 if (next == str+3 || *next != 0 || index < 1)
1491 goto next;
1492 index--;
1493
1494 url_entry = heap_alloc_zero(sizeof(*url_entry));
1495 if (!url_entry) goto error;
1496
1497 url_entry->index = index;
1498
1499 if (!value_get_str_field(inf_value, 1, &url_entry->url, NULL))
1500 goto error;
1501 if (!url_entry->url || !*url_entry->url)
1502 {
1503 url_entry_free(url_entry);
1504 goto next;
1505 }
1506
1507 if (!value_get_dword_field(inf_value, 2, &url_entry->flags, 0))
1508 goto error;
1509
1510 list_add_tail(&component->urls, &url_entry->entry);
1511
1512 next:
1513 heap_free(str);
1514 }
1515
1516 return TRUE;
1517
1518error:
1519 heap_free(str);
1520 url_entry_free(url_entry);
1521 return FALSE;
1522};
#define index(s, c)
Definition: various.h:29
static BOOL value_get_dword_field(struct inf_value *inf_val, int field, DWORD *value, DWORD def)
Definition: icif.c:1311
static BOOL value_get_str_field(struct inf_value *inf_val, int field, char **value, const char *def)
Definition: icif.c:1251
_Check_return_ long __cdecl strtol(_In_z_ const char *_Str, _Out_opt_ _Deref_post_z_ char **_EndPtr, _In_ int _Radix)
BOOL inf_section_next_value(struct inf_section *sec, struct inf_value **value)
Definition: inf.c:219
char * inf_value_get_key(struct inf_value *value)
Definition: inf.c:248
Definition: inf.c:31
struct list entry
Definition: icif.c:79
DWORD flags
Definition: icif.c:82
INT index
Definition: icif.c:80
char * url
Definition: icif.c:81

Referenced by process_component().

◆ read_version_entry()

static BOOL read_version_entry ( struct inf_section section,
DWORD ret_ver,
DWORD ret_build 
)
static

Definition at line 1352 of file icif.c.

1353{
1354 DWORD version = 0;
1355 DWORD build = 0;
1356 char *line, *str, *next;
1357
1358 if (!section_get_str(section, "Version", &line, NULL))
1359 return FALSE;
1360 if (!line) goto done;
1361
1362 str = line;
1363
1364 next = next_part(&str, TRUE);
1365 version |= atoi(str) << 16;
1366 if (!next) goto done;
1367 str = next;
1368
1369 next = next_part(&str, TRUE);
1370 version |= atoi(str) & 0xffff;
1371 if (!next) goto done;
1372 str = next;
1373
1374 next = next_part(&str, TRUE);
1375 build |= atoi(str) << 16;
1376 if (!next) goto done;
1377 str = next;
1378
1379 next_part(&str, TRUE);
1380 build |= atoi(str) & 0xffff;
1381
1382done:
1383 heap_free(line);
1384 *ret_ver = version;
1385 *ret_build = build;
1386 return TRUE;
1387}
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)

Referenced by process_component().

◆ section_get_dword()

static BOOL section_get_dword ( struct inf_section inf_sec,
const char key,
DWORD value,
DWORD  def 
)
static

Definition at line 1290 of file icif.c.

1291{
1292 struct inf_value *inf_val;
1293 char *str;
1294
1295 inf_val = inf_get_value(inf_sec, key);
1296 if (!inf_val)
1297 {
1298 *value = def;
1299 return TRUE;
1300 }
1301
1302 str = inf_value_get_value(inf_val);
1303 if (!str) return FALSE;
1304
1305 *value = atoi(str);
1306 heap_free(str);
1307
1308 return TRUE;
1309}
char * inf_value_get_value(struct inf_value *value)
Definition: inf.c:253
struct inf_value * inf_get_value(struct inf_section *sec, const char *key)
Definition: inf.c:235

Referenced by process_component(), and process_group().

◆ section_get_dword_field()

static BOOL section_get_dword_field ( struct inf_section inf_sec,
const char key,
int  field,
DWORD value,
DWORD  def 
)
static

Definition at line 1330 of file icif.c.

1331{
1332 struct inf_value *inf_val;
1333
1334 inf_val = inf_get_value(inf_sec, key);
1335 if (!inf_val)
1336 {
1337 *value = def;
1338 return TRUE;
1339 }
1340
1341 return value_get_dword_field(inf_val, field, value, def);
1342}
Definition: parser.c:44

Referenced by process_component().

◆ section_get_str()

static BOOL section_get_str ( struct inf_section inf_sec,
const char key,
char **  value,
const char def 
)
static

Definition at line 1219 of file icif.c.

1220{
1221 struct inf_value *inf_val;
1222
1223 inf_val = inf_get_value(inf_sec, key);
1224 if (!inf_val) return copy_string(value, def);
1225
1226 *value = inf_value_get_value(inf_val);
1227 if (!*value) return FALSE;
1228
1229 return TRUE;
1230}
static BOOL copy_string(char **dest, const char *source)
Definition: icif.c:1206

Referenced by process_component(), process_group(), process_section(), process_version(), read_dependencies(), read_platform_entry(), and read_version_entry().

◆ url_entry_free()

static void url_entry_free ( struct url_info url)
static

Definition at line 203 of file icif.c.

204{
205 heap_free(url->url);
206 heap_free(url);
207}

Referenced by component_free(), and read_urls().

◆ value_get_dword_field()

static BOOL value_get_dword_field ( struct inf_value inf_val,
int  field,
DWORD value,
DWORD  def 
)
static

Definition at line 1311 of file icif.c.

1312{
1313 char *value_str;
1314 BOOL ret;
1315
1317 if (!ret) return FALSE;
1318 if (!value_str)
1319 {
1320 *value = def;
1321 return TRUE;
1322 }
1323
1324 *value = atoi(value_str);
1326
1327 return TRUE;
1328}
static UNICODE_STRING value_str
Definition: reg.c:1328

Referenced by read_urls(), and section_get_dword_field().

◆ value_get_str_field()

static BOOL value_get_str_field ( struct inf_value inf_val,
int  field,
char **  value,
const char def 
)
static

Definition at line 1251 of file icif.c.

1252{
1253 char *line, *str, *next;
1254 int i = 0;
1255
1256 line = inf_value_get_value(inf_val);
1257 if (!line) return FALSE;
1258
1259 str = line;
1260 do
1261 {
1262 i++;
1263 next = next_part(&str, TRUE);
1264
1265 if (field == i)
1266 {
1268 heap_free(line);
1269 return ret;
1270 }
1271
1272 str = next;
1273 } while (str);
1274
1275 return copy_string(value, def);
1276}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248

Referenced by read_urls(), and value_get_dword_field().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( inseng  )

Variable Documentation

◆ cifcomponentVtbl

const ICifComponentVtbl cifcomponentVtbl
static

Definition at line 746 of file icif.c.

Referenced by process_component().

◆ ciffileVtbl

const ICifFileVtbl ciffileVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI ciffile_FindComponent(ICifFile *iface, const char *id, ICifComponent **component)
Definition: icif.c:1103
static HRESULT WINAPI ciffile_GetDescription(ICifFile *iface, char *desc, DWORD size)
Definition: icif.c:1173
static HRESULT WINAPI ciffile_EnumModes(ICifFile *iface, IEnumCifModes **cuf_modes, DWORD filter, void *pv)
Definition: icif.c:1155
static HRESULT WINAPI ciffile_QueryInterface(ICifFile *iface, REFIID riid, void **ppv)
Definition: icif.c:1022
static HRESULT WINAPI ciffile_GetDetDlls(ICifFile *iface, char *dlls, DWORD size)
Definition: icif.c:1182
static ULONG WINAPI ciffile_AddRef(ICifFile *iface)
Definition: icif.c:1047
static HRESULT WINAPI ciffile_FindGroup(ICifFile *iface, const char *id, ICifGroup **group)
Definition: icif.c:1136
static ULONG WINAPI ciffile_Release(ICifFile *iface)
Definition: icif.c:1057
static HRESULT WINAPI ciffile_EnumGroups(ICifFile *iface, IEnumCifGroups **enum_groups, DWORD filter, void *pv)
Definition: icif.c:1122
static HRESULT WINAPI ciffile_EnumComponents(ICifFile *iface, IEnumCifComponents **enum_components, DWORD filter, void *pv)
Definition: icif.c:1089
static HRESULT WINAPI ciffile_FindMode(ICifFile *iface, const char *id, ICifMode **mode)
Definition: icif.c:1164

Definition at line 1191 of file icif.c.

Referenced by load_ciffile().

◆ cifgroupVtbl

const ICifGroupVtbl cifgroupVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI group_GetDescription(ICifGroup *iface, char *desc, DWORD size)
Definition: icif.c:266
static DWORD WINAPI group_GetCurrentPriority(ICifGroup *iface)
Definition: icif.c:300
static HRESULT WINAPI group_GetID(ICifGroup *iface, char *id, DWORD size)
Definition: icif.c:257
static DWORD WINAPI group_GetPriority(ICifGroup *iface)
Definition: icif.c:275
static HRESULT WINAPI group_EnumComponents(ICifGroup *iface, IEnumCifComponents **enum_components, DWORD filter, LPVOID pv)
Definition: icif.c:284

Definition at line 309 of file icif.c.

Referenced by process_group().

◆ enum_componentsVtbl

const IEnumCifComponentsVtbl enum_componentsVtbl
static
Initial value:
=
{
}
static ULONG WINAPI enum_components_Release(IEnumCifComponents *iface)
Definition: icif.c:824
static ULONG WINAPI enum_components_AddRef(IEnumCifComponents *iface)
Definition: icif.c:814
static HRESULT WINAPI enum_components_Reset(IEnumCifComponents *iface)
Definition: icif.c:872
static HRESULT WINAPI enum_components_QueryInterface(IEnumCifComponents *iface, REFIID riid, void **ppv)
Definition: icif.c:787
static HRESULT WINAPI enum_components_Next(IEnumCifComponents *iface, ICifComponent **component)
Definition: icif.c:840

Definition at line 882 of file icif.c.

Referenced by enum_components_create().

◆ enum_groupsVtbl

const IEnumCifGroupsVtbl enum_groupsVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI enum_groups_Next(IEnumCifGroups *iface, ICifGroup **group)
Definition: icif.c:964
static HRESULT WINAPI enum_groups_Reset(IEnumCifGroups *iface)
Definition: icif.c:984
static ULONG WINAPI enum_groups_AddRef(IEnumCifGroups *iface)
Definition: icif.c:938
static HRESULT WINAPI enum_groups_QueryInterface(IEnumCifGroups *iface, REFIID riid, void **ppv)
Definition: icif.c:911
static ULONG WINAPI enum_groups_Release(IEnumCifGroups *iface)
Definition: icif.c:948

Definition at line 994 of file icif.c.

Referenced by enum_groups_create().