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
cbf55d82
Commit
cbf55d82
authored
Jan 28, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 28, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Uuid attribute is allowed for 'struct'.
parent
f9f52edb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
30 deletions
+65
-30
test_tlb.idl
dlls/oleaut32/tests/test_tlb.idl
+6
-0
typelib.c
dlls/oleaut32/tests/typelib.c
+56
-28
objbase.h
include/objbase.h
+2
-1
parser.y
tools/widl/parser.y
+1
-1
No files found.
dlls/oleaut32/tests/test_tlb.idl
View file @
cbf55d82
...
...
@@ -38,4 +38,10 @@ library Test
{
HRESULT
test
()
;
}
[
uuid
(
4029
f190
-
ca4a
-
4611
-
aeb9
-
673983
cb96dd
)
]
struct
test_struct
{
HRESULT
f
;
}
;
}
dlls/oleaut32/tests/typelib.c
View file @
cbf55d82
...
...
@@ -28,6 +28,7 @@
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "oleauto.h"
#include "ocidl.h"
#include "shlwapi.h"
...
...
@@ -39,6 +40,7 @@
#define expect_int(expr, value) expect_eq(expr, (int)(value), int, "%d")
#define expect_hex(expr, value) expect_eq(expr, (int)(value), int, "0x%x")
#define expect_null(expr) expect_eq(expr, NULL, const void *, "%p")
#define expect_guid(expected, guid) { ok(IsEqualGUID(expected, guid), "got wrong guid\n"); }
#define expect_wstr_acpval(expr, value) \
{ \
...
...
@@ -3757,9 +3759,10 @@ typedef struct _function_info
LPCSTR
names
[
15
];
}
function_info
;
typedef
struct
_
interfac
e_info
typedef
struct
_
typ
e_info
{
LPCSTR
name
;
LPCSTR
uuid
;
TYPEKIND
type
;
WORD
wTypeFlags
;
USHORT
cbAlignment
;
...
...
@@ -3767,17 +3770,17 @@ typedef struct _interface_info
USHORT
cbSizeVft
;
USHORT
cFuncs
;
function_info
funcs
[
20
];
}
interfac
e_info
;
}
typ
e_info
;
static
const
interface_info
info
[]
=
{
/* interfaces count: 2 */
static
const
type_info
info
[]
=
{
{
"IDualIface"
,
/*kind*/
TKIND_DISPATCH
,
/*flags*/
0x1040
,
/*align*/
4
,
/*size*/
sizeof
(
void
*
),
"{b14b6bb5-904e-4ff9-b247-bd361f7aaedd}"
,
/*kind*/
TKIND_DISPATCH
,
/*flags*/
TYPEFLAG_FDISPATCHABLE
|
TYPEFLAG_FDUAL
,
/*align*/
4
,
/*size*/
sizeof
(
void
*
),
/*#vtbl*/
7
,
/*#func*/
8
,
{
{
0x60000000
,
/*func*/
FUNC_DISPATCH
,
/*inv*/
INVOKE_FUNC
,
/*call*/
0x4
,
0x60000000
,
/*func*/
FUNC_DISPATCH
,
/*inv*/
INVOKE_FUNC
,
/*call*/
CC_STDCALL
,
/*#param*/
2
,
/*#opt*/
0
,
/*vtbl*/
0
,
/*#scodes*/
0
,
/*flags*/
0x1
,
{
24
,
0
},
/* ret */
{
/* params */
...
...
@@ -3793,7 +3796,7 @@ static const interface_info info[] = {
},
},
{
0x60000001
,
/*func*/
FUNC_DISPATCH
,
/*inv*/
INVOKE_FUNC
,
/*call*/
0x4
,
0x60000001
,
/*func*/
FUNC_DISPATCH
,
/*inv*/
INVOKE_FUNC
,
/*call*/
CC_STDCALL
,
/*#param*/
0
,
/*#opt*/
0
,
/*vtbl*/
1
,
/*#scodes*/
0
,
/*flags*/
0x1
,
{
19
,
0
},
/* ret */
{
/* params */
...
...
@@ -3805,7 +3808,7 @@ static const interface_info info[] = {
},
},
{
0x60000002
,
/*func*/
FUNC_DISPATCH
,
/*inv*/
INVOKE_FUNC
,
/*call*/
0x4
,
0x60000002
,
/*func*/
FUNC_DISPATCH
,
/*inv*/
INVOKE_FUNC
,
/*call*/
CC_STDCALL
,
/*#param*/
0
,
/*#opt*/
0
,
/*vtbl*/
2
,
/*#scodes*/
0
,
/*flags*/
0x1
,
{
19
,
0
},
/* ret */
{
/* params */
...
...
@@ -3817,7 +3820,7 @@ static const interface_info info[] = {
},
},
{
0x60010000
,
/*func*/
FUNC_DISPATCH
,
/*inv*/
INVOKE_FUNC
,
/*call*/
0x4
,
0x60010000
,
/*func*/
FUNC_DISPATCH
,
/*inv*/
INVOKE_FUNC
,
/*call*/
CC_STDCALL
,
/*#param*/
1
,
/*#opt*/
0
,
/*vtbl*/
3
,
/*#scodes*/
0
,
/*flags*/
0x1
,
{
24
,
0
},
/* ret */
{
/* params */
...
...
@@ -3831,7 +3834,7 @@ static const interface_info info[] = {
},
},
{
0x60010001
,
/*func*/
FUNC_DISPATCH
,
/*inv*/
INVOKE_FUNC
,
/*call*/
0x4
,
0x60010001
,
/*func*/
FUNC_DISPATCH
,
/*inv*/
INVOKE_FUNC
,
/*call*/
CC_STDCALL
,
/*#param*/
3
,
/*#opt*/
0
,
/*vtbl*/
4
,
/*#scodes*/
0
,
/*flags*/
0x1
,
{
24
,
0
},
/* ret */
{
/* params */
...
...
@@ -3849,7 +3852,7 @@ static const interface_info info[] = {
},
},
{
0x60010002
,
/*func*/
FUNC_DISPATCH
,
/*inv*/
INVOKE_FUNC
,
/*call*/
0x4
,
0x60010002
,
/*func*/
FUNC_DISPATCH
,
/*inv*/
INVOKE_FUNC
,
/*call*/
CC_STDCALL
,
/*#param*/
5
,
/*#opt*/
0
,
/*vtbl*/
5
,
/*#scodes*/
0
,
/*flags*/
0x1
,
{
24
,
0
},
/* ret */
{
/* params */
...
...
@@ -3871,7 +3874,7 @@ static const interface_info info[] = {
},
},
{
0x60010003
,
/*func*/
FUNC_DISPATCH
,
/*inv*/
INVOKE_FUNC
,
/*call*/
0x4
,
0x60010003
,
/*func*/
FUNC_DISPATCH
,
/*inv*/
INVOKE_FUNC
,
/*call*/
CC_STDCALL
,
/*#param*/
8
,
/*#opt*/
0
,
/*vtbl*/
6
,
/*#scodes*/
0
,
/*flags*/
0x1
,
{
24
,
0
},
/* ret */
{
/* params */
...
...
@@ -3899,7 +3902,7 @@ static const interface_info info[] = {
},
},
{
0x60020000
,
/*func*/
FUNC_DISPATCH
,
/*inv*/
INVOKE_FUNC
,
/*call*/
0x4
,
0x60020000
,
/*func*/
FUNC_DISPATCH
,
/*inv*/
INVOKE_FUNC
,
/*call*/
CC_STDCALL
,
/*#param*/
0
,
/*#opt*/
0
,
/*vtbl*/
7
,
/*#scodes*/
0
,
/*flags*/
0x0
,
{
24
,
0
},
/* ret */
{
/* params */
...
...
@@ -3914,11 +3917,12 @@ static const interface_info info[] = {
},
{
"ISimpleIface"
,
/*kind*/
TKIND_INTERFACE
,
/*flags*/
0x1000
,
/*align*/
4
,
/*size*/
sizeof
(
void
*
),
"{ec5dfcd6-eeb0-4cd6-b51e-8030e1dac009}"
,
/*kind*/
TKIND_INTERFACE
,
/*flags*/
TYPEFLAG_FDISPATCHABLE
,
/*align*/
4
,
/*size*/
sizeof
(
void
*
),
/*#vtbl*/
8
,
/*#func*/
1
,
{
{
0x60020000
,
/*func*/
FUNC_PUREVIRTUAL
,
/*inv*/
INVOKE_FUNC
,
/*call*/
0x4
,
0x60020000
,
/*func*/
FUNC_PUREVIRTUAL
,
/*inv*/
INVOKE_FUNC
,
/*call*/
CC_STDCALL
,
/*#param*/
0
,
/*#opt*/
0
,
/*vtbl*/
7
,
/*#scodes*/
0
,
/*flags*/
0x0
,
{
25
,
0
},
/* ret */
{
/* params */
...
...
@@ -3931,6 +3935,11 @@ static const interface_info info[] = {
},
}
},
{
"test_struct"
,
"{4029f190-ca4a-4611-aeb9-673983cb96dd}"
,
/* kind */
TKIND_RECORD
,
/*flags*/
0
,
/*align*/
4
,
/*size*/
4
}
};
#define check_type(elem, info) { \
...
...
@@ -3942,36 +3951,55 @@ static void test_dump_typelib(const char *name)
{
WCHAR
wszName
[
MAX_PATH
];
ITypeLib
*
typelib
;
int
if
count
=
sizeof
(
info
)
/
sizeof
(
info
[
0
]);
int
ti
count
=
sizeof
(
info
)
/
sizeof
(
info
[
0
]);
int
iface
,
func
;
MultiByteToWideChar
(
CP_ACP
,
0
,
name
,
-
1
,
wszName
,
MAX_PATH
);
ole_check
(
LoadTypeLibEx
(
wszName
,
REGKIND_NONE
,
&
typelib
));
expect_eq
(
ITypeLib_GetTypeInfoCount
(
typelib
),
if
count
,
UINT
,
"%d"
);
for
(
iface
=
0
;
iface
<
if
count
;
iface
++
)
expect_eq
(
ITypeLib_GetTypeInfoCount
(
typelib
),
ti
count
,
UINT
,
"%d"
);
for
(
iface
=
0
;
iface
<
ti
count
;
iface
++
)
{
const
interface_info
*
if_info
=
&
info
[
iface
];
const
type_info
*
ti
=
&
info
[
iface
];
ITypeInfo
*
typeinfo
;
TYPEATTR
*
typeattr
;
BSTR
bstrIfName
;
trace
(
"Interface %s
\n
"
,
if_info
->
name
);
trace
(
"Interface %s
\n
"
,
ti
->
name
);
ole_check
(
ITypeLib_GetTypeInfo
(
typelib
,
iface
,
&
typeinfo
));
ole_check
(
ITypeLib_GetDocumentation
(
typelib
,
iface
,
&
bstrIfName
,
NULL
,
NULL
,
NULL
));
expect_wstr_acpval
(
bstrIfName
,
if_info
->
name
);
expect_wstr_acpval
(
bstrIfName
,
ti
->
name
);
SysFreeString
(
bstrIfName
);
ole_check
(
ITypeInfo_GetTypeAttr
(
typeinfo
,
&
typeattr
));
expect_int
(
typeattr
->
typekind
,
if_info
->
type
);
expect_hex
(
typeattr
->
wTypeFlags
,
if_info
->
wTypeFlags
);
expect_int
(
typeattr
->
cbAlignment
,
if_info
->
cbAlignment
);
expect_int
(
typeattr
->
cbSizeInstance
,
if_info
->
cbSizeInstance
);
expect_int
(
typeattr
->
cbSizeVft
,
if_info
->
cbSizeVft
*
sizeof
(
void
*
));
expect_int
(
typeattr
->
cFuncs
,
if_info
->
cFuncs
);
expect_int
(
typeattr
->
typekind
,
ti
->
type
);
expect_hex
(
typeattr
->
wTypeFlags
,
ti
->
wTypeFlags
);
expect_int
(
typeattr
->
cbAlignment
,
ti
->
cbAlignment
);
expect_int
(
typeattr
->
cbSizeInstance
,
ti
->
cbSizeInstance
);
expect_int
(
typeattr
->
cbSizeVft
,
ti
->
cbSizeVft
*
sizeof
(
void
*
));
expect_int
(
typeattr
->
cFuncs
,
ti
->
cFuncs
);
/* compare type uuid */
if
(
ti
->
uuid
&&
*
ti
->
uuid
)
{
WCHAR
guidW
[
39
]
=
{
0
};
ITypeInfo
*
typeinfo2
;
HRESULT
hr
;
GUID
guid
;
MultiByteToWideChar
(
CP_ACP
,
0
,
ti
->
uuid
,
-
1
,
guidW
,
40
);
IIDFromString
(
guidW
,
&
guid
);
expect_guid
(
&
guid
,
&
typeattr
->
guid
);
/* check that it's possible to search using this uuid */
typeinfo2
=
NULL
;
hr
=
ITypeLib_GetTypeInfoOfGuid
(
typelib
,
&
guid
,
&
typeinfo2
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ITypeInfo_Release
(
typeinfo2
);
}
for
(
func
=
0
;
func
<
typeattr
->
cFuncs
;
func
++
)
{
function_info
*
fn_info
=
(
function_info
*
)
&
if_info
->
funcs
[
func
];
function_info
*
fn_info
=
(
function_info
*
)
&
ti
->
funcs
[
func
];
FUNCDESC
*
desc
;
BSTR
namesTab
[
256
];
UINT
cNames
;
...
...
include/objbase.h
View file @
cbf55d82
...
...
@@ -393,8 +393,9 @@ HRESULT WINAPI StringFromCLSID(REFCLSID id, LPOLESTR*);
HRESULT
WINAPI
CLSIDFromString
(
LPCOLESTR
,
LPCLSID
);
HRESULT
WINAPI
CLSIDFromProgID
(
LPCOLESTR
progid
,
LPCLSID
riid
);
HRESULT
WINAPI
ProgIDFromCLSID
(
REFCLSID
clsid
,
LPOLESTR
*
lplpszProgID
);
INT
WINAPI
StringFromGUID2
(
REFGUID
id
,
LPOLESTR
str
,
INT
cmax
);
HRESULT
WINAPI
IIDFromString
(
LPCOLESTR
str
,
IID
*
iid
);
HRESULT
WINAPI
StringFromIID
(
REFIID
riid
,
LPOLESTR
str
);
/*****************************************************************************
* COM Server dll - exports
...
...
tools/widl/parser.y
View file @
cbf55d82
...
...
@@ -2114,7 +2114,7 @@ struct allowed_attr allowed_attr[] =
/* ATTR_UIDEFAULT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "uidefault" },
/* ATTR_USESGETLASTERROR */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "usesgetlasterror" },
/* ATTR_USERMARSHAL */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "user_marshal" },
/* ATTR_UUID */ { 1, 0, 1, 0, 0, 1, 1,
0
, 0, 0, 1, 1, 1, 1, "uuid" },
/* ATTR_UUID */ { 1, 0, 1, 0, 0, 1, 1,
1
, 0, 0, 1, 1, 1, 1, "uuid" },
/* ATTR_V1ENUM */ { 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, "v1_enum" },
/* ATTR_VARARG */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "vararg" },
/* ATTR_VERSION */ { 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, "version" },
...
...
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