oleaut32: Properly register the stdole typelibs.
This commit is contained in:
parent
9585bf6700
commit
6e2babc977
|
@ -21,6 +21,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
#define COBJMACROS
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
|
@ -377,6 +378,32 @@ static LONG register_key_defvalueA(
|
|||
return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* 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
|
||||
*/
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue