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
852a42e2
Commit
852a42e2
authored
Jan 15, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atl100: Added AtlGetObjectSourceInterface implementation.
parent
0b10f0b8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
115 additions
and
3 deletions
+115
-3
atl.spec
dlls/atl/atl.spec
+1
-1
atl.c
dlls/atl100/atl.c
+111
-0
atl100.spec
dlls/atl100/atl100.spec
+1
-1
atl80.spec
dlls/atl80/atl80.spec
+1
-1
atlbase.h
include/atlbase.h
+1
-0
No files found.
dlls/atl/atl.spec
View file @
852a42e2
...
...
@@ -45,7 +45,7 @@
51 stdcall AtlIPersistStreamInit_Save(ptr long ptr ptr ptr) atl100.AtlIPersistStreamInit_Save
52 stub AtlIPersistPropertyBag_Load
53 stub AtlIPersistPropertyBag_Save
54 st
ub
AtlGetObjectSourceInterface
54 st
dcall AtlGetObjectSourceInterface(ptr ptr ptr ptr ptr) atl100.
AtlGetObjectSourceInterface
55 stub AtlModuleUnRegisterTypeLib
56 stdcall AtlModuleLoadTypeLib(ptr wstr ptr ptr)
57 stdcall AtlModuleUnregisterServerEx(ptr long ptr)
...
...
dlls/atl100/atl.c
View file @
852a42e2
...
...
@@ -595,6 +595,117 @@ BOOL WINAPI AtlWaitWithMessageLoop(HANDLE handle)
}
}
static
HRESULT
get_default_source
(
ITypeLib
*
typelib
,
const
CLSID
*
clsid
,
IID
*
iid
)
{
ITypeInfo
*
typeinfo
,
*
src_typeinfo
=
NULL
;
TYPEATTR
*
attr
;
int
type_flags
;
unsigned
i
;
HRESULT
hres
;
hres
=
ITypeLib_GetTypeInfoOfGuid
(
typelib
,
clsid
,
&
typeinfo
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
ITypeInfo_GetTypeAttr
(
typeinfo
,
&
attr
);
if
(
FAILED
(
hres
))
{
ITypeInfo_Release
(
typeinfo
);
return
hres
;
}
for
(
i
=
0
;
i
<
attr
->
cImplTypes
;
i
++
)
{
hres
=
ITypeInfo_GetImplTypeFlags
(
typeinfo
,
i
,
&
type_flags
);
if
(
SUCCEEDED
(
hres
)
&&
type_flags
==
(
IMPLTYPEFLAG_FSOURCE
|
IMPLTYPEFLAG_FDEFAULT
))
{
HREFTYPE
ref
;
hres
=
ITypeInfo_GetRefTypeOfImplType
(
typeinfo
,
i
,
&
ref
);
if
(
SUCCEEDED
(
hres
))
hres
=
ITypeInfo_GetRefTypeInfo
(
typeinfo
,
ref
,
&
src_typeinfo
);
break
;
}
}
ITypeInfo_ReleaseTypeAttr
(
typeinfo
,
attr
);
ITypeInfo_Release
(
typeinfo
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
!
src_typeinfo
)
{
*
iid
=
IID_NULL
;
return
S_OK
;
}
hres
=
ITypeInfo_GetTypeAttr
(
src_typeinfo
,
&
attr
);
if
(
SUCCEEDED
(
hres
))
{
*
iid
=
attr
->
guid
;
ITypeInfo_ReleaseTypeAttr
(
src_typeinfo
,
attr
);
}
ITypeInfo_Release
(
src_typeinfo
);
return
hres
;
}
/***********************************************************************
* AtlGetObjectSourceInterface [atl100.54]
*/
HRESULT
WINAPI
AtlGetObjectSourceInterface
(
IUnknown
*
unk
,
GUID
*
libid
,
IID
*
iid
,
unsigned
short
*
major
,
unsigned
short
*
minor
)
{
IProvideClassInfo2
*
classinfo
;
ITypeInfo
*
typeinfo
;
ITypeLib
*
typelib
;
IPersist
*
persist
;
IDispatch
*
disp
;
HRESULT
hres
;
TRACE
(
"(%p %p %p %p %p)
\n
"
,
unk
,
libid
,
iid
,
major
,
minor
);
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IDispatch
,
(
void
**
)
&
disp
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IDispatch_GetTypeInfo
(
disp
,
0
,
0
,
&
typeinfo
);
IDispatch_Release
(
disp
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
ITypeInfo_GetContainingTypeLib
(
typeinfo
,
&
typelib
,
0
);
ITypeInfo_Release
(
typeinfo
);
if
(
SUCCEEDED
(
hres
))
{
TLIBATTR
*
attr
;
hres
=
ITypeLib_GetLibAttr
(
typelib
,
&
attr
);
if
(
SUCCEEDED
(
hres
))
{
*
libid
=
attr
->
guid
;
*
major
=
attr
->
wMajorVerNum
;
*
minor
=
attr
->
wMinorVerNum
;
ITypeLib_ReleaseTLibAttr
(
typelib
,
attr
);
}
else
{
ITypeLib_Release
(
typelib
);
}
}
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IProvideClassInfo2
,
(
void
**
)
&
classinfo
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
IProvideClassInfo2_GetGUID
(
classinfo
,
GUIDKIND_DEFAULT_SOURCE_DISP_IID
,
iid
);
IProvideClassInfo2_Release
(
classinfo
);
ITypeLib_Release
(
typelib
);
return
hres
;
}
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IPersist
,
(
void
**
)
&
persist
);
if
(
SUCCEEDED
(
hres
))
{
CLSID
clsid
;
hres
=
IPersist_GetClassID
(
persist
,
&
clsid
);
if
(
SUCCEEDED
(
hres
))
hres
=
get_default_source
(
typelib
,
&
clsid
,
iid
);
IPersist_Release
(
persist
);
}
return
hres
;
}
/***********************************************************************
* AtlGetVersion [atl100.@]
*/
...
...
dlls/atl100/atl100.spec
View file @
852a42e2
...
...
@@ -37,7 +37,7 @@
51 stdcall AtlIPersistStreamInit_Save(ptr long ptr ptr ptr)
52 stub AtlIPersistPropertyBag_Load
53 stub AtlIPersistPropertyBag_Save
54 st
ub AtlGetObjectSourceInterface
54 st
dcall AtlGetObjectSourceInterface(ptr ptr ptr ptr ptr)
56 stdcall AtlLoadTypeLib(long wstr ptr ptr)
58 stdcall AtlModuleAddTermFunc(ptr ptr long)
59 stub AtlAxCreateControlLic
...
...
dlls/atl80/atl80.spec
View file @
852a42e2
...
...
@@ -39,7 +39,7 @@
51 stdcall AtlIPersistStreamInit_Save(ptr long ptr ptr ptr) atl100.AtlIPersistStreamInit_Save
52 stub AtlIPersistPropertyBag_Load
53 stub AtlIPersistPropertyBag_Save
54 st
ub
AtlGetObjectSourceInterface
54 st
dcall AtlGetObjectSourceInterface(ptr ptr ptr ptr ptr) atl100.
AtlGetObjectSourceInterface
55 stub AtlUnRegisterTypeLib
56 stdcall AtlLoadTypeLib(long wstr ptr ptr) atl100.AtlLoadTypeLib
58 stdcall AtlModuleAddTermFunc(ptr ptr long) atl100.AtlModuleAddTermFunc
...
...
include/atlbase.h
View file @
852a42e2
...
...
@@ -257,5 +257,6 @@ HRESULT WINAPI AtlRegisterClassCategoriesHelper(REFCLSID,const struct _ATL_CATMA
HRESULT
WINAPI
AtlComModuleGetClassObject
(
_ATL_COM_MODULE
*
,
REFCLSID
,
REFIID
,
void
**
);
HRESULT
WINAPI
AtlComModuleUnregisterServer
(
_ATL_COM_MODULE
*
,
BOOL
,
const
CLSID
*
);
BOOL
WINAPI
AtlWaitWithMessageLoop
(
HANDLE
);
HRESULT
WINAPI
AtlGetObjectSourceInterface
(
IUnknown
*
,
GUID
*
,
IID
*
,
unsigned
short
*
,
unsigned
short
*
);
#endif
/* __WINE_ATLBASE_H__ */
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