Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
22022d13
Commit
22022d13
authored
Dec 27, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 27, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Get rid of some magic offset values, use structure for that.
parent
677302cf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
+15
-13
typelib.c
dlls/oleaut32/typelib.c
+14
-11
typelib.h
dlls/oleaut32/typelib.h
+1
-2
No files found.
dlls/oleaut32/typelib.c
View file @
22022d13
...
...
@@ -2094,7 +2094,7 @@ static void MSFT_DoVars(TLBContext *pcx, ITypeInfoImpl *pTI, int cFuncs,
{
int
infolen
,
nameoffset
,
reclength
;
char
recbuf
[
256
];
MSFT_VarRecord
*
pVarRec
=
(
MSFT_VarRecord
*
)
recbuf
;
MSFT_VarRecord
*
pVarRec
=
(
MSFT_VarRecord
*
)
recbuf
;
int
i
;
int
recoffset
;
...
...
@@ -2111,17 +2111,20 @@ static void MSFT_DoVars(TLBContext *pcx, ITypeInfoImpl *pTI, int cFuncs,
offset
+
infolen
+
(
2
*
cFuncs
+
cVars
+
i
+
1
)
*
sizeof
(
INT
));
(
*
pptvd
)
->
Name
=
MSFT_ReadName
(
pcx
,
nameoffset
);
/* read the variable information record */
MSFT_ReadLEDWords
(
&
reclength
,
sizeof
(
INT
),
pcx
,
recoffset
);
reclength
&=
0xff
;
MSFT_ReadLEDWords
(
pVarRec
,
reclength
-
sizeof
(
INT
),
pcx
,
DO_NOT_SEEK
);
/* Optional data */
if
(
reclength
>
(
6
*
sizeof
(
INT
))
)
(
*
pptvd
)
->
HelpContext
=
pVarRec
->
HelpContext
;
if
(
reclength
>
(
7
*
sizeof
(
INT
))
)
MSFT_ReadLEDWords
(
&
reclength
,
sizeof
(
pVarRec
->
Info
),
pcx
,
recoffset
);
reclength
&=
0xff
;
MSFT_ReadLEDWords
(
&
pVarRec
->
DataType
,
reclength
-
FIELD_OFFSET
(
MSFT_VarRecord
,
DataType
),
pcx
,
DO_NOT_SEEK
);
/* optional data */
if
(
reclength
>
FIELD_OFFSET
(
MSFT_VarRecord
,
HelpContext
))
(
*
pptvd
)
->
HelpContext
=
pVarRec
->
HelpContext
;
if
(
reclength
>
FIELD_OFFSET
(
MSFT_VarRecord
,
oHelpString
))
(
*
pptvd
)
->
HelpString
=
MSFT_ReadString
(
pcx
,
pVarRec
->
oHelpString
)
;
if
(
reclength
>
(
8
*
sizeof
(
INT
))
)
if
(
reclength
>
(
9
*
sizeof
(
INT
))
)
(
*
pptvd
)
->
HelpStringContext
=
pVarRec
->
HelpStringContext
;
if
(
reclength
>
FIELD_OFFSET
(
MSFT_VarRecord
,
HelpStringContext
))
(
*
pptvd
)
->
HelpStringContext
=
pVarRec
->
HelpStringContext
;
/* fill the VarDesc Structure */
MSFT_ReadLEDWords
(
&
(
*
pptvd
)
->
vardesc
.
memid
,
sizeof
(
INT
),
pcx
,
offset
+
infolen
+
(
cFuncs
+
i
+
1
)
*
sizeof
(
INT
));
...
...
dlls/oleaut32/typelib.h
View file @
22022d13
...
...
@@ -231,7 +231,7 @@ typedef struct {
/* Variable description data */
typedef
struct
{
/* INT recsize; // record size including some
xtra stuff */
INT
Info
;
/* record size including some e
xtra stuff */
INT
DataType
;
/* data type of the variable */
INT
Flags
;
/* VarFlags (LOWORD) */
#ifdef WORDS_BIGENDIAN
...
...
@@ -250,7 +250,6 @@ typedef struct {
INT
res9
;
/* unknown (-1) */
INT
oCustData
;
/* custom data for variable */
INT
HelpStringContext
;
}
MSFT_VarRecord
;
/* Structure of the reference data */
...
...
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