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
6b035d25
Commit
6b035d25
authored
Mar 15, 2010
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 16, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Simplify ICreateTypeInfo2_SetTypeFlags implementation.
parent
78166b0b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
34 deletions
+26
-34
typelib2.c
dlls/oleaut32/typelib2.c
+26
-34
No files found.
dlls/oleaut32/typelib2.c
View file @
6b035d25
...
...
@@ -1406,43 +1406,35 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetTypeFlags(ICreateTypeInfo2 *iface, U
TRACE
(
"(%p,0x%x)
\n
"
,
iface
,
uTypeFlags
);
This
->
typeinfo
->
flags
=
uTypeFlags
;
if
(
uTypeFlags
&
(
TYPEFLAG_FDISPATCHABLE
|
TYPEFLAG_FDUAL
))
{
static
const
WCHAR
stdole2tlb
[]
=
{
's'
,
't'
,
'd'
,
'o'
,
'l'
,
'e'
,
'2'
,
'.'
,
't'
,
'l'
,
'b'
,
0
};
ITypeLib
*
stdole
;
ITypeInfo
*
dispatch
;
HREFTYPE
hreftype
;
HRESULT
hres
;
if
(
uTypeFlags
&
TYPEFLAG_FDISPATCHABLE
)
{
MSFT_GuidEntry
foo
;
int
guidoffset
;
int
fileoffset
;
MSFT_ImpInfo
impinfo
;
static
const
WCHAR
stdole2tlb
[]
=
{
's'
,
't'
,
'd'
,
'o'
,
'l'
,
'e'
,
'2'
,
'.'
,
't'
,
'l'
,
'b'
,
0
};
foo
.
guid
=
IID_StdOle
;
foo
.
hreftype
=
2
;
foo
.
next_hash
=
-
1
;
guidoffset
=
ctl2_alloc_guid
(
This
->
typelib
,
&
foo
);
if
(
guidoffset
==
-
1
)
return
E_OUTOFMEMORY
;
fileoffset
=
ctl2_alloc_importfile
(
This
->
typelib
,
guidoffset
,
This
->
typelib
->
typelib_header
.
lcid2
,
2
,
0
,
stdole2tlb
);
if
(
fileoffset
==
-
1
)
return
E_OUTOFMEMORY
;
foo
.
guid
=
IID_IDispatch
;
foo
.
hreftype
=
1
;
foo
.
next_hash
=
-
1
;
guidoffset
=
ctl2_alloc_guid
(
This
->
typelib
,
&
foo
);
if
(
guidoffset
==
-
1
)
return
E_OUTOFMEMORY
;
impinfo
.
flags
=
TKIND_INTERFACE
<<
24
|
MSFT_IMPINFO_OFFSET_IS_GUID
;
impinfo
.
oImpFile
=
fileoffset
;
impinfo
.
oGuid
=
guidoffset
;
ctl2_alloc_importinfo
(
This
->
typelib
,
&
impinfo
);
This
->
typelib
->
typelib_header
.
dispatchpos
=
1
;
This
->
typeinfo
->
typekind
|=
0x10
;
This
->
typeinfo
->
typekind
&=
~
0x0f
;
This
->
typeinfo
->
typekind
|=
TKIND_DISPATCH
;
hres
=
LoadTypeLib
(
stdole2tlb
,
&
stdole
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
ITypeLib_GetTypeInfoOfGuid
(
stdole
,
&
IID_IDispatch
,
&
dispatch
);
ITypeLib_Release
(
stdole
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
ICreateTypeInfo2_AddRefTypeInfo
(
iface
,
dispatch
,
&
hreftype
);
ITypeInfo_Release
(
dispatch
);
if
(
FAILED
(
hres
))
return
hres
;
}
if
(
uTypeFlags
&
TYPEFLAG_FDUAL
)
{
This
->
typeinfo
->
typekind
|=
0x10
;
This
->
typeinfo
->
typekind
&=
~
0x0f
;
This
->
typeinfo
->
typekind
|=
TKIND_DISPATCH
;
}
This
->
typeinfo
->
flags
=
uTypeFlags
;
return
S_OK
;
}
...
...
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