summaryrefslogtreecommitdiff
path: root/extensions/test
diff options
context:
space:
mode:
authorJoachim Lingner <jl@openoffice.org>2001-11-26 14:59:41 +0000
committerJoachim Lingner <jl@openoffice.org>2001-11-26 14:59:41 +0000
commit992acd1f4aff54b8b0f6c656a7fe54c27c1fe35e (patch)
tree0146d4ee24f68a3ecbf2a1f9d7160b05f23cb98e /extensions/test
parent5c74e25d24f7b6b877b4c16c2ec3100400008d0e (diff)
*** empty log message ***
Diffstat (limited to 'extensions/test')
-rw-r--r--extensions/test/ole/EventListenerSample/EventListener/EventListener.cpp72
-rw-r--r--extensions/test/ole/EventListenerSample/EventListener/EventListener.dsp323
-rw-r--r--extensions/test/ole/EventListenerSample/EventListener/EventListener.dsw29
-rw-r--r--extensions/test/ole/EventListenerSample/EventListener/EventListener.idl39
-rw-r--r--extensions/test/ole/EventListenerSample/EventListener/EventListener.rc136
-rw-r--r--extensions/test/ole/EventListenerSample/EventListener/EvtListener.cpp14
-rw-r--r--extensions/test/ole/EventListenerSample/EventListener/EvtListener.h34
-rw-r--r--extensions/test/ole/EventListenerSample/EventListener/EvtListener.rgs26
-rw-r--r--extensions/test/ole/EventListenerSample/EventListener/StdAfx.cpp12
-rw-r--r--extensions/test/ole/EventListenerSample/EventListener/StdAfx.h27
-rw-r--r--extensions/test/ole/EventListenerSample/EventListener/resource.h17
-rw-r--r--extensions/test/ole/EventListenerSample/events.htm86
-rw-r--r--extensions/test/ole/EventListenerSample/readme.txt4
13 files changed, 819 insertions, 0 deletions
diff --git a/extensions/test/ole/EventListenerSample/EventListener/EventListener.cpp b/extensions/test/ole/EventListenerSample/EventListener/EventListener.cpp
new file mode 100644
index 000000000000..02dc541c1bc2
--- /dev/null
+++ b/extensions/test/ole/EventListenerSample/EventListener/EventListener.cpp
@@ -0,0 +1,72 @@
+// EventListener.cpp : Implementation of DLL Exports.
+
+
+// Note: Proxy/Stub Information
+// To build a separate proxy/stub DLL,
+// run nmake -f EventListenerps.mk in the project directory.
+
+#include "stdafx.h"
+#include "resource.h"
+#include <initguid.h>
+#include "EventListener.h"
+
+#include "EventListener_i.c"
+#include "EvtListener.h"
+
+
+CComModule _Module;
+
+BEGIN_OBJECT_MAP(ObjectMap)
+OBJECT_ENTRY(CLSID_EvtListener, CEvtListener)
+END_OBJECT_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// DLL Entry Point
+
+extern "C"
+BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
+{
+ if (dwReason == DLL_PROCESS_ATTACH)
+ {
+ _Module.Init(ObjectMap, hInstance, &LIBID_EVENTLISTENERLib);
+ DisableThreadLibraryCalls(hInstance);
+ }
+ else if (dwReason == DLL_PROCESS_DETACH)
+ _Module.Term();
+ return TRUE; // ok
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// Used to determine whether the DLL can be unloaded by OLE
+
+STDAPI DllCanUnloadNow(void)
+{
+ return (_Module.GetLockCount()==0) ? S_OK : S_FALSE;
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// Returns a class factory to create an object of the requested type
+
+STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
+{
+ return _Module.GetClassObject(rclsid, riid, ppv);
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// DllRegisterServer - Adds entries to the system registry
+
+STDAPI DllRegisterServer(void)
+{
+ // registers object, typelib and all interfaces in typelib
+ return _Module.RegisterServer(TRUE);
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// DllUnregisterServer - Removes entries from the system registry
+
+STDAPI DllUnregisterServer(void)
+{
+ return _Module.UnregisterServer(TRUE);
+}
+
+
diff --git a/extensions/test/ole/EventListenerSample/EventListener/EventListener.dsp b/extensions/test/ole/EventListenerSample/EventListener/EventListener.dsp
new file mode 100644
index 000000000000..08aac8247c0a
--- /dev/null
+++ b/extensions/test/ole/EventListenerSample/EventListener/EventListener.dsp
@@ -0,0 +1,323 @@
+# Microsoft Developer Studio Project File - Name="EventListener" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** NICHT BEARBEITEN **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=EventListener - Win32 Debug
+!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
+!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl
+!MESSAGE
+!MESSAGE NMAKE /f "EventListener.mak".
+!MESSAGE
+!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
+!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
+!MESSAGE
+!MESSAGE NMAKE /f "EventListener.mak" CFG="EventListener - Win32 Debug"
+!MESSAGE
+!MESSAGE Für die Konfiguration stehen zur Auswahl:
+!MESSAGE
+!MESSAGE "EventListener - Win32 Debug" (basierend auf "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "EventListener - Win32 Unicode Debug" (basierend auf "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "EventListener - Win32 Release MinSize" (basierend auf "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "EventListener - Win32 Release MinDependency" (basierend auf "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "EventListener - Win32 Unicode Release MinSize" (basierend auf "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "EventListener - Win32 Unicode Release MinDependency" (basierend auf "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "EventListener - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c
+# ADD BASE RSC /l 0x407 /d "_DEBUG"
+# ADD RSC /l 0x407 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
+# Begin Custom Build - Performing registration
+OutDir=.\Debug
+TargetPath=.\Debug\EventListener.dll
+InputPath=.\Debug\EventListener.dll
+SOURCE="$(InputPath)"
+
+"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ regsvr32 /s /c "$(TargetPath)"
+ echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "EventListener - Win32 Unicode Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "DebugU"
+# PROP BASE Intermediate_Dir "DebugU"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "DebugU"
+# PROP Intermediate_Dir "DebugU"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c
+# ADD BASE RSC /l 0x407 /d "_DEBUG"
+# ADD RSC /l 0x407 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
+# Begin Custom Build - Performing registration
+OutDir=.\DebugU
+TargetPath=.\DebugU\EventListener.dll
+InputPath=.\DebugU\EventListener.dll
+SOURCE="$(InputPath)"
+
+"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ if "%OS%"=="" goto NOTNT
+ if not "%OS%"=="Windows_NT" goto NOTNT
+ regsvr32 /s /c "$(TargetPath)"
+ echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
+ goto end
+ :NOTNT
+ echo Warning : Cannot register Unicode DLL on Windows 95
+ :end
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "EventListener - Win32 Release MinSize"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "ReleaseMinSize"
+# PROP BASE Intermediate_Dir "ReleaseMinSize"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "ReleaseMinSize"
+# PROP Intermediate_Dir "ReleaseMinSize"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c
+# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c
+# ADD BASE RSC /l 0x407 /d "NDEBUG"
+# ADD RSC /l 0x407 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
+# Begin Custom Build - Performing registration
+OutDir=.\ReleaseMinSize
+TargetPath=.\ReleaseMinSize\EventListener.dll
+InputPath=.\ReleaseMinSize\EventListener.dll
+SOURCE="$(InputPath)"
+
+"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ regsvr32 /s /c "$(TargetPath)"
+ echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "EventListener - Win32 Release MinDependency"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "ReleaseMinDependency"
+# PROP BASE Intermediate_Dir "ReleaseMinDependency"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "ReleaseMinDependency"
+# PROP Intermediate_Dir "ReleaseMinDependency"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c
+# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c
+# ADD BASE RSC /l 0x407 /d "NDEBUG"
+# ADD RSC /l 0x407 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
+# Begin Custom Build - Performing registration
+OutDir=.\ReleaseMinDependency
+TargetPath=.\ReleaseMinDependency\EventListener.dll
+InputPath=.\ReleaseMinDependency\EventListener.dll
+SOURCE="$(InputPath)"
+
+"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ regsvr32 /s /c "$(TargetPath)"
+ echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "EventListener - Win32 Unicode Release MinSize"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "ReleaseUMinSize"
+# PROP BASE Intermediate_Dir "ReleaseUMinSize"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "ReleaseUMinSize"
+# PROP Intermediate_Dir "ReleaseUMinSize"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c
+# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c
+# ADD BASE RSC /l 0x407 /d "NDEBUG"
+# ADD RSC /l 0x407 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
+# Begin Custom Build - Performing registration
+OutDir=.\ReleaseUMinSize
+TargetPath=.\ReleaseUMinSize\EventListener.dll
+InputPath=.\ReleaseUMinSize\EventListener.dll
+SOURCE="$(InputPath)"
+
+"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ if "%OS%"=="" goto NOTNT
+ if not "%OS%"=="Windows_NT" goto NOTNT
+ regsvr32 /s /c "$(TargetPath)"
+ echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
+ goto end
+ :NOTNT
+ echo Warning : Cannot register Unicode DLL on Windows 95
+ :end
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "EventListener - Win32 Unicode Release MinDependency"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "ReleaseUMinDependency"
+# PROP BASE Intermediate_Dir "ReleaseUMinDependency"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "ReleaseUMinDependency"
+# PROP Intermediate_Dir "ReleaseUMinDependency"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c
+# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c
+# ADD BASE RSC /l 0x407 /d "NDEBUG"
+# ADD RSC /l 0x407 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
+# Begin Custom Build - Performing registration
+OutDir=.\ReleaseUMinDependency
+TargetPath=.\ReleaseUMinDependency\EventListener.dll
+InputPath=.\ReleaseUMinDependency\EventListener.dll
+SOURCE="$(InputPath)"
+
+"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ if "%OS%"=="" goto NOTNT
+ if not "%OS%"=="Windows_NT" goto NOTNT
+ regsvr32 /s /c "$(TargetPath)"
+ echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
+ goto end
+ :NOTNT
+ echo Warning : Cannot register Unicode DLL on Windows 95
+ :end
+
+# End Custom Build
+
+!ENDIF
+
+# Begin Target
+
+# Name "EventListener - Win32 Debug"
+# Name "EventListener - Win32 Unicode Debug"
+# Name "EventListener - Win32 Release MinSize"
+# Name "EventListener - Win32 Release MinDependency"
+# Name "EventListener - Win32 Unicode Release MinSize"
+# Name "EventListener - Win32 Unicode Release MinDependency"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\EventListener.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\EventListener.def
+# End Source File
+# Begin Source File
+
+SOURCE=.\EventListener.idl
+# ADD MTL /tlb ".\EventListener.tlb" /h "EventListener.h" /iid "EventListener_i.c" /Oicf
+# End Source File
+# Begin Source File
+
+SOURCE=.\EventListener.rc
+# End Source File
+# Begin Source File
+
+SOURCE=.\EvtListener.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\StdAfx.cpp
+# ADD CPP /Yc"stdafx.h"
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\EvtListener.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Resource.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\StdAfx.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\EvtListener.rgs
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/extensions/test/ole/EventListenerSample/EventListener/EventListener.dsw b/extensions/test/ole/EventListenerSample/EventListener/EventListener.dsw
new file mode 100644
index 000000000000..20f5e80a4ee6
--- /dev/null
+++ b/extensions/test/ole/EventListenerSample/EventListener/EventListener.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "EventListener"=.\EventListener.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/extensions/test/ole/EventListenerSample/EventListener/EventListener.idl b/extensions/test/ole/EventListenerSample/EventListener/EventListener.idl
new file mode 100644
index 000000000000..6272173a24d9
--- /dev/null
+++ b/extensions/test/ole/EventListenerSample/EventListener/EventListener.idl
@@ -0,0 +1,39 @@
+// EventListener.idl : IDL source for EventListener.dll
+//
+
+// This file will be processed by the MIDL tool to
+// produce the type library (EventListener.tlb) and marshalling code.
+
+import "oaidl.idl";
+import "ocidl.idl";
+ [
+ object,
+ uuid(86653399-24C6-4C2B-9E8A-564175250CB2),
+ dual,
+ helpstring("IEvtListener-Schnittstelle"),
+ pointer_default(unique)
+ ]
+ interface IEvtListener : IDispatch
+ {
+ [id(1), helpstring("Methode disposing")] HRESULT disposing([in] IDispatch* source);
+ };
+
+[
+ uuid(E3E61535-3262-45E6-BFD9-EE8AED051BD1),
+ version(1.0),
+ helpstring("EventListener 1.0 Type Library")
+]
+library EVENTLISTENERLib
+{
+ importlib("stdole32.tlb");
+ importlib("stdole2.tlb");
+
+ [
+ uuid(830E0743-87C1-4C99-A77A-5FBA0C2EBD9A),
+ helpstring("EvtListener Class")
+ ]
+ coclass EvtListener
+ {
+ [default] interface IEvtListener;
+ };
+};
diff --git a/extensions/test/ole/EventListenerSample/EventListener/EventListener.rc b/extensions/test/ole/EventListenerSample/EventListener/EventListener.rc
new file mode 100644
index 000000000000..90f0c7bd2ce5
--- /dev/null
+++ b/extensions/test/ole/EventListenerSample/EventListener/EventListener.rc
@@ -0,0 +1,136 @@
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "winres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// Deutsch (Deutschland) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
+#ifdef _WIN32
+LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""winres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "1 TYPELIB ""EventListener.tlb""\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904B0"
+ BEGIN
+ VALUE "CompanyName", "\0"
+ VALUE "FileDescription", "EventListener Module\0"
+ VALUE "FileVersion", "1, 0, 0, 1\0"
+ VALUE "InternalName", "EventListener\0"
+ VALUE "LegalCopyright", "Copyright 2001\0"
+ VALUE "OriginalFilename", "EventListener.DLL\0"
+ VALUE "ProductName", "EventListener Module\0"
+ VALUE "ProductVersion", "1, 0, 0, 1\0"
+ VALUE "OLESelfRegister", "\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+#endif // !_MAC
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_PROJNAME "EventListener"
+END
+
+#endif // Deutsch (Deutschland) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Englisch (USA) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// REGISTRY
+//
+
+IDR_EVTLISTENER REGISTRY DISCARDABLE "EvtListener.rgs"
+#endif // Englisch (USA) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+1 TYPELIB "EventListener.tlb"
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/extensions/test/ole/EventListenerSample/EventListener/EvtListener.cpp b/extensions/test/ole/EventListenerSample/EventListener/EvtListener.cpp
new file mode 100644
index 000000000000..821769e5bf50
--- /dev/null
+++ b/extensions/test/ole/EventListenerSample/EventListener/EvtListener.cpp
@@ -0,0 +1,14 @@
+// EvtListener.cpp : Implementierung von CEvtListener
+#include "stdafx.h"
+#include "EventListener.h"
+#include "EvtListener.h"
+
+/////////////////////////////////////////////////////////////////////////////
+// CEvtListener
+
+STDMETHODIMP CEvtListener::disposing( IDispatch* source)
+{
+ ::MessageBox(NULL,_T("XEventListener::disposing"),
+ _T("EventListener.EvtListener component"), MB_OK);
+ return S_OK;
+} \ No newline at end of file
diff --git a/extensions/test/ole/EventListenerSample/EventListener/EvtListener.h b/extensions/test/ole/EventListenerSample/EventListener/EvtListener.h
new file mode 100644
index 000000000000..8bbb9c1591bf
--- /dev/null
+++ b/extensions/test/ole/EventListenerSample/EventListener/EvtListener.h
@@ -0,0 +1,34 @@
+// EvtListener.h : Deklaration von CEvtListener
+
+#ifndef __EVTLISTENER_H_
+#define __EVTLISTENER_H_
+
+#include "resource.h" // Hauptsymbole
+
+/////////////////////////////////////////////////////////////////////////////
+// CEvtListener
+class ATL_NO_VTABLE CEvtListener :
+ public CComObjectRootEx<CComSingleThreadModel>,
+ public CComCoClass<CEvtListener, &CLSID_EvtListener>,
+ public IDispatchImpl<IEvtListener, &IID_IEvtListener, &LIBID_EVENTLISTENERLib>
+{
+public:
+ CEvtListener()
+ {
+ }
+
+DECLARE_REGISTRY_RESOURCEID(IDR_EVTLISTENER)
+
+DECLARE_PROTECT_FINAL_CONSTRUCT()
+
+BEGIN_COM_MAP(CEvtListener)
+ COM_INTERFACE_ENTRY(IEvtListener)
+ COM_INTERFACE_ENTRY(IDispatch)
+END_COM_MAP()
+
+// IEvtListener
+public:
+ STDMETHOD(disposing)(IDispatch* source);
+};
+
+#endif //__EVTLISTENER_H_
diff --git a/extensions/test/ole/EventListenerSample/EventListener/EvtListener.rgs b/extensions/test/ole/EventListenerSample/EventListener/EvtListener.rgs
new file mode 100644
index 000000000000..e0aa9bbb7c37
--- /dev/null
+++ b/extensions/test/ole/EventListenerSample/EventListener/EvtListener.rgs
@@ -0,0 +1,26 @@
+HKCR
+{
+ EventListener.EvtListener.1 = s 'EvtListener Class'
+ {
+ CLSID = s '{830E0743-87C1-4C99-A77A-5FBA0C2EBD9A}'
+ }
+ EventListener.EvtListener = s 'EvtListener Class'
+ {
+ CLSID = s '{830E0743-87C1-4C99-A77A-5FBA0C2EBD9A}'
+ CurVer = s 'EventListener.EvtListener.1'
+ }
+ NoRemove CLSID
+ {
+ ForceRemove {830E0743-87C1-4C99-A77A-5FBA0C2EBD9A} = s 'EvtListener Class'
+ {
+ ProgID = s 'EventListener.EvtListener.1'
+ VersionIndependentProgID = s 'EventListener.EvtListener'
+ ForceRemove 'Programmable'
+ InprocServer32 = s '%MODULE%'
+ {
+ val ThreadingModel = s 'Apartment'
+ }
+ 'TypeLib' = s '{E3E61535-3262-45E6-BFD9-EE8AED051BD1}'
+ }
+ }
+}
diff --git a/extensions/test/ole/EventListenerSample/EventListener/StdAfx.cpp b/extensions/test/ole/EventListenerSample/EventListener/StdAfx.cpp
new file mode 100644
index 000000000000..a5eea178f78b
--- /dev/null
+++ b/extensions/test/ole/EventListenerSample/EventListener/StdAfx.cpp
@@ -0,0 +1,12 @@
+// stdafx.cpp : source file that includes just the standard includes
+// stdafx.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+#ifdef _ATL_STATIC_REGISTRY
+#include <statreg.h>
+#include <statreg.cpp>
+#endif
+
+#include <atlimpl.cpp>
diff --git a/extensions/test/ole/EventListenerSample/EventListener/StdAfx.h b/extensions/test/ole/EventListenerSample/EventListener/StdAfx.h
new file mode 100644
index 000000000000..199640620e6e
--- /dev/null
+++ b/extensions/test/ole/EventListenerSample/EventListener/StdAfx.h
@@ -0,0 +1,27 @@
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently,
+// but are changed infrequently
+
+#if !defined(AFX_STDAFX_H__E275407A_804A_477E_9A28_F5CA84E711C3__INCLUDED_)
+#define AFX_STDAFX_H__E275407A_804A_477E_9A28_F5CA84E711C3__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#define STRICT
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0400
+#endif
+#define _ATL_APARTMENT_THREADED
+
+#include <atlbase.h>
+//You may derive a class from CComModule and use it if you want to override
+//something, but do not change the name of _Module
+extern CComModule _Module;
+#include <atlcom.h>
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_STDAFX_H__E275407A_804A_477E_9A28_F5CA84E711C3__INCLUDED)
diff --git a/extensions/test/ole/EventListenerSample/EventListener/resource.h b/extensions/test/ole/EventListenerSample/EventListener/resource.h
new file mode 100644
index 000000000000..9446ddd2fca7
--- /dev/null
+++ b/extensions/test/ole/EventListenerSample/EventListener/resource.h
@@ -0,0 +1,17 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by EventListener.rc
+//
+#define IDS_PROJNAME 100
+#define IDR_EVTLISTENER 101
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 201
+#define _APS_NEXT_COMMAND_VALUE 32768
+#define _APS_NEXT_CONTROL_VALUE 201
+#define _APS_NEXT_SYMED_VALUE 102
+#endif
+#endif
diff --git a/extensions/test/ole/EventListenerSample/events.htm b/extensions/test/ole/EventListenerSample/events.htm
new file mode 100644
index 000000000000..be6d9aa2dfd0
--- /dev/null
+++ b/extensions/test/ole/EventListenerSample/events.htm
@@ -0,0 +1,86 @@
+<HTML>
+<HEAD>
+<META NAME="GENERATOR" Content="Microsoft Developer Studio">
+<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
+<TITLE>Document Title</TITLE>
+</HEAD>
+<BODY id=theBody>
+
+<script language="JScript">
+function Main( id)
+{
+var objServiceManager= new ActiveXObject("com.sun.star.ServiceManager");
+
+var objDesktop= objServiceManager.createInstance("com.sun.star.frame.Desktop");
+
+var args= new Array();
+
+var objDocument= objDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, args);
+
+var listener;
+if( id == 0)
+ listener= new XEventListener_Impl();
+else if(id == 1)
+ listener= new ActiveXObject("EventListener.EvtListener");
+objDocument.addEventListener( listener);
+}
+
+
+function XEventListener_Impl()
+{
+ this._environment= "JScript";
+ this._implementedInterfaces= new Array( "com.sun.star.lang.XEventListener");
+
+ //XEventListener
+ this.disposing= XEventListener_disposing;
+}
+
+function XEventListener_disposing( source)
+{
+ alert("JScript Event Listener \n The document was closed");
+}
+</script>
+
+<script language="VBScript">
+SUB MainVB()
+Set objServiceManager= CreateObject("com.sun.star.ServiceManager")
+
+Set objCoreReflection= objServiceManager.createInstance("com.sun.star.reflection.CoreReflection")
+
+Set objDesktop= objServiceManager.createInstance("com.sun.star.frame.Desktop")
+
+'Open a new empty writer document
+Dim args()
+Set objDocument= objDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, args)
+
+Set eventListener= CreateObject("EventListener.EvtListener")
+
+objDocument.addEventListener eventlistener
+END SUB
+
+</script>
+<p>
+The script on this page creates a new StarOffice document and connects an event listener
+to it. When the document is closed then the XEventListener::disposing method is called on the
+listener object. How the listener is set up depends on the button being clicked.
+</p>
+<p>
+The button will run JScript code that and adds an JScript event listener to the document.
+The listener is also implemented in JScript an is on this page..
+</p>
+<button onclick='Main(0)'>JScript go</Button>
+<p>
+
+The button runs JScript code that creates the ActiveX component EventListener.EvtListener that
+is written in C++ and housed in a dll. Then the event listener is added to the document.
+</p>
+<button onclick='Main( 1)'>JScript go</Button>
+<p>
+The button runs VBScript code that creates the components EventListener.EvtListener and adds it
+to the document.
+</p>
+<button onclick='MainVB()'>VBScript</Button>
+</body>
+</html>
+
+
diff --git a/extensions/test/ole/EventListenerSample/readme.txt b/extensions/test/ole/EventListenerSample/readme.txt
new file mode 100644
index 000000000000..0e7cb4197c2c
--- /dev/null
+++ b/extensions/test/ole/EventListenerSample/readme.txt
@@ -0,0 +1,4 @@
+The folder EventListener contains an MSDEV project that builds a dll that contains
+the EventListener.EvtListener ActiveX component. The component implements the XEventListener
+interface according to the rules of the OleBridge. The component will be used from the
+HTML page events.htm. \ No newline at end of file