[libvirt] virDomainInfo marshalling prolem
arnaud.champion at devatom.fr
arnaud.champion at devatom.fr
Fri Oct 29 13:30:59 UTC 2010
?Hi,
I am working on the marshaling of the virDomainInfo structure. I have marshalled it in this way :
/// <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>
public int maxMem;
/// <summary>
/// The memory in KBytes used by the domain.
/// </summary>
public int memory;
/// <summary>
/// The number of virtual CPUs for the domain.
/// </summary>
public short nrVirtCpu;
/// <summary>
/// The CPU time used in nanoseconds.
/// </summary>
public long cpuTime;
/// <summary>
/// The running state, one of virDomainState.
/// </summary>
public DomainState State { get { return (DomainState)state; } }
}
It work fine in 32 bits, but not in 64 bits, it seems that packing in 64 bits is different so infos are not in order. Am I right ?
Regards,
Arnaud
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101029/eab38c02/attachment-0001.htm>
More information about the libvir-list
mailing list