40#define NONAMELESSUNION
65#define E_OUTOFMEMORY ((HRESULT)0x8007000EL)
153 typelib->typelib_header.magic1 = 0x5446534d;
154 typelib->typelib_header.magic2 = 0x00010002;
155 typelib->typelib_header.posguid = -1;
156 typelib->typelib_header.lcid = 0x0409;
157 typelib->typelib_header.lcid2 = 0x0;
158 typelib->typelib_header.varflags = 0x40;
159 typelib->typelib_header.version = 0;
160 typelib->typelib_header.flags = 0;
161 typelib->typelib_header.nrtypeinfos = 0;
162 typelib->typelib_header.helpstring = -1;
163 typelib->typelib_header.helpstringcontext = 0;
164 typelib->typelib_header.helpcontext = 0;
165 typelib->typelib_header.nametablecount = 0;
166 typelib->typelib_header.nametablechars = 0;
167 typelib->typelib_header.NameOffset = -1;
168 typelib->typelib_header.helpfile = -1;
169 typelib->typelib_header.CustomDataOffset = -1;
170 typelib->typelib_header.res44 = 0x20;
171 typelib->typelib_header.res48 = 0x80;
172 typelib->typelib_header.dispatchpos = -1;
173 typelib->typelib_header.nimpinfos = 0;
213 for (
i = 0;
i < 8;
i ++) {
273 if (!((namestruct[2] ^ *((
int *)
name)) & 0xffff00ff)) {
306 static char converted_name[0x104];
313 converted_name[
length + 4] = 0;
318#ifdef WORDS_BIGENDIAN
319 converted_name[3] =
length & 0xff;
320 converted_name[2] = 0x00;
321 converted_name[1] =
value;
322 converted_name[0] =
value >> 8;
324 converted_name[0] =
length & 0xff;
325 converted_name[1] = 0x00;
326 converted_name[2] =
value;
327 converted_name[3] =
value >> 8;
357 static char converted_string[0x104];
363#ifdef WORDS_BIGENDIAN
364 converted_string[1] =
length & 0xff;
365 converted_string[0] = (
length >> 8) & 0xff;
367 converted_string[0] =
length & 0xff;
368 converted_string[1] = (
length >> 8) & 0xff;
378 *
result = converted_string;
404 if(!
typelib->typelib_segment_data[segment]) {
409 if (!
typelib->typelib_segment_data[segment])
return -1;
413 while ((
typelib->typelib_segdir[segment].length +
size) >
typelib->typelib_segment_block_length[segment]) {
414 unsigned char *
block;
510 chat(
"adding uuid {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
512 guid->guid.Data4[0],
guid->guid.Data4[1],
guid->guid.Data4[2],
guid->guid.Data4[3],
513 guid->guid.Data4[4],
guid->guid.Data4[5],
guid->guid.Data4[6],
guid->guid.Data4[7]);
521 warning(
"duplicate uuid {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
523 guid->guid.Data4[0],
guid->guid.Data4[1],
guid->guid.Data4[2],
guid->guid.Data4[3],
524 guid->guid.Data4[4],
guid->guid.Data4[5],
guid->guid.Data4[6],
guid->guid.Data4[7]);
571 if (
typelib->typelib_namehash_segment[encoded_name[2] & 0x7f] != -1)
572 name_space->next_hash =
typelib->typelib_namehash_segment[encoded_name[2] & 0x7f];
574 typelib->typelib_namehash_segment[encoded_name[2] & 0x7f] =
offset;
576 typelib->typelib_header.nametablecount += 1;
577 typelib->typelib_header.nametablechars += *encoded_name;
598 unsigned char *string_space;
599 char *encoded_string;
648 *impinfo_space = *impinfo;
673 char *encoded_string;
677 encoded_string[0] <<= 2;
678 encoded_string[0] |= 1;
689 importfile->
guid = guidoffset;
691 importfile->
version = major_version | (minor_version << 16);
701 chat(
"alloc_importinfo: %s\n", importinfo->
name);
703 if(!importlib->allocated) {
707 chat(
"allocating importlib %s\n", importlib->name);
709 importlib->allocated = -1;
717 importlib->version>>16, importlib->name);
742 impinfo.
oGuid = importinfo->
id;
753 chat(
"search importlib %s\n",
name);
760 for(
i=0;
i < importlib->ntypeinfos;
i++) {
761 if(!
strcmp(
name, importlib->importinfos[
i].name)) {
762 chat(
"Found %s in importlib.\n",
name);
763 return importlib->importinfos+
i;
804 chat(
"encode_type vt %d type %p\n",
vt,
type);
806 default_type = 0x80000000 | (
vt << 16) |
vt;
814 *encoded_type = default_type;
818 *encoded_type = 0x80000000 | (
VT_I4 << 16) |
VT_INT;
828 *encoded_type = default_type;
836 *encoded_type = default_type;
842 *encoded_type = default_type;
847 *encoded_type = default_type;
851 *encoded_type = default_type;
855 *encoded_type = 0x80000000 | (
VT_EMPTY << 16) |
vt;
861 *encoded_type = default_type;
865 *encoded_type = default_type;
870 *encoded_type = 0xfffe0000 |
vt;
890 chat(
"encode_type: skipping ptr\n");
908 mix_field = ((typedata[0] >> 16) == 0x7fff)? 0x7fff: 0x7ffe;
914 typedata[0] = (mix_field << 16) |
VT_PTR;
918 *encoded_type = typeoffset;
944 mix_field = ((typedata[0] >> 16) == 0x7fff)? 0x7fff: 0x7ffe;
954 *encoded_type = typeoffset;
965 if (
type->typelib_idx > -1)
967 chat(
"encode_type: VT_USERDEFINED - found already defined type %s at %d\n",
969 typeinfo_offset =
typelib->typelib_typeinfo_offsets[
type->typelib_idx];
973 chat(
"encode_type: VT_USERDEFINED - found imported type %s in %s\n",
976 typeinfo_offset = importinfo->
offset | 0x1;
984 chat(
"encode_type: VT_USERDEFINED - adding new type %s, real type %d\n",
1005 error(
"encode_type: VT_USERDEFINED - unhandled type %d\n",
1009 typeinfo_offset =
typelib->typelib_typeinfo_offsets[
type->typelib_idx];
1013 if ((typedata[0] == ((0x7fff << 16) |
VT_USERDEFINED)) && (typedata[1] == typeinfo_offset))
break;
1021 typedata[1] = typeinfo_offset;
1024 *encoded_type = typeoffset;
1029 error(
"encode_type: unrecognized type %d.\n",
vt);
1030 *encoded_type = default_type;
1059 chat(
"encode_var: var %p type %p type->name %s\n",
1063 int num_dims, elements = 1, arrayoffset;
1073 chat(
"array with %d dimensions\n", num_dims);
1079 arraydata[1] = num_dims;
1080 arraydata[1] |= ((num_dims * 2 *
sizeof(
int)) << 16);
1096 typedata[0] = (0x7ffe << 16) |
VT_CARRAY;
1097 typedata[1] = arrayoffset;
1099 *encoded_type = typeoffset;
1111 chat(
"encode_var: skipping ptr\n");
1132 mix_field = ((typedata[0] >> 16) == 0x7fff)? 0x7fff: 0x7ffe;
1138 typedata[0] = (mix_field << 16) |
VT_PTR;
1142 *encoded_type = typeoffset;
1163 return val & 0xffff;
1175 if ((lv & 0x3ffffff) == lv) {
1196 while(
len < seg_len) {
1209 error(
"string default value applied to non-string type\n");
1222 warning(
"non-null pointer default value\n");
1239 warning(
"can't write value of type %d yet\n",
vt);
1270 custdata[0] = guidoffset;
1271 custdata[1] = data_out;
1281 int *typedata, typedata_size;
1282 int i,
id, next_idx;
1284 int num_params = 0, num_optional = 0, num_defaults = 0;
1286 unsigned char *namedata;
1288 unsigned int funcflags = 0, callconv = 4 ;
1289 unsigned int funckind, invokekind = 1 ;
1290 int help_context = 0, help_string_context = 0, help_string_offset = -1;
1291 int entry = -1, entry_is_ord = 0;
1292 int lcid_retval_count = 0;
1296 id = ((0x6000 | (
typeinfo->typeinfo->datatype2 & 0xffff)) << 16) |
index;
1311 chat(
"add_func_desc: skipping local function\n");
1327 chat(
"add_func_desc: num of params %d\n", num_params);
1333 switch(
attr->type) {
1347 extra_attr =
max(extra_attr, 3);
1356 extra_attr =
max(extra_attr, 1);
1357 help_context =
expr->
u.lval;
1360 extra_attr =
max(extra_attr, 2);
1364 extra_attr =
max(extra_attr, 6);
1365 help_string_context =
expr->
u.lval;
1374 funcflags |= 0x1000;
1407 if (num_optional || num_defaults)
1408 warning(
"add_func_desc: ignoring vararg in function with optional or defaultvalue params\n");
1418 typedata_size = 0x18 + extra_attr *
sizeof(
int) + (num_params * (num_defaults ? 16 : 12));
1422 typeinfo->func_data_allocated = 0x100;
1426 if(
typeinfo->func_data[0] + typedata_size +
sizeof(
int) >
typeinfo->func_data_allocated) {
1428 typeinfo->func_data[0] + typedata_size +
sizeof(
int));
1433 typeinfo->func_data[0] += typedata_size;
1438 for(
i = 0;
i < (
typeinfo->typeinfo->cElement & 0xffff);
i++) {
1439 if(name_offset ==
typeinfo->func_names[
i]) {
1447 for(
i = 0;
i < (
typeinfo->typeinfo->cElement & 0xffff);
i++) {
1457 typedata[0] = typedata_size | (
index << 16);
1460 typedata[2] = funcflags;
1462 typedata[4] = (next_idx << 16) | (callconv << 8) | (invokekind << 3) | funckind;
1463 if(num_defaults) typedata[4] |= 0x1000;
1464 if(entry_is_ord) typedata[4] |= 0x2000;
1465 typedata[5] = (num_optional << 16) | num_params;
1469 typedata[3] += (16 * num_params) << 16;
1470 typedata[3] += (24 * num_defaults) << 16;
1472 switch(extra_attr) {
1473 case 6: typedata[11] = help_string_context;
1474 case 5: typedata[10] = -1;
1475 case 4: typedata[9] = -1;
1476 case 3: typedata[8] =
entry;
1477 case 2: typedata[7] = help_string_offset;
1478 case 1: typedata[6] = help_context;
1482 warning(
"unknown number of optional attrs\n");
1491 int *paramdata = typedata + 6 + extra_attr + (num_defaults ? num_params : 0) +
i * 3;
1492 int *defaultdata = num_defaults ? typedata + 6 + extra_attr +
i :
NULL;
1494 if(defaultdata) *defaultdata = -1;
1498 switch(
attr->type) {
1516 lcid_retval_count++;
1520 lcid_retval_count++;
1523 chat(
"unhandled param attr %d\n",
attr->type);
1528 paramdata[2] = paramflags;
1535 if(lcid_retval_count == 1)
1536 typedata[4] |= 0x4000;
1537 else if(lcid_retval_count == 2)
1538 typedata[4] |= 0x8000;
1540 if(
typeinfo->funcs_allocated == 0) {
1565 typeinfo->typeinfo->res3 += 0x38 + num_params * 0x10;
1566 if(num_defaults)
typeinfo->typeinfo->res3 += num_params * 0x4;
1569 if(funckind != 0x3 )
1576 if (*((
INT *)namedata) == -1) {
1577 *((
INT *)namedata) =
typeinfo->typelib->typelib_typeinfo_offsets[
typeinfo->typeinfo->typekind >> 16];
1579 namedata[9] |= 0x10;
1581 namedata[9] &= ~0x10;
1584 namedata[9] |= 0x20;
1592 if(
i != num_params - 1 || (invokekind != 0x4 && invokekind != 0x8 ))
1594 int *paramdata = typedata + 6 + extra_attr + (num_defaults ? num_params : 0) +
i * 3;
1607 unsigned int typedata_size;
1609 unsigned int var_datawidth, var_alignment = 0;
1610 int var_type_size, var_kind = 0 ;
1614 unsigned char *namedata;
1615 int var_num = (
typeinfo->typeinfo->cElement >> 16) & 0xffff;
1619 id = 0x40000000 +
index;
1623 switch(
attr->type) {
1670 typedata_size = 0x14;
1674 typeinfo->var_data_allocated = 0x100;
1678 if(
typeinfo->var_data[0] + typedata_size +
sizeof(
int) >
typeinfo->var_data_allocated) {
1680 typeinfo->var_data[0] + typedata_size +
sizeof(
int));
1685 typeinfo->var_data[0] += typedata_size;
1689 typedata[0] = typedata_size | (
index << 16);
1690 typedata[2] = varflags;
1691 typedata[3] = (36 << 16) | 0;
1693 if(
typeinfo->vars_allocated == 0) {
1699 if(
typeinfo->vars_allocated == var_num) {
1715 typeinfo->datawidth += var_alignment - 1;
1716 typeinfo->datawidth &= ~(var_alignment - 1);
1722 var_type_size += 16;
1723 typeinfo->datawidth = var_datawidth;
1727 typeinfo->datawidth += var_datawidth;
1738 error(
"add_var_desc: unhandled type kind %d\n",
typeinfo->typekind);
1743 typedata[3] += var_type_size << 16 | var_kind;
1746 alignment = (
typeinfo->typeinfo->typekind >> 11) & 0x1f;
1747 if (alignment < var_alignment) {
1748 alignment = var_alignment;
1749 typeinfo->typeinfo->typekind &= ~0xffc0;
1750 typeinfo->typeinfo->typekind |= alignment << 11 | alignment << 6;
1764 typeinfo->typeinfo->cElement += 0x10000;
1767 typeinfo->typeinfo->size = (
typeinfo->datawidth + (alignment - 1)) & ~(alignment - 1);
1773 if (*((
INT *)namedata) == -1) {
1774 *((
INT *)namedata) =
typeinfo->typelib->typelib_typeinfo_offsets[
typeinfo->typeinfo->typekind >> 16];
1776 namedata[9] |= 0x10;
1778 namedata[9] &= ~0x10;
1781 namedata[9] |= 0x20;
1794 if(
ref->typelib_idx == -1)
1796 if(
ref->typelib_idx == -1)
1797 error(
"add_impl_type: unable to add inherited interface\n");
1799 typeinfo->typeinfo->datatype1 =
typeinfo->typelib->typelib_typeinfo_offsets[
ref->typelib_idx];
1812 int typeinfo_offset;
1816 chat(
"create_msft_typeinfo: name %s kind %d index %d\n",
name, kind,
typelib->typelib_header.nrtypeinfos);
1818 msft_typeinfo =
xmalloc(
sizeof(*msft_typeinfo));
1819 memset( msft_typeinfo, 0,
sizeof(*msft_typeinfo) );
1839 switch(
attr->type) {
1940 if (
typelib->last_typeinfo)
typelib->last_typeinfo->next_typeinfo = msft_typeinfo;
1941 typelib->last_typeinfo = msft_typeinfo;
1945 return msft_typeinfo;
1950 int guid_offset, impfile_offset, hash_key;
1953 GUID stdole = {0x00020430,0x0000,0x0000,{0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}};
1954 GUID iid_idispatch = {0x00020400,0x0000,0x0000,{0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}};
1956 if(
typelib->typelib_header.dispatchpos != -1)
return;
1963 if (guid_offset == -1)
1967 guidentry.
guid = iid_idispatch;
1974 if (guid_offset == -1)
1976 impinfo.
oGuid = guid_offset;
1982 int num_parents = 0, num_funcs = 0;
2010 dispinterface->
attrs);
2064 int num_parents = 0, num_funcs = 0;
2188 int datatype1, datatype2, duplicate = 0;
2189 unsigned int size, alignment = 0;
2225 int num_ifaces = 0,
offset,
i;
2227 int have_default = 0, have_default_source = 0;
2241 num_ifaces *
sizeof(*
ref), 0);
2250 ref->oCustData = -1;
2252 if(
i < num_ifaces - 1)
2256 switch(
attr->type) {
2270 warning(
"add_coclass_typeinfo: unhandled attr %d\n",
attr->type);
2273 if(
ref->flags & 0x1) {
2274 if(
ref->flags & 0x2)
2275 have_default_source = 1;
2282 if((
ref->flags & 0x4) == 0) {
2283 if(
ref->flags & 0x2) {
2295 if(!have_default &&
first)
2296 first->flags |= 0x1;
2297 if(!have_default_source && first_source)
2298 first_source->flags |= 0x1;
2311 if (-1 <
module->typelib_idx)
2350 error(
"add_entry: unhandled type 0x%x for %s\n",
2358 switch(stmt->
type) {
2372 for (; type_entry; type_entry = type_entry->
next) {
2400 if (
offset == -1)
return;
2451 typelib->typelib_header.varflags |= 0x10;
2472 typelib->typelib_header.varflags |= 0x100;
2497 typelib->typelib_header.flags = 0;
2498 if (!
typelib->typelib->attrs)
return;
2501 switch(
attr->type) {
2503 typelib->typelib_header.flags |= 0x02;
2506 typelib->typelib_header.flags |= 0x04;
2509 typelib->typelib_header.flags |= 0x01;
2528 typeinfo->typeinfo->memoffset = filesize;
2530 filesize +=
typeinfo->func_data[0] + ((
typeinfo->typeinfo->cElement & 0xffff) * 12);
2532 filesize +=
typeinfo->var_data[0] + (((
typeinfo->typeinfo->cElement >> 16) & 0xffff) * 12);
2540 if (
typelib->typelib_segdir[segment].length) {
2541 typelib->typelib_segdir[segment].offset = filepos;
2543 typelib->typelib_segdir[segment].offset = -1;
2546 return typelib->typelib_segdir[segment].length;
2559 typedata_size =
typeinfo->func_data[0];
2561 typedata_size +=
typeinfo->var_data[0];
2562 put_data(&typedata_size,
sizeof(
int));
2581 for(
i = 0;
i < (
typeinfo->typeinfo->cElement >> 16);
i++) {
2597 if(
typelib->typelib_header.varflags & 0x100) filepos += 4;
2598 filepos +=
typelib->typelib_header.nrtypeinfos * 4;
2620 if(
typelib->typelib_header.varflags & 0x100)
2643 char typelib_id[13] =
"#1";
2663 char *time_override;
2664 unsigned int version = 7 << 24 | 555;
2665 GUID midl_time_guid = {0xde77ba63,0x517c,0x11d1,{0xa2,0xda,0x00,0x00,0xf8,0x77,0x3c,0xe9}};
2666 GUID midl_version_guid = {0xde77ba64,0x517c,0x11d1,{0xa2,0xda,0x00,0x00,0xf8,0x77,0x3c,0xe9}};
2667 GUID midl_info_guid = {0xde77ba65,0x517c,0x11d1,{0xa2,0xda,0x00,0x00,0xf8,0x77,0x3c,0xe9}};
2668 char info_string[128];
2670 msft =
xmalloc(
sizeof(*msft));
2671 memset(msft, 0,
sizeof(*msft));
2711 time_override =
getenv(
"WIDL_TIME_OVERRIDE");
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
void * xrealloc(void *oldmem, size_t size)
_In_ fcb _In_ chunk _In_ uint64_t _In_ uint64_t _In_ bool _In_opt_ void _In_opt_ PIRP _In_ LIST_ENTRY _In_ uint8_t _In_ uint64_t decoded_size
static const WCHAR version[]
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt
struct tagMSFT_ImpInfo MSFT_ImpInfo
struct tagMSFT_Header MSFT_Header
#define MSFT_IMPINFO_OFFSET_IS_GUID
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLuint GLuint GLsizei GLenum type
GLuint GLsizei GLsizei * length
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
_Check_return_ long __cdecl atol(_In_z_ const char *_Str)
_Check_return_ char *__cdecl getenv(_In_z_ const char *_VarName)
static DWORD block_size(DWORD block)
#define memcpy(s1, s2, n)
#define sprintf(buf, format,...)
static const char * target_type(DWORD dwType)
static HRESULT flush_output_buffer(mxwriter *This)
#define IsEqualIID(riid1, riid2)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
MSFT_TypeInfoBase * typeinfo
unsigned int var_data_allocated
struct _msft_typeinfo_t * next_typeinfo
unsigned int func_data_allocated
INT * typelib_guidhash_segment
struct _msft_typeinfo_t * typeinfos
INT typelib_typeinfo_offsets[0x200]
MSFT_pSeg typelib_segdir[MSFT_SEG_MAX]
INT * typelib_namehash_segment
INT help_string_dll_offset
MSFT_Header typelib_header
unsigned char * typelib_segment_data[MSFT_SEG_MAX]
int typelib_segment_block_length[MSFT_SEG_MAX]
struct _msft_typeinfo_t * last_typeinfo
union _statement_t::@5026 u
struct _type_list_t * next
union _type_t::@5025 details
struct iface_details * iface
IMAGEHLP_MODULEW64 module
unsigned int type_memsize_and_alignment(const type_t *t, unsigned int *align)
static int type_array_is_decl_as_ptr(const type_t *type)
static enum type_type type_get_type(const type_t *type)
static type_t * type_function_get_rettype(const type_t *type)
static var_list_t * type_union_get_cases(const type_t *type)
static var_list_t * type_dispiface_get_methods(const type_t *type)
static type_t * type_alias_get_aliasee(const type_t *type)
static type_t * type_dispiface_get_inherit(const type_t *type)
static ifref_list_t * type_coclass_get_ifaces(const type_t *type)
static var_list_t * type_struct_get_fields(const type_t *type)
static int type_is_alias(const type_t *type)
static type_t * type_iface_get_inherit(const type_t *type)
static type_t * type_array_get_element(const type_t *type)
static unsigned int type_array_get_dim(const type_t *type)
static statement_list_t * type_iface_get_stmts(const type_t *type)
static type_t * type_pointer_get_ref(const type_t *type)
static var_list_t * type_enum_get_values(const type_t *type)
static var_list_t * type_dispiface_get_props(const type_t *type)
unsigned int pointer_size
static var_list_t * type_get_function_args(const type_t *func_type)
#define STATEMENTS_FOR_EACH_FUNC(stmt, stmts)
static int ctl2_find_name(msft_typelib_t *typelib, char *name)
static void add_module_typeinfo(msft_typelib_t *typelib, type_t *module)
static HRESULT set_custdata(msft_typelib_t *typelib, REFGUID guid, int vt, const void *value, int *offset)
static void set_help_string_context(msft_typelib_t *typelib)
static void add_enum_typeinfo(msft_typelib_t *typelib, type_t *enumeration)
static void set_doc_string(msft_typelib_t *typelib)
static void add_entry(msft_typelib_t *typelib, const statement_t *stmt)
static void set_lcid(msft_typelib_t *typelib)
static int ctl2_find_guid(msft_typelib_t *typelib, int hash_key, REFGUID guid)
static void add_structure_typeinfo(msft_typelib_t *typelib, type_t *structure)
int create_msft_typelib(typelib_t *typelib)
static void add_coclass_typeinfo(msft_typelib_t *typelib, type_t *cls)
static void add_interface_typeinfo(msft_typelib_t *typelib, type_t *interface)
struct _msft_typeinfo_t msft_typeinfo_t
static void set_name(msft_typelib_t *typelib)
static msft_typeinfo_t * create_msft_typeinfo(msft_typelib_t *typelib, enum type_kind kind, const char *name, const attr_list_t *attrs)
static void ctl2_finalize_typeinfos(msft_typelib_t *typelib, int filesize)
static void write_string_value(msft_typelib_t *typelib, int *out, const char *value)
static void add_dispatch(msft_typelib_t *typelib)
static HRESULT add_func_desc(msft_typeinfo_t *typeinfo, var_t *func, int index)
static void add_dispinterface_typeinfo(msft_typelib_t *typelib, type_t *dispinterface)
static void set_version(msft_typelib_t *typelib)
static void write_int_value(msft_typelib_t *typelib, int *out, int vt, int value)
static HRESULT add_impl_type(msft_typeinfo_t *typeinfo, type_t *ref, importinfo_t *importinfo)
static void set_lib_flags(msft_typelib_t *typelib)
static void ctl2_write_typeinfos(msft_typelib_t *typelib)
static int encode_type(msft_typelib_t *typelib, int vt, type_t *type, int *encoded_type, int *decoded_size)
static HRESULT add_var_desc(msft_typeinfo_t *typeinfo, UINT index, var_t *var)
static void alloc_importinfo(msft_typelib_t *typelib, importinfo_t *importinfo)
static void ctl2_init_segdir(msft_typelib_t *typelib)
static void add_union_typeinfo(msft_typelib_t *typelib, type_t *tunion)
static int ctl2_alloc_name(msft_typelib_t *typelib, const char *name)
static void dump_type(type_t *t)
static int ctl2_encode_string(const char *string, char **result)
static void add_type_typeinfo(msft_typelib_t *typelib, type_t *type)
struct tagMSFT_ImpFile MSFT_ImpFile
static void add_typedef_typeinfo(msft_typelib_t *typelib, type_t *tdef)
static int ctl2_alloc_string(msft_typelib_t *typelib, const char *string)
static importinfo_t * find_importinfo(msft_typelib_t *typelib, const char *name)
static int ctl2_alloc_typeinfo(msft_typelib_t *typelib, int nameoffset)
static void set_help_context(msft_typelib_t *typelib)
static void set_guid(msft_typelib_t *typelib)
static int ctl2_alloc_guid(msft_typelib_t *typelib, MSFT_GuidEntry *guid)
static void set_help_string_dll(msft_typelib_t *typelib)
static int ctl2_alloc_segment(msft_typelib_t *typelib, enum MSFT_segment_index segment, int size, int block_size)
static int ctl2_hash_guid(REFGUID guid)
static void ctl2_init_header(msft_typelib_t *typelib)
static int alloc_importfile(msft_typelib_t *typelib, int guidoffset, int major_version, int minor_version, const char *filename)
static void ctl2_write_segment(msft_typelib_t *typelib, int segment)
static void save_all_changes(msft_typelib_t *typelib)
static int ctl2_encode_name(msft_typelib_t *typelib, const char *name, char **result)
static int alloc_msft_importinfo(msft_typelib_t *typelib, MSFT_ImpInfo *impinfo)
struct _msft_typelib_t msft_typelib_t
static int encode_var(msft_typelib_t *typelib, type_t *type, var_t *var, int *encoded_type, int *decoded_size)
static unsigned int get_ulong_val(unsigned int val, int vt)
static void set_help_file_name(msft_typelib_t *typelib)
static void write_default_value(msft_typelib_t *typelib, type_t *type, expr_t *expr, int *out)
static int ctl2_finalize_segment(msft_typelib_t *typelib, int filepos, int segment)
static unsigned int block