summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extensions/test/ole/DCOM/Clients/WriterDemo/Module1.bas8
-rw-r--r--extensions/test/ole/DCOM/Clients/WriterDemo/client_writerdemo.vbp33
-rw-r--r--extensions/test/ole/DCOM/Clients/WriterDemo/client_writerdemo.vbw1
-rw-r--r--extensions/test/ole/DCOM/Clients/WriterDemo/readme.txt4
-rw-r--r--extensions/test/ole/DCOM/dcom_test/Module1.bas38
-rw-r--r--extensions/test/ole/DCOM/dcom_test/dcom_test.vbp35
-rw-r--r--extensions/test/ole/DCOM/dcom_test/readme.txt5
7 files changed, 124 insertions, 0 deletions
diff --git a/extensions/test/ole/DCOM/Clients/WriterDemo/Module1.bas b/extensions/test/ole/DCOM/Clients/WriterDemo/Module1.bas
new file mode 100644
index 000000000000..e9bb197ed692
--- /dev/null
+++ b/extensions/test/ole/DCOM/Clients/WriterDemo/Module1.bas
@@ -0,0 +1,8 @@
+Attribute VB_Name = "Module1"
+Option Explicit
+
+Sub main()
+ Dim obj As Object
+ Set obj = CreateObject("dcomtest.writerdemo.wsc")
+ obj.run
+End Sub
diff --git a/extensions/test/ole/DCOM/Clients/WriterDemo/client_writerdemo.vbp b/extensions/test/ole/DCOM/Clients/WriterDemo/client_writerdemo.vbp
new file mode 100644
index 000000000000..ca477cff6b66
--- /dev/null
+++ b/extensions/test/ole/DCOM/Clients/WriterDemo/client_writerdemo.vbp
@@ -0,0 +1,33 @@
+Type=Exe
+Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINNT\System32\stdole2.tlb#OLE Automation
+Module=Module1; Module1.bas
+Startup="Sub Main"
+HelpFile=""
+Command32=""
+Name="client_writerdemo"
+HelpContextID="0"
+CompatibleMode="0"
+MajorVer=1
+MinorVer=0
+RevisionVer=0
+AutoIncrementVer=0
+ServerSupportFiles=0
+VersionCompanyName="StarOffice"
+CompilationType=0
+OptimizationType=0
+FavorPentiumPro(tm)=0
+CodeViewDebugInfo=0
+NoAliasing=0
+BoundsCheck=0
+OverflowCheck=0
+FlPointCheck=0
+FDIVCheck=0
+UnroundedFP=0
+StartMode=0
+Unattended=0
+Retained=0
+ThreadPerObject=0
+MaxNumberOfThreads=1
+
+[MS Transaction Server]
+AutoRefresh=1
diff --git a/extensions/test/ole/DCOM/Clients/WriterDemo/client_writerdemo.vbw b/extensions/test/ole/DCOM/Clients/WriterDemo/client_writerdemo.vbw
new file mode 100644
index 000000000000..09c6b8fe6be8
--- /dev/null
+++ b/extensions/test/ole/DCOM/Clients/WriterDemo/client_writerdemo.vbw
@@ -0,0 +1 @@
+Module1 = 108, 108, 685, 544, Z
diff --git a/extensions/test/ole/DCOM/Clients/WriterDemo/readme.txt b/extensions/test/ole/DCOM/Clients/WriterDemo/readme.txt
new file mode 100644
index 000000000000..cc16cd810e3c
--- /dev/null
+++ b/extensions/test/ole/DCOM/Clients/WriterDemo/readme.txt
@@ -0,0 +1,4 @@
+Visual Basic client that instantiates a Windows Script Component
+,dcomtest.writerdemo.wsc. That component is located in
+extensions/test/ole/DCOM/scriptComponents/WriterDemo.wsc.
+Don't forget to register that component (right-click,select register). \ No newline at end of file
diff --git a/extensions/test/ole/DCOM/dcom_test/Module1.bas b/extensions/test/ole/DCOM/dcom_test/Module1.bas
new file mode 100644
index 000000000000..c41c3a073967
--- /dev/null
+++ b/extensions/test/ole/DCOM/dcom_test/Module1.bas
@@ -0,0 +1,38 @@
+Attribute VB_Name = "Module1"
+Option Explicit
+
+Sub main()
+
+MsgBox "hallo"
+
+'The service manager is always the starting point
+'If there is no office running then an office is started up
+Dim objServiceManager As Object
+Set objServiceManager = CreateObject("com.sun.star.ServiceManager")
+
+'Create the CoreReflection service that is later used to create structs
+Set objCoreReflection = objServiceManager.createInstance("com.sun.star.reflection.CoreReflection")
+
+'Create the Desktop
+Set objDesktop = objServiceManager.createInstance("com.sun.star.frame.Desktop")
+
+'Open a new empty writer document
+
+Set objCoreReflection = objServiceManager.createInstance("com.sun.star.reflection.CoreReflection")
+'get a type description class for Size
+Set propClass = objCoreReflection.forName("com.sun.star.beans.PropertyValue")
+
+Dim prop
+propClass.CreateObject prop
+prop.Name = "Hidden"
+prop.Value = True
+
+'create the actual object
+Dim args(0)
+Set args(0) = prop
+
+Dim args2()
+'Set objDocument= objDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, args)
+Set objDocument = objDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, args2)
+
+End Sub
diff --git a/extensions/test/ole/DCOM/dcom_test/dcom_test.vbp b/extensions/test/ole/DCOM/dcom_test/dcom_test.vbp
new file mode 100644
index 000000000000..63e6b1480561
--- /dev/null
+++ b/extensions/test/ole/DCOM/dcom_test/dcom_test.vbp
@@ -0,0 +1,35 @@
+Type=Exe
+Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINNT\System32\stdole2.tlb#OLE Automation
+Module=Module1; Module1.bas
+Startup="Sub Main"
+HelpFile=""
+Title="dcom_test"
+Command32=""
+Name="dcom_test"
+HelpContextID="0"
+CompatibleMode="0"
+MajorVer=1
+MinorVer=0
+RevisionVer=0
+AutoIncrementVer=0
+ServerSupportFiles=0
+VersionCompanyName="StarOffice"
+CompilationType=0
+OptimizationType=0
+FavorPentiumPro(tm)=0
+CodeViewDebugInfo=0
+NoAliasing=0
+BoundsCheck=0
+OverflowCheck=0
+FlPointCheck=0
+FDIVCheck=0
+UnroundedFP=0
+StartMode=0
+Unattended=0
+Retained=0
+ThreadPerObject=0
+MaxNumberOfThreads=1
+DebugStartupOption=0
+
+[MS Transaction Server]
+AutoRefresh=1
diff --git a/extensions/test/ole/DCOM/dcom_test/readme.txt b/extensions/test/ole/DCOM/dcom_test/readme.txt
new file mode 100644
index 000000000000..215d6f409f2c
--- /dev/null
+++ b/extensions/test/ole/DCOM/dcom_test/readme.txt
@@ -0,0 +1,5 @@
+The program creates the com.sun.star.Servicemanager on a remote machine:
+
+Set objServiceManager = CreateObject("com.sun.star.ServiceManager", "\\jl-1036")
+
+creates a document and writes in it. \ No newline at end of file