///
<summary> /// Structure to handle domain informations /// </summary>[
StructLayout(LayoutKind.Sequential)] public class DomainInfo{
/// <summary> /// The running state, one of virDomainState. /// </summary> private byte state; /// <summary> /// The maximum memory in KBytes allowed. /// </summary>[
MarshalAs(UnmanagedType.SysUInt)] public UIntPtr maxMem; /// <summary> /// The memory in KBytes used by the domain. /// </summary>[
MarshalAs(UnmanagedType.SysUInt)] public UIntPtr memory; /// <summary> /// The number of virtual CPUs for the domain. /// </summary> public ushort nrVirtCpu; /// <summary> /// The CPU time used in nanoseconds. /// </summary>[
MarshalAs(UnmanagedType.SysUInt)] public UIntPtr cpuTime; /// <summary> /// The running state, one of virDomainState. /// </summary> public DomainState State { get { return (DomainState)state; } }}
Also, another important thing change : the libvirt bindings project must have an x86 target to make this marshaling working. This is also in the patch.
Another thing, you can also use Errors.GetLastErro() method to identify the problem, it return an error class which can inform you about the problem.
Best regards,
Arnaud
PS : are you sure also that libvirt dll is compiled with xen support ?