Full MSCOM support in a hacky way - might not work

And almost at the end I realized I could make a simple proxy that relays everything, or just fix the things automatically
This commit is contained in:
Norbi Peti 2020-10-16 18:59:06 +02:00
parent d68ddb3418
commit 6eee57f18e
37 changed files with 1496 additions and 72 deletions

View file

@ -44,19 +44,17 @@
<groupId>org.virtualbox</groupId>
<artifactId>VirtualBox-MSCOM</artifactId>
<version>6.1</version>
<scope>system</scope>
<systemPath>${project.basedir}/../VirtualComputerMSCOM/src/main/resources/Interop.VirtualBox.j4n.jar</systemPath>
</dependency>
<dependency>
<groupId>com.aparapi</groupId>
<artifactId>aparapi</artifactId>
<version>1.10.0</version>
</dependency>
<dependency>
<!-- <dependency>
<groupId>io.github.NorbiPeti</groupId>
<artifactId>VirtualComputer-XPCOM</artifactId>
<version>2.1-SNAPSHOT</version>
</dependency>
</dependency> -->
<dependency>
<groupId>io.github.NorbiPeti</groupId>
<artifactId>VirtualComputer-MSCOM</artifactId>

View file

@ -101,8 +101,7 @@ public final class Computer {
handler.registerTo(progress.getEventSource()); //TODO: Show progress bar some way?
val fb = new MCFrameBuffer(console.getDisplay());
fb.start();
String fbid = console.getDisplay().attachFramebuffer(0L,
COMUtils.gimmeAFramebuffer(fb));
String fbid = console.getDisplay().attachFramebuffer(0, COMUtils.gimmeAFramebuffer(fb));
fb.setId(fbid);
framebuffer = fb;
}
@ -171,13 +170,14 @@ public final class Computer {
return;
}
val lastUpdated = new Holder<Long>();
var status = session.getConsole().getGuest().getFacilityStatus(AdditionsFacilityType.Seamless, lastUpdated);
sendMessage(sender, "Seamless status: " + status);
sendMessage(sender, "§eFixing screen...");
try {
synchronized (session) {
if (seamless == null)
session.getConsole().getDisplay().setVideoModeHint(0L, true, false, 0, 0, 640L, 480L, 32L, false);
session.getConsole().getDisplay().setVideoModeHint(COMUtils.convertFromLong(0L),
COMUtils.convertFromBool(true), COMUtils.convertFromBool(false),
0, 0, COMUtils.convertFromLong(640L), COMUtils.convertFromLong(480L),
COMUtils.convertFromLong(32L), COMUtils.convertFromBool(false));
} //Last param: notify - send PnP notification - stops updates but not changes for some reason
Bukkit.getScheduler().runTaskLaterAsynchronously(PluginMain.Instance, () -> {
synchronized (session) {
@ -190,8 +190,6 @@ public final class Computer {
} catch (Exception e) {
e.printStackTrace();
}
status = session.getConsole().getGuest().getFacilityStatus(AdditionsFacilityType.Seamless, lastUpdated);
sendMessage(sender, "Seamless status: " + status);
}
public boolean checkMachineNotRunning(@Nullable CommandSender sender) {

View file

@ -11,6 +11,7 @@ import org.virtualbox_6_1.IStateChangedEvent;
import org.virtualbox_6_1.VBoxEventType;
import sznp.virtualcomputer.Computer;
import sznp.virtualcomputer.PluginMain;
import sznp.virtualcomputer.util.COMUtils;
import java.util.logging.Logger;
@ -42,7 +43,7 @@ public class MachineEventHandler extends EventHandlerBase {
starting = false;
Bukkit.getScheduler().runTaskAsynchronously(PluginMain.Instance, () -> {
progress.waitForCompletion(-1);
if (progress != null && progress.getCompleted() && progress.getResultCode() != 0) {
if (progress != null && COMUtils.convertToBool(progress.getCompleted()) && progress.getResultCode() != 0) {
Logger l = PluginMain.Instance.getLogger();
l.warning("Result code: " + Integer.toHexString(progress.getResultCode()));
for (var info = progress.getErrorInfo(); info != null; info = info.getNext()) {

View file

@ -39,7 +39,7 @@ public class MCFrameBuffer implements IMCFrameBuffer {
synchronized (this) { //If a change occurs twice, then wait for it
try {
//System.out.println("Change: " + xOrigin + " " + yOrigin + " - " + width + " " + height);
display.querySourceBitmap(0L, holder);
COMUtils.querySourceBitmap(display, holder);
long[] ptr = new long[1], w = new long[1], h = new long[1], bpp = new long[1], bpl = new long[1], pf = new long[1];
COMUtils.queryBitmapInfo(holder.value, ptr, w, h, bpp, bpl, pf);
if (PluginMain.direct) {

View file

@ -20,8 +20,6 @@
<version>6.1</version>
<optional>true
</optional> <!-- https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html -->
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/Interop.VirtualBox.j4n.jar</systemPath>
</dependency>
<dependency>
<groupId>net.sf.jni4net</groupId>

View file

@ -0,0 +1,18 @@
package org.virtualbox_6_1;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public enum BitmapFormat {
Opaque(0),
PNG(541544016), // 0x20474E50
BGR(542263106), // 0x20524742
BGR0(810698562), // 0x30524742
RGBA(1094862674), // 0x41424752
BGRA(1095911234), // 0x41524742
JPEG(1195724874); // 0x4745504A
@Getter
private final int value;
}

View file

@ -0,0 +1,5 @@
package org.virtualbox_6_1;
public class Holder<T> {
public T value;
}

View file

@ -0,0 +1,42 @@
// ------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by jni4net. See http://jni4net.sourceforge.net/
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
package org.virtualbox_6_1;
import lombok.var;
import virtualcomputerwindows.Exports;
@net.sf.jni4net.attributes.ClrInterface
public interface IEvent {
//<generated-interface>
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/VBoxEventType;")
org.virtualbox_6_1_FixIt.VBoxEventType getType_FixIt();
default VBoxEventType getType() {
var type = Exports.convertEnum(getType_FixIt());
for (var value : VBoxEventType.values())
if (value.value() == type)
return value;
return null;
}
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/IEventSource;")
IEventSource getSource();
@net.sf.jni4net.attributes.ClrMethod("()I")
int getWaitable();
@net.sf.jni4net.attributes.ClrMethod("()V")
void setProcessed();
@net.sf.jni4net.attributes.ClrMethod("(I)I")
int waitProcessed(int aTimeout);
//</generated-interface>
}

View file

@ -0,0 +1,74 @@
// ------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by jni4net. See http://jni4net.sourceforge.net/
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
package org.virtualbox_6_1;
import lombok.var;
import system.Array;
import virtualcomputerwindows.Exports;
import java.util.List;
@net.sf.jni4net.attributes.ClrInterface
public interface IKeyboard {
//<generated-interface>
@net.sf.jni4net.attributes.ClrMethod("()LSystem/Array;")
system.Array getKeyboardLEDs_FixIt();
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/IEventSource;")
IEventSource getEventSource();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute1IKeyboard();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute2IKeyboard();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute3IKeyboard();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute4IKeyboard();
@net.sf.jni4net.attributes.ClrMethod("(I)V")
void putScancode(int aScancode);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/Array;)LSystem/UInt32;")
int putScancodes_FixIt(system.Array aScancodes);
default int putScancodes(List<Integer> scancodes) {
var sc = new int[scancodes.size()];
for (int i = 0; i < sc.length; i++)
sc[i] = scancodes.get(i);
return putScancodes_FixIt(Exports.convertArray_FixIt(sc));
}
@net.sf.jni4net.attributes.ClrMethod("()V")
void putCAD();
@net.sf.jni4net.attributes.ClrMethod("()V")
void releaseKeys();
@net.sf.jni4net.attributes.ClrMethod("(III)V")
void putUsageCode(int aUsageCode, int aUsagePage, int aKeyRelease);
@net.sf.jni4net.attributes.ClrMethod("()V")
void internalAndReservedMethod1IKeyboard();
@net.sf.jni4net.attributes.ClrMethod("()V")
void internalAndReservedMethod2IKeyboard();
@net.sf.jni4net.attributes.ClrMethod("()V")
void internalAndReservedMethod3IKeyboard();
@net.sf.jni4net.attributes.ClrMethod("()V")
void internalAndReservedMethod4IKeyboard();
//</generated-interface>
}

View file

@ -0,0 +1,699 @@
// ------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by jni4net. See http://jni4net.sourceforge.net/
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
package org.virtualbox_6_1;
import lombok.var;
import virtualcomputerwindows.Exports;
@net.sf.jni4net.attributes.ClrInterface
public interface IMachine {
//<generated-interface>
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute15IMachine();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute16IMachine();
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/Session;Lorg/virtualbox_6_1/LockType;)V")
void lockMachine_FixIt(Session aSession, org.virtualbox_6_1_FixIt.LockType aLockType);
default void lockMachine(ISession session, LockType lockType) {
lockMachine_FixIt((Session) session, (org.virtualbox_6_1_FixIt.LockType) system.Enum.ToObject(org.virtualbox_6_1_FixIt.LockType.typeof(), lockType.ordinal()));
}
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/Session;LSystem/String;LSystem/Array;)Lorg/virtualbox_6_1/IProgress;")
IProgress launchVMProcess_FixIt(Session aSession, String aName, system.Array aEnvironmentChanges);
//default IProgress launchVMProcess(Session session, String name, )
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;Lorg/virtualbox_6_1/DeviceType;)V")
void setBootOrder_FixIt(int aPosition, org.virtualbox_6_1_FixIt.DeviceType aDevice);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;)Lorg/virtualbox_6_1/DeviceType;")
org.virtualbox_6_1_FixIt.DeviceType getBootOrder_FixIt(int aPosition);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;IILorg/virtualbox_6_1/DeviceType;Lorg/virtualbox_6_1/IMedium;)V")
void attachDevice_FixIt(String aName, int aControllerPort, int aDevice, org.virtualbox_6_1_FixIt.DeviceType aType, IMedium aMedium);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;IILorg/virtualbox_6_1/DeviceType;)V")
void attachDeviceWithoutMedium_FixIt(String aName, int aControllerPort, int aDevice, org.virtualbox_6_1_FixIt.DeviceType aType);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;II)V")
void detachDevice(String aName, int aControllerPort, int aDevice);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;III)V")
void passthroughDevice(String aName, int aControllerPort, int aDevice, int aPassthrough);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;III)V")
void temporaryEjectDevice(String aName, int aControllerPort, int aDevice, int aTemporaryEject);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;III)V")
void nonRotationalDevice(String aName, int aControllerPort, int aDevice, int aNonRotational);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;III)V")
void setAutoDiscardForDevice(String aName, int aControllerPort, int aDevice, int aDiscard);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;III)V")
void setHotPluggableForDevice(String aName, int aControllerPort, int aDevice, int aHotPluggable);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;IILorg/virtualbox_6_1/IBandwidthGroup;)V")
void setBandwidthGroupForDevice(String aName, int aControllerPort, int aDevice, IBandwidthGroup aBandwidthGroup);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;II)V")
void setNoBandwidthGroupForDevice(String aName, int aControllerPort, int aDevice);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;III)V")
void unmountMedium(String aName, int aControllerPort, int aDevice, int aForce);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;IILorg/virtualbox_6_1/IMedium;I)V")
void mountMedium(String aName, int aControllerPort, int aDevice, IMedium aMedium, int aForce);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;II)Lorg/virtualbox_6_1/IMedium;")
IMedium getMedium(String aName, int aControllerPort, int aDevice);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)LSystem/Array;")
system.Array getMediumAttachmentsOfController_FixIt(String aName);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;II)Lorg/virtualbox_6_1/IMediumAttachment;")
IMediumAttachment getMediumAttachment(String aName, int aControllerPort, int aDevice);
@net.sf.jni4net.attributes.ClrMethod("(III)V")
void attachHostPCIDevice(int aHostAddress, int aDesiredGuestAddress, int aTryToUnbind);
@net.sf.jni4net.attributes.ClrMethod("(I)V")
void detachHostPCIDevice(int aHostAddress);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;)Lorg/virtualbox_6_1/INetworkAdapter;")
INetworkAdapter getNetworkAdapter(int aSlot);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;Lorg/virtualbox_6_1/StorageBus;)Lorg/virtualbox_6_1/IStorageController;")
IStorageController addStorageController_FixIt(String aName, org.virtualbox_6_1_FixIt.StorageBus aConnectionType);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)Lorg/virtualbox_6_1/IStorageController;")
IStorageController getStorageControllerByName(String aName);
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/StorageBus;LSystem/UInt32;)Lorg/virtualbox_6_1/IStorageController;")
IStorageController getStorageControllerByInstance_FixIt(org.virtualbox_6_1_FixIt.StorageBus aConnectionType, int aInstance);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)V")
void removeStorageController(String aName);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;I)V")
void setStorageControllerBootable(String aName, int aBootable);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;Lorg/virtualbox_6_1/USBControllerType;)Lorg/virtualbox_6_1/IUSBController;")
IUSBController addUSBController_FixIt(String aName, org.virtualbox_6_1_FixIt.USBControllerType aType);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)V")
void removeUSBController(String aName);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)Lorg/virtualbox_6_1/IUSBController;")
IUSBController getUSBControllerByName(String aName);
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/USBControllerType;)LSystem/UInt32;")
int getUSBControllerCountByType_FixIt(org.virtualbox_6_1_FixIt.USBControllerType aType);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;)Lorg/virtualbox_6_1/ISerialPort;")
ISerialPort getSerialPort(int aSlot);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;)Lorg/virtualbox_6_1/IParallelPort;")
IParallelPort getParallelPort(int aSlot);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/Array;")
system.Array getExtraDataKeys_FixIt();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)LSystem/String;")
String getExtraData(String aKey);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;LSystem/String;)V")
void setExtraData(String aKey, String aValue);
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/CPUPropertyType;)I")
int getCPUProperty_FixIt(org.virtualbox_6_1_FixIt.CPUPropertyType aProperty);
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/CPUPropertyType;I)V")
void setCPUProperty_FixIt(org.virtualbox_6_1_FixIt.CPUPropertyType aProperty, int aValue);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;LSystem/UInt32;LSystem/UInt32;LSystem/UInt32;LSystem/UInt32;LSystem/UInt32;LSystem/UInt32;)V")
void getCPUIDLeafByOrdinal(int aOrdinal, net.sf.jni4net.Out<Integer> aIdx, net.sf.jni4net.Out<Integer> aIdxSub, net.sf.jni4net.Out<Integer> aValEax, net.sf.jni4net.Out<Integer> aValEbx, net.sf.jni4net.Out<Integer> aValEcx, net.sf.jni4net.Out<Integer> aValEdx);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;LSystem/UInt32;LSystem/UInt32;LSystem/UInt32;LSystem/UInt32;LSystem/UInt32;)V")
void getCPUIDLeaf(int aIdx, int aIdxSub, net.sf.jni4net.Out<Integer> aValEax, net.sf.jni4net.Out<Integer> aValEbx, net.sf.jni4net.Out<Integer> aValEcx, net.sf.jni4net.Out<Integer> aValEdx);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;LSystem/UInt32;LSystem/UInt32;LSystem/UInt32;LSystem/UInt32;LSystem/UInt32;)V")
void setCPUIDLeaf(int aIdx, int aIdxSub, int aValEax, int aValEbx, int aValEcx, int aValEdx);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;LSystem/UInt32;)V")
void removeCPUIDLeaf(int aIdx, int aIdxSub);
@net.sf.jni4net.attributes.ClrMethod("()V")
void removeAllCPUIDLeaves();
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/HWVirtExPropertyType;)I")
int getHWVirtExProperty_FixIt(org.virtualbox_6_1_FixIt.HWVirtExPropertyType aProperty);
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/HWVirtExPropertyType;I)V")
void setHWVirtExProperty_FixIt(org.virtualbox_6_1_FixIt.HWVirtExPropertyType aProperty, int aValue);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)Lorg/virtualbox_6_1/IProgress;")
IProgress setSettingsFilePath(String aSettingsFilePath);
@net.sf.jni4net.attributes.ClrMethod("()V")
void saveSettings();
@net.sf.jni4net.attributes.ClrMethod("()V")
void discardSettings();
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/CleanupMode;)LSystem/Array;")
system.Array unregister_FixIt(org.virtualbox_6_1_FixIt.CleanupMode aCleanupMode);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/Array;)Lorg/virtualbox_6_1/IProgress;")
IProgress deleteConfig_FixIt(system.Array aMedia);
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/IAppliance;LSystem/String;)Lorg/virtualbox_6_1/IVirtualSystemDescription;")
IVirtualSystemDescription exportTo(IAppliance aAppliance, String aLocation);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)Lorg/virtualbox_6_1/ISnapshot;")
ISnapshot findSnapshot(String aNameOrId);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;LSystem/String;IILSystem/String;)V")
void createSharedFolder(String aName, String aHostPath, int aWritable, int aAutoMount, String aAutoMountPoint);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)V")
void removeSharedFolder(String aName);
@net.sf.jni4net.attributes.ClrMethod("()I")
int canShowConsoleWindow();
@net.sf.jni4net.attributes.ClrMethod("()J")
long showConsoleWindow();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;LSystem/String;JLSystem/String;)V")
void getGuestProperty(String aName, net.sf.jni4net.Out<String> aValue, net.sf.jni4net.Out<Long> aTimeStamp, net.sf.jni4net.Out<String> aFlags);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)LSystem/String;")
String getGuestPropertyValue(String aProperty);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)J")
long getGuestPropertyTimestamp(String aProperty);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;LSystem/String;LSystem/String;)V")
void setGuestProperty(String aProperty, String aValue, String aFlags);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;LSystem/String;)V")
void setGuestPropertyValue(String aProperty, String aValue);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)V")
void deleteGuestProperty(String aName);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;LSystem/Array;LSystem/Array;LSystem/Array;LSystem/Array;)V")
void enumerateGuestProperties(String aPatterns, net.sf.jni4net.Out<system.Array> aNames, net.sf.jni4net.Out<system.Array> aValues, net.sf.jni4net.Out<system.Array> aTimestamps, net.sf.jni4net.Out<system.Array> aFlags);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;LSystem/UInt32;LSystem/UInt32;LSystem/UInt32;LSystem/UInt32;I)V")
void querySavedGuestScreenInfo(int aScreenId, net.sf.jni4net.Out<Integer> aOriginX, net.sf.jni4net.Out<Integer> aOriginY, net.sf.jni4net.Out<Integer> aWidth, net.sf.jni4net.Out<Integer> aHeight, net.sf.jni4net.Out<Integer> aEnabled);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;Lorg/virtualbox_6_1/BitmapFormat;LSystem/UInt32;LSystem/UInt32;)LSystem/Array;")
system.Array readSavedThumbnailToArray_FixIt(int aScreenId, org.virtualbox_6_1_FixIt.BitmapFormat aBitmapFormat, net.sf.jni4net.Out<Integer> aWidth, net.sf.jni4net.Out<Integer> aHeight);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;LSystem/UInt32;LSystem/UInt32;)LSystem/Array;")
system.Array querySavedScreenshotInfo_FixIt(int aScreenId, net.sf.jni4net.Out<Integer> aWidth, net.sf.jni4net.Out<Integer> aHeight);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;Lorg/virtualbox_6_1/BitmapFormat;LSystem/UInt32;LSystem/UInt32;)LSystem/Array;")
system.Array readSavedScreenshotToArray_FixIt(int aScreenId, org.virtualbox_6_1_FixIt.BitmapFormat aBitmapFormat, net.sf.jni4net.Out<Integer> aWidth, net.sf.jni4net.Out<Integer> aHeight);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;)V")
void hotPlugCPU(int aCpu);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;)V")
void hotUnplugCPU(int aCpu);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;)I")
int getCPUStatus(int aCpu);
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/ParavirtProvider;")
org.virtualbox_6_1_FixIt.ParavirtProvider getEffectiveParavirtProvider_FixIt();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;)LSystem/String;")
String queryLogFilename(int aIdx);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;JJ)LSystem/Array;")
system.Array readLog_FixIt(int aIdx, long aOffset, long aSize);
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/IMachine;Lorg/virtualbox_6_1/CloneMode;LSystem/Array;)Lorg/virtualbox_6_1/IProgress;")
IProgress cloneTo_FixIt(IMachine aTarget, org.virtualbox_6_1_FixIt.CloneMode aMode, system.Array aOptions);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;LSystem/String;)Lorg/virtualbox_6_1/IProgress;")
IProgress moveTo(String aFolder, String aType);
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/IProgress;")
IProgress saveState();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)V")
void adoptSavedState(String aSavedStateFile);
@net.sf.jni4net.attributes.ClrMethod("(I)V")
void discardSavedState(int aFRemoveFile);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;LSystem/String;ILSystem/String;)Lorg/virtualbox_6_1/IProgress;")
IProgress takeSnapshot(String aName, String aDescription, int aPause, net.sf.jni4net.Out<String> aId);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)Lorg/virtualbox_6_1/IProgress;")
IProgress deleteSnapshot(String aId);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)Lorg/virtualbox_6_1/IProgress;")
IProgress deleteSnapshotAndAllChildren(String aId);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;LSystem/String;)Lorg/virtualbox_6_1/IProgress;")
IProgress deleteSnapshotRange(String aStartId, String aEndId);
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/ISnapshot;)Lorg/virtualbox_6_1/IProgress;")
IProgress restoreSnapshot(ISnapshot aSnapshot);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)V")
void applyDefaults(String aFlags);
@net.sf.jni4net.attributes.ClrMethod("()V")
void internalAndReservedMethod1IMachine();
@net.sf.jni4net.attributes.ClrMethod("()V")
void internalAndReservedMethod2IMachine();
@net.sf.jni4net.attributes.ClrMethod("()V")
void internalAndReservedMethod3IMachine();
@net.sf.jni4net.attributes.ClrMethod("()V")
void internalAndReservedMethod4IMachine();
@net.sf.jni4net.attributes.ClrMethod("()V")
void internalAndReservedMethod5IMachine();
@net.sf.jni4net.attributes.ClrMethod("()V")
void internalAndReservedMethod6IMachine();
@net.sf.jni4net.attributes.ClrMethod("()V")
void internalAndReservedMethod7IMachine();
@net.sf.jni4net.attributes.ClrMethod("()V")
void internalAndReservedMethod8IMachine();
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/VirtualBox;")
VirtualBox getParent();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/Array;")
system.Array getIcon_FixIt();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/Array;)V")
void setIcon_FixIt(system.Array aIcon);
@net.sf.jni4net.attributes.ClrMethod("()I")
int getAccessible();
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/IVirtualBoxErrorInfo;")
IVirtualBoxErrorInfo getAccessError();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getName();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)V")
void setName(String aName);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getDescription();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)V")
void setDescription(String aDescription);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getId();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/Array;")
system.Array getGroups_FixIt();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/Array;)V")
void setGroups_FixIt(system.Array aGroups);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getOSTypeId();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)V")
void setOSTypeId(String aOSTypeId);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getHardwareVersion();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)V")
void setHardwareVersion(String aHardwareVersion);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getHardwareUUID();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)V")
void setHardwareUUID(String aHardwareUUID);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getCPUCount();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;)V")
void setCPUCount(int aCPUCount);
@net.sf.jni4net.attributes.ClrMethod("()I")
int getCPUHotPlugEnabled();
@net.sf.jni4net.attributes.ClrMethod("(I)V")
void setCPUHotPlugEnabled(int aCPUHotPlugEnabled);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getCPUExecutionCap();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;)V")
void setCPUExecutionCap(int aCPUExecutionCap);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getCPUIDPortabilityLevel();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;)V")
void setCPUIDPortabilityLevel(int aCPUIDPortabilityLevel);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getMemorySize();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;)V")
void setMemorySize(int aMemorySize);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getMemoryBalloonSize();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;)V")
void setMemoryBalloonSize(int aMemoryBalloonSize);
@net.sf.jni4net.attributes.ClrMethod("()I")
int getPageFusionEnabled();
@net.sf.jni4net.attributes.ClrMethod("(I)V")
void setPageFusionEnabled(int aPageFusionEnabled);
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/IGraphicsAdapter;")
IGraphicsAdapter getGraphicsAdapter();
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/IBIOSSettings;")
IBIOSSettings getBIOSSettings();
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/IRecordingSettings;")
IRecordingSettings getRecordingSettings();
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/FirmwareType;")
org.virtualbox_6_1_FixIt.FirmwareType getFirmwareType_FixIt();
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/FirmwareType;)V")
void setFirmwareType_FixIt(org.virtualbox_6_1_FixIt.FirmwareType aFirmwareType);
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/PointingHIDType;")
org.virtualbox_6_1_FixIt.PointingHIDType getPointingHIDType_FixIt();
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/PointingHIDType;)V")
void setPointingHIDType_FixIt(org.virtualbox_6_1_FixIt.PointingHIDType aPointingHIDType);
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/KeyboardHIDType;")
org.virtualbox_6_1_FixIt.KeyboardHIDType getKeyboardHIDType_FixIt();
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/KeyboardHIDType;)V")
void setKeyboardHIDType_FixIt(org.virtualbox_6_1_FixIt.KeyboardHIDType aKeyboardHIDType);
@net.sf.jni4net.attributes.ClrMethod("()I")
int getHPETEnabled();
@net.sf.jni4net.attributes.ClrMethod("(I)V")
void setHPETEnabled(int aHPETEnabled);
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/ChipsetType;")
org.virtualbox_6_1_FixIt.ChipsetType getChipsetType_FixIt();
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/ChipsetType;)V")
void setChipsetType_FixIt(org.virtualbox_6_1_FixIt.ChipsetType aChipsetType);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getSnapshotFolder();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)V")
void setSnapshotFolder(String aSnapshotFolder);
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/IVRDEServer;")
IVRDEServer getVRDEServer();
@net.sf.jni4net.attributes.ClrMethod("()I")
int getEmulatedUSBCardReaderEnabled();
@net.sf.jni4net.attributes.ClrMethod("(I)V")
void setEmulatedUSBCardReaderEnabled(int aEmulatedUSBCardReaderEnabled);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/Array;")
system.Array getMediumAttachments_FixIt();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/Array;")
system.Array getUSBControllers_FixIt();
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/IUSBDeviceFilters;")
IUSBDeviceFilters getUSBDeviceFilters();
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/IAudioAdapter;")
IAudioAdapter getAudioAdapter();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/Array;")
system.Array getStorageControllers_FixIt();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getSettingsFilePath();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getSettingsAuxFilePath();
@net.sf.jni4net.attributes.ClrMethod("()I")
int getSettingsModified();
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/SessionState;")
org.virtualbox_6_1_FixIt.SessionState getSessionState_FixIt();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getSessionName();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getSessionPID();
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/MachineState;")
org.virtualbox_6_1_FixIt.MachineState getState_FixIt();
default MachineState getState() {
int state = Exports.convertEnum(getState_FixIt());
for (var value : MachineState.values())
if (value.value() == state)
return value;
return null;
}
@net.sf.jni4net.attributes.ClrMethod("()J")
long getLastStateChange();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getStateFilePath();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getLogFolder();
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/ISnapshot;")
ISnapshot getCurrentSnapshot();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getSnapshotCount();
@net.sf.jni4net.attributes.ClrMethod("()I")
int getCurrentStateModified();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/Array;")
system.Array getSharedFolders_FixIt();
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/ClipboardMode;")
org.virtualbox_6_1_FixIt.ClipboardMode getClipboardMode_FixIt();
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/ClipboardMode;)V")
void setClipboardMode_FixIt(org.virtualbox_6_1_FixIt.ClipboardMode aClipboardMode);
@net.sf.jni4net.attributes.ClrMethod("()I")
int getClipboardFileTransfersEnabled();
@net.sf.jni4net.attributes.ClrMethod("(I)V")
void setClipboardFileTransfersEnabled(int aClipboardFileTransfersEnabled);
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/DnDMode;")
org.virtualbox_6_1_FixIt.DnDMode getDnDMode_FixIt();
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/DnDMode;)V")
void setDnDMode_FixIt(org.virtualbox_6_1_FixIt.DnDMode aDnDMode);
@net.sf.jni4net.attributes.ClrMethod("()I")
int getTeleporterEnabled();
@net.sf.jni4net.attributes.ClrMethod("(I)V")
void setTeleporterEnabled(int aTeleporterEnabled);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getTeleporterPort();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;)V")
void setTeleporterPort(int aTeleporterPort);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getTeleporterAddress();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)V")
void setTeleporterAddress(String aTeleporterAddress);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getTeleporterPassword();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)V")
void setTeleporterPassword(String aTeleporterPassword);
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/ParavirtProvider;")
org.virtualbox_6_1_FixIt.ParavirtProvider getParavirtProvider_FixIt();
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/ParavirtProvider;)V")
void setParavirtProvider_FixIt(org.virtualbox_6_1_FixIt.ParavirtProvider aParavirtProvider);
@net.sf.jni4net.attributes.ClrMethod("()I")
int getRTCUseUTC();
@net.sf.jni4net.attributes.ClrMethod("(I)V")
void setRTCUseUTC(int aRTCUseUTC);
@net.sf.jni4net.attributes.ClrMethod("()I")
int getIOCacheEnabled();
@net.sf.jni4net.attributes.ClrMethod("(I)V")
void setIOCacheEnabled(int aIOCacheEnabled);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getIOCacheSize();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;)V")
void setIOCacheSize(int aIOCacheSize);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/Array;")
system.Array getPCIDeviceAssignments_FixIt();
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/IBandwidthControl;")
IBandwidthControl getBandwidthControl();
@net.sf.jni4net.attributes.ClrMethod("()I")
int getTracingEnabled();
@net.sf.jni4net.attributes.ClrMethod("(I)V")
void setTracingEnabled(int aTracingEnabled);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getTracingConfig();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)V")
void setTracingConfig(String aTracingConfig);
@net.sf.jni4net.attributes.ClrMethod("()I")
int getAllowTracingToAccessVM();
@net.sf.jni4net.attributes.ClrMethod("(I)V")
void setAllowTracingToAccessVM(int aAllowTracingToAccessVM);
@net.sf.jni4net.attributes.ClrMethod("()I")
int getAutostartEnabled();
@net.sf.jni4net.attributes.ClrMethod("(I)V")
void setAutostartEnabled(int aAutostartEnabled);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getAutostartDelay();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/UInt32;)V")
void setAutostartDelay(int aAutostartDelay);
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/AutostopType;")
org.virtualbox_6_1_FixIt.AutostopType getAutostopType_FixIt();
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/AutostopType;)V")
void setAutostopType_FixIt(org.virtualbox_6_1_FixIt.AutostopType aAutostopType);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getDefaultFrontend();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)V")
void setDefaultFrontend(String aDefaultFrontend);
@net.sf.jni4net.attributes.ClrMethod("()I")
int getUSBProxyAvailable();
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/VMProcPriority;")
org.virtualbox_6_1_FixIt.VMProcPriority getVMProcessPriority_FixIt();
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/VMProcPriority;)V")
void setVMProcessPriority_FixIt(org.virtualbox_6_1_FixIt.VMProcPriority aVMProcessPriority);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getParavirtDebug();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)V")
void setParavirtDebug(String aParavirtDebug);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getCPUProfile();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)V")
void setCPUProfile(String aCPUProfile);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute1IMachine();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute2IMachine();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute3IMachine();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute4IMachine();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute5IMachine();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute6IMachine();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute7IMachine();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute8IMachine();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute9IMachine();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute10IMachine();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute11IMachine();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute12IMachine();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute13IMachine();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute14IMachine();
//</generated-interface>
}

View file

@ -9,19 +9,25 @@
package org.virtualbox_6_1;
import virtualcomputerwindows.Exports;
@net.sf.jni4net.attributes.ClrInterface
public interface ISession {
//<generated-interface>
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/SessionState;")
org.virtualbox_6_1.SessionState getState_FixIt();
org.virtualbox_6_1_FixIt.SessionState getState_FixIt();
default org.virtualbox_6_1.SessionState getState() {
return SessionState.Locked;
return SessionState.values()[Exports.convertEnum(getState_FixIt())];
}
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/SessionType;")
org.virtualbox_6_1.SessionType getType_FixIt();
org.virtualbox_6_1_FixIt.SessionType getType_FixIt();
default org.virtualbox_6_1.SessionType getType() {
return SessionType.values()[Exports.convertEnum(getType_FixIt())];
}
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
java.lang.String getName();

View file

@ -0,0 +1,47 @@
// ------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by jni4net. See http://jni4net.sourceforge.net/
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
package org.virtualbox_6_1;
import virtualcomputerwindows.Exports;
@net.sf.jni4net.attributes.ClrInterface
public interface ISessionStateChangedEvent extends IMachineEvent, IEvent {
//<generated-interface>
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/VBoxEventType;")
org.virtualbox_6_1_FixIt.VBoxEventType getType_FixIt();
default VBoxEventType getType() {
return VBoxEventType.values()[Exports.convertEnum(getType_FixIt())];
}
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/IEventSource;")
IEventSource getSource();
@net.sf.jni4net.attributes.ClrMethod("()I")
int getWaitable();
@net.sf.jni4net.attributes.ClrMethod("()V")
void setProcessed();
@net.sf.jni4net.attributes.ClrMethod("(I)I")
int waitProcessed(int aTimeout);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getMachineId();
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/SessionState;")
org.virtualbox_6_1_FixIt.SessionState getState_FixIt();
default SessionState getState() {
return SessionState.values()[Exports.convertEnum(getState_FixIt())];
}
//</generated-interface>
}

View file

@ -0,0 +1,45 @@
// ------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by jni4net. See http://jni4net.sourceforge.net/
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
package org.virtualbox_6_1;
import lombok.var;
import virtualcomputerwindows.Exports;
@net.sf.jni4net.attributes.ClrInterface
public interface IStateChangedEvent extends IEvent {
//<generated-interface>
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/VBoxEventType;")
org.virtualbox_6_1_FixIt.VBoxEventType getType_FixIt();
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/IEventSource;")
IEventSource getSource();
@net.sf.jni4net.attributes.ClrMethod("()I")
int getWaitable();
@net.sf.jni4net.attributes.ClrMethod("()V")
void setProcessed();
@net.sf.jni4net.attributes.ClrMethod("(I)I")
int waitProcessed(int aTimeout);
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/MachineState;")
org.virtualbox_6_1_FixIt.MachineState getState_FixIt();
default MachineState getState() {
int state = Exports.convertEnum(getState_FixIt());
for (var value : MachineState.values())
if (value.value() == state)
return value;
return null;
}
//</generated-interface>
}

View file

@ -0,0 +1,255 @@
// ------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by jni4net. See http://jni4net.sourceforge.net/
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
package org.virtualbox_6_1;
import lombok.var;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@net.sf.jni4net.attributes.ClrInterface
public interface IVirtualBox {
//<generated-interface>
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getVersion();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getVersionNormalized();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getRevision();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getPackageType();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getAPIVersion();
@net.sf.jni4net.attributes.ClrMethod("()J")
long getAPIRevision();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getHomeFolder();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/String;")
String getSettingsFilePath();
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/IHost;")
IHost getHost();
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/ISystemProperties;")
ISystemProperties getSystemProperties();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/Array;")
system.Array getMachines_FixIt();
default List<IMachine> getMachines() {
var list = new ArrayList<IMachine>();
var arr = getMachines_FixIt();
for (int i = 0; i < arr.getLength(); i++)
list.add((IMachine) arr.getItem(i));
return Collections.unmodifiableList(list);
}
@net.sf.jni4net.attributes.ClrMethod("()LSystem/Array;")
system.Array getMachineGroups_FixIt();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/Array;")
system.Array getHardDisks_FixIt();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/Array;")
system.Array getDVDImages_FixIt();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/Array;")
system.Array getFloppyImages_FixIt();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/Array;")
system.Array getProgressOperations_FixIt();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/Array;")
system.Array getGuestOSTypes_FixIt();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/Array;")
system.Array getSharedFolders_FixIt();
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/IPerformanceCollector;")
IPerformanceCollector getPerformanceCollector();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/Array;")
system.Array getDHCPServers_FixIt();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/Array;")
system.Array getNATNetworks_FixIt();
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/IEventSource;")
IEventSource getEventSource();
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/IExtPackManager;")
IExtPackManager getExtensionPackManager();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/Array;")
system.Array getInternalNetworks_FixIt();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/Array;")
system.Array getGenericNetworkDrivers_FixIt();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/Array;")
system.Array getCloudNetworks_FixIt();
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/ICloudProviderManager;")
ICloudProviderManager getCloudProviderManager();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute1IVirtualBox();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute2IVirtualBox();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute3IVirtualBox();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute4IVirtualBox();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute5IVirtualBox();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute6IVirtualBox();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute7IVirtualBox();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute8IVirtualBox();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute9IVirtualBox();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute10IVirtualBox();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute11IVirtualBox();
@net.sf.jni4net.attributes.ClrMethod("()LSystem/UInt32;")
int getInternalAndReservedAttribute12IVirtualBox();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;LSystem/String;LSystem/String;LSystem/String;)LSystem/String;")
String composeMachineFilename(String aName, String aGroup, String aCreateFlags, String aBaseFolder);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;LSystem/String;LSystem/Array;LSystem/String;LSystem/String;)Lorg/virtualbox_6_1/IMachine;")
IMachine createMachine_FixIt(String aSettingsFile, String aName, system.Array aGroups, String aOSTypeId, String aFlags);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)Lorg/virtualbox_6_1/IMachine;")
IMachine openMachine(String aSettingsFile);
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/IMachine;)V")
void registerMachine(IMachine aMachine);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)Lorg/virtualbox_6_1/IMachine;")
IMachine findMachine(String aNameOrId);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/Array;)LSystem/Array;")
system.Array getMachinesByGroups_FixIt(system.Array aGroups);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/Array;)LSystem/Array;")
system.Array getMachineStates_FixIt(system.Array aMachines);
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/IAppliance;")
IAppliance createAppliance();
@net.sf.jni4net.attributes.ClrMethod("()Lorg/virtualbox_6_1/IUnattended;")
IUnattended createUnattendedInstaller();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;LSystem/String;Lorg/virtualbox_6_1/AccessMode;Lorg/virtualbox_6_1/DeviceType;)Lorg/virtualbox_6_1/IMedium;")
IMedium createMedium_FixIt(String aFormat, String aLocation, org.virtualbox_6_1_FixIt.AccessMode aAccessMode, org.virtualbox_6_1_FixIt.DeviceType aADeviceTypeType);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;Lorg/virtualbox_6_1/DeviceType;Lorg/virtualbox_6_1/AccessMode;I)Lorg/virtualbox_6_1/IMedium;")
IMedium openMedium_FixIt(String aLocation, org.virtualbox_6_1_FixIt.DeviceType aDeviceType, org.virtualbox_6_1_FixIt.AccessMode aAccessMode, int aForceNewUuid);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)Lorg/virtualbox_6_1/IGuestOSType;")
IGuestOSType getGuestOSType(String aId);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;LSystem/String;IILSystem/String;)V")
void createSharedFolder(String aName, String aHostPath, int aWritable, int aAutoMount, String aAutoMountPoint);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)V")
void removeSharedFolder(String aName);
@net.sf.jni4net.attributes.ClrMethod("()LSystem/Array;")
system.Array getExtraDataKeys_FixIt();
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)LSystem/String;")
String getExtraData(String aKey);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;LSystem/String;)V")
void setExtraData(String aKey, String aValue);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)V")
void setSettingsSecret(String aPassword);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)Lorg/virtualbox_6_1/IDHCPServer;")
IDHCPServer createDHCPServer(String aName);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)Lorg/virtualbox_6_1/IDHCPServer;")
IDHCPServer findDHCPServerByNetworkName(String aName);
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/IDHCPServer;)V")
void removeDHCPServer(IDHCPServer aServer);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)Lorg/virtualbox_6_1/INATNetwork;")
INATNetwork createNATNetwork(String aNetworkName);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)Lorg/virtualbox_6_1/INATNetwork;")
INATNetwork findNATNetworkByName(String aNetworkName);
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/INATNetwork;)V")
void removeNATNetwork(INATNetwork aNetwork);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)Lorg/virtualbox_6_1/ICloudNetwork;")
ICloudNetwork createCloudNetwork(String aNetworkName);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)Lorg/virtualbox_6_1/ICloudNetwork;")
ICloudNetwork findCloudNetworkByName(String aNetworkName);
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/ICloudNetwork;)V")
void removeCloudNetwork(ICloudNetwork aNetwork);
@net.sf.jni4net.attributes.ClrMethod("(Lorg/virtualbox_6_1/FirmwareType;LSystem/String;LSystem/String;LSystem/String;)I")
int checkFirmwarePresent_FixIt(org.virtualbox_6_1_FixIt.FirmwareType aFirmwareType, String aVersion, net.sf.jni4net.Out<String> aUrl, net.sf.jni4net.Out<String> aFile);
@net.sf.jni4net.attributes.ClrMethod("()V")
void internalAndReservedMethod1IVirtualBox();
@net.sf.jni4net.attributes.ClrMethod("()V")
void internalAndReservedMethod2IVirtualBox();
@net.sf.jni4net.attributes.ClrMethod("()V")
void internalAndReservedMethod3IVirtualBox();
@net.sf.jni4net.attributes.ClrMethod("()V")
void internalAndReservedMethod4IVirtualBox();
@net.sf.jni4net.attributes.ClrMethod("()V")
void internalAndReservedMethod5IVirtualBox();
@net.sf.jni4net.attributes.ClrMethod("()V")
void internalAndReservedMethod6IVirtualBox();
@net.sf.jni4net.attributes.ClrMethod("()V")
void internalAndReservedMethod7IVirtualBox();
@net.sf.jni4net.attributes.ClrMethod("()V")
void internalAndReservedMethod8IVirtualBox();
//</generated-interface>
}

View file

@ -0,0 +1,8 @@
package org.virtualbox_6_1;
public enum LockType {
Null,
Shared,
Write,
VM,
}

View file

@ -0,0 +1,40 @@
package org.virtualbox_6_1;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public enum MachineState {
Null(0),
PoweredOff(1),
Saved(2),
Teleported(3),
Aborted(4),
FirstOnline(5),
Running(5),
Paused(6),
Stuck(7),
FirstTransient(8),
Teleporting(8),
LiveSnapshotting(9),
Starting(10), // 0x0000000A
Stopping(11), // 0x0000000B
Saving(12), // 0x0000000C
Restoring(13), // 0x0000000D
TeleportingPausedVM(14), // 0x0000000E
TeleportingIn(15), // 0x0000000F
DeletingSnapshotOnline(16), // 0x00000010
DeletingSnapshotPaused(17), // 0x00000011
LastOnline(18), // 0x00000012
OnlineSnapshotting(18), // 0x00000012
RestoringSnapshot(19), // 0x00000013
DeletingSnapshot(20), // 0x00000014
SettingUp(21), // 0x00000015
LastTransient(22), // 0x00000016
Snapshotting(22); // 0x00000016
private final int value;
public int value() {
return value;
}
}

View file

@ -0,0 +1,21 @@
package org.virtualbox_6_1;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public enum MouseButtonState {
LeftButton(1),
RightButton(2),
MiddleButton(4),
WheelUp(8),
WheelDown(16),
XButton1(32),
XButton2(64),
MouseStateMask(127);
private final int value;
public int value() {
return value;
}
}

View file

@ -1,5 +1,9 @@
package org.virtualbox_6_1;
public enum SessionState {
Locked
Null,
Unlocked,
Locked,
Spawning,
Unlocking,
}

View file

@ -0,0 +1,8 @@
package org.virtualbox_6_1;
public enum SessionType {
Null,
WriteLock,
Remote,
Shared,
}

View file

@ -0,0 +1,94 @@
package org.virtualbox_6_1;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public enum VBoxEventType {
Invalid(0),
Any(1),
Vetoable(2),
MachineEvent(3),
SnapshotEvent(4),
InputEvent(5),
LastWildcard(31), // 0x0000001F
OnMachineStateChanged(32), // 0x00000020
OnMachineDataChanged(33), // 0x00000021
OnExtraDataChanged(34), // 0x00000022
OnExtraDataCanChange(35), // 0x00000023
OnMediumRegistered(36), // 0x00000024
OnMachineRegistered(37), // 0x00000025
OnSessionStateChanged(38), // 0x00000026
OnSnapshotTaken(39), // 0x00000027
OnSnapshotDeleted(40), // 0x00000028
OnSnapshotChanged(41), // 0x00000029
OnGuestPropertyChanged(42), // 0x0000002A
OnMousePointerShapeChanged(43), // 0x0000002B
OnMouseCapabilityChanged(44), // 0x0000002C
OnKeyboardLedsChanged(45), // 0x0000002D
OnStateChanged(46), // 0x0000002E
OnAdditionsStateChanged(47), // 0x0000002F
OnNetworkAdapterChanged(48), // 0x00000030
OnSerialPortChanged(49), // 0x00000031
OnParallelPortChanged(50), // 0x00000032
OnStorageControllerChanged(51), // 0x00000033
OnMediumChanged(52), // 0x00000034
OnVRDEServerChanged(53), // 0x00000035
OnUSBControllerChanged(54), // 0x00000036
OnUSBDeviceStateChanged(55), // 0x00000037
OnSharedFolderChanged(56), // 0x00000038
OnRuntimeError(57), // 0x00000039
OnCanShowWindow(58), // 0x0000003A
OnShowWindow(59), // 0x0000003B
OnCPUChanged(60), // 0x0000003C
OnVRDEServerInfoChanged(61), // 0x0000003D
OnEventSourceChanged(62), // 0x0000003E
OnCPUExecutionCapChanged(63), // 0x0000003F
OnGuestKeyboard(64), // 0x00000040
OnGuestMouse(65), // 0x00000041
OnNATRedirect(66), // 0x00000042
OnHostPCIDevicePlug(67), // 0x00000043
OnVBoxSVCAvailabilityChanged(68), // 0x00000044
OnBandwidthGroupChanged(69), // 0x00000045
OnGuestMonitorChanged(70), // 0x00000046
OnStorageDeviceChanged(71), // 0x00000047
OnClipboardModeChanged(72), // 0x00000048
OnDnDModeChanged(73), // 0x00000049
OnNATNetworkChanged(74), // 0x0000004A
OnNATNetworkStartStop(75), // 0x0000004B
OnNATNetworkAlter(76), // 0x0000004C
OnNATNetworkCreationDeletion(77), // 0x0000004D
OnNATNetworkSetting(78), // 0x0000004E
OnNATNetworkPortForward(79), // 0x0000004F
OnGuestSessionStateChanged(80), // 0x00000050
OnGuestSessionRegistered(81), // 0x00000051
OnGuestProcessRegistered(82), // 0x00000052
OnGuestProcessStateChanged(83), // 0x00000053
OnGuestProcessInputNotify(84), // 0x00000054
OnGuestProcessOutput(85), // 0x00000055
OnGuestFileRegistered(86), // 0x00000056
OnGuestFileStateChanged(87), // 0x00000057
OnGuestFileOffsetChanged(88), // 0x00000058
OnGuestFileRead(89), // 0x00000059
OnGuestFileWrite(90), // 0x0000005A
OnRecordingChanged(91), // 0x0000005B
OnGuestUserStateChanged(92), // 0x0000005C
OnGuestMultiTouch(93), // 0x0000005D
OnHostNameResolutionConfigurationChange(94), // 0x0000005E
OnSnapshotRestored(95), // 0x0000005F
OnMediumConfigChanged(96), // 0x00000060
OnAudioAdapterChanged(97), // 0x00000061
OnProgressPercentageChanged(98), // 0x00000062
OnProgressTaskCompleted(99), // 0x00000063
OnCursorPositionChanged(100), // 0x00000064
OnGuestAdditionsStatusChanged(101), // 0x00000065
OnGuestMonitorInfoChanged(102), // 0x00000066
OnGuestFileSizeChanged(103), // 0x00000067
OnClipboardFileTransferModeChanged(104), // 0x00000068
Last(105); // 0x00000069
private final int value;
public final int value() {
return value;
}
}

View file

@ -0,0 +1,10 @@
package org.virtualbox_6_1;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@Getter
@RequiredArgsConstructor
public class VBoxException extends RuntimeException {
private final long resultCode;
}

View file

@ -0,0 +1,23 @@
package org.virtualbox_6_1;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public class VirtualBoxManager {
private static VirtualBoxManager instance;
private final String path;
private final IVirtualBox vbox = new VirtualBoxClass();
private final ISession session = new SessionClass();
public static VirtualBoxManager createInstance(String path) {
return instance = new VirtualBoxManager(path);
}
public IVirtualBox getVBox() {
return vbox;
}
public ISession getSessionObject() {
return session;
}
}

View file

@ -2,10 +2,11 @@ package sznp.virtualcomputer;
import lombok.RequiredArgsConstructor;
import net.sf.jni4net.Ref;
import org.virtualbox_6_1.BitmapFormat;
import org.virtualbox_6_1.IFramebuffer;
import org.virtualbox_6_1.IFramebufferOverlay;
import org.virtualbox_6_1_FixIt.BitmapFormat;
import system.Array;
import system.Enum;
import sznp.virtualcomputer.util.IMCFrameBuffer;
import virtualcomputerwindows.Exports;
@ -47,7 +48,7 @@ public class COMFrameBuffer implements IFramebuffer {
}
public BitmapFormat getPixelFormat_FixIt() {
//return BitmapFormat.BGRA.value();
Enum.ToObject(BitmapFormat.typeof(), org.virtualbox_6_1.BitmapFormat.BGRA.getValue());
return null;
}
@ -64,7 +65,7 @@ public class COMFrameBuffer implements IFramebuffer {
}
public void notify3DEvent_FixIt(int type, Array data) {
System.out.println("3D event! " + type + " - " + Arrays.toString(Exports.ConvertArrayByte(data)));
System.out.println("3D event! " + type + " - " + Arrays.toString(Exports.convertArrayByte_FixIt(data)));
}
public void notifyChange(int screenId, int xOrigin, int yOrigin, int width, int height) {
@ -76,7 +77,7 @@ public class COMFrameBuffer implements IFramebuffer {
}
public void notifyUpdateImage_FixIt(int arg0, int arg1, int arg2, int arg3, Array arg4) {
frameBuffer.notifyUpdateImage(arg0, arg1, arg2, arg3, Exports.ConvertArrayByte(arg4));
frameBuffer.notifyUpdateImage(arg0, arg1, arg2, arg3, Exports.convertArrayByte_FixIt(arg4));
}
public void setVisibleRegion(Ref<Byte> arg0, int arg1) {

View file

@ -42,7 +42,7 @@ public final class COMUtils {
public static void queryBitmapInfo(IDisplaySourceBitmap bitmap, long[] ptr, long[] w, long[] h, long[] bpp, long[] bpl, long[] pf) {
Out<Integer> wo = new Out<>(), ho = new Out<>(), bppo = new Out<>(), bplo = new Out<>();
val pfo = new Out<BitmapFormat>();
val pfo = new Out<org.virtualbox_6_1_FixIt.BitmapFormat>();
val ptro = new Out<Long>();
bitmap.queryBitmapInfo(ptro, wo, ho, bppo, bplo, pfo);
ptr[0] = ptro.getValue();
@ -50,6 +50,24 @@ public final class COMUtils {
h[0] = ho.getValue();
bpp[0] = bppo.getValue();
bpl[0] = bplo.getValue();
pf[0] = Exports.ConvertEnum(pfo.getValue());
pf[0] = Exports.convertEnum(pfo.getValue());
}
public static void querySourceBitmap(IDisplay display, Holder<IDisplaySourceBitmap> holder) {
val out = new Out<IDisplaySourceBitmap>();
display.querySourceBitmap(0, out);
holder.value = out.getValue();
}
public static boolean convertToBool(int bool) {
return bool != 0;
}
public static int convertFromBool(boolean bool) {
return bool ? 1 : 0;
}
public static int convertFromLong(long l) {
return (int) l;
}
}

View file

@ -67,9 +67,13 @@ namespace VirtualComputerWindows
return (uint[]) array;
}
public static Array ConvertArray(int[] array)
{
return array;
}
public static int ConvertEnum(object someEnum)
{
BitmapFormat.BitmapFormat_RGBA;
return (int) someEnum;
}
}

View file

@ -38,4 +38,20 @@ public final class COMUtils {
public static void queryBitmapInfo(IDisplaySourceBitmap bitmap, long[] ptr, long[] w, long[] h, long[] bpp, long[] bpl, long[] pf) {
bitmap.getTypedWrapped().queryBitmapInfo(ptr, w, h, bpp, bpl, pf);
}
public static void querySourceBitmap(IDisplay display, Holder<IDisplaySourceBitmap> holder) {
display.querySourceBitmap(0L, holder);
}
public static boolean convertToBool(boolean bool) {
return bool;
}
public static boolean convertFromBool(boolean bool) {
return bool;
}
public static long convertFromLong(long l) {
return l;
}
}

12
pom.xml
View file

@ -8,6 +8,7 @@
<artifactId>VirtualComputer</artifactId>
<version>2.1-SNAPSHOT</version>
<modules>
<module>VirtualComputerMSCOM</module>
<module>VirtualComputer-Core</module>
</modules>
<packaging>pom</packaging>
@ -138,5 +139,16 @@
<module>VirtualComputerMSCOM</module>
</modules>
</profile>
<profile>
<id>intellij-idea-only</id>
<activation>
<property>
<name>idea.maven.embedder.version</name>
</property>
</activation>
<modules>
<module>VirtualComputerMSCOM</module>
</modules>
</profile>
</profiles>
</project>

View file

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>net.sf.jacob-project</groupId>
<artifactId>jacob</artifactId>
<version>1.19</version>
<description>POM was created from install:install-file</description>
</project>

View file

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>net.sf.jacob-project</groupId>
<artifactId>jacob</artifactId>
<versioning>
<release>1.19</release>
<versions>
<version>1.19</version>
</versions>
<lastUpdated>20200811224130</lastUpdated>
</versioning>
</metadata>

View file

@ -8,6 +8,6 @@
<version>6.0</version>
<version>6.1</version>
</versions>
<lastUpdated>20200731215317</lastUpdated>
<lastUpdated>20201016165020</lastUpdated>
</versioning>
</metadata>