Oops again, a little mistake again :S
In mono, we can't loop thru ref array objects.
Oops, I have made a little mistake that make the example not compiling. This patch make it works, sorry :S
I have finally find the problem with examples on mono compiled in 64 bits. The problem was the "ToInt32" method of an IntPtr which failed on mono 64 bits (have to use ToInt64 instead).
This path solve this problem.
Also, I have put marshaling complexity of the ConnectOpenAuth callback in bindings, this make the callback of ConnectOpenAuth more simple to achieve the authentification. In the example, the callback is treated like this :
private static int AuthCallback(ref ConnectCredential creds, IntPtr cbdata)
AuthData authData = (AuthData)Marshal.PtrToStructure(cbdata, typeof(AuthData));
foreach (ConnectCredential cred in creds)
// Fill the user name
cred.Result = authData.user_name;
// Fill the password
cred.Result = authData.password;
The bindings user has no marshaling to do, and believe me, it's simpler.
Finally, this patch finalize renaming.
libvir-list mailing list
libvir-list redhat com
Description: Binary data