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
a2ea406e
Commit
a2ea406e
authored
Sep 04, 2013
by
Piotr Caban
Committed by
Alexandre Julliard
Sep 05, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Add ICreateTypeInfo2::SetVarName implementation.
parent
f21961cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
4 deletions
+25
-4
typelib.c
dlls/oleaut32/tests/typelib.c
+14
-2
typelib.c
dlls/oleaut32/typelib.c
+11
-2
No files found.
dlls/oleaut32/tests/typelib.c
View file @
a2ea406e
...
@@ -4287,13 +4287,14 @@ static void test_SetVarDocString(void)
...
@@ -4287,13 +4287,14 @@ static void test_SetVarDocString(void)
static
OLECHAR
nameW
[]
=
{
'n'
,
'a'
,
'm'
,
'e'
,
0
};
static
OLECHAR
nameW
[]
=
{
'n'
,
'a'
,
'm'
,
'e'
,
0
};
static
OLECHAR
doc1W
[]
=
{
'd'
,
'o'
,
'c'
,
'1'
,
0
};
static
OLECHAR
doc1W
[]
=
{
'd'
,
'o'
,
'c'
,
'1'
,
0
};
static
OLECHAR
doc2W
[]
=
{
'd'
,
'o'
,
'c'
,
'2'
,
0
};
static
OLECHAR
doc2W
[]
=
{
'd'
,
'o'
,
'c'
,
'2'
,
0
};
static
OLECHAR
var_nameW
[]
=
{
'v'
,
'a'
,
'r'
,
'n'
,
'a'
,
'm'
,
'e'
,
0
};
CHAR
filenameA
[
MAX_PATH
];
CHAR
filenameA
[
MAX_PATH
];
WCHAR
filenameW
[
MAX_PATH
];
WCHAR
filenameW
[
MAX_PATH
];
ICreateTypeLib2
*
ctl
;
ICreateTypeLib2
*
ctl
;
ICreateTypeInfo
*
cti
;
ICreateTypeInfo
*
cti
;
ITypeLib
*
tl
;
ITypeLib
*
tl
;
ITypeInfo
*
ti
;
ITypeInfo
*
ti
;
BSTR
docstr
;
BSTR
namestr
,
docstr
;
VARDESC
desc
,
*
pdesc
;
VARDESC
desc
,
*
pdesc
;
HRESULT
hr
;
HRESULT
hr
;
VARIANT
v
;
VARIANT
v
;
...
@@ -4324,6 +4325,15 @@ static void test_SetVarDocString(void)
...
@@ -4324,6 +4325,15 @@ static void test_SetVarDocString(void)
hr
=
ICreateTypeInfo_AddVarDesc
(
cti
,
0
,
&
desc
);
hr
=
ICreateTypeInfo_AddVarDesc
(
cti
,
0
,
&
desc
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
ICreateTypeInfo_SetVarName
(
cti
,
0
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
hr
=
ICreateTypeInfo_SetVarName
(
cti
,
1
,
var_nameW
);
ok
(
hr
==
TYPE_E_ELEMENTNOTFOUND
,
"got %08x
\n
"
,
hr
);
hr
=
ICreateTypeInfo_SetVarName
(
cti
,
0
,
var_nameW
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
ICreateTypeInfo_SetVarDocString
(
cti
,
0
,
NULL
);
hr
=
ICreateTypeInfo_SetVarDocString
(
cti
,
0
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
...
@@ -4359,10 +4369,12 @@ static void test_SetVarDocString(void)
...
@@ -4359,10 +4369,12 @@ static void test_SetVarDocString(void)
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
));
ok
(
V_INT
(
U
(
pdesc
)
->
lpvarValue
)
==
1
,
"got wrong value: 0x%x
\n
"
,
V_INT
(
U
(
pdesc
)
->
lpvarValue
));
ok
(
V_INT
(
U
(
pdesc
)
->
lpvarValue
)
==
1
,
"got wrong value: 0x%x
\n
"
,
V_INT
(
U
(
pdesc
)
->
lpvarValue
));
hr
=
ITypeInfo_GetDocumentation
(
ti
,
pdesc
->
memid
,
NULL
,
&
docstr
,
NULL
,
NULL
);
hr
=
ITypeInfo_GetDocumentation
(
ti
,
pdesc
->
memid
,
&
namestr
,
&
docstr
,
NULL
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
memcmp
(
namestr
,
var_nameW
,
sizeof
(
var_nameW
))
==
0
,
"got wrong name: %s
\n
"
,
wine_dbgstr_w
(
namestr
));
ok
(
memcmp
(
docstr
,
doc2W
,
sizeof
(
doc2W
))
==
0
,
"got wrong docstring: %s
\n
"
,
wine_dbgstr_w
(
docstr
));
ok
(
memcmp
(
docstr
,
doc2W
,
sizeof
(
doc2W
))
==
0
,
"got wrong docstring: %s
\n
"
,
wine_dbgstr_w
(
docstr
));
SysFreeString
(
namestr
);
SysFreeString
(
docstr
);
SysFreeString
(
docstr
);
ITypeInfo_ReleaseVarDesc
(
ti
,
pdesc
);
ITypeInfo_ReleaseVarDesc
(
ti
,
pdesc
);
...
...
dlls/oleaut32/typelib.c
View file @
a2ea406e
...
@@ -10688,8 +10688,17 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetVarName(ICreateTypeInfo2 *iface,
...
@@ -10688,8 +10688,17 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetVarName(ICreateTypeInfo2 *iface,
UINT
index
,
LPOLESTR
name
)
UINT
index
,
LPOLESTR
name
)
{
{
ITypeInfoImpl
*
This
=
info_impl_from_ICreateTypeInfo2
(
iface
);
ITypeInfoImpl
*
This
=
info_impl_from_ICreateTypeInfo2
(
iface
);
FIXME
(
"%p %u %s - stub
\n
"
,
This
,
index
,
wine_dbgstr_w
(
name
));
return
E_NOTIMPL
;
TRACE
(
"%p %u %s
\n
"
,
This
,
index
,
wine_dbgstr_w
(
name
));
if
(
!
name
)
return
E_INVALIDARG
;
if
(
index
>=
This
->
cVars
)
return
TYPE_E_ELEMENTNOTFOUND
;
This
->
vardescs
[
index
].
Name
=
TLB_append_str
(
&
This
->
pTypeLib
->
name_list
,
name
);
return
S_OK
;
}
}
static
HRESULT
WINAPI
ICreateTypeInfo2_fnSetTypeDescAlias
(
ICreateTypeInfo2
*
iface
,
static
HRESULT
WINAPI
ICreateTypeInfo2_fnSetTypeDescAlias
(
ICreateTypeInfo2
*
iface
,
...
...
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