falox/libvirt-csharp

UIntPtr in virDomainInfo

Opened this issue · 1 comments

/// <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;

Tries to UIntPtr to get the correct length. The problem is that the libvirt-0.dll being called might be different from the dotnet platform (call 32bit libvirt-0.dll from 64bit dotnet or else).

I think this problem should be fixed from libvirt itself because I do not think I can find a way to workaround.

I have talked with our friends who also maintain some C# shim for *nix oriented lib. They suggest me to maintain a patch for the lib and provide Windows .dll build by ourselves.

Do you still have time to review or maintain this project? pls take a look at my PR?