HostNetworkInterfaces - TypeLoadException

Discussion about using the VirtualBox API, Tutorials, Samples.
Post Reply
Benne
Posts: 1
Joined: 25. Feb 2017, 13:44
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Win 7

HostNetworkInterfaces - TypeLoadException

Post by Benne »

Hi,

I'm playing around with the API to start and stop Virtualbox with C#. All is running fine, but now I tried the following:

Code: Select all

VirtualBox.VirtualBox vb = new VirtualBox.VirtualBox();
IHost ihost = vb.Host;
HostNetworkInterfaceType t = HostNetworkInterfaceType.HostNetworkInterfaceType_HostOnly;
ihost.FindHostNetworkInterfacesOfType(t);
This results in a TypeLoadException for the type VirtualBox.IHostNetworkInterface.
Anyone ever had such an issue?

I'm running VBox 5.1.22 on Win 7, but same result on Win 10.

Thanks in advance.
Kind regards
Ben
Last edited by Benne on 24. Jul 2017, 08:33, edited 1 time in total.
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: HostNetworkInterfaces - TypeLoadException

Post by noteirak »

Please provide all the required information as per posting guildelines.
I have a feeling there is some kind of missmatch somewhere...
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Post Reply