Alexander Morozov : shell32: Added typelib.
Alexandre Julliard
julliard at winehq.org
Wed Jan 19 11:46:15 CST 2011
Module: wine
Branch: master
Commit: 535f0bce59ed55dc4e0511259c7452bf7a9a59a6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=535f0bce59ed55dc4e0511259c7452bf7a9a59a6
Author: Alexander Morozov <amorozov at etersoft.ru>
Date: Tue Jan 18 21:36:08 2011 +0300
shell32: Added typelib.
---
.gitignore | 1 +
dlls/shell32/Makefile.in | 2 ++
dlls/shell32/regsvr.c | 13 +++++++++++++
dlls/shell32/shell32.rc | 3 +++
dlls/shell32/shell32_tlb.idl | 19 +++++++++++++++++++
5 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/.gitignore b/.gitignore
index cbc189d..3817eea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -127,6 +127,7 @@ dlls/rpcrt4/tests/server_c.c
dlls/rpcrt4/tests/server_s.c
dlls/shdocvw/shdocvw_v1.tlb
dlls/shell32/AUTHORS
+dlls/shell32/shell32_tlb.tlb
dlls/stdole2.tlb/std_ole_v2.tlb
dlls/stdole32.tlb/std_ole_v1.tlb
dlls/sti/sti_wia.h
diff --git a/dlls/shell32/Makefile.in b/dlls/shell32/Makefile.in
index 7755111..15cb9d5 100644
--- a/dlls/shell32/Makefile.in
+++ b/dlls/shell32/Makefile.in
@@ -89,6 +89,8 @@ RC_SRCS = \
PO_SRCS = shell32.rc
+IDL_TLB_SRCS = shell32_tlb.idl
+
SVG_SRCS = \
cdrom.svg \
control.svg \
diff --git a/dlls/shell32/regsvr.c b/dlls/shell32/regsvr.c
index f09d72b..9d3ca65 100644
--- a/dlls/shell32/regsvr.c
+++ b/dlls/shell32/regsvr.c
@@ -22,6 +22,8 @@
#include <string.h>
#include <stdio.h>
+#define COBJMACROS
+
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
@@ -837,6 +839,8 @@ static struct regsvr_namespace const namespace_extensions_list[] = {
HRESULT WINAPI DllRegisterServer(void)
{
HRESULT hr;
+ ITypeLib *tl;
+ static const WCHAR wszShell32[] = { 's','h','e','l','l','3','2','.','d','l','l', 0 };
TRACE("\n");
@@ -847,6 +851,12 @@ HRESULT WINAPI DllRegisterServer(void)
hr = SHELL_RegisterShellFolders();
if (SUCCEEDED(hr))
hr = register_namespace_extensions(namespace_extensions_list);
+ if (SUCCEEDED(hr))
+ {
+ hr = LoadTypeLibEx(wszShell32, REGKIND_REGISTER, &tl);
+ if(SUCCEEDED(hr))
+ ITypeLib_Release(tl);
+ }
return hr;
}
@@ -864,5 +874,8 @@ HRESULT WINAPI DllUnregisterServer(void)
hr = unregister_interfaces(interface_list);
if (SUCCEEDED(hr))
hr = unregister_namespace_extensions(namespace_extensions_list);
+ if (SUCCEEDED(hr))
+ hr = UnRegisterTypeLib(&LIBID_Shell32, 1, 0, LOCALE_SYSTEM_DEFAULT,
+ SYS_WIN32);
return hr;
}
diff --git a/dlls/shell32/shell32.rc b/dlls/shell32/shell32.rc
index bc8e8df..4459be0 100644
--- a/dlls/shell32/shell32.rc
+++ b/dlls/shell32/shell32.rc
@@ -260,6 +260,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA."
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+/* @makedep: shell32_tlb.tlb */
+1 TYPELIB shell32_tlb.tlb
+
shv_accel ACCELERATORS
BEGIN
VK_F5, FCIDM_SHVIEW_REFRESH, VIRTKEY
diff --git a/dlls/shell32/shell32_tlb.idl b/dlls/shell32/shell32_tlb.idl
new file mode 100644
index 0000000..2b6c719
--- /dev/null
+++ b/dlls/shell32/shell32_tlb.idl
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2010 Alexander Morozov for Etersoft
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "shldisp.idl"
More information about the wine-cvs
mailing list