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
b6bfd6d3
Commit
b6bfd6d3
authored
Aug 16, 2013
by
Andrew Eikum
Committed by
Alexandre Julliard
Aug 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Assign MEMBERIDs to vardescs without one.
parent
341ff65b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
typelib.c
dlls/oleaut32/tests/typelib.c
+4
-0
typelib.c
dlls/oleaut32/typelib.c
+27
-0
No files found.
dlls/oleaut32/tests/typelib.c
View file @
b6bfd6d3
...
@@ -4032,6 +4032,7 @@ static void test_SetVarHelpContext(void)
...
@@ -4032,6 +4032,7 @@ static void test_SetVarHelpContext(void)
ok
(
hr
==
TYPE_E_ELEMENTNOTFOUND
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
TYPE_E_ELEMENTNOTFOUND
,
"got %08x
\n
"
,
hr
);
memset
(
&
desc
,
0
,
sizeof
(
desc
));
memset
(
&
desc
,
0
,
sizeof
(
desc
));
desc
.
memid
=
MEMBERID_NIL
;
desc
.
elemdescVar
.
tdesc
.
vt
=
VT_INT
;
desc
.
elemdescVar
.
tdesc
.
vt
=
VT_INT
;
desc
.
varkind
=
VAR_CONST
;
desc
.
varkind
=
VAR_CONST
;
...
@@ -4067,6 +4068,7 @@ static void test_SetVarHelpContext(void)
...
@@ -4067,6 +4068,7 @@ static void test_SetVarHelpContext(void)
hr
=
ITypeInfo_GetVarDesc
(
ti
,
0
,
&
pdesc
);
hr
=
ITypeInfo_GetVarDesc
(
ti
,
0
,
&
pdesc
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
pdesc
->
memid
==
0x40000000
,
"got wrong memid: %x
\n
"
,
pdesc
->
memid
);
ok
(
pdesc
->
elemdescVar
.
tdesc
.
vt
==
VT_INT
,
"got wrong vardesc type: %u
\n
"
,
pdesc
->
elemdescVar
.
tdesc
.
vt
);
ok
(
pdesc
->
elemdescVar
.
tdesc
.
vt
==
VT_INT
,
"got wrong vardesc type: %u
\n
"
,
pdesc
->
elemdescVar
.
tdesc
.
vt
);
ok
(
pdesc
->
varkind
==
VAR_CONST
,
"got wrong varkind: %u
\n
"
,
pdesc
->
varkind
);
ok
(
pdesc
->
varkind
==
VAR_CONST
,
"got wrong varkind: %u
\n
"
,
pdesc
->
varkind
);
ok
(
V_VT
(
U
(
pdesc
)
->
lpvarValue
)
==
VT_INT
,
"got wrong value type: %u
\n
"
,
V_VT
(
U
(
pdesc
)
->
lpvarValue
));
ok
(
V_VT
(
U
(
pdesc
)
->
lpvarValue
)
==
VT_INT
,
"got wrong value type: %u
\n
"
,
V_VT
(
U
(
pdesc
)
->
lpvarValue
));
...
@@ -4191,6 +4193,7 @@ static void test_SetVarDocString(void)
...
@@ -4191,6 +4193,7 @@ static void test_SetVarDocString(void)
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
memset
(
&
desc
,
0
,
sizeof
(
desc
));
memset
(
&
desc
,
0
,
sizeof
(
desc
));
desc
.
memid
=
MEMBERID_NIL
;
desc
.
elemdescVar
.
tdesc
.
vt
=
VT_INT
;
desc
.
elemdescVar
.
tdesc
.
vt
=
VT_INT
;
desc
.
varkind
=
VAR_CONST
;
desc
.
varkind
=
VAR_CONST
;
...
@@ -4229,6 +4232,7 @@ static void test_SetVarDocString(void)
...
@@ -4229,6 +4232,7 @@ static void test_SetVarDocString(void)
hr
=
ITypeInfo_GetVarDesc
(
ti
,
0
,
&
pdesc
);
hr
=
ITypeInfo_GetVarDesc
(
ti
,
0
,
&
pdesc
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
pdesc
->
memid
==
0x40000000
,
"got wrong memid: %x
\n
"
,
pdesc
->
memid
);
ok
(
pdesc
->
elemdescVar
.
tdesc
.
vt
==
VT_INT
,
"got wrong vardesc type: %u
\n
"
,
pdesc
->
elemdescVar
.
tdesc
.
vt
);
ok
(
pdesc
->
elemdescVar
.
tdesc
.
vt
==
VT_INT
,
"got wrong vardesc type: %u
\n
"
,
pdesc
->
elemdescVar
.
tdesc
.
vt
);
ok
(
pdesc
->
varkind
==
VAR_CONST
,
"got wrong varkind: %u
\n
"
,
pdesc
->
varkind
);
ok
(
pdesc
->
varkind
==
VAR_CONST
,
"got wrong varkind: %u
\n
"
,
pdesc
->
varkind
);
ok
(
V_VT
(
U
(
pdesc
)
->
lpvarValue
)
==
VT_INT
,
"got wrong value type: %u
\n
"
,
V_VT
(
U
(
pdesc
)
->
lpvarValue
));
ok
(
V_VT
(
U
(
pdesc
)
->
lpvarValue
)
==
VT_INT
,
"got wrong value type: %u
\n
"
,
V_VT
(
U
(
pdesc
)
->
lpvarValue
));
...
...
dlls/oleaut32/typelib.c
View file @
b6bfd6d3
...
@@ -10737,6 +10737,33 @@ static HRESULT WINAPI ICreateTypeInfo2_fnLayOut(ICreateTypeInfo2 *iface)
...
@@ -10737,6 +10737,33 @@ static HRESULT WINAPI ICreateTypeInfo2_fnLayOut(ICreateTypeInfo2 *iface)
if
(
user_vft
>
This
->
cbSizeVft
)
if
(
user_vft
>
This
->
cbSizeVft
)
This
->
cbSizeVft
=
user_vft
+
This
->
pTypeLib
->
ptr_size
;
This
->
cbSizeVft
=
user_vft
+
This
->
pTypeLib
->
ptr_size
;
for
(
i
=
0
;
i
<
This
->
cVars
;
++
i
){
TLBVarDesc
*
var_desc
=
&
This
->
vardescs
[
i
];
if
(
var_desc
->
vardesc
.
memid
==
MEMBERID_NIL
){
UINT
j
=
0
;
BOOL
reset
=
FALSE
;
TLBVarDesc
*
iter
;
var_desc
->
vardesc
.
memid
=
0x40000000
+
(
depth
<<
16
)
+
i
;
iter
=
This
->
vardescs
;
while
(
j
<
This
->
cVars
)
{
if
(
iter
!=
var_desc
&&
iter
->
vardesc
.
memid
==
var_desc
->
vardesc
.
memid
)
{
if
(
!
reset
)
{
var_desc
->
vardesc
.
memid
=
0x40000000
+
(
depth
<<
16
)
+
This
->
cVars
;
reset
=
TRUE
;
}
else
++
var_desc
->
vardesc
.
memid
;
iter
=
This
->
vardescs
;
j
=
0
;
}
else
{
++
iter
;
++
j
;
}
}
}
}
ITypeInfo_Release
(
tinfo
);
ITypeInfo_Release
(
tinfo
);
return
hres
;
return
hres
;
}
}
...
...
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