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
a2c1bdf1
Commit
a2c1bdf1
authored
Jun 30, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Jul 01, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Load string constants correctly from SLTG typelibs.
parent
45989a1f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
12 deletions
+35
-12
typelib.c
dlls/oleaut32/typelib.c
+35
-12
No files found.
dlls/oleaut32/typelib.c
View file @
a2c1bdf1
...
...
@@ -3122,6 +3122,17 @@ static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsign
TRACE_
(
typelib
)(
"byte_offs = 0x%x
\n
"
,
pItem
->
byte_offs
);
TRACE_
(
typelib
)(
"memid = 0x%x
\n
"
,
pItem
->
memid
);
if
(
pItem
->
flags
&
0x02
)
pType
=
&
pItem
->
type
;
else
pType
=
(
WORD
*
)(
pBlk
+
pItem
->
type
);
if
(
pItem
->
flags
&
~
0xda
)
FIXME_
(
typelib
)(
"unhandled flags = %02x
\n
"
,
pItem
->
flags
&
~
0xda
);
SLTG_DoElem
(
pType
,
pBlk
,
&
(
*
ppVarDesc
)
->
vardesc
.
elemdescVar
,
ref_lookup
);
if
(
pItem
->
flags
&
0x40
)
{
TRACE_
(
typelib
)(
"VAR_DISPATCH
\n
"
);
(
*
ppVarDesc
)
->
vardesc
.
varkind
=
VAR_DISPATCH
;
...
...
@@ -3134,9 +3145,32 @@ static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsign
V_VT
((
*
ppVarDesc
)
->
vardesc
.
u
.
lpvarValue
)
=
VT_INT
;
if
(
pItem
->
flags
&
0x08
)
V_UNION
((
*
ppVarDesc
)
->
vardesc
.
u
.
lpvarValue
,
intVal
)
=
pItem
->
byte_offs
;
else
else
{
switch
((
*
ppVarDesc
)
->
vardesc
.
elemdescVar
.
tdesc
.
vt
)
{
case
VT_LPSTR
:
case
VT_LPWSTR
:
case
VT_BSTR
:
{
WORD
len
=
*
(
WORD
*
)(
pBlk
+
pItem
->
byte_offs
);
INT
alloc_len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
pBlk
+
pItem
->
byte_offs
+
2
,
len
,
NULL
,
0
);
BSTR
str
=
SysAllocStringLen
(
NULL
,
alloc_len
);
MultiByteToWideChar
(
CP_ACP
,
0
,
pBlk
+
pItem
->
byte_offs
+
2
,
len
,
str
,
alloc_len
);
V_VT
((
*
ppVarDesc
)
->
vardesc
.
u
.
lpvarValue
)
=
VT_BSTR
;
V_BSTR
((
*
ppVarDesc
)
->
vardesc
.
u
.
lpvarValue
)
=
str
;
break
;
}
case
VT_I2
:
case
VT_UI2
:
case
VT_I4
:
case
VT_UI4
:
V_UNION
((
*
ppVarDesc
)
->
vardesc
.
u
.
lpvarValue
,
intVal
)
=
*
(
INT
*
)(
pBlk
+
pItem
->
byte_offs
);
break
;
default:
FIXME
(
"VAR_CONST unimplemented for type %d
\n
"
,
(
*
ppVarDesc
)
->
vardesc
.
elemdescVar
.
tdesc
.
vt
);
}
}
}
else
{
TRACE_
(
typelib
)(
"VAR_PERINSTANCE
\n
"
);
...
...
@@ -3150,17 +3184,6 @@ static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsign
if
(
pItem
->
flags
&
0x80
)
(
*
ppVarDesc
)
->
vardesc
.
wVarFlags
|=
VARFLAG_FREADONLY
;
if
(
pItem
->
flags
&
0x02
)
pType
=
&
pItem
->
type
;
else
pType
=
(
WORD
*
)(
pBlk
+
pItem
->
type
);
if
(
pItem
->
flags
&
~
0xda
)
FIXME_
(
typelib
)(
"unhandled flags = %02x
\n
"
,
pItem
->
flags
&
~
0xda
);
SLTG_DoElem
(
pType
,
pBlk
,
&
(
*
ppVarDesc
)
->
vardesc
.
elemdescVar
,
ref_lookup
);
if
(
TRACE_ON
(
typelib
))
{
char
buf
[
300
];
dump_TypeDesc
(
&
(
*
ppVarDesc
)
->
vardesc
.
elemdescVar
.
tdesc
,
buf
);
...
...
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