Hi,

Im trying to call libvirt functions from a widows machine.

The client version i'm using is 0.6.1.

My application is a multi-Threaded application.

This is the way my application works:

1. I connect to Libvirt using "virConnectOpen". (this done only once when my application starts).
2. For funther interaction with libvirt i just call "virConnectRef" and then i call some other function like "virNodeGetInfo".
3. Then i call "virConnectClose".

Now my understanding is for every "virConnectRef" call there has to be a corrosponding "virConnectClose".

In my application call to number of calls to "virConnectClose" is always equal to "virConnectRef".
and "virConnectClose" corrosponding to "virConnectOpen" is called when the application is closed.
So connection to libvirt should always be there till the time my application is running.

But what is happening is, even if i call "virConnectRef" twice, a single call to "virConnectClose" closes the connection with libvirt.

Is there anything that im doing wrong here...??

Regards
Anuj