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
34f1d8a2
Commit
34f1d8a2
authored
Aug 10, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Sep 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Handle LCID arguments in ITypeInfo::Invoke.
parent
1327ae0c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
11 deletions
+29
-11
tmarshal.c
dlls/oleaut32/tests/tmarshal.c
+0
-4
typelib.c
dlls/oleaut32/typelib.c
+29
-7
No files found.
dlls/oleaut32/tests/tmarshal.c
View file @
34f1d8a2
...
...
@@ -1299,7 +1299,6 @@ static void test_typelibmarshal(void)
dispparams
.
rgvarg
=
vararg
;
VariantInit
(
&
varresult
);
hr
=
IDispatch_Invoke
(
pDispatch
,
DISPID_TM_PROP_WITH_LCID
,
&
IID_NULL
,
0x40c
,
DISPATCH_PROPERTYPUT
,
&
dispparams
,
&
varresult
,
&
excepinfo
,
NULL
);
todo_wine
ok_ole_success
(
hr
,
ITypeInfo_Invoke
);
VariantClear
(
&
varresult
);
...
...
@@ -1309,12 +1308,9 @@ todo_wine
dispparams
.
rgvarg
=
NULL
;
dispparams
.
rgdispidNamedArgs
=
NULL
;
hr
=
IDispatch_Invoke
(
pDispatch
,
DISPID_TM_PROP_WITH_LCID
,
&
IID_NULL
,
0x40c
,
DISPATCH_PROPERTYGET
,
&
dispparams
,
&
varresult
,
&
excepinfo
,
NULL
);
todo_wine
{
ok_ole_success
(
hr
,
ITypeInfo_Invoke
);
ok
(
V_VT
(
&
varresult
)
==
VT_I4
,
"got %x
\n
"
,
V_VT
(
&
varresult
));
ok
(
V_I4
(
&
varresult
)
==
0x409
,
"got %x
\n
"
,
V_I4
(
&
varresult
));
}
VariantClear
(
&
varresult
);
/* test propget of INT value */
...
...
dlls/oleaut32/typelib.c
View file @
34f1d8a2
...
...
@@ -930,6 +930,7 @@ typedef struct tagITypeLibImpl
const
ITypeCompVtbl
*
lpVtblTypeComp
;
LONG
ref
;
TLIBATTR
LibAttr
;
/* guid,lcid,syskind,version,flags */
LCID
lcid
;
/* strings can be stored in tlb as multibyte strings BUT they are *always*
* exported to the application as a UNICODE string.
...
...
@@ -2878,6 +2879,8 @@ static ITypeLib2* ITypeLib2_Constructor_MSFT(LPVOID pLib, DWORD dwTLBLength)
pTypeLibImpl
->
LibAttr
.
wMinorVerNum
=
HIWORD
(
tlbHeader
.
version
);
pTypeLibImpl
->
LibAttr
.
wLibFlags
=
(
WORD
)
tlbHeader
.
flags
&
0xffff
;
/* check mask */
pTypeLibImpl
->
lcid
=
tlbHeader
.
lcid
;
/* name, eventually add to a hash table */
pTypeLibImpl
->
Name
=
MSFT_ReadName
(
&
cx
,
tlbHeader
.
NameOffset
);
...
...
@@ -3099,9 +3102,9 @@ static DWORD SLTG_ReadLibBlk(LPVOID pLibBlk, ITypeLibImpl *pTypeLibImpl)
ptr
+=
2
;
if
(
SUBLANGID
(
*
(
WORD
*
)
ptr
)
==
SUBLANG_NEUTRAL
)
pTypeLibImpl
->
LibAttr
.
lcid
=
MAKELCID
(
MAKELANGID
(
PRIMARYLANGID
(
*
(
WORD
*
)
ptr
),
0
),
0
);
pTypeLibImpl
->
lcid
=
pTypeLibImpl
->
LibAttr
.
lcid
=
MAKELCID
(
MAKELANGID
(
PRIMARYLANGID
(
*
(
WORD
*
)
ptr
),
0
),
0
);
else
pTypeLibImpl
->
LibAttr
.
lcid
=
0
;
pTypeLibImpl
->
lcid
=
pTypeLibImpl
->
LibAttr
.
lcid
=
0
;
ptr
+=
2
;
ptr
+=
4
;
/* skip res12 */
...
...
@@ -6063,6 +6066,7 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
VARTYPE
*
rgvt
=
INVBUF_GET_ARG_TYPE_ARRAY
(
buffer
,
func_desc
->
cParams
);
UINT
cNamedArgs
=
pDispParams
->
cNamedArgs
;
DISPID
*
rgdispidNamedArgs
=
pDispParams
->
rgdispidNamedArgs
;
UINT
vargs_converted
=
0
;
hres
=
S_OK
;
...
...
@@ -6100,6 +6104,15 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
USHORT
wParamFlags
=
func_desc
->
lprgelemdescParam
[
i
].
u
.
paramdesc
.
wParamFlags
;
VARIANTARG
*
src_arg
;
if
(
wParamFlags
&
PARAMFLAG_FLCID
)
{
VARIANTARG
*
arg
;
arg
=
prgpvarg
[
i
]
=
&
rgvarg
[
i
];
V_VT
(
arg
)
=
VT_I4
;
V_I4
(
arg
)
=
This
->
pTypeLib
->
lcid
;
continue
;
}
if
(
cNamedArgs
)
{
USHORT
j
;
...
...
@@ -6112,7 +6125,10 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
}
}
else
src_arg
=
i
<
pDispParams
->
cArgs
?
&
pDispParams
->
rgvarg
[
pDispParams
->
cArgs
-
1
-
i
]
:
NULL
;
{
src_arg
=
vargs_converted
<
pDispParams
->
cArgs
?
&
pDispParams
->
rgvarg
[
pDispParams
->
cArgs
-
1
-
vargs_converted
]
:
NULL
;
vargs_converted
++
;
}
if
(
wParamFlags
&
PARAMFLAG_FRETVAL
)
{
...
...
@@ -6278,10 +6294,15 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
V_VT
(
&
varresult
),
func_desc
->
cParams
,
rgvt
,
prgpvarg
,
&
varresult
);
vargs_converted
=
0
;
for
(
i
=
0
;
i
<
func_desc
->
cParams
;
i
++
)
{
USHORT
wParamFlags
=
func_desc
->
lprgelemdescParam
[
i
].
u
.
paramdesc
.
wParamFlags
;
if
(
wParamFlags
&
PARAMFLAG_FRETVAL
)
if
(
wParamFlags
&
PARAMFLAG_FLCID
)
continue
;
else
if
(
wParamFlags
&
PARAMFLAG_FRETVAL
)
{
if
(
TRACE_ON
(
ole
))
{
...
...
@@ -6309,11 +6330,11 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
}
break
;
}
else
if
(
i
<
pDispParams
->
cArgs
)
else
if
(
vargs_converted
<
pDispParams
->
cArgs
)
{
if
(
wParamFlags
&
PARAMFLAG_FOUT
)
{
VARIANTARG
*
arg
=
&
pDispParams
->
rgvarg
[
pDispParams
->
cArgs
-
1
-
i
];
VARIANTARG
*
arg
=
&
pDispParams
->
rgvarg
[
pDispParams
->
cArgs
-
1
-
vargs_converted
];
if
((
rgvt
[
i
]
==
VT_BYREF
)
&&
(
V_VT
(
arg
)
!=
VT_BYREF
))
hres
=
VariantChangeType
(
arg
,
&
rgvarg
[
i
],
0
,
V_VT
(
arg
));
...
...
@@ -6321,7 +6342,7 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
if
(
FAILED
(
hres
))
{
ERR
(
"failed to convert param %d to vt %d
\n
"
,
i
,
V_VT
(
&
pDispParams
->
rgvarg
[
pDispParams
->
cArgs
-
1
-
i
]));
V_VT
(
&
pDispParams
->
rgvarg
[
pDispParams
->
cArgs
-
1
-
vargs_converted
]));
break
;
}
}
...
...
@@ -6354,6 +6375,7 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
}
}
VariantClear
(
&
rgvarg
[
i
]);
vargs_converted
++
;
}
else
if
(
wParamFlags
&
PARAMFLAG_FOPT
)
{
...
...
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