summaryrefslogtreecommitdiffstats
path: root/extensions/test/ole/AxTestComponents
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/test/ole/AxTestComponents')
-rw-r--r--extensions/test/ole/AxTestComponents/AxTestComponents.cpp77
-rw-r--r--extensions/test/ole/AxTestComponents/AxTestComponents.def9
-rw-r--r--extensions/test/ole/AxTestComponents/AxTestComponents.dsp325
-rw-r--r--extensions/test/ole/AxTestComponents/AxTestComponents.idl251
-rw-r--r--extensions/test/ole/AxTestComponents/AxTestComponents.rc155
-rw-r--r--extensions/test/ole/AxTestComponents/AxTestComponents.sln31
-rw-r--r--extensions/test/ole/AxTestComponents/AxTestComponents.vcproj819
-rw-r--r--extensions/test/ole/AxTestComponents/Basic.cpp1356
-rw-r--r--extensions/test/ole/AxTestComponents/Basic.h259
-rw-r--r--extensions/test/ole/AxTestComponents/Basic.rgs50
-rw-r--r--extensions/test/ole/AxTestComponents/Foo.cpp30
-rw-r--r--extensions/test/ole/AxTestComponents/Foo.h54
-rw-r--r--extensions/test/ole/AxTestComponents/StdAfx.cpp26
-rw-r--r--extensions/test/ole/AxTestComponents/StdAfx.h46
-rw-r--r--extensions/test/ole/AxTestComponents/readme.txt3
-rw-r--r--extensions/test/ole/AxTestComponents/resource.h38
16 files changed, 3529 insertions, 0 deletions
diff --git a/extensions/test/ole/AxTestComponents/AxTestComponents.cpp b/extensions/test/ole/AxTestComponents/AxTestComponents.cpp
new file mode 100644
index 0000000000..ca7d37457f
--- /dev/null
+++ b/extensions/test/ole/AxTestComponents/AxTestComponents.cpp
@@ -0,0 +1,77 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+// Note: Proxy/Stub Information
+// To build a separate proxy/stub DLL,
+// run nmake -f AxTestComponentsps.mk in the project directory.
+
+#include "stdafx.h"
+#include "resource.h"
+#include <initguid.h>
+
+#include "Basic.h"
+#include "Foo.h"
+
+CComModule _Module;
+
+BEGIN_OBJECT_MAP(ObjectMap)
+OBJECT_ENTRY(CLSID_Basic, CBasic)
+OBJECT_ENTRY(CLSID_Foo, CFoo)
+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_AXTESTCOMPONENTSLib);
+ 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); }
+
+//VT_I4 size_t V_ERROR VARIANT VARIANT_FALSE CComVariant FADF_EMBEDDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/test/ole/AxTestComponents/AxTestComponents.def b/extensions/test/ole/AxTestComponents/AxTestComponents.def
new file mode 100644
index 0000000000..5d8c019ade
--- /dev/null
+++ b/extensions/test/ole/AxTestComponents/AxTestComponents.def
@@ -0,0 +1,9 @@
+; AxTestComponents.def : Declares the module parameters.
+
+LIBRARY "AxTestComponents.DLL"
+
+EXPORTS
+ DllCanUnloadNow PRIVATE
+ DllGetClassObject PRIVATE
+ DllRegisterServer PRIVATE
+ DllUnregisterServer PRIVATE
diff --git a/extensions/test/ole/AxTestComponents/AxTestComponents.dsp b/extensions/test/ole/AxTestComponents/AxTestComponents.dsp
new file mode 100644
index 0000000000..43fbbe53d3
--- /dev/null
+++ b/extensions/test/ole/AxTestComponents/AxTestComponents.dsp
@@ -0,0 +1,325 @@
+# Microsoft Developer Studio Project File - Name="AxTestComponents" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=AxTestComponents - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "AxTestComponents.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "AxTestComponents.mak" CFG="AxTestComponents - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "AxTestComponents - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "AxTestComponents - Win32 Unicode Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "AxTestComponents - Win32 Release MinSize" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "AxTestComponents - Win32 Release MinDependency" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "AxTestComponents - Win32 Unicode Release MinSize" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "AxTestComponents - Win32 Unicode Release MinDependency" (based on "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)" == "AxTestComponents - 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" /FR /Yu"stdafx.h" /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /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\AxTestComponents.dll
+InputPath=.\Debug\AxTestComponents.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)" == "AxTestComponents - 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 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /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\AxTestComponents.dll
+InputPath=.\DebugU\AxTestComponents.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)" == "AxTestComponents - 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 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /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\AxTestComponents.dll
+InputPath=.\ReleaseMinSize\AxTestComponents.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)" == "AxTestComponents - 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 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /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\AxTestComponents.dll
+InputPath=.\ReleaseMinDependency\AxTestComponents.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)" == "AxTestComponents - 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 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /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\AxTestComponents.dll
+InputPath=.\ReleaseUMinSize\AxTestComponents.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)" == "AxTestComponents - 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 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /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\AxTestComponents.dll
+InputPath=.\ReleaseUMinDependency\AxTestComponents.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 "AxTestComponents - Win32 Debug"
+# Name "AxTestComponents - Win32 Unicode Debug"
+# Name "AxTestComponents - Win32 Release MinSize"
+# Name "AxTestComponents - Win32 Release MinDependency"
+# Name "AxTestComponents - Win32 Unicode Release MinSize"
+# Name "AxTestComponents - 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=.\AxTestComponents.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\AxTestComponents.def
+# End Source File
+# Begin Source File
+
+SOURCE=.\AxTestComponents.idl
+# ADD MTL /tlb ".\AxTestComponents.tlb" /h "AxTestComponents.h" /iid "AxTestComponents_i.c" /Oicf
+# End Source File
+# Begin Source File
+
+SOURCE=.\AxTestComponents.rc
+# End Source File
+# Begin Source File
+
+SOURCE=.\Basic.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=.\Basic.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=.\Basic.rgs
+# End Source File
+# End Group
+# End Target
+# End Project
+
+
diff --git a/extensions/test/ole/AxTestComponents/AxTestComponents.idl b/extensions/test/ole/AxTestComponents/AxTestComponents.idl
new file mode 100644
index 0000000000..6649483a7d
--- /dev/null
+++ b/extensions/test/ole/AxTestComponents/AxTestComponents.idl
@@ -0,0 +1,251 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+// AxTestComponents.idl : IDL source for AxTestComponents.dll
+
+
+// This file will be processed by the MIDL tool to
+// produce the type library (AxTestComponents.tlb) and marshalling code.
+// next id 86
+import "oaidl.idl";
+import "ocidl.idl";
+ [
+ object,
+ uuid(BFE10EBD-8584-11D4-8335-005004526AB4),
+ dual,
+ helpstring("IBasic Interface"),
+ pointer_default(unique)
+ ]
+ interface IBasic : IDispatch
+ {
+ [id(82), helpstring("method inBool")] HRESULT inBool([in]VARIANT_BOOL val);
+ [id(1), helpstring("method inByte")] HRESULT inByte([in] unsigned char val);
+ [id(2), helpstring("method inShort")] HRESULT inShort([in] short val);
+ [id(3), helpstring("method inLong")] HRESULT inLong([in] long val);
+ [id(4), helpstring("method inString")] HRESULT inString([in] BSTR val);
+ [id(5), helpstring("method inFloat")] HRESULT inFloat([in] float val);
+ [id(6), helpstring("method inDouble")] HRESULT inDouble([in] double val);
+ [id(7), helpstring("method inVariant")] HRESULT inVariant([in] VARIANT val);
+ [id(8), helpstring("method inArray")] HRESULT inArray([in] SAFEARRAY(VARIANT) val);
+ [id(9), helpstring("method inObject")] HRESULT inObject([in] IDispatch* val);
+ [id(83), helpstring("method inoutBool")] HRESULT inoutBool([in,out]VARIANT_BOOL* val);
+ [id(12), helpstring("method inoutByte")] HRESULT inoutByte([in,out] unsigned char* val);
+ [id(13), helpstring("method inoutShort")] HRESULT inoutShort([in,out] short* val);
+ [id(14), helpstring("method inoutLong")] HRESULT inoutLong([in,out] long * val);
+ [id(15), helpstring("method inoutString")] HRESULT inoutString([in, out] BSTR* val);
+ [id(16), helpstring("method inoutFloat")] HRESULT inoutFloat([in,out] float * val);
+ [id(17), helpstring("method inoutDouble")] HRESULT inoutDouble([in,out] double * val);
+ [id(18), helpstring("method inoutVariant")] HRESULT inoutVariant([in,out] VARIANT * val);
+ [id(19), helpstring("method inoutArray")] HRESULT inoutArray([in,out] SAFEARRAY(VARIANT) * val);
+ [id(20), helpstring("method inoutObject")] HRESULT inoutObject([in,out] IDispatch** val);
+ [id(84), helpstring("method outBool")] HRESULT outBool([out] VARIANT_BOOL* val);
+ [id(23), helpstring("method outByte")] HRESULT outByte([out] unsigned char* val);
+ [id(24), helpstring("method outShort")] HRESULT outShort([out] short* val);
+ [id(25), helpstring("method outLong")] HRESULT outLong([out] long* val);
+ [id(26), helpstring("method outString")] HRESULT outString([out] BSTR* val);
+ [id(27), helpstring("method outFloat")] HRESULT outFloat([out] float* val);
+ [id(28), helpstring("method outDouble")] HRESULT outDouble([out] double* val);
+ [id(29), helpstring("method outVariant")] HRESULT outVariant([out] VARIANT* val);
+ [id(30), helpstring("method outArray")] HRESULT outArray([out] SAFEARRAY(VARIANT) * val);
+ [id(31), helpstring("method outObject")] HRESULT outObject([out] IDispatch** val);
+ [propget, id(85), helpstring("property prpBool")] HRESULT prpBool([out, retval] VARIANT_BOOL *pVal);
+ [propput, id(85), helpstring("property prpBool")] HRESULT prpBool([in] VARIANT_BOOL newVal);
+ [propget, id(34), helpstring("property prpByte")] HRESULT prpByte([out, retval] unsigned char *pVal);
+ [propput, id(34), helpstring("property prpByte")] HRESULT prpByte([in] unsigned char newVal);
+ [propget, id(35), helpstring("property prpShort")] HRESULT prpShort([out, retval] short *pVal);
+ [propput, id(35), helpstring("property prpShort")] HRESULT prpShort([in] short newVal);
+ [propget, id(36), helpstring("property prpLong")] HRESULT prpLong([out, retval] long *pVal);
+ [propput, id(36), helpstring("property prpLong")] HRESULT prpLong([in] long newVal);
+ [propget, id(37), helpstring("property prpString")] HRESULT prpString([out, retval] BSTR *pVal);
+ [propput, id(37), helpstring("property prpString")] HRESULT prpString([in] BSTR newVal);
+ [propget, id(38), helpstring("property prpFloat")] HRESULT prpFloat([out, retval] float *pVal);
+ [propput, id(38), helpstring("property prpFloat")] HRESULT prpFloat([in] float newVal);
+ [propget, id(39), helpstring("property prpDouble")] HRESULT prpDouble([out, retval] double *pVal);
+ [propput, id(39), helpstring("property prpDouble")] HRESULT prpDouble([in] double newVal);
+ [propget, id(40), helpstring("property prpVariant")] HRESULT prpVariant([out, retval] VARIANT *pVal);
+ [propput, id(40), helpstring("property prpVariant")] HRESULT prpVariant([in] VARIANT newVal);
+ [propget, id(41), helpstring("property prpArray")] HRESULT prpArray([out, retval]SAFEARRAY(VARIANT) *pVal);
+ [propput, id(41), helpstring("property prpArray")] HRESULT prpArray([in] SAFEARRAY(VARIANT) newVal);
+ [propget, id(42), helpstring("property prpObject")] HRESULT prpObject([out, retval] IDispatch* *pVal);
+ [propput, id(42), helpstring("property prpObject")] HRESULT prpObject([in] IDispatch* newVal);
+ [id(43), helpstring("method mixed1")] HRESULT mixed1(
+ [in, out] unsigned char* aChar,
+ [in, out] float *aFloat,
+ [in,out] VARIANT* inoutVar);
+ [id(44), helpstring("method inSequenceLong")] HRESULT inSequenceLong([in] SAFEARRAY(long) ar);
+ [id(45), helpstring("method inSequenceByte")] HRESULT inSequenceByte([in] SAFEARRAY(byte) ar);
+ [id(46), helpstring("method inSequenceShort")] HRESULT inSequenceShort([in] SAFEARRAY(short) ar);
+ [id(47), helpstring("method inSequenceString")] HRESULT inSequenceString([in] SAFEARRAY( BSTR) ar);
+ [id(48), helpstring("method inSequenceFloat")] HRESULT inSequenceFloat([in] SAFEARRAY(float) ar);
+ [id(49), helpstring("method inSequenceDouble")] HRESULT inSequenceDouble([in] SAFEARRAY(double) ar);
+ [id(50), helpstring("method inSequenceObject")] HRESULT inSequenceObject([in] SAFEARRAY(IDispatch*) ar);
+ [id(51), helpstring("method outSequenceByte")] HRESULT outSequenceByte([out] SAFEARRAY(unsigned char)* val);
+ [id(52), helpstring("method outSequenceShort")] HRESULT outSequenceShort([out] SAFEARRAY(short)* val);
+ [id(53), helpstring("method outSequenceLong")] HRESULT outSequenceLong([out] SAFEARRAY(long )*val);
+ [id(54), helpstring("method outSequenceString")] HRESULT outSequenceString([out] SAFEARRAY(BSTR)* val);
+ [id(55), helpstring("method outSequenceFloat")] HRESULT outSequenceFloat([out] SAFEARRAY(float)* val);
+ [id(56), helpstring("method outSequenceDouble")] HRESULT outSequenceDouble([out] SAFEARRAY(double)* val);
+ [id(57), helpstring("method outSequenceObject")] HRESULT outSequenceObject([out] SAFEARRAY(IDispatch*)* val);
+ [id(58), helpstring("method inoutSequenceByte")] HRESULT inoutSequenceByte([in,out] SAFEARRAY(unsigned char)* val);
+ [id(59), helpstring("method inoutSequenceShort")] HRESULT inoutSequenceShort([in,out] SAFEARRAY(short)* val);
+ [id(60), helpstring("method inoutSequenceLong")] HRESULT inoutSequenceLong([in,out] SAFEARRAY( long)*val);
+ [id(61), helpstring("method inoutSequenceString")] HRESULT inoutSequenceString([in,out] SAFEARRAY(BSTR)* val);
+ [id(62), helpstring("method inoutSequenceFloat")] HRESULT inoutSequenceFloat([in,out] SAFEARRAY(float)* val);
+ [id(63), helpstring("method inoutSequenceDouble")] HRESULT inoutSequenceDouble([in,out] SAFEARRAY(double)* val);
+ [id(64), helpstring("method inoutSequenceObject")] HRESULT inoutSequenceObject([in,out] SAFEARRAY(IDispatch*)* val);
+ [id(65), helpstring("method inMulDimArrayLong")] HRESULT inMulDimArrayLong([in] SAFEARRAY(long) val );
+ [id(66), helpstring("method inMulDimArrayVariant")] HRESULT inMulDimArrayVariant([in] SAFEARRAY(VARIANT) val);
+ [id(67), helpstring("method inMulDimArrayLong2")] HRESULT inMulDimArrayLong2([in] SAFEARRAY(long) val);
+ [id(68), helpstring("method inMulDimArrayVariant2")] HRESULT inMulDimArrayVariant2([in] SAFEARRAY(VARIANT) val);
+ [id(69), helpstring("method inMulDimArrayByte")] HRESULT inMulDimArrayByte([in] SAFEARRAY(unsigned char) val);
+ [id(70), helpstring("method inMulDimArrayByte2")] HRESULT inMulDimArrayByte2([in] SAFEARRAY(unsigned char) val);
+ [id(71), helpstring("method outMore")] HRESULT outMore([out]long* val1, [out]long* val2);
+
+ [id(72), helpstring("method optional1")]
+ HRESULT optional1([in] long val1, [in, optional] VARIANT* val2);
+ [id(73), helpstring("method optional2")]
+ HRESULT optional2([out] long* val1, [out, optional] VARIANT* val2);
+ [id(74), helpstring("method optional3")]
+ HRESULT optional3([in, optional] VARIANT* val1, [in, optional] VARIANT* val2);
+ [id(75), helpstring("method optional4")]
+ HRESULT optional4([in, out, optional] VARIANT* val1, [in, out, optional] VARIANT* val2);
+ [id(76), helpstring("method optional5")]
+ HRESULT optional5([out, optional] VARIANT* val1, [out, optional] VARIANT* val2);
+ //midl creates for val4 a BSTR "4" as default value in the TLB. The midl complains
+ //but the error message seems to be not for this case.
+ //in defaultvalue2 val4 has a VT_I4 in the TLB. This must be a bug!
+ [id(77), helpstring("method defaultvalue1")]
+ HRESULT defaultvalue1([in, defaultvalue(1)] long val1,
+ [in, defaultvalue(2)] double* val2,
+ // [in, defaultvalue(3)] VARIANT val3, //ok
+ [in, defaultvalue(4)] VARIANT* val4);
+
+ // bug in midl: when val3 and val4 are pointers then the generated header creates
+ // for all params default values:
+ //HRESULT STDMETHODCALLTYPE defaultvalue2(
+ // /* [defaultvalue][in] */ long *val1 = 10,
+ // /* [defaultvalue][in] */ double *val2 = 3.14,
+ // /* [defaultvalue][in] */ VARIANT *val3 = 10,
+ // /* [defaultvalue][in] */ VARIANT *val4 = 100) = 0;
+ // And that does not compile.
+ //Therefore we must not include the midl generated header, instead use
+ // #import to create the interface header
+ [id(78), helpstring("method defaultvalue2")]
+ HRESULT defaultvalue2([in, out, defaultvalue(1)]long* val1,
+ [in, out, defaultvalue(2)] double* val2,
+ // [in, out, defaultvalue(3)] VARIANT *val3,
+ [in, out, defaultvalue(4)] VARIANT *val4);
+
+ [id(79), helpstring("method varargfunc1"),vararg]
+ HRESULT varargfunc1([in] long val1, [in] SAFEARRAY(VARIANT) val2);
+ [id(80), helpstring("method varargfunc2")]
+ HRESULT varargfunc2([out] long* val1, [out] SAFEARRAY(VARIANT)* val2);
+
+
+ [id(86), helpstring("method inSequenceByteDim2")] HRESULT inSequenceByteDim2([in] SAFEARRAY(byte) val);
+ [id(87), helpstring("method inCurrency")] HRESULT inCurrency([in] CY val);
+ [id(88), helpstring("method outCurrency")] HRESULT outCurrency([out] CY* val);
+ [id(89), helpstring("method inoutCurrency")] HRESULT inoutCurrency([in,out] CY* val);
+ [id(90), helpstring("method inDate")] HRESULT inDate([in] DATE val);
+ [id(91), helpstring("method outDate")] HRESULT outDate([out] DATE* val);
+ [id(92), helpstring("method inoutDate")] HRESULT inoutDate([in,out] DATE* val);
+ [propget, id(93), helpstring("property prpCY")] HRESULT prpCurrency([out, retval] CY* pVal);
+ [propput, id(93), helpstring("property prpCY")] HRESULT prpCurrency([in] CY newVal);
+ [propget, id(94), helpstring("property prpDate")] HRESULT prpDate([out, retval] DATE* pVal);
+ [propput, id(94), helpstring("property prpDate")] HRESULT prpDate([in] DATE newVal);
+ [id(95), helpstring("method inDecimal")] HRESULT inDecimal([in] DECIMAL val);
+ [id(96), helpstring("method outDecimal")] HRESULT outDecimal([out] DECIMAL* val);
+ [id(97), helpstring("method inoutDecimal")] HRESULT inoutDecimal([in,out] DECIMAL* val);
+ [propget, id(98), helpstring("property prpDecimal")] HRESULT prpDecimal([out, retval] DECIMAL* pVal);
+ [propput, id(98), helpstring("property prpDecimal")] HRESULT prpDecimal([in] DECIMAL newVal);
+ [id(99), helpstring("method inSCode")] HRESULT inSCode([in] SCODE val);
+ [id(100), helpstring("method outScode")] HRESULT outScode([out] SCODE* val);
+ [id(101), helpstring("method inoutSCode")] HRESULT inoutSCode([in,out] SCODE* val);
+ [propget, id(102), helpstring("property prpSCode")] HRESULT prpSCode([out, retval] SCODE* pVal);
+ [propput, id(102), helpstring("property prpSCode")] HRESULT prpSCode([in] SCODE newVal);
+ [id(103), helpstring("method inrefLong")] HRESULT inrefLong([in] LONG* val);
+ [id(104), helpstring("method inrefVARIANT")] HRESULT inrefVariant([in] VARIANT* val);
+ [id(105), helpstring("method inrefDecimal")] HRESULT inrefDecimal(DECIMAL* val);
+ [propget, id(106), helpstring("property prpRefLong")] HRESULT prpRefLong([out, retval] long* pVal);
+ [propputref, id(106), helpstring("property prpRefLong")] HRESULT prpRefLong([in] long* newVal);
+ [propget, id(107), helpstring("property prprefVariant")] HRESULT prprefVariant([out, retval] VARIANT* pVal);
+ [propputref, id(107), helpstring("property prprefVariant")] HRESULT prprefVariant([in] VARIANT* newVal);
+ [propget, id(108), helpstring("property prprefDecimal")] HRESULT prprefDecimal([out, retval] DECIMAL* pVal);
+ [propputref, id(108), helpstring("property prprefDecimal")] HRESULT prprefDecimal([in] DECIMAL* newVal);
+ [id(109), helpstring("method optional6")] HRESULT optional6([in,optional] VARIANT* val1,
+ [in,optional] VARIANT * val2, [in,optional] VARIANT* val3, [in,optional] VARIANT* val4);
+ [id(110), helpstring("method optional7")] HRESULT optional7([out,optional] VARIANT* val1,
+ [out,optional] VARIANT * val2, [out,optional] VARIANT* val3, [out,optional] VARIANT* val4);
+
+ [propget, id(111), helpstring("property prpMultiArg1")] HRESULT prpMultiArg1([in,out,optional] VARIANT* val1, [in,out,optional] VARIANT* val2, [out, optional, retval] VARIANT* pVal);
+ [propput, id(111), helpstring("property prpMultiArg1")] HRESULT prpMultiArg1([in,out,optional] VARIANT* val1, [in,out,optional] VARIANT* val2, [in] VARIANT* newVal);
+ [propget, id(112), helpstring("property prpMultiArg2")] HRESULT prpMultiArg2([in] VARIANT val1, [out, retval] VARIANT* pVal);
+ [propput, id(112), helpstring("property prpMultiArg2")] HRESULT prpMultiArg2([in] VARIANT val1, [in] VARIANT newVal);
+ [id(113), helpstring("method prpMultiArg2GetValues")] HRESULT prpMultiArg2GetValues([out] VARIANT* val1, [out] VARIANT* valProperty);
+ [propget, id(114), helpstring("property prpMultiArg3")] HRESULT prpMultiArg3([in,out] LONG* val1, [out, retval] LONG* pVal);
+ [propput, id(114), helpstring("property prpMultiArg3")] HRESULT prpMultiArg3([in,out] LONG* val1, [in] LONG newVal);
+ [id(115), helpstring("method inUnknown")] HRESULT inUnknown([in] IUnknown* val);
+ [id(116), helpstring("method outUnknown")] HRESULT outUnknown([out] IUnknown** val);
+ [id(117), helpstring("method inoutUnknown")] HRESULT inoutUnknown([in,out] IUnknown** val);
+ [propget, id(118), helpstring("property prpUnknown")] HRESULT prpUnknown([out, retval] IUnknown** pVal);
+ [propput, id(118), helpstring("property prpUnknown")] HRESULT prpUnknown([in] IUnknown* newVal);
+};
+
+[
+ object,
+ uuid(96E6105A-A436-48b3-BFE7-C9302D927CCF),
+ dual,
+ helpstring("IFoo Interface"),
+ pointer_default(unique)
+]
+interface IFoo : IUnknown
+{
+ HRESULT Foo([in] IUnknown* val);
+};
+
+[
+ uuid(BFE10EB1-8584-11D4-8335-005004526AB4),
+ version(1.0),
+ helpstring("AxTestComponents 1.0 Type Library")
+]
+library AXTESTCOMPONENTSLib
+{
+ importlib("stdole32.tlb");
+ importlib("stdole2.tlb");
+
+ [
+ uuid(BFE10EBE-8584-11D4-8335-005004526AB4),
+ helpstring("Basic Class")
+ ]
+ coclass Basic
+ {
+ [default] interface IBasic;
+ };
+
+ [
+ uuid(14DE9D5D-EB9D-4091-8E1B-A1B1672D8C1D),
+ helpstring("Foo Class")
+ ]
+ coclass Foo
+ {
+ [default] interface IFoo;
+ };
+
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/test/ole/AxTestComponents/AxTestComponents.rc b/extensions/test/ole/AxTestComponents/AxTestComponents.rc
new file mode 100644
index 0000000000..da5d58f657
--- /dev/null
+++ b/extensions/test/ole/AxTestComponents/AxTestComponents.rc
@@ -0,0 +1,155 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+//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
+
+
+// German (Germany) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
+#ifdef _WIN32
+LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
+#pragma code_page(1252)
+#endif //_WIN32
+
+
+
+// REGISTRY
+
+
+IDR_BASIC REGISTRY DISCARDABLE "Basic.rgs"
+IDR_FOO REGISTRY DISCARDABLE "Basic.rgs"
+#endif // German (Germany) resources
+
+
+
+
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#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 ""AxTestComponents.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", "AxTestComponents Module\0"
+ VALUE "FileVersion", "1, 0, 0, 1\0"
+ VALUE "InternalName", "AxTestComponents\0"
+ VALUE "LegalCopyright", "Copyright 2000\0"
+ VALUE "OriginalFilename", "AxTestComponents.DLL\0"
+ VALUE "ProductName", "AxTestComponents 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 "AxTestComponents"
+END
+
+#endif // English (U.S.) resources
+
+
+
+
+#ifndef APSTUDIO_INVOKED
+
+
+// Generated from the TEXTINCLUDE 3 resource.
+
+1 TYPELIB "AxTestComponents.tlb"
+
+
+#endif // not APSTUDIO_INVOKED
+
diff --git a/extensions/test/ole/AxTestComponents/AxTestComponents.sln b/extensions/test/ole/AxTestComponents/AxTestComponents.sln
new file mode 100644
index 0000000000..eadaa373ed
--- /dev/null
+++ b/extensions/test/ole/AxTestComponents/AxTestComponents.sln
@@ -0,0 +1,31 @@
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AxTestComponents", "AxTestComponents.vcproj", "{CF6DC513-B04E-420A-A0F9-6D1F4046D098}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release MinDependency|Win32 = Release MinDependency|Win32
+ Release MinSize|Win32 = Release MinSize|Win32
+ Unicode Debug|Win32 = Unicode Debug|Win32
+ Unicode Release MinDependency|Win32 = Unicode Release MinDependency|Win32
+ Unicode Release MinSize|Win32 = Unicode Release MinSize|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Debug|Win32.Build.0 = Debug|Win32
+ {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Release MinDependency|Win32.ActiveCfg = Release MinDependency|Win32
+ {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Release MinDependency|Win32.Build.0 = Release MinDependency|Win32
+ {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Release MinSize|Win32.ActiveCfg = Release MinSize|Win32
+ {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Release MinSize|Win32.Build.0 = Release MinSize|Win32
+ {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32
+ {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32
+ {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Unicode Release MinDependency|Win32.ActiveCfg = Unicode Release MinDependency|Win32
+ {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Unicode Release MinDependency|Win32.Build.0 = Unicode Release MinDependency|Win32
+ {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Unicode Release MinSize|Win32.ActiveCfg = Unicode Release MinSize|Win32
+ {CF6DC513-B04E-420A-A0F9-6D1F4046D098}.Unicode Release MinSize|Win32.Build.0 = Unicode Release MinSize|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/extensions/test/ole/AxTestComponents/AxTestComponents.vcproj b/extensions/test/ole/AxTestComponents/AxTestComponents.vcproj
new file mode 100644
index 0000000000..078daba3da
--- /dev/null
+++ b/extensions/test/ole/AxTestComponents/AxTestComponents.vcproj
@@ -0,0 +1,819 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="AxTestComponents"
+ ProjectGUID="{CF6DC513-B04E-420A-A0F9-6D1F4046D098}"
+ RootNamespace="AxTestComponents"
+ Keyword="AtlProj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Unicode Release MinDependency|Win32"
+ OutputDirectory=".\ReleaseUMinDependency"
+ IntermediateDirectory=".\ReleaseUMinDependency"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ UseOfATL="1"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Performing registration"
+ CommandLine="if &quot;%OS%&quot;==&quot;&quot; goto NOTNT&#x0D;&#x0A;if not &quot;%OS%&quot;==&quot;Windows_NT&quot; goto NOTNT&#x0D;&#x0A;regsvr32 /s /c &quot;$(TargetPath)&quot;&#x0D;&#x0A;echo regsvr32 exec. time &gt; &quot;$(OutDir)\regsvr32.trg&quot;&#x0D;&#x0A;goto end&#x0D;&#x0A;:NOTNT&#x0D;&#x0A;echo Warning : Cannot register Unicode DLL on Windows 95&#x0D;&#x0A;:end&#x0D;&#x0A;"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ReleaseUMinDependency/AxTestComponents.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\ReleaseUMinDependency/AxTestComponents.pch"
+ AssemblerListingLocation=".\ReleaseUMinDependency/"
+ ObjectFile=".\ReleaseUMinDependency/"
+ ProgramDataBaseFileName=".\ReleaseUMinDependency/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile=".\ReleaseUMinDependency/AxTestComponents.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\AxTestComponents.def"
+ ProgramDatabaseFile=".\ReleaseUMinDependency/AxTestComponents.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\ReleaseUMinDependency/AxTestComponents.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release MinSize|Win32"
+ OutputDirectory=".\ReleaseMinSize"
+ IntermediateDirectory=".\ReleaseMinSize"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ UseOfATL="2"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Performing registration"
+ CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;&#x0D;&#x0A;echo regsvr32 exec. time &gt; &quot;$(OutDir)\regsvr32.trg&quot;&#x0D;&#x0A;"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ReleaseMinSize/AxTestComponents.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\ReleaseMinSize/AxTestComponents.pch"
+ AssemblerListingLocation=".\ReleaseMinSize/"
+ ObjectFile=".\ReleaseMinSize/"
+ ProgramDataBaseFileName=".\ReleaseMinSize/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile=".\ReleaseMinSize/AxTestComponents.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\AxTestComponents.def"
+ ProgramDatabaseFile=".\ReleaseMinSize/AxTestComponents.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\ReleaseMinSize/AxTestComponents.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Unicode Release MinSize|Win32"
+ OutputDirectory=".\ReleaseUMinSize"
+ IntermediateDirectory=".\ReleaseUMinSize"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ UseOfATL="2"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Performing registration"
+ CommandLine="if &quot;%OS%&quot;==&quot;&quot; goto NOTNT&#x0D;&#x0A;if not &quot;%OS%&quot;==&quot;Windows_NT&quot; goto NOTNT&#x0D;&#x0A;regsvr32 /s /c &quot;$(TargetPath)&quot;&#x0D;&#x0A;echo regsvr32 exec. time &gt; &quot;$(OutDir)\regsvr32.trg&quot;&#x0D;&#x0A;goto end&#x0D;&#x0A;:NOTNT&#x0D;&#x0A;echo Warning : Cannot register Unicode DLL on Windows 95&#x0D;&#x0A;:end&#x0D;&#x0A;"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ReleaseUMinSize/AxTestComponents.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\ReleaseUMinSize/AxTestComponents.pch"
+ AssemblerListingLocation=".\ReleaseUMinSize/"
+ ObjectFile=".\ReleaseUMinSize/"
+ ProgramDataBaseFileName=".\ReleaseUMinSize/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile=".\ReleaseUMinSize/AxTestComponents.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\AxTestComponents.def"
+ ProgramDatabaseFile=".\ReleaseUMinSize/AxTestComponents.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\ReleaseUMinSize/AxTestComponents.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release MinDependency|Win32"
+ OutputDirectory=".\ReleaseMinDependency"
+ IntermediateDirectory=".\ReleaseMinDependency"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ UseOfATL="1"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Performing registration"
+ CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;&#x0D;&#x0A;echo regsvr32 exec. time &gt; &quot;$(OutDir)\regsvr32.trg&quot;&#x0D;&#x0A;"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ReleaseMinDependency/AxTestComponents.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\ReleaseMinDependency/AxTestComponents.pch"
+ AssemblerListingLocation=".\ReleaseMinDependency/"
+ ObjectFile=".\ReleaseMinDependency/"
+ ProgramDataBaseFileName=".\ReleaseMinDependency/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile=".\ReleaseMinDependency/AxTestComponents.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\AxTestComponents.def"
+ ProgramDatabaseFile=".\ReleaseMinDependency/AxTestComponents.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\ReleaseMinDependency/AxTestComponents.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Performing registration"
+ CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;&#x0D;&#x0A;echo regsvr32 exec. time &gt; &quot;$(OutDir)\regsvr32.trg&quot;&#x0D;&#x0A;"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/AxTestComponents.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\Debug/AxTestComponents.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ BrowseInformation="1"
+ WarningLevel="3"
+ SuppressStartupBanner="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile=".\Debug/AxTestComponents.dll"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\AxTestComponents.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/AxTestComponents.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\Debug/AxTestComponents.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Unicode Debug|Win32"
+ OutputDirectory=".\DebugU"
+ IntermediateDirectory=".\DebugU"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Performing registration"
+ CommandLine="if &quot;%OS%&quot;==&quot;&quot; goto NOTNT&#x0D;&#x0A;if not &quot;%OS%&quot;==&quot;Windows_NT&quot; goto NOTNT&#x0D;&#x0A;regsvr32 /s /c &quot;$(TargetPath)&quot;&#x0D;&#x0A;echo regsvr32 exec. time &gt; &quot;$(OutDir)\regsvr32.trg&quot;&#x0D;&#x0A;goto end&#x0D;&#x0A;:NOTNT&#x0D;&#x0A;echo Warning : Cannot register Unicode DLL on Windows 95&#x0D;&#x0A;:end&#x0D;&#x0A;"
+ Outputs="$(OutDir)\regsvr32.trg"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\DebugU/AxTestComponents.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\DebugU/AxTestComponents.pch"
+ AssemblerListingLocation=".\DebugU/"
+ ObjectFile=".\DebugU/"
+ ProgramDataBaseFileName=".\DebugU/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile=".\DebugU/AxTestComponents.dll"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\AxTestComponents.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\DebugU/AxTestComponents.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\DebugU/AxTestComponents.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath=".\AxTestComponents.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\AxTestComponents.def"
+ >
+ </File>
+ <File
+ RelativePath=".\AxTestComponents.idl"
+ >
+ <FileConfiguration
+ Name="Unicode Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ GenerateStublessProxies="true"
+ TypeLibraryName=".\AxTestComponents.tlb"
+ HeaderFileName="AxTestComponents.h"
+ InterfaceIdentifierFileName="AxTestComponents_i.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ GenerateStublessProxies="true"
+ TypeLibraryName=".\AxTestComponents.tlb"
+ HeaderFileName="AxTestComponents.h"
+ InterfaceIdentifierFileName="AxTestComponents_i.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ GenerateStublessProxies="true"
+ TypeLibraryName=".\AxTestComponents.tlb"
+ HeaderFileName="AxTestComponents.h"
+ InterfaceIdentifierFileName="AxTestComponents_i.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ GenerateStublessProxies="true"
+ TypeLibraryName=".\AxTestComponents.tlb"
+ HeaderFileName="AxTestComponents.h"
+ InterfaceIdentifierFileName="AxTestComponents_i.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ GenerateStublessProxies="true"
+ TypeLibraryName=".\AxTestComponents.tlb"
+ HeaderFileName="AxTestComponents.h"
+ InterfaceIdentifierFileName="AxTestComponents_i.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Debug|Win32"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ GenerateStublessProxies="true"
+ TypeLibraryName=".\AxTestComponents.tlb"
+ HeaderFileName="AxTestComponents.h"
+ InterfaceIdentifierFileName="AxTestComponents_i.c"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\AxTestComponents.rc"
+ >
+ <FileConfiguration
+ Name="Unicode Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(OUTDIR);$(NoInherit)"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\Basic.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions=" /Ob0"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="Foo.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.cpp"
+ >
+ <FileConfiguration
+ Name="Unicode Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Release MinSize|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release MinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath=".\Basic.h"
+ >
+ </File>
+ <File
+ RelativePath="Foo.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath=".\Basic.rgs"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/extensions/test/ole/AxTestComponents/Basic.cpp b/extensions/test/ole/AxTestComponents/Basic.cpp
new file mode 100644
index 0000000000..8aad56e8af
--- /dev/null
+++ b/extensions/test/ole/AxTestComponents/Basic.cpp
@@ -0,0 +1,1356 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "stdafx.h"
+#include "Basic.h"
+
+
+
+// CBasic
+CBasic::CBasic(): m_cPrpByte(0),m_nPrpShort(0),m_lPrpLong(0),m_fPrpFloat(0), m_dPrpDouble(0),m_PrpArray(0),
+m_safearray(NULL), m_bool(VARIANT_FALSE),
+m_arByte(0), m_arShort(0), m_arLong(0), m_arString(0), m_arVariant(0), m_arFloat(0),
+m_arDouble(0), m_arObject(0), m_arByteDim2(0), m_date(0.), m_scode(0)
+
+{
+ memset(&m_cy, 0, sizeof(CY));
+ memset(&m_decimal, 0, sizeof(DECIMAL));
+}
+
+CBasic::~CBasic()
+{
+ SafeArrayDestroy(m_safearray);
+ SafeArrayDestroy(m_arByte);
+ SafeArrayDestroy(m_arShort);
+ SafeArrayDestroy(m_arLong);
+ SafeArrayDestroy(m_arString);
+ SafeArrayDestroy(m_arVariant);
+ SafeArrayDestroy(m_arFloat);
+ SafeArrayDestroy(m_arDouble);
+ SafeArrayDestroy(m_arObject);
+ SafeArrayDestroy(m_arByteDim2);
+
+}
+STDMETHODIMP CBasic::inBool(VARIANT_BOOL val)
+{
+ m_bool = val;
+ return S_OK;
+}
+STDMETHODIMP CBasic::inByte(unsigned char val)
+{
+ m_byte = val;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inShort(short val)
+{
+ m_short = val;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inLong(long val)
+{
+ m_long = val;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inString(BSTR val)
+{
+ m_bstr = val;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inFloat(float val)
+{
+ m_float = val;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inDouble(double val)
+{
+ m_double = val;
+
+ CComVariant varDest;
+ CComVariant varSource(val);
+ HRESULT hr = VariantChangeType(&varDest, &varSource, 0, VT_BSTR);
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inVariant(VARIANT val)
+{
+ m_var1 = val;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inArray(LPSAFEARRAY val)
+{
+ HRESULT hr = S_OK;
+ if (FAILED(hr = SafeArrayDestroy(m_safearray)))
+ return hr;
+ if (FAILED(hr = SafeArrayCopy(val, &m_safearray)))
+ return hr;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inObject(IDispatch *val)
+{
+ m_obj = val;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inoutBool(VARIANT_BOOL* val)
+{
+ VARIANT_BOOL aBool = *val;
+ *val = m_bool;
+ m_bool = aBool;
+ return S_OK;
+}
+
+
+STDMETHODIMP CBasic::inoutByte(unsigned char* val)
+{
+ unsigned char aByte = *val;
+ *val = m_byte;
+ m_byte = aByte;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inoutShort(short *val)
+{
+ short aShort = *val;
+ *val = m_short;
+ m_short = aShort;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inoutLong(long *val)
+{
+ long aLong = *val;
+ *val = m_long;
+ m_long = aLong;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inoutString(BSTR *val)
+{
+ CComBSTR aStr = *val;
+ HRESULT hr = S_OK;
+ if (FAILED( hr = m_bstr.CopyTo(val)))
+ return hr;
+ m_bstr = aStr;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inoutFloat(float *val)
+{
+ float aFloat = *val;
+ *val = m_float;
+ m_float = aFloat;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inoutDouble(double *val)
+{
+ double aDouble = *val;
+ *val = m_double;
+ m_double = aDouble;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inoutVariant(VARIANT *val)
+{
+ CComVariant aVar = *val;
+ HRESULT hr = S_OK;
+ if (FAILED(hr = VariantCopy(val, &m_var1)))
+ return hr;
+ m_var1 = aVar;
+ return S_OK;
+}
+
+/* The array contains VARIANT according to IDL.
+ If the VARIANTs contain strings then we append "out" to each string.
+*/
+STDMETHODIMP CBasic::inoutArray(LPSAFEARRAY *val)
+{
+ SAFEARRAY* aAr = NULL;
+ HRESULT hr = S_OK;
+ if (FAILED(hr = SafeArrayCopy(*val, &aAr)))
+ return hr;
+ if (FAILED(hr = SafeArrayCopy(m_safearray, val)))
+ return hr;
+ if (FAILED(hr = SafeArrayCopy(aAr, & m_safearray)))
+ return hr;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inoutObject(IDispatch **val)
+{
+ CComPtr<IDispatch> disp = *val;
+ if (*val)
+ (*val)->Release();
+ *val = m_obj;
+ if (*val)
+ (*val)->AddRef();
+ m_obj = disp;
+ return S_OK;
+}
+
+
+STDMETHODIMP CBasic::outBool(VARIANT_BOOL* val)
+{
+ *val = m_bool;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::outByte(unsigned char *val)
+{
+ *val= m_byte;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::outShort(short *val)
+{
+ *val= m_short;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::outLong(long *val)
+{
+ *val= m_long;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::outString(BSTR *val)
+{
+ *val= SysAllocString(m_bstr);
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::outFloat(float *val)
+{
+ *val= m_float;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::outDouble(double *val)
+{
+ *val= m_double;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::outVariant(VARIANT *val)
+{
+ HRESULT hr = S_OK;
+ if (FAILED(hr = VariantCopy(val, &m_var1)))
+ return hr;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::outArray(LPSAFEARRAY *val)
+{
+ HRESULT hr = S_OK;
+ if (FAILED(hr = SafeArrayCopy(m_safearray, val)))
+ return false;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::outObject(IDispatch* *val)
+{
+ *val = m_obj;
+ if (m_obj)
+ (*val)->AddRef();
+
+ return S_OK;
+}
+
+
+STDMETHODIMP CBasic::get_prpBool(VARIANT_BOOL* pVal)
+{
+ if (!pVal) return E_POINTER;
+ *pVal = m_bool;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::put_prpBool(VARIANT_BOOL val)
+{
+ m_bool = val;
+ return S_OK;
+}
+
+
+STDMETHODIMP CBasic::get_prpByte(unsigned char *pVal)
+{
+ if( !pVal)
+ return E_POINTER;
+ *pVal= m_cPrpByte;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::put_prpByte(unsigned char newVal)
+{
+ m_cPrpByte= newVal;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::get_prpShort(short *pVal)
+{
+ if( !pVal)
+ return E_POINTER;
+ *pVal= m_nPrpShort;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::put_prpShort(short newVal)
+{
+ m_nPrpShort= newVal;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::get_prpLong(long *pVal)
+{
+ if( !pVal)
+ return E_POINTER;
+ *pVal= m_lPrpLong;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::put_prpLong(long newVal)
+{
+ m_lPrpLong= newVal;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::get_prpString(BSTR *pVal)
+{
+ if( !pVal)
+ return E_POINTER;
+ m_bstrPrpString.CopyTo( pVal );
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::put_prpString(BSTR newVal)
+{
+ m_bstrPrpString= newVal;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::get_prpFloat(float *pVal)
+{
+ if( !pVal)
+ return E_POINTER;
+ *pVal= m_fPrpFloat;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::put_prpFloat(float newVal)
+{
+ m_fPrpFloat= newVal;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::get_prpDouble(double *pVal)
+{
+ if( !pVal)
+ return E_POINTER;
+ *pVal= m_dPrpDouble;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::put_prpDouble(double newVal)
+{
+ m_dPrpDouble= newVal;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::get_prpVariant(VARIANT *pVal)
+{
+ if( !pVal)
+ return E_POINTER;
+ HRESULT hr = S_OK;
+ if (FAILED(hr = VariantCopy( pVal, &m_PropVariant)))
+ return hr;
+ return hr;
+}
+
+STDMETHODIMP CBasic::put_prpVariant(VARIANT newVal)
+{
+ m_PropVariant= newVal;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::get_prpArray(LPSAFEARRAY *pVal)
+{
+ if( !pVal)
+ return E_POINTER;
+ HRESULT hr = S_OK;
+ if (FAILED(hr = SafeArrayCopy( m_PrpArray, pVal)))
+ return hr;
+ return hr;
+}
+
+STDMETHODIMP CBasic::put_prpArray(LPSAFEARRAY newVal)
+{
+ HRESULT hr = S_OK;
+ if (FAILED(hr = SafeArrayDestroy( m_PrpArray)))
+ return hr;
+ if (FAILED(hr = SafeArrayCopy( newVal, &m_PrpArray)))
+ return hr;
+ return hr;
+}
+
+STDMETHODIMP CBasic::get_prpObject(IDispatch **pVal)
+{
+ if( !pVal)
+ return E_POINTER;
+ *pVal= m_PrpObject;
+ if( *pVal != NULL)
+ (*pVal)->AddRef();
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::put_prpObject(IDispatch *newVal)
+{
+ m_PrpObject= newVal;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::mixed1(
+ /* [out][in] */ unsigned char *aChar,
+ /* [out][in] */ float *aFloat,
+ /* [out][in] */ VARIANT *aVar)
+
+{
+ HRESULT hr= S_OK;
+ inoutByte(aChar);
+ inoutFloat(aFloat);
+ inoutVariant(aVar);
+ return hr;
+}
+
+
+
+
+// VT_UI1
+
+STDMETHODIMP CBasic::inSequenceLong(LPSAFEARRAY val)
+{
+ HRESULT hr = S_OK;
+ if (FAILED(hr = SafeArrayDestroy(m_arLong)))
+ return hr;
+ if (FAILED(hr = SafeArrayCopy(val, & m_arLong)))
+ return hr;
+ return hr;
+}
+
+STDMETHODIMP CBasic::inSequenceByte( LPSAFEARRAY val)
+{
+ HRESULT hr = S_OK;
+ if (FAILED(hr = SafeArrayDestroy(m_arByte)))
+ return hr;
+ if (FAILED(hr = SafeArrayCopy(val, & m_arByte)))
+ return hr;
+ return hr;
+}
+
+STDMETHODIMP CBasic::inSequenceShort(LPSAFEARRAY val)
+{
+ HRESULT hr = S_OK;
+ if (FAILED(hr = SafeArrayDestroy(m_arShort)))
+ return hr;
+ if (FAILED(hr = SafeArrayCopy(val, & m_arShort)))
+ return hr;
+ return hr;
+}
+
+STDMETHODIMP CBasic::inSequenceString(LPSAFEARRAY val)
+{
+ HRESULT hr = S_OK;
+ if (FAILED(hr = SafeArrayDestroy(m_arString)))
+ return hr;
+ if (FAILED(hr = SafeArrayCopy(val, & m_arString)))
+ return hr;
+ return hr;
+}
+
+STDMETHODIMP CBasic::inSequenceFloat(LPSAFEARRAY val)
+{
+ HRESULT hr = S_OK;
+ if (FAILED(hr = SafeArrayDestroy(m_arFloat)))
+ return hr;
+ if (FAILED(hr = SafeArrayCopy(val, & m_arFloat)))
+ return hr;
+ return hr;
+}
+
+STDMETHODIMP CBasic::inSequenceDouble(LPSAFEARRAY val)
+{
+ HRESULT hr = S_OK;
+ if (FAILED(hr = SafeArrayDestroy(m_arDouble)))
+ return hr;
+ if (FAILED(hr = SafeArrayCopy(val, & m_arDouble)))
+ return hr;
+ return hr;
+}
+
+STDMETHODIMP CBasic::inSequenceObject(LPSAFEARRAY val)
+{
+ HRESULT hr = S_OK;
+ if (FAILED(hr = SafeArrayDestroy(m_arObject)))
+ return hr;
+ if (FAILED(hr = SafeArrayCopy(val, & m_arObject)))
+ return hr;
+ return hr;
+}
+
+void CBasic::printArray( LPSAFEARRAY val, BSTR message, VARTYPE type)
+{
+
+ HRESULT hr= S_OK;
+ USES_CONVERSION;
+ long lbound=0;
+ long ubound= 0;
+ hr= SafeArrayGetLBound( val, 1, &lbound);
+ hr= SafeArrayGetUBound( val, 1, &ubound);
+ long length= ubound - lbound +1;
+
+ CComVariant varElement;
+ char buf[1024];
+ sprintf( buf,"%s", W2A(message));
+
+ for( long i= 0; i < length ; i++)
+ {
+ char tmp[1024];
+ long data=0;
+ CComVariant var;
+ switch( type)
+ {
+ case VT_UI1:
+ case VT_I2:
+ case VT_I4:
+ case VT_ERROR:
+ hr= SafeArrayGetElement( val, &i, (void*)&data);
+ sprintf( tmp, "%ld \n", *(long*)&data);
+ break;
+ case VT_BSTR:
+ hr= SafeArrayGetElement( val, &i, (void*)&data);
+ sprintf( tmp, "%S \n", (BSTR)data);
+ break;
+ case VT_VARIANT:
+ hr= SafeArrayGetElement( val, &i, &var);
+ sprintf( tmp, "%x \n", var.byref);
+ break;
+ case VT_R4:
+ hr= SafeArrayGetElement( val, &i, (void*)&data);
+ sprintf( tmp, "%f \n", *(float*) &data);
+ break;
+ case VT_R8: ;
+ hr= SafeArrayGetElement( val, &i, (void*)&data);
+ sprintf( tmp, "%f \n", *(double*) &data);
+ break;
+ case VT_DISPATCH:
+ // we assume the objects are instances of this component and have the
+ // property prpString set.
+ hr= SafeArrayGetElement( val, &i, (void*)&data);
+ IDispatch* pdisp= ( IDispatch*) data;
+ CComDispatchDriver driver( pdisp);
+ CComVariant var;
+ if( pdisp)
+ {
+ driver.GetPropertyByName(L"prpString", &var);
+ sprintf( tmp, "%x : %S \n", *(long*)&data, var.bstrVal);
+ }
+ else
+ sprintf( tmp, "%x\n", *(long*)&data);
+ }
+
+ strcat( buf, tmp);
+ }
+ MessageBox( NULL, _T(A2T(buf)), _T("AxTestComponents.Basic"), MB_OK);
+
+}
+// V_ERROR OLECHAR VARIANT VT_UI1
+
+STDMETHODIMP CBasic::outSequenceByte(LPSAFEARRAY* val)
+{
+ HRESULT hr= S_OK;
+ hr = SafeArrayCopy(m_arByte, val);
+ return hr;
+}
+
+STDMETHODIMP CBasic::outSequenceShort(LPSAFEARRAY* val)
+{
+ HRESULT hr= S_OK;
+ hr = SafeArrayCopy(m_arShort, val);
+ return hr;
+}
+
+STDMETHODIMP CBasic::outSequenceLong(LPSAFEARRAY* val)
+{
+ HRESULT hr= S_OK;
+ hr = SafeArrayCopy(m_arLong, val);
+ return hr;
+}
+
+STDMETHODIMP CBasic::outSequenceString(LPSAFEARRAY* val)
+{
+ HRESULT hr= S_OK;
+ hr = SafeArrayCopy(m_arString, val);
+ return hr;
+}
+
+STDMETHODIMP CBasic::outSequenceFloat(LPSAFEARRAY* val)
+{
+ HRESULT hr= S_OK;
+ hr = SafeArrayCopy(m_arFloat, val);
+ return hr;
+}
+
+STDMETHODIMP CBasic::outSequenceDouble(LPSAFEARRAY* val)
+{
+ HRESULT hr= S_OK;
+ hr = SafeArrayCopy(m_arDouble, val);
+ return hr;
+}
+
+STDMETHODIMP CBasic::outSequenceObject(LPSAFEARRAY* val)
+{
+ HRESULT hr = S_OK;
+ hr = SafeArrayCopy(m_arObject, val);
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inoutSequenceByte(LPSAFEARRAY* val)
+{
+ HRESULT hr = S_OK;
+ SAFEARRAY *arTemp = NULL;
+ if (FAILED(hr = SafeArrayCopy(*val, &arTemp)))
+ return hr;
+ if (FAILED(hr = SafeArrayCopy(m_arByte, val)))
+ return hr;
+ m_arByte = arTemp;
+ return hr;
+}
+
+STDMETHODIMP CBasic::inoutSequenceShort(LPSAFEARRAY* val)
+{
+ HRESULT hr = S_OK;
+ SAFEARRAY *arTemp = NULL;
+ if (FAILED(hr = SafeArrayCopy(*val, &arTemp)))
+ return hr;
+ if (FAILED(hr = SafeArrayCopy(m_arShort, val)))
+ return hr;
+ m_arShort = arTemp;
+ return hr;
+}
+
+STDMETHODIMP CBasic::inoutSequenceLong(LPSAFEARRAY* val)
+{
+ HRESULT hr = S_OK;
+ SAFEARRAY *arTemp = NULL;
+ if (FAILED(hr = SafeArrayCopy(*val, &arTemp)))
+ return hr;
+ if (FAILED(hr = SafeArrayCopy(m_arLong, val)))
+ return hr;
+ m_arLong = arTemp;
+ return hr;
+}
+
+STDMETHODIMP CBasic::inoutSequenceString(LPSAFEARRAY* val)
+{
+ HRESULT hr = S_OK;
+ SAFEARRAY *arTemp = NULL;
+ if (FAILED(hr = SafeArrayCopy(*val, &arTemp)))
+ return hr;
+ if (FAILED(hr = SafeArrayCopy(m_arString, val)))
+ return hr;
+ m_arString = arTemp;
+ return hr;
+}
+
+STDMETHODIMP CBasic::inoutSequenceFloat(LPSAFEARRAY* val)
+{
+ HRESULT hr = S_OK;
+ SAFEARRAY *arTemp = NULL;
+ if (FAILED(hr = SafeArrayCopy(*val, &arTemp)))
+ return hr;
+ if (FAILED(hr = SafeArrayCopy(m_arFloat, val)))
+ return hr;
+ m_arFloat = arTemp;
+ return hr;
+}
+
+STDMETHODIMP CBasic::inoutSequenceDouble(LPSAFEARRAY* val)
+{
+ HRESULT hr = S_OK;
+ SAFEARRAY *arTemp = NULL;
+ if (FAILED(hr = SafeArrayCopy(*val, &arTemp)))
+ return hr;
+ if (FAILED(hr = SafeArrayCopy(m_arDouble, val)))
+ return hr;
+ m_arDouble = arTemp;
+ return hr;
+}
+
+STDMETHODIMP CBasic::inoutSequenceObject(LPSAFEARRAY* val)
+{
+ HRESULT hr = S_OK;
+ SAFEARRAY *arTemp = NULL;
+ if (FAILED(hr = SafeArrayCopy(*val, &arTemp)))
+ return hr;
+ if (FAILED(hr = SafeArrayCopy(m_arObject, val)))
+ return hr;
+ m_arObject = arTemp;
+ return hr;
+}
+
+// 2-dimensional Array
+STDMETHODIMP CBasic::inMulDimArrayLong(LPSAFEARRAY val)
+{
+ printMulArray( val, VT_I4);
+ return S_OK;
+}
+// 2-dimensional Array
+STDMETHODIMP CBasic::inMulDimArrayVariant(LPSAFEARRAY val)
+{
+ printMulArray( val, VT_VARIANT);
+ return S_OK;
+}
+// 3-dimensional Array
+STDMETHODIMP CBasic::inMulDimArrayLong2(LPSAFEARRAY val)
+{
+ printMulArray( val, VT_I4);
+ return S_OK;
+}
+// 3-dimensional Array
+STDMETHODIMP CBasic::inMulDimArrayVariant2(LPSAFEARRAY val)
+{
+ return S_OK;
+}
+
+
+STDMETHODIMP CBasic::inMulDimArrayByte(LPSAFEARRAY val)
+{
+ HRESULT hr = S_OK;
+ if (FAILED(hr = SafeArrayDestroy(m_arByteDim2)))
+ return hr;
+ if (FAILED(hr = SafeArrayCopy(val, & m_arByteDim2)))
+ return hr;
+ return hr;
+}
+// 3-dimensionales array
+STDMETHODIMP CBasic::inMulDimArrayByte2(LPSAFEARRAY val)
+{
+
+ // TODO: Add your implementation code here
+ //printMulArray( val, VT_UI1);
+ return S_OK;
+}
+
+// supports 2 and 3 dimensional SAFEARRAY with elements of long or VARIANT
+void CBasic::printMulArray( SAFEARRAY* val, VARTYPE type)
+{
+ HRESULT hr= S_OK;
+ UINT dims= SafeArrayGetDim( val);
+ long lbound1;
+ long ubound1;
+ long lbound2;
+ long ubound2;
+ long lbound3;
+ long ubound3;
+ long length1;
+ long length2;
+
+ char buff[4096];
+ buff[0]=0;
+
+ if( dims == 2)
+ {
+ hr= SafeArrayGetLBound( val, 1, &lbound1);
+ hr= SafeArrayGetUBound( val, 1, &ubound1);
+ length1= ubound1 - lbound1 +1;
+
+ hr= SafeArrayGetLBound( val, 2, &lbound2);
+ hr= SafeArrayGetUBound( val, 2, &ubound2);
+ length2= ubound2 - lbound2 + 1;
+ char tmpBuf[1024];
+ tmpBuf[0]=0;
+ long index[2];
+ for( long i= 0; i< length2; i++)
+ {
+ for( long j= 0; j<length1; j++)
+ {
+ index[0]= j;
+ index[1]= i;
+ long longVal;
+ CComVariant var;
+ switch( type)
+ {
+ case VT_I4:
+ hr= SafeArrayGetElement( val, index, &longVal);
+ sprintf( tmpBuf, "(%ld,%ld): %ld\n", index[1], index[0], longVal);
+ break;
+ case VT_UI1:
+ hr= SafeArrayGetElement( val, index, &longVal);
+ sprintf( tmpBuf, "(%ld,%ld): %d\n", index[1], index[0], (unsigned char)longVal);
+ break;
+ case VT_VARIANT:
+ hr= SafeArrayGetElement( val, index, &var );
+ sprintf( tmpBuf, "(%ld,%ld): %d (vartype %d)\n", index[1], index[0], var.byref, var.vt);
+ break;
+ }
+ strcat( buff,tmpBuf);
+ }
+
+ }
+
+
+ }
+ else if( dims == 3 )
+ {
+ hr= SafeArrayGetLBound( val, 1, &lbound1);
+ hr= SafeArrayGetUBound( val, 1, &ubound1);
+ length1= ubound1 - lbound1 +1;
+
+ hr= SafeArrayGetLBound( val, 2, &lbound2);
+ hr= SafeArrayGetUBound( val, 2, &ubound2);
+ length2= ubound2 - lbound2 + 1;
+
+ hr= SafeArrayGetLBound( val, 3, &lbound3);
+ hr= SafeArrayGetUBound( val, 3, &ubound3);
+ long length3= ubound3 - lbound3 +1;
+ char tmpBuf[1024];
+ tmpBuf[0]=0;
+ long index[3];
+ for( long i= 0; i< length3; i++)
+ {
+ for( long j= 0; j<length2; j++)
+ {
+ for( long k= 0; k<length1; k++)
+ {
+ index[0]= k;
+ index[1]= j;
+ index[2]= i;
+ long longVal;
+ CComVariant var;
+ switch( type)
+ {
+ case VT_I4:
+ hr= SafeArrayGetElement( val, index, &longVal);
+ sprintf( tmpBuf, "(%ld,%ld,%ld): %ld\n", index[2], index[1], index[0], longVal);
+ break;
+ case VT_UI1:
+ hr= SafeArrayGetElement( val, index, &longVal);
+ sprintf( tmpBuf, "(%ld,%ld,%ld): %d\n", index[2], index[1], index[0], (unsigned char)longVal);
+ break;
+
+ case VT_VARIANT:
+ hr= SafeArrayGetElement( val, index, &var );
+ sprintf( tmpBuf, "(%ld,%ld,%ld): %d (vartype %d)\n", index[2], index[1], index[0], var.byref, var.vt);
+ break;
+ }
+ strcat( buff,tmpBuf);
+ }
+ }
+
+ }
+
+ }
+
+ MessageBox( NULL, A2T( buff), _T("AxTestControl.Basic"), MB_OK);
+
+
+}
+
+
+
+
+STDMETHODIMP CBasic::outMore(long* val1, long* val2)
+{
+ // TODO: Add your implementation code here
+ *val1= 111;
+ *val2= 112;
+ return S_OK;
+}
+// If an optional parameter was not provided then the respective member will
+// not be set
+STDMETHODIMP CBasic::optional1(/*[in]*/ long val1, /*[in, optional]*/ VARIANT* val2)
+{
+ m_long = val1;
+ if (val2->vt != VT_ERROR)
+ m_var1 = *val2;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::optional2(/*[out]*/ long* val1,/*[out, optional]*/ VARIANT* val2)
+{
+ HRESULT hr = S_OK;
+ *val1 = m_long;
+
+ if (val2->vt != VT_ERROR)
+ hr = VariantCopy(val2, & m_var1);
+ return hr;
+}
+
+STDMETHODIMP CBasic::optional3(/*[in, optional]*/ VARIANT* val1,/*[in, optional]*/ VARIANT* val2)
+{
+ //if (val1->vt != VT_ERROR)
+ m_var1 = *val1;
+
+ //if (val2->vt != VT_ERROR)
+ m_var2 = *val2;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::optional4(/*[in, out, optional]*/ VARIANT* val1,
+ /*[in, out, optional]*/ VARIANT* val2)
+{
+ HRESULT hr = S_OK;
+ //return the previously set in values
+ if (val1->vt != VT_ERROR)
+ {
+ CComVariant var1(*val1);
+ if (FAILED(hr = VariantCopy(val1, & m_var1)))
+ return hr;
+ m_var1 = var1;
+ }
+ if (val2->vt != VT_ERROR)
+ {
+ CComVariant var2(*val2);
+ if (FAILED(hr = VariantCopy(val2, & m_var2)))
+ return hr;
+ m_var2 = var2;
+ }
+ return hr;
+}
+
+STDMETHODIMP CBasic::optional5(/*[out, optional]*/ VARIANT* val1,
+ /*[out, optional]*/ VARIANT* val2)
+{
+ HRESULT hr = S_OK;
+ if (FAILED(hr = VariantCopy(val1, &m_var1)))
+ return hr;
+ if (FAILED(hr = VariantCopy(val2, &m_var2)))
+ return hr;
+ return hr;
+}
+
+STDMETHODIMP CBasic::defaultvalue1(/*[in, defaultvalue(10)]*/ long val1,
+ /*[in, defaultvalue(3.14)]*/ double* val2,
+ // /*[in, defaultvalue(10)]*/ VARIANT val3,
+ /*[in, defaultvalue(100)]*/ VARIANT* val4)
+{
+ m_long = val1;
+ m_double = *val2;
+// m_var1 = val3;
+ m_var2 = *val4;
+ return S_OK;
+}
+STDMETHODIMP CBasic::defaultvalue2(/*[in, out, defaultvalue(10)]*/ long* val1,
+ /*[in, out, defaultvalue(3.14)]*/ double* val2,
+ // /*[in, out, defaultvalue(10)]*/ VARIANT* val3,
+ /*[in, out, defaultvalue(100)]*/ VARIANT* val4)
+{
+ HRESULT hr = S_OK;
+ long aLong = *val1;
+ double aDouble = *val2;
+// CComVariant var1(*val3);
+ CComVariant var2(*val4);
+ *val1 = m_long;
+ *val2 = m_double;
+ //if (FAILED(hr = VariantCopy(val3, &m_var1)))
+ // return hr;
+ if (FAILED(hr = VariantCopy(val4, &m_var2)))
+ return hr;
+ m_long = aLong;
+ m_double = aDouble;
+// m_var1 = var1;
+ m_var2 = var2;
+ return hr;
+}
+/* val2 contains the variable argument list. If no such arguments are supplied
+ then the safearray is invalid. SafeArrayCopy then returns E_INVALIDARG
+*/
+STDMETHODIMP CBasic::varargfunc1(/*[in]*/ long val1,/*[in]*/ LPSAFEARRAY val2)
+{
+ m_long = val1;
+
+ HRESULT hr = S_OK;
+ if (FAILED(hr = SafeArrayDestroy(m_safearray)))
+ return hr;
+ if (FAILED(hr = SafeArrayCopy(val2, & m_safearray)))
+ {
+ if (hr != E_INVALIDARG)
+ return hr;
+ }
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::varargfunc2(/*[out]*/ long* val1, /*[out]*/ SAFEARRAY ** val2)
+{
+ *val1 = m_long;
+ HRESULT hr = SafeArrayCopy(m_safearray, val2);
+ return hr;
+}
+
+STDMETHODIMP CBasic::inSequenceByteDim2(LPSAFEARRAY val)
+{
+ HRESULT hr = S_OK;
+ if (FAILED(hr = SafeArrayDestroy(m_arByteDim2)))
+ return hr;
+ if (FAILED(hr = SafeArrayCopy(val, & m_arByteDim2)))
+ return hr;
+ return hr;
+}
+
+
+STDMETHODIMP CBasic::inCurrency(CY val)
+{
+ m_cy = val;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::outCurrency(CY* val)
+{
+ *val = m_cy;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inoutCurrency(CY* val)
+{
+ CY tmp = *val;
+ *val = m_cy;
+ m_cy = tmp;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inDate(DATE val)
+{
+ m_date = val;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::outDate(DATE* val)
+{
+ *val = m_date;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inoutDate(DATE* val)
+{
+ DATE tmp = *val;
+ *val = m_date;
+ m_date = tmp;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::get_prpCurrency(CY* pVal)
+{
+ *pVal = m_cy;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::put_prpCurrency(CY newVal)
+{
+ m_cy = newVal;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::get_prpDate(DATE* pVal)
+{
+ *pVal = m_date;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::put_prpDate(DATE newVal)
+{
+ m_date = newVal;
+ return S_OK;
+}
+
+//VT_I4 DECIMAL_NEG //tagVARIANT DISPATCH_PROPERTYPUT
+STDMETHODIMP CBasic::inDecimal(DECIMAL val)
+{
+ m_decimal = val;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::outDecimal(DECIMAL* val)
+{
+ * val = m_decimal;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inoutDecimal(DECIMAL* val)
+{
+ DECIMAL tmp;
+ tmp = * val;
+ * val = m_decimal;
+ m_decimal = tmp;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::get_prpDecimal(DECIMAL* pVal)
+{
+ * pVal = m_decimal;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::put_prpDecimal(DECIMAL newVal)
+{
+ m_decimal = newVal;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inSCode(SCODE val)
+{
+ m_scode = val;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::outScode(SCODE* val)
+{
+ * val = m_scode;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inoutSCode(SCODE* val)
+{
+ SCODE tmp = *val;
+ * val = m_scode;
+ m_scode = tmp;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::get_prpSCode(SCODE* pVal)
+{
+ * pVal = m_scode;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::put_prpSCode(SCODE newVal)
+{
+ m_scode = newVal;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inrefLong(LONG* val)
+{
+ m_long = * val;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inrefVariant(VARIANT* val)
+{
+ HRESULT hr = S_OK;
+ if (FAILED(hr = VariantCopy( & m_var1, val)))
+ return hr;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inrefDecimal(DECIMAL* val)
+{
+ m_decimal = * val;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::get_prpRefLong(long* pVal)
+{
+ *pVal = m_long;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::putref_prpRefLong(long* newVal)
+{
+ m_long = * newVal;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::get_prprefVariant(VARIANT* pVal)
+{
+ HRESULT hr = S_OK;
+ hr = VariantCopy(pVal, & m_var1);
+ return hr;
+}
+
+STDMETHODIMP CBasic::putref_prprefVariant(VARIANT* newVal)
+{
+ m_var1 = * newVal;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::get_prprefDecimal(DECIMAL* pVal)
+{
+ * pVal = m_decimal;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::putref_prprefDecimal(DECIMAL* newVal)
+{
+ m_decimal = *newVal;
+ return S_OK;
+}
+
+
+STDMETHODIMP CBasic::optional6(VARIANT* val1, VARIANT* val2, VARIANT* val3, VARIANT* val4)
+{
+ HRESULT hr = S_OK;
+ if (FAILED(hr = m_var1.Copy(val1)))
+ return hr;
+ if (FAILED(hr = m_var2.Copy(val2)))
+ return hr;
+ if (FAILED(hr = m_var3.Copy(val3)))
+ return hr;
+ if (FAILED(hr = m_var4.Copy(val4)))
+ return hr;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::optional7(VARIANT* val1, VARIANT* val2, VARIANT* val3, VARIANT* val4)
+{
+ HRESULT hr = S_OK;
+ if (FAILED(hr = VariantCopy(val1, & m_var1)))
+ return hr;
+ if (FAILED(hr = VariantCopy(val2, & m_var2)))
+ return hr;
+ if (FAILED(hr = VariantCopy(val3, & m_var3)))
+ return hr;
+ if (FAILED(hr = VariantCopy(val4, & m_var4)))
+ return hr;
+
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::get_prpMultiArg1(VARIANT* val1, VARIANT* val2, VARIANT* pVal)
+{
+ HRESULT hr = S_OK;
+ CComVariant tmp1(*val1);
+ CComVariant tmp2(*val2);
+
+ if (FAILED(hr = VariantCopy(val1, & m_var1)))
+ return hr;
+ if (FAILED(hr = VariantCopy(val2, & m_var2)))
+ return hr;
+ m_var1 = tmp1;
+ m_var2 = tmp2;
+ if (FAILED(hr = VariantCopy(pVal, & m_var3)))
+ return hr;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::put_prpMultiArg1(VARIANT* val1, VARIANT* val2, VARIANT* newVal)
+{
+ HRESULT hr = S_OK;
+ CComVariant tmp1( * val1);
+ CComVariant tmp2( * val2);
+
+ if (FAILED(hr = VariantCopy(val1, & m_var1)))
+ return hr;
+ if (FAILED(hr = VariantCopy(val2, & m_var2)))
+ return hr;
+ m_var1 = tmp1;
+ m_var2 = tmp2;
+
+ m_var3 = *newVal;
+ return S_OK;
+}
+
+// tagVARIANT DISPATCH_PROPERTYPUT DISPID_PROPERTYPUT VARIANTARG LOCALE_USER_DEFAULT
+
+STDMETHODIMP CBasic::get_prpMultiArg2(VARIANT val1, VARIANT* pVal)
+{
+ HRESULT hr = S_OK;
+ m_var1 = val1;
+
+ if (FAILED(hr = VariantCopy(pVal, & m_var2)))
+ return hr;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::put_prpMultiArg2(VARIANT val1, VARIANT newVal)
+{
+ m_var1 = val1;
+ m_var2 = newVal;
+ return S_OK;
+}
+
+// returns the values set by prpMultiArg2
+STDMETHODIMP CBasic::prpMultiArg2GetValues(VARIANT* val1, VARIANT* valProperty)
+{
+ HRESULT hr = S_OK;
+ if (FAILED(VariantCopy(val1, & m_var1)))
+ return hr;
+ if (FAILED(VariantCopy(valProperty, & m_var2)))
+ return hr;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::get_prpMultiArg3(LONG* val1, LONG* pVal)
+{
+ long aLong = *val1;
+ *val1 = m_long;
+ m_long = aLong;
+
+ * pVal = m_long2;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::put_prpMultiArg3(LONG* val1, LONG newVal)
+{
+ long aLong = *val1;
+ *val1 = m_long;
+ m_long = aLong;
+
+ m_long2 = newVal;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inUnknown(IUnknown* val)
+{
+ m_unknown = val;
+
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::outUnknown(IUnknown** val)
+{
+ m_unknown.CopyTo(val);
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::inoutUnknown(IUnknown** val)
+{
+ CComPtr<IUnknown> tmp = *val;
+ m_unknown.CopyTo(val);
+ m_unknown = tmp;
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::get_prpUnknown(IUnknown** pVal)
+{
+ m_prpUnknown.CopyTo(pVal);
+ return S_OK;
+}
+
+STDMETHODIMP CBasic::put_prpUnknown(IUnknown* newVal)
+{
+ m_prpUnknown = newVal;
+ return S_OK;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/test/ole/AxTestComponents/Basic.h b/extensions/test/ole/AxTestComponents/Basic.h
new file mode 100644
index 0000000000..eec04aa085
--- /dev/null
+++ b/extensions/test/ole/AxTestComponents/Basic.h
@@ -0,0 +1,259 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+// Basic.h : Declaration of the CBasic
+
+#ifndef __BASIC_H_
+#define __BASIC_H_
+
+#include "resource.h"
+#import "AxTestComponents.tlb" no_namespace no_implementation raw_interfaces_only named_guids
+
+
+// CBasic
+class ATL_NO_VTABLE CBasic :
+ public CComObjectRootEx<CComSingleThreadModel>,
+ public CComCoClass<CBasic, &CLSID_Basic>,
+ public IDispatchImpl<IBasic, &IID_IBasic, &LIBID_AXTESTCOMPONENTSLib>
+ {
+public:
+ CBasic();
+ ~CBasic();
+
+ DECLARE_REGISTRY_RESOURCEID(IDR_BASIC)
+
+ DECLARE_PROTECT_FINAL_CONSTRUCT()
+
+ BEGIN_COM_MAP(CBasic)
+ COM_INTERFACE_ENTRY(IBasic)
+ COM_INTERFACE_ENTRY(IDispatch)
+ END_COM_MAP()
+
+ // IBasic
+public:
+ STDMETHOD(outMore)(/*[out]*/long* val1, /*[out]*/long* val2);
+ STDMETHOD(inMulDimArrayByte2)(LPSAFEARRAY val);
+ STDMETHOD(inMulDimArrayByte)(LPSAFEARRAY val);
+ STDMETHOD(inMulDimArrayVariant2)(LPSAFEARRAY val);
+ STDMETHOD(inMulDimArrayLong2)(LPSAFEARRAY val);
+ STDMETHOD(inMulDimArrayVariant)(LPSAFEARRAY val);
+ STDMETHOD(inMulDimArrayLong)( LPSAFEARRAY val);
+ STDMETHOD(inoutSequenceObject)(LPSAFEARRAY* val);
+ STDMETHOD(inoutSequenceDouble)(LPSAFEARRAY * val);
+ STDMETHOD(inoutSequenceFloat)(LPSAFEARRAY * val);
+ STDMETHOD(inoutSequenceString)(LPSAFEARRAY* val);
+ STDMETHOD(inoutSequenceLong)(LPSAFEARRAY * val);
+ STDMETHOD(inoutSequenceShort)(LPSAFEARRAY * val);
+ STDMETHOD(inoutSequenceByte)(LPSAFEARRAY * val);
+ STDMETHOD(outSequenceObject)(/*[out]*/ LPSAFEARRAY* val);
+ STDMETHOD(outSequenceDouble)(/*[out]*/ LPSAFEARRAY* val);
+ STDMETHOD(outSequenceFloat)(/*[out]*/ LPSAFEARRAY* val);
+ STDMETHOD(outSequenceString)(/*[out]*/ LPSAFEARRAY* val);
+ STDMETHOD(outSequenceLong)(/*[out]*/ LPSAFEARRAY* val);
+ STDMETHOD(outSequenceShort)(/*[out]*/ LPSAFEARRAY* val);
+ STDMETHOD(outSequenceByte)(/*[out]*/ LPSAFEARRAY* val);
+ STDMETHOD(inSequenceObject)(LPSAFEARRAY ar);
+ STDMETHOD(inSequenceDouble)(LPSAFEARRAY ar);
+ STDMETHOD(inSequenceFloat)(LPSAFEARRAY ar);
+ STDMETHOD(inSequenceString)(LPSAFEARRAY ar);
+ STDMETHOD(inSequenceShort)(LPSAFEARRAY ar);
+ STDMETHOD(inSequenceByte)(LPSAFEARRAY ar);
+ STDMETHOD(inSequenceLong)(LPSAFEARRAY ar);
+ STDMETHOD(mixed1)(
+ /* [out][in] */ unsigned char *aChar,
+ /* [out][in] */ float *aFloat,
+ /* [out][in] */ VARIANT *aVar);
+ STDMETHOD(get_prpObject)(/*[out, retval]*/ IDispatch* *pVal);
+ STDMETHOD(put_prpObject)(/*[in]*/ IDispatch* newVal);
+ STDMETHOD(get_prpArray)(/*[out, retval]*/ LPSAFEARRAY *pVal);
+ STDMETHOD(put_prpArray)(/*[in]*/ LPSAFEARRAY newVal);
+ STDMETHOD(get_prpVariant)(/*[out, retval]*/ VARIANT *pVal);
+ STDMETHOD(put_prpVariant)(/*[in]*/ VARIANT newVal);
+ STDMETHOD(get_prpDouble)(/*[out, retval]*/ double *pVal);
+ STDMETHOD(put_prpDouble)(/*[in]*/ double newVal);
+ STDMETHOD(get_prpFloat)(/*[out, retval]*/ float *pVal);
+ STDMETHOD(put_prpFloat)(/*[in]*/ float newVal);
+ STDMETHOD(get_prpString)(/*[out, retval]*/ BSTR *pVal);
+ STDMETHOD(put_prpString)(/*[in]*/ BSTR newVal);
+ STDMETHOD(get_prpLong)(/*[out, retval]*/ long *pVal);
+ STDMETHOD(put_prpLong)(/*[in]*/ long newVal);
+ STDMETHOD(get_prpShort)(/*[out, retval]*/ short *pVal);
+ STDMETHOD(put_prpShort)(/*[in]*/ short newVal);
+ STDMETHOD(get_prpByte)(/*[out, retval]*/ unsigned char *pVal);
+ STDMETHOD(put_prpByte)(/*[in]*/ unsigned char newVal);
+ STDMETHOD(get_prpBool)(/*[out, retval]*/ VARIANT_BOOL *pVal);
+ STDMETHOD(put_prpBool)(/*[in]*/ VARIANT_BOOL newVal);
+
+ STDMETHOD(outObject)(/*[out]*/ IDispatch* *val);
+ STDMETHOD(outArray)(/*[out]*/ LPSAFEARRAY * val);
+ STDMETHOD(outVariant)(/*[out]*/ VARIANT* val);
+ STDMETHOD(outDouble)(/*[out]*/ double* val);
+ STDMETHOD(outFloat)(/*[out]*/ float* val);
+ STDMETHOD(outString)(/*[out]*/ BSTR* val);
+ STDMETHOD(outLong)(/*[out]*/ long* val);
+ STDMETHOD(outShort)(/*[out]*/ short* val);
+ STDMETHOD(outByte)(/*[out]*/ unsigned char* val);
+ STDMETHOD(outBool)(/*[out]*/ VARIANT_BOOL* val);
+
+ STDMETHOD(inoutObject)(/*[in,out]*/ IDispatch* *val);
+ STDMETHOD(inoutArray)(/*[in,out]*/ LPSAFEARRAY * val);
+ STDMETHOD(inoutVariant)(/*[in,out]*/ VARIANT * val);
+ STDMETHOD(inoutDouble)(/*[in,out]*/ double * val);
+ STDMETHOD(inoutFloat)(/*[in,out]*/ float * val);
+ STDMETHOD(inoutString)(/*[in, out]*/ BSTR* val);
+ STDMETHOD(inoutLong)(/*[in,out]*/ long * val);
+ STDMETHOD(inoutShort)(/*[in,out]*/ short* val);
+ STDMETHOD(inoutByte)(/*[in,out]*/ unsigned char* val);
+ STDMETHOD(inoutBool)(/*[in,out]*/ VARIANT_BOOL* val);
+
+
+ STDMETHOD(inObject)(/*[in]*/ IDispatch* val);
+ STDMETHOD(inArray)(/*[in]*/ LPSAFEARRAY val);
+ STDMETHOD(inVariant)(/*[in]*/ VARIANT val);
+ STDMETHOD(inDouble)(/*[in]*/ double val);
+ STDMETHOD(inFloat)(/*[in]*/ float val);
+ STDMETHOD(inString)(/*[in]*/ BSTR val);
+ STDMETHOD(inLong)(/*[in]*/ long val);
+ STDMETHOD(inShort)(/*[in]*/ short val);
+ STDMETHOD(inByte)(/*[in]*/ unsigned char val);
+ STDMETHOD(inBool)(/*[in]*/ VARIANT_BOOL val);
+
+
+ STDMETHOD(optional1)(/*[in]*/ long val1, /*[in, optional]*/ VARIANT* val2);
+ STDMETHOD(optional2)(/*[out]*/ long* val1,/*[out, optional]*/ VARIANT* val2);
+ STDMETHOD(optional3)(/*[in, optional]*/ VARIANT* val1,/*[in, optional]*/ VARIANT* val2);
+ STDMETHOD(optional4)(/*[in, out, optional]*/ VARIANT* val1,/*[in, out, optional]*/ VARIANT* val2);
+ STDMETHOD(optional5)(/*[out, optional]*/ VARIANT* val1,/*[out, optional]*/ VARIANT* val2);
+
+
+ STDMETHOD(defaultvalue1)(/*[in, defaultvalue(10)]*/ long val1,
+ /*[in, defaultvalue(3.14)]*/ double* val2,
+ /*[in, defaultvalue(100)]*/ VARIANT* val4);
+
+ STDMETHOD(defaultvalue2)(/*[in, out, defaultvalue(10)]*/ long* val1,
+ /*[in, out, defaultvalue(3.14)]*/ double* val2,
+ /*[in, out, defaultvalue(100)]*/ VARIANT* val4);
+
+ STDMETHOD(varargfunc1)(/*[in]*/ long val1,/*[in]*/ LPSAFEARRAY val2);
+
+ STDMETHOD(varargfunc2)(/*[out]*/ long* val1, /*[out]*/ SAFEARRAY ** val2);
+
+
+ // members for property implementations
+ unsigned char m_cPrpByte;
+ short m_nPrpShort;
+ long m_lPrpLong;
+ float m_fPrpFloat;
+ double m_dPrpDouble;
+ CComPtr<IDispatch> m_PrpObject;
+ CComPtr<IUnknown> m_prpUnknown;
+
+ CComBSTR m_bstrPrpString;
+ CComVariant m_PropVariant;
+ LPSAFEARRAY m_PrpArray;
+protected:
+ VARIANT_BOOL m_bool;
+ unsigned char m_byte;
+ short m_short;
+ long m_long;
+ long m_long2;
+ float m_float;
+ double m_double;
+ CComVariant m_var1;
+ CComVariant m_var2;
+ CComVariant m_var3;
+ CComVariant m_var4;
+ CComBSTR m_bstr;
+ CY m_cy;
+ DATE m_date;
+ DECIMAL m_decimal;
+ SCODE m_scode;
+ SAFEARRAY * m_safearray;
+ CComPtr<IDispatch> m_obj;
+ CComPtr<IUnknown> m_unknown;
+
+ SAFEARRAY * m_arByte;
+ SAFEARRAY * m_arShort;
+ SAFEARRAY * m_arLong;
+ SAFEARRAY * m_arString;
+ SAFEARRAY * m_arVariant;
+ SAFEARRAY * m_arFloat;
+ SAFEARRAY * m_arDouble;
+ SAFEARRAY * m_arObject;
+ SAFEARRAY * m_arByteDim2;
+
+ static void printArray(LPSAFEARRAY val, BSTR message, VARTYPE type);
+ static void printMulArray(LPSAFEARRAY val, VARTYPE type);
+
+
+public:
+ STDMETHOD(inSequenceByteDim2)(LPSAFEARRAY val);
+ STDMETHOD(inCurrency)(CY val);
+ STDMETHOD(outCurrency)(CY* val);
+ STDMETHOD(inoutCurrency)(CY* val);
+ STDMETHOD(inDate)(DATE val);
+ STDMETHOD(outDate)(DATE* val);
+ STDMETHOD(inoutDate)(DATE* val);
+ STDMETHOD(get_prpCurrency)(CY* pVal);
+ STDMETHOD(put_prpCurrency)(CY newVal);
+ STDMETHOD(get_prpDate)(DATE* pVal);
+ STDMETHOD(put_prpDate)(DATE newVal);
+ STDMETHOD(inDecimal)(DECIMAL val);
+ STDMETHOD(outDecimal)(DECIMAL* val);
+ STDMETHOD(inoutDecimal)(DECIMAL* val);
+ STDMETHOD(get_prpDecimal)(DECIMAL* pVal);
+ STDMETHOD(put_prpDecimal)(DECIMAL newVal);
+ STDMETHOD(inSCode)(SCODE val);
+ STDMETHOD(outScode)(SCODE* val);
+ STDMETHOD(inoutSCode)(SCODE* val);
+ STDMETHOD(get_prpSCode)(SCODE* pVal);
+ STDMETHOD(put_prpSCode)(SCODE newVal);
+ STDMETHOD(inrefLong)(LONG* val);
+ STDMETHOD(inrefVariant)(VARIANT* val);
+ STDMETHOD(inrefDecimal)(DECIMAL* val);
+ STDMETHOD(get_prpRefLong)(long* pVal);
+ STDMETHOD(putref_prpRefLong)(long* newVal);
+ STDMETHOD(get_prprefVariant)(VARIANT* pVal);
+ STDMETHOD(putref_prprefVariant)(VARIANT* newVal);
+ STDMETHOD(get_prprefDecimal)(DECIMAL* pVal);
+ STDMETHOD(putref_prprefDecimal)(DECIMAL* newVal);
+ STDMETHOD(optional6)(VARIANT* val1, VARIANT* val2, VARIANT* val3, VARIANT* val4);
+ STDMETHOD(optional7)(VARIANT* val1, VARIANT* val2, VARIANT* val3, VARIANT* val4);
+
+ STDMETHOD(get_prpMultiArg1)(VARIANT* val1, VARIANT* val2, VARIANT* pVal);
+ //STDMETHOD(get_prpMultiArg1)(VARIANT* val1, VARIANT* pVal);
+ STDMETHOD(put_prpMultiArg1)(VARIANT* val1, VARIANT* val2, VARIANT* newVal);
+ //STDMETHOD(put_prpMultiArg1)(VARIANT* val1, VARIANT* newVal);
+ STDMETHOD(get_prpMultiArg2)(VARIANT val1, VARIANT* pVal);
+ STDMETHOD(put_prpMultiArg2)(VARIANT val1, VARIANT newVal);
+ STDMETHOD(prpMultiArg2GetValues)(VARIANT* val1, VARIANT* valProperty);
+ STDMETHOD(get_prpMultiArg3)(LONG* val1, LONG* pVal);
+ STDMETHOD(put_prpMultiArg3)(LONG* val1, LONG newVal);
+
+ // IFoo Methods
+public:
+ STDMETHOD(inUnknown)(IUnknown* val);
+ STDMETHOD(outUnknown)(IUnknown** val);
+ STDMETHOD(inoutUnknown)(IUnknown** val);
+ STDMETHOD(get_prpUnknown)(IUnknown** pVal);
+ STDMETHOD(put_prpUnknown)(IUnknown* newVal);
+};
+
+#endif //__BASIC_H_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/test/ole/AxTestComponents/Basic.rgs b/extensions/test/ole/AxTestComponents/Basic.rgs
new file mode 100644
index 0000000000..67fa860089
--- /dev/null
+++ b/extensions/test/ole/AxTestComponents/Basic.rgs
@@ -0,0 +1,50 @@
+HKCR
+{
+ AxTestComponents.Basic.1 = s 'Basic Class'
+ {
+ CLSID = s '{BFE10EBE-8584-11D4-8335-005004526AB4}'
+ }
+ AxTestComponents.Basic = s 'Basic Class'
+ {
+ CLSID = s '{BFE10EBE-8584-11D4-8335-005004526AB4}'
+ CurVer = s 'AxTestComponents.Basic.1'
+ }
+ NoRemove CLSID
+ {
+ ForceRemove {BFE10EBE-8584-11D4-8335-005004526AB4} = s 'Basic Class'
+ {
+ ProgID = s 'AxTestComponents.Basic.1'
+ VersionIndependentProgID = s 'AxTestComponents.Basic'
+ ForceRemove 'Programmable'
+ InprocServer32 = s '%MODULE%'
+ {
+ val ThreadingModel = s 'Apartment'
+ }
+ 'TypeLib' = s '{BFE10EB1-8584-11D4-8335-005004526AB4}'
+ }
+ }
+ AxTestComponents.Foo.1 = s 'Foo Class'
+ {
+ CLSID = s '{14DE9D5D-EB9D-4091-8E1B-A1B1672D8C1D}'
+ }
+ AxTestComponents.Foo = s 'Foo Class'
+ {
+ CLSID = s '{14DE9D5D-EB9D-4091-8E1B-A1B1672D8C1D}'
+ CurVer = s 'AxTestComponents.Foo.1'
+ }
+ NoRemove CLSID
+ {
+ ForceRemove {14DE9D5D-EB9D-4091-8E1B-A1B1672D8C1D} = s 'Foo Class'
+ {
+ ProgID = s 'AxTestComponents.Foo.1'
+ VersionIndependentProgID = s 'AxTestComponents.Foo'
+ ForceRemove 'Programmable'
+ InprocServer32 = s '%MODULE%'
+ {
+ val ThreadingModel = s 'Apartment'
+ }
+ 'TypeLib' = s '{BFE10EB1-8584-11D4-8335-005004526AB4}'
+ }
+ }
+
+}
diff --git a/extensions/test/ole/AxTestComponents/Foo.cpp b/extensions/test/ole/AxTestComponents/Foo.cpp
new file mode 100644
index 0000000000..9faefd393e
--- /dev/null
+++ b/extensions/test/ole/AxTestComponents/Foo.cpp
@@ -0,0 +1,30 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "stdafx.h"
+#include "Foo.h"
+
+// CBasic
+CFoo::CFoo() {}
+
+CFoo::~CFoo() {}
+
+STDMETHODIMP CFoo::Foo(IUnknown* pVal) { return S_OK; }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/test/ole/AxTestComponents/Foo.h b/extensions/test/ole/AxTestComponents/Foo.h
new file mode 100644
index 0000000000..3d0dc5bb5c
--- /dev/null
+++ b/extensions/test/ole/AxTestComponents/Foo.h
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+// Basic.h : Declaration of the CBasic
+
+#pragma once
+
+#include "resource.h"
+#import "AxTestComponents.tlb" no_namespace no_implementation raw_interfaces_only named_guids
+
+
+// CBasic
+class ATL_NO_VTABLE CFoo :
+ public CComObjectRootEx<CComSingleThreadModel>,
+ public CComCoClass<CFoo, &CLSID_Foo>,
+ public IFoo
+
+// public IDispatchImpl<IFoo, &__uuidof(IFoo), &LIBID_AXTESTCOMPONENTSLib, /* wMajor = */ 1, /* wMinor = */ 0>
+{
+public:
+ CFoo();
+ ~CFoo();
+
+ DECLARE_REGISTRY_RESOURCEID(IDR_BASIC)
+
+ DECLARE_PROTECT_FINAL_CONSTRUCT()
+
+ BEGIN_COM_MAP(CFoo)
+ COM_INTERFACE_ENTRY(IFoo)
+ END_COM_MAP()
+
+
+STDMETHOD(Foo)(IUnknown* val);
+
+ // IFoo Methods
+public:
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/test/ole/AxTestComponents/StdAfx.cpp b/extensions/test/ole/AxTestComponents/StdAfx.cpp
new file mode 100644
index 0000000000..71ebbdb6b3
--- /dev/null
+++ b/extensions/test/ole/AxTestComponents/StdAfx.cpp
@@ -0,0 +1,26 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "stdafx.h"
+
+#ifdef _ATL_STATIC_REGISTRY
+#include <statreg.h>
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/test/ole/AxTestComponents/StdAfx.h b/extensions/test/ole/AxTestComponents/StdAfx.h
new file mode 100644
index 0000000000..211943ce47
--- /dev/null
+++ b/extensions/test/ole/AxTestComponents/StdAfx.h
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+// 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__BFE10EB4_8584_11D4_8335_005004526AB4__INCLUDED_)
+#define AFX_STDAFX_H__BFE10EB4_8584_11D4_8335_005004526AB4__INCLUDED_
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#define STRICT
+#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>
+#include <stdio.h>
+#include <string.h>
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_STDAFX_H__BFE10EB4_8584_11D4_8335_005004526AB4__INCLUDED)
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/test/ole/AxTestComponents/readme.txt b/extensions/test/ole/AxTestComponents/readme.txt
new file mode 100644
index 0000000000..6f19ea6102
--- /dev/null
+++ b/extensions/test/ole/AxTestComponents/readme.txt
@@ -0,0 +1,3 @@
+The component does not use the AxTestComponent.h created by the midl
+compiler. Instead #import is used. This is because of a bug when
+using attribute "defaultvalue" in idl.
diff --git a/extensions/test/ole/AxTestComponents/resource.h b/extensions/test/ole/AxTestComponents/resource.h
new file mode 100644
index 0000000000..e741826b54
--- /dev/null
+++ b/extensions/test/ole/AxTestComponents/resource.h
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by AxTestComponents.rc
+
+#define IDS_PROJNAME 100
+#define IDR_BASIC 101
+//#define IDR_FOO 501
+
+// 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
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */