Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
ab548adf
Commit
ab548adf
authored
Mar 13, 2004
by
Alastair Bridgewater
Committed by
Alexandre Julliard
Mar 13, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename some of the fields in typelib.h to makes more evocative than
'unk00'.
parent
464e59f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
29 deletions
+35
-29
typelib.h
dlls/oleaut32/typelib.h
+21
-15
typelib2.c
dlls/oleaut32/typelib2.c
+14
-14
No files found.
dlls/oleaut32/typelib.h
View file @
ab548adf
...
@@ -76,9 +76,9 @@ typedef struct tagMSFT_Header {
...
@@ -76,9 +76,9 @@ typedef struct tagMSFT_Header {
INT
helpfile
;
/* position of helpfile in stringtable */
INT
helpfile
;
/* position of helpfile in stringtable */
/*0x40*/
INT
CustomDataOffset
;
/* if -1 no custom data, else it is offset */
/*0x40*/
INT
CustomDataOffset
;
/* if -1 no custom data, else it is offset */
/* in customer data/guid offset table */
/* in customer data/guid offset table */
INT
res44
;
/* unknown always: 0x20 */
INT
res44
;
/* unknown always: 0x20
(guid hash size?)
*/
INT
res48
;
/* unknown always: 0x80 */
INT
res48
;
/* unknown always: 0x80
(name hash size?)
*/
INT
dispatchpos
;
/*
gets a value (1+n*0x0c) with Idispatch interfaces
*/
INT
dispatchpos
;
/*
HREFTYPE to IDispatch, or -1 if no IDispatch
*/
/*0x50*/
INT
res50
;
/* is zero becomes one when an interface is derived */
/*0x50*/
INT
res50
;
/* is zero becomes one when an interface is derived */
}
MSFT_Header
;
}
MSFT_Header
;
...
@@ -172,11 +172,11 @@ typedef struct {
...
@@ -172,11 +172,11 @@ typedef struct {
INT
DataType
;
/* data type of the memeber, eg return of function */
INT
DataType
;
/* data type of the memeber, eg return of function */
INT
Flags
;
/* something to do with attribute flags (LOWORD) */
INT
Flags
;
/* something to do with attribute flags (LOWORD) */
#ifdef WORDS_BIGENDIAN
#ifdef WORDS_BIGENDIAN
INT16
res3
;
/* some offset into dunno what
*/
INT16
funcdescsize
;
/* size of reconstituted FUNCDESC and related structs
*/
INT16
VtableOffset
;
/* offset in vtable */
INT16
VtableOffset
;
/* offset in vtable */
#else
#else
INT16
VtableOffset
;
/* offset in vtable */
INT16
VtableOffset
;
/* offset in vtable */
INT16
res3
;
/* some offset into dunno what
*/
INT16
funcdescsize
;
/* size of reconstituted FUNCDESC and related structs
*/
#endif
#endif
INT
FKCCIC
;
/* bit string with the following */
INT
FKCCIC
;
/* bit string with the following */
/* meaning (bit 0 is the msb): */
/* meaning (bit 0 is the msb): */
...
@@ -226,11 +226,11 @@ typedef struct {
...
@@ -226,11 +226,11 @@ typedef struct {
INT
DataType
;
/* data type of the variable */
INT
DataType
;
/* data type of the variable */
INT
Flags
;
/* VarFlags (LOWORD) */
INT
Flags
;
/* VarFlags (LOWORD) */
#ifdef WORDS_BIGENDIAN
#ifdef WORDS_BIGENDIAN
INT16
res3
;
/* some offset into dunno what
*/
INT16
vardescsize
;
/* size of reconstituted VARDESC and related structs
*/
INT16
VarKind
;
/* VarKind */
INT16
VarKind
;
/* VarKind */
#else
#else
INT16
VarKind
;
/* VarKind */
INT16
VarKind
;
/* VarKind */
INT16
res3
;
/* some offset into dunno what
*/
INT16
vardescsize
;
/* size of reconstituted VARDESC and related structs
*/
#endif
#endif
INT
OffsValue
;
/* value of the variable or the offset */
INT
OffsValue
;
/* value of the variable or the offset */
/* in the data structure */
/* in the data structure */
...
@@ -258,17 +258,23 @@ typedef struct {
...
@@ -258,17 +258,23 @@ typedef struct {
/* this is how a guid is stored */
/* this is how a guid is stored */
typedef
struct
{
typedef
struct
{
GUID
guid
;
GUID
guid
;
INT
unk10
;
/* differntiate with libid, classid etc? */
INT
hreftype
;
/* -2 for the typelib guid, typeinfo offset
/* it's -2 for a libary */
for typeinfo guid, low two bits are 01 if
/* it's 0 for an interface */
this is an imported typeinfo, low two bits
INT
unk14
;
/* always? -1 */
are 10 if this is an imported typelib (used
by imported typeinfos) */
INT
next_hash
;
/* offset to next guid in the hash bucket */
}
MSFT_GuidEntry
;
}
MSFT_GuidEntry
;
/* some data preceding entries in the name table */
/* some data preceding entries in the name table */
typedef
struct
{
typedef
struct
{
INT
unk00
;
/* sometimes -1 (lib, parameter) ,
INT
hreftype
;
/* is -1 if name is for neither a typeinfo,
sometimes 0 (interface, func) */
a variable, or a function (that is, name
INT
unk10
;
/* sometimes -1 (lib) , sometimes 0 (interface, func),
is for a typelib or a function parameter).
sometimes 0x10 (par) */
otherwise is the offset of the first
typeinfo that this name refers to (either
to the typeinfo itself or to a member of
the typeinfo */
INT
next_hash
;
/* offset to next name in the hash bucket */
INT
namelen
;
/* only lower 8 bits are valid,
INT
namelen
;
/* only lower 8 bits are valid,
lower-middle 8 bits are unknown (flags?),
lower-middle 8 bits are unknown (flags?),
upper 16 bits are hash code */
upper 16 bits are hash code */
...
...
dlls/oleaut32/typelib2.c
View file @
ab548adf
...
@@ -521,7 +521,7 @@ static int ctl2_alloc_guid(
...
@@ -521,7 +521,7 @@ static int ctl2_alloc_guid(
}
}
hash_key
=
(
hash
&
0xf
)
|
((
hash
&
0x10
)
&
(
0
-
!!
(
hash
&
0xe0
)));
hash_key
=
(
hash
&
0xf
)
|
((
hash
&
0x10
)
&
(
0
-
!!
(
hash
&
0xe0
)));
guid_space
->
unk14
=
This
->
typelib_guidhash_segment
[
hash_key
];
guid_space
->
next_hash
=
This
->
typelib_guidhash_segment
[
hash_key
];
This
->
typelib_guidhash_segment
[
hash_key
]
=
offset
;
This
->
typelib_guidhash_segment
[
hash_key
]
=
offset
;
TRACE
(
"Updating GUID hash table (%s,0x%x).
\n
"
,
debugstr_guid
(
&
guid
->
guid
),
hash
);
TRACE
(
"Updating GUID hash table (%s,0x%x).
\n
"
,
debugstr_guid
(
&
guid
->
guid
),
hash
);
...
@@ -558,12 +558,12 @@ static int ctl2_alloc_name(
...
@@ -558,12 +558,12 @@ static int ctl2_alloc_name(
if
(
offset
==
-
1
)
return
-
1
;
if
(
offset
==
-
1
)
return
-
1
;
name_space
=
(
void
*
)(
This
->
typelib_segment_data
[
MSFT_SEG_NAME
]
+
offset
);
name_space
=
(
void
*
)(
This
->
typelib_segment_data
[
MSFT_SEG_NAME
]
+
offset
);
name_space
->
unk00
=
-
1
;
name_space
->
hreftype
=
-
1
;
name_space
->
unk10
=
-
1
;
name_space
->
next_hash
=
-
1
;
memcpy
(
&
name_space
->
namelen
,
encoded_name
,
length
);
memcpy
(
&
name_space
->
namelen
,
encoded_name
,
length
);
if
(
This
->
typelib_namehash_segment
[
encoded_name
[
2
]
&
0x7f
]
!=
-
1
)
if
(
This
->
typelib_namehash_segment
[
encoded_name
[
2
]
&
0x7f
]
!=
-
1
)
name_space
->
unk10
=
This
->
typelib_namehash_segment
[
encoded_name
[
2
]
&
0x7f
];
name_space
->
next_hash
=
This
->
typelib_namehash_segment
[
encoded_name
[
2
]
&
0x7f
];
This
->
typelib_namehash_segment
[
encoded_name
[
2
]
&
0x7f
]
=
offset
;
This
->
typelib_namehash_segment
[
encoded_name
[
2
]
&
0x7f
]
=
offset
;
...
@@ -751,8 +751,8 @@ static HRESULT ctl2_set_custdata(
...
@@ -751,8 +751,8 @@ static HRESULT ctl2_set_custdata(
guidentry
.
guid
=
*
guid
;
guidentry
.
guid
=
*
guid
;
guidentry
.
unk10
=
-
1
;
guidentry
.
hreftype
=
-
1
;
guidentry
.
unk14
=
-
1
;
guidentry
.
next_hash
=
-
1
;
guidoffset
=
ctl2_alloc_guid
(
This
,
&
guidentry
);
guidoffset
=
ctl2_alloc_guid
(
This
,
&
guidentry
);
if
(
guidoffset
==
-
1
)
return
E_OUTOFMEMORY
;
if
(
guidoffset
==
-
1
)
return
E_OUTOFMEMORY
;
...
@@ -1114,8 +1114,8 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetGuid(ICreateTypeInfo2 *iface, REFGUI
...
@@ -1114,8 +1114,8 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetGuid(ICreateTypeInfo2 *iface, REFGUI
TRACE
(
"(%p,%s)
\n
"
,
iface
,
debugstr_guid
(
guid
));
TRACE
(
"(%p,%s)
\n
"
,
iface
,
debugstr_guid
(
guid
));
guidentry
.
guid
=
*
guid
;
guidentry
.
guid
=
*
guid
;
guidentry
.
unk10
=
0
;
guidentry
.
hreftype
=
0
;
guidentry
.
unk14
=
0x18
;
guidentry
.
next_hash
=
0x18
;
offset
=
ctl2_alloc_guid
(
This
->
typelib
,
&
guidentry
);
offset
=
ctl2_alloc_guid
(
This
->
typelib
,
&
guidentry
);
...
@@ -1147,8 +1147,8 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetTypeFlags(ICreateTypeInfo2 *iface, U
...
@@ -1147,8 +1147,8 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetTypeFlags(ICreateTypeInfo2 *iface, U
WCHAR
stdole2tlb
[]
=
{
's'
,
't'
,
'd'
,
'o'
,
'l'
,
'e'
,
'2'
,
'.'
,
't'
,
'l'
,
'b'
,
0
};
WCHAR
stdole2tlb
[]
=
{
's'
,
't'
,
'd'
,
'o'
,
'l'
,
'e'
,
'2'
,
'.'
,
't'
,
'l'
,
'b'
,
0
};
foo
.
guid
=
IID_StdOle
;
foo
.
guid
=
IID_StdOle
;
foo
.
unk10
=
2
;
foo
.
hreftype
=
2
;
foo
.
unk14
=
-
1
;
foo
.
next_hash
=
-
1
;
guidoffset
=
ctl2_alloc_guid
(
This
->
typelib
,
&
foo
);
guidoffset
=
ctl2_alloc_guid
(
This
->
typelib
,
&
foo
);
if
(
guidoffset
==
-
1
)
return
E_OUTOFMEMORY
;
if
(
guidoffset
==
-
1
)
return
E_OUTOFMEMORY
;
...
@@ -1156,8 +1156,8 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetTypeFlags(ICreateTypeInfo2 *iface, U
...
@@ -1156,8 +1156,8 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetTypeFlags(ICreateTypeInfo2 *iface, U
if
(
fileoffset
==
-
1
)
return
E_OUTOFMEMORY
;
if
(
fileoffset
==
-
1
)
return
E_OUTOFMEMORY
;
foo
.
guid
=
IID_IDispatch
;
foo
.
guid
=
IID_IDispatch
;
foo
.
unk10
=
1
;
foo
.
hreftype
=
1
;
foo
.
unk14
=
-
1
;
foo
.
next_hash
=
-
1
;
guidoffset
=
ctl2_alloc_guid
(
This
->
typelib
,
&
foo
);
guidoffset
=
ctl2_alloc_guid
(
This
->
typelib
,
&
foo
);
if
(
guidoffset
==
-
1
)
return
E_OUTOFMEMORY
;
if
(
guidoffset
==
-
1
)
return
E_OUTOFMEMORY
;
...
@@ -3028,8 +3028,8 @@ static HRESULT WINAPI ICreateTypeLib2_fnSetGuid(ICreateTypeLib2 * iface, REFGUID
...
@@ -3028,8 +3028,8 @@ static HRESULT WINAPI ICreateTypeLib2_fnSetGuid(ICreateTypeLib2 * iface, REFGUID
TRACE
(
"(%p,%s)
\n
"
,
iface
,
debugstr_guid
(
guid
));
TRACE
(
"(%p,%s)
\n
"
,
iface
,
debugstr_guid
(
guid
));
guidentry
.
guid
=
*
guid
;
guidentry
.
guid
=
*
guid
;
guidentry
.
unk10
=
-
2
;
guidentry
.
hreftype
=
-
2
;
guidentry
.
unk14
=
-
1
;
guidentry
.
next_hash
=
-
1
;
offset
=
ctl2_alloc_guid
(
This
,
&
guidentry
);
offset
=
ctl2_alloc_guid
(
This
,
&
guidentry
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment