Alexandre Julliard : oleaut32: Properly register the stdole typelibs.
Alexandre Julliard
julliard at winehq.org
Wed Sep 23 11:03:19 CDT 2009
Module: wine
Branch: master
Commit: 6e2babc977c270d2166380acdedc0ded28ee488f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6e2babc977c270d2166380acdedc0ded28ee488f
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Sep 23 14:28:13 2009 +0200
oleaut32: Properly register the stdole typelibs.
---
dlls/oleaut32/regsvr.c | 34 ++++++++++++++++++++++++++++++++++
tools/wine.inf.in | 5 -----
2 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/dlls/oleaut32/regsvr.c b/dlls/oleaut32/regsvr.c
index 3c5fabc..75deac7 100644
--- a/dlls/oleaut32/regsvr.c
+++ b/dlls/oleaut32/regsvr.c
@@ -21,6 +21,7 @@
#include <stdarg.h>
#include <string.h>
+#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
@@ -378,6 +379,32 @@ static LONG register_key_defvalueA(
}
/***********************************************************************
+ * register_typelib
+ */
+static HRESULT register_typelib( const WCHAR *name )
+{
+ static const WCHAR backslash[] = {'\\',0};
+ HRESULT hr;
+ ITypeLib *typelib;
+ WCHAR *path;
+ DWORD len;
+
+ len = GetSystemDirectoryW( NULL, 0 ) + strlenW( name ) + 1;
+ if (!(path = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) return E_OUTOFMEMORY;
+ GetSystemDirectoryW( path, len );
+ strcatW( path, backslash );
+ strcatW( path, name );
+ hr = LoadTypeLib( path, &typelib );
+ if (SUCCEEDED(hr))
+ {
+ hr = RegisterTypeLib( typelib, path, NULL );
+ ITypeLib_Release( typelib );
+ }
+ HeapFree( GetProcessHeap(), 0, path );
+ return hr;
+}
+
+/***********************************************************************
* coclass list
*/
static GUID const CLSID_RecordInfo = {
@@ -538,6 +565,13 @@ HRESULT WINAPI DllRegisterServer(void)
hr = register_coclasses(coclass_list);
if (SUCCEEDED(hr))
hr = register_interfaces(interface_list);
+ if (SUCCEEDED(hr))
+ {
+ const WCHAR stdole32W[] = {'s','t','d','o','l','e','3','2','.','t','l','b',0};
+ const WCHAR stdole2W[] = {'s','t','d','o','l','e','2','.','t','l','b',0};
+ hr = register_typelib( stdole2W );
+ if (SUCCEEDED(hr)) hr = register_typelib( stdole32W );
+ }
return hr;
}
diff --git a/tools/wine.inf.in b/tools/wine.inf.in
index ab25de5..aedf14e 100644
--- a/tools/wine.inf.in
+++ b/tools/wine.inf.in
@@ -188,13 +188,8 @@ HKCR,AVIFile\Extensions\AVI,,,"{00020000-0000-0000-C000-000000000046}"
HKCR,AVIFile\Extensions\WAV,,,"{00020003-0000-0000-C000-000000000046}"
HKCR,AVIFile\RIFFHandlers\AVI,,,"{00020000-0000-0000-C000-000000000046}"
HKCR,AVIFile\RIFFHandlers\WAVE,,,"{00020003-0000-0000-C000-000000000046}"
-HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\1.0,,,"OLE Automation"
HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\1.0\0\win16,,,"stdole.tlb"
-HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\1.0\0\win32,,,"stdole32.tlb"
HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\1.0\FLAGS,,,"1"
-HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\2.0,,,"OLE Automation"
-HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\2.0\0\win32,,,"stdole2.tlb"
-HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\2.0\FLAGS,,,"0"
HKCR,MIME\Database\Charset\_iso-2022-jp$ESC,"Codepage",0x10003,932
HKCR,MIME\Database\Charset\_iso-2022-jp$ESC,"InternetEncoding",0x10003,50221
More information about the wine-cvs
mailing list