private static extern bool lm_connection_open(IntPtr obj, _ResultFunction func, IntPtr ptr, IntPtr ignored2, IntPtr errPtr);
private static extern bool lm_connection_authenticate(IntPtr obj, string username, string password, string resource, _ResultFunction func, IntPtr ignored, IntPtr ignored2, IntPtr errPtr);