Jacek Caban : atl100: Added AtlLoadTypeLib implementation ( based on AtlModuleLoadTypeLib).
Alexandre Julliard
julliard at winehq.org
Tue Dec 11 14:41:15 CST 2012
Module: wine
Branch: master
Commit: b09af0d0b2ab6cceac849533fad0069b3acd85e3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b09af0d0b2ab6cceac849533fad0069b3acd85e3
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue Dec 11 13:02:46 2012 +0100
atl100: Added AtlLoadTypeLib implementation (based on AtlModuleLoadTypeLib).
---
dlls/atl100/atl.c | 23 +++++++++++++++++++++++
dlls/atl100/atl100.spec | 2 +-
include/atlbase.h | 1 +
3 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/dlls/atl100/atl.c b/dlls/atl100/atl.c
index dd08867..7e273b7 100644
--- a/dlls/atl100/atl.c
+++ b/dlls/atl100/atl.c
@@ -265,6 +265,29 @@ void WINAPI AtlCallTermFunc(_ATL_MODULE *pM)
}
/***********************************************************************
+ * AtlLoadTypeLib [atl100.@]
+ */
+HRESULT WINAPI AtlLoadTypeLib(HINSTANCE inst, LPCOLESTR lpszIndex,
+ BSTR *pbstrPath, ITypeLib **ppTypeLib)
+{
+ OLECHAR path[MAX_PATH+8]; /* leave some space for index */
+ HRESULT hres;
+
+ TRACE("(%p %s %p %p)\n", inst, debugstr_w(lpszIndex), pbstrPath, ppTypeLib);
+
+ GetModuleFileNameW(inst, path, MAX_PATH);
+ if(lpszIndex)
+ lstrcatW(path, lpszIndex);
+
+ hres = LoadTypeLib(path, ppTypeLib);
+ if(FAILED(hres))
+ return hres;
+
+ *pbstrPath = SysAllocString(path);
+ return S_OK;
+}
+
+/***********************************************************************
* AtlGetVersion [atl100.@]
*/
DWORD WINAPI AtlGetVersion(void *pReserved)
diff --git a/dlls/atl100/atl100.spec b/dlls/atl100/atl100.spec
index 13e043b..ec8a858 100644
--- a/dlls/atl100/atl100.spec
+++ b/dlls/atl100/atl100.spec
@@ -38,7 +38,7 @@
52 stub AtlIPersistPropertyBag_Load
53 stub AtlIPersistPropertyBag_Save
54 stub AtlGetObjectSourceInterface
-56 stub AtlLoadTypeLib
+56 stdcall AtlLoadTypeLib(long wstr ptr ptr)
58 stdcall AtlModuleAddTermFunc(ptr ptr long)
59 stub AtlAxCreateControlLic
60 stub AtlAxCreateControlLicEx
diff --git a/include/atlbase.h b/include/atlbase.h
index 5dd0d5b..4aeabe9 100644
--- a/include/atlbase.h
+++ b/include/atlbase.h
@@ -211,5 +211,6 @@ HRESULT WINAPI AtlUnadvise(IUnknown *pUnkCP, const IID * iid, DWORD dw);
HRESULT WINAPI AtlUnmarshalPtr(IStream *pStream, const IID *iid, IUnknown **ppUnk);
HRESULT WINAPI AtlCreateRegistrar(IRegistrar**);
HRESULT WINAPI AtlUpdateRegistryFromResourceD(HINSTANCE,LPCOLESTR,BOOL,struct _ATL_REGMAP_ENTRY*,IRegistrar*);
+HRESULT WINAPI AtlLoadTypeLib(HINSTANCE,LPCOLESTR,BSTR*,ITypeLib**);
#endif /* __WINE_ATLBASE_H__ */
More information about the wine-cvs
mailing list