IntByReference lpdwNotifyKey = new IntByReference();
IntByReference lpdwFilterType = new IntByReference();
IntByReference lpcchName = new IntByReference();
IntByReference dwNotifyKey = new IntByReference();
Memory lpszName = new Memory(256);
Pointer minusOne = Pointer.createConstant(-1);
int dwMilliseconds = 300 * 1000;
final int dwFilter = Clusapi.CLUSTER_CHANGE_GROUP_STATE | Clusapi.CLUSTER_CHANGE_HANDLE_CLOSE
| Clusapi.CLUSTER_CHANGE_GROUP_DELETED | Clusapi.CLUSTER_CHANGE_CLUSTER_STATE
| Clusapi.CLUSTER_CHANGE_CLUSTER_RECONNECT | Clusapi.CLUSTER_CHANGE_GROUP_ADDED;
while (!_stopped)
{
Pointer hCluster = null;
Pointer hChange = null;
long started = System.currentTimeMillis();
try
{