From f215e02bf85f68d3a6106c2a1f4f7f063f819064 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 11 Apr 2024 10:17:27 +0200 Subject: Adding upstream version 7.0.14-dfsg. Signed-off-by: Daniel Baumann --- src/VBox/Main/testcase/VBoxVBTest/TestForm.frm | 137 +++++++++++++++++++++++ src/VBox/Main/testcase/VBoxVBTest/TestForm.frx | Bin 0 -> 155 bytes src/VBox/Main/testcase/VBoxVBTest/VBoxVBTest.vbp | 34 ++++++ 3 files changed, 171 insertions(+) create mode 100644 src/VBox/Main/testcase/VBoxVBTest/TestForm.frm create mode 100644 src/VBox/Main/testcase/VBoxVBTest/TestForm.frx create mode 100644 src/VBox/Main/testcase/VBoxVBTest/VBoxVBTest.vbp (limited to 'src/VBox/Main/testcase/VBoxVBTest') diff --git a/src/VBox/Main/testcase/VBoxVBTest/TestForm.frm b/src/VBox/Main/testcase/VBoxVBTest/TestForm.frm new file mode 100644 index 00000000..3ba63c8f --- /dev/null +++ b/src/VBox/Main/testcase/VBoxVBTest/TestForm.frm @@ -0,0 +1,137 @@ +VERSION 5.00 +Begin VB.Form TestForm + Caption = "VirtualBox Test" + ClientHeight = 4692 + ClientLeft = 60 + ClientTop = 348 + ClientWidth = 6972 + LinkTopic = "TestForm" + ScaleHeight = 4692 + ScaleWidth = 6972 + StartUpPosition = 3 'Windows Default + Begin VB.ListBox machineList + Height = 2352 + ItemData = "TestForm.frx":0000 + Left = 240 + List = "TestForm.frx":0007 + TabIndex = 4 + Top = 2040 + Width = 6492 + End + Begin VB.CommandButton getMachieListCmd + Caption = "Get Machine List" + Height = 372 + Left = 2640 + TabIndex = 0 + Top = 720 + Width = 1692 + End + Begin VB.Label Label3 + AutoSize = -1 'True + Caption = "Registered Machines:" + Height = 192 + Left = 240 + TabIndex = 5 + Top = 1680 + Width = 1572 + End + Begin VB.Label versionLabel + AutoSize = -1 'True + Caption = "" + Height = 192 + Left = 1680 + TabIndex = 3 + Top = 1320 + Width = 528 + End + Begin VB.Label Label2 + AutoSize = -1 'True + Caption = "VirtualBox Version:" + Height = 252 + Left = 240 + TabIndex = 2 + Top = 1320 + Width = 1344 + End + Begin VB.Label Label1 + Alignment = 2 'Center + Caption = $"TestForm.frx":0013 + Height = 372 + Left = 240 + TabIndex = 1 + Top = 120 + Width = 6492 + WordWrap = -1 'True + End +End +Attribute VB_Name = "TestForm" +Attribute VB_GlobalNameSpace = False +Attribute VB_Creatable = False +Attribute VB_PredeclaredId = True +Attribute VB_Exposed = False + +Private Declare Function SetEnvironmentVariable Lib "kernel32" _ + Alias "SetEnvironmentVariableA" (ByVal lpName As String, ByVal lpValue As String) As Long +Private Declare Function GetEnvironmentVariable Lib "kernel32" _ + Alias "GetEnvironmentVariableA" (ByVal lpName As String, ByVal lpValue As String, ByVal nSize As Long) As Long + +Private Sub Form_Load() + + ' Set where to take VirtualBox configuration from + + 'SetEnvironmentVariable "VBOX_USER_HOME", "E:\VirtualBoxHome\win" + + ' Setup debug logging (available only in debug builds) + + 'PATH_OUT_BASE = "D:/Coding/innotek/vbox/out" + + 'SetEnvironmentVariable "VBOX_LOG", "main.e.l.f + gui.e.l.f" + 'SetEnvironmentVariable "VBOX_LOG_FLAGS", "time tid thread" + 'SetEnvironmentVariable "VBOX_LOG_DEST", "dir:" + PATH_OUT_BASE + "/logs" + +End Sub + +Private Sub getMachieListCmd_Click() + + ' Clear the old list contents + + machineList.Clear + machineList.Refresh + + versionLabel.Caption = "" + + ' Disable the button and the list for the duration of the call + + getMachieListCmd.Enabled = False + machineList.Enabled = False + + ' Obtain the global VirtualBox object (this will start + ' the VirtualBox server if it is not already started) + + Dim vbox As VirtualBox.VirtualBox + Set vbox = New VirtualBox.VirtualBox + + ' Get the VirtualBox server version + + versionLabel.Caption = vbox.Version + + ' Obtain a list of registered machines + + Dim machines() As VirtualBox.IMachine + machines = vbox.Machines2 + + If UBound(machines) < 0 Then + machineList.AddItem ("") + Else + For i = 0 To UBound(machines) + Item = machines(i).Name + " (" + machines(i).OSTypeId() + ")" + machineList.AddItem (Item) + Next i + End If + + ' Reenable the button and the list + + getMachieListCmd.Enabled = True + machineList.Enabled = True + +End Sub diff --git a/src/VBox/Main/testcase/VBoxVBTest/TestForm.frx b/src/VBox/Main/testcase/VBoxVBTest/TestForm.frx new file mode 100644 index 00000000..bd27fb45 Binary files /dev/null and b/src/VBox/Main/testcase/VBoxVBTest/TestForm.frx differ diff --git a/src/VBox/Main/testcase/VBoxVBTest/VBoxVBTest.vbp b/src/VBox/Main/testcase/VBoxVBTest/VBoxVBTest.vbp new file mode 100644 index 00000000..cdc19c8a --- /dev/null +++ b/src/VBox/Main/testcase/VBoxVBTest/VBoxVBTest.vbp @@ -0,0 +1,34 @@ +Type=Exe +Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\system32\stdole2.tlb#OLE Automation +Reference=*\G{D7569351-1750-46F0-936E-BD127D5BC264}#1.3#0#VBoxC.dll#InnoTek VirtualBox Machine Type Library +Form=TestForm.frm +Startup="TestForm" +ExeName32="VBoxVBTest.exe" +Command32="" +Name="VBoxVBTest" +HelpContextID="0" +CompatibleMode="0" +MajorVer=1 +MinorVer=0 +RevisionVer=0 +AutoIncrementVer=0 +ServerSupportFiles=0 +VersionCompanyName="Something" +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 -- cgit v1.2.3