diff --git a/dlls/atl80/Makefile.in b/dlls/atl80/Makefile.in index 70f416f9e7c..1b83f5f3970 100644 --- a/dlls/atl80/Makefile.in +++ b/dlls/atl80/Makefile.in @@ -1,4 +1,5 @@ MODULE = atl80.dll +IMPORTS = atl100 oleaut32 EXTRADEFS = -D_ATL_VER=_ATL_VER_80 diff --git a/dlls/atl80/atl80.c b/dlls/atl80/atl80.c index b250d32ef2b..c85f75e2311 100644 --- a/dlls/atl80/atl80.c +++ b/dlls/atl80/atl80.c @@ -16,11 +16,36 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include "windef.h" -#include "winbase.h" +#define COBJMACROS + #include "atlbase.h" +#include "wine/debug.h" +#include "wine/unicode.h" + +WINE_DEFAULT_DEBUG_CHANNEL(atl); + +/*********************************************************************** + * AtlRegisterTypeLib [atl80.19] + */ +HRESULT WINAPI AtlRegisterTypeLib(HINSTANCE inst, const WCHAR *index) +{ + ITypeLib *typelib; + BSTR path; + HRESULT hres; + + TRACE("(%p %s)\n", inst, debugstr_w(index)); + + hres = AtlLoadTypeLib(inst, index, &path, &typelib); + if(FAILED(hres)) + return hres; + + hres = RegisterTypeLib(typelib, path, NULL); /* FIXME: pass help directory */ + ITypeLib_Release(typelib); + SysFreeString(path); + return hres; +} + /*********************************************************************** * AtlGetVersion [atl80.@] */ diff --git a/dlls/atl80/atl80.spec b/dlls/atl80/atl80.spec index c6e589eb220..e4d73f15801 100644 --- a/dlls/atl80/atl80.spec +++ b/dlls/atl80/atl80.spec @@ -6,7 +6,7 @@ 15 stdcall AtlComModuleGetClassObject(ptr ptr ptr ptr) atl100.AtlComModuleGetClassObject 17 stub AtlComModuleRegisterClassObjects 18 stub AtlComModuleRegisterServer(ptr long ptr) -19 stub AtlRegisterTypeLib(ptr wstr) +19 stdcall AtlRegisterTypeLib(ptr wstr) 20 stub AtlComModuleRevokeClassObjects 22 stub AtlComModuleUnregisterServer 23 stdcall AtlUpdateRegistryFromResourceD(long wstr long ptr ptr) atl100.AtlUpdateRegistryFromResourceD diff --git a/include/atlbase.h b/include/atlbase.h index ee8167c8558..39c3741eab7 100644 --- a/include/atlbase.h +++ b/include/atlbase.h @@ -252,6 +252,7 @@ HRESULT WINAPI AtlUnmarshalPtr(IStream *pStream, const IID *iid, IUnknown **ppUn HRESULT WINAPI AtlCreateRegistrar(IRegistrar**); HRESULT WINAPI AtlUpdateRegistryFromResourceD(HINSTANCE,LPCOLESTR,BOOL,struct _ATL_REGMAP_ENTRY*,IRegistrar*); HRESULT WINAPI AtlLoadTypeLib(HINSTANCE,LPCOLESTR,BSTR*,ITypeLib**); +HRESULT WINAPI AtlRegisterTypeLib(HINSTANCE,LPCOLESTR); HRESULT WINAPI AtlRegisterClassCategoriesHelper(REFCLSID,const struct _ATL_CATMAP_ENTRY*,BOOL); HRESULT WINAPI AtlComModuleGetClassObject(_ATL_COM_MODULE*,REFCLSID,REFIID,void**);