public AuthListener()
{
_requestCredentials = new InternalRequestCredentials(this._RequestCredentials);
_verifyCredentials = new InternalVerifyCredentials(this._VerifyCredentials);
_securityViolation = new InternalSecurityViolation(this._SecurityViolation);
_authenticationComplete = new InternalAuthenticationComplete(this._AuthenticationComplete);
AuthListenerCallbacks callbacks;
callbacks.requestCredentials = Marshal.GetFunctionPointerForDelegate(_requestCredentials);
callbacks.verifyCredentials = Marshal.GetFunctionPointerForDelegate(_verifyCredentials);
callbacks.securityViolation = Marshal.GetFunctionPointerForDelegate(_securityViolation);
callbacks.authenticationComplete = Marshal.GetFunctionPointerForDelegate(_authenticationComplete);
GCHandle gch = GCHandle.Alloc(callbacks, GCHandleType.Pinned);
_authListener = alljoyn_authlistener_create(gch.AddrOfPinnedObject(), IntPtr.Zero);
gch.Free();
}