int wfreerdp_client_new(freerdp* instance, rdpContext* context) { wfContext* wfc = (wfContext*) context; wfreerdp_client_global_init(); instance->PreConnect = wf_pre_connect; instance->PostConnect = wf_post_connect; instance->Authenticate = wf_authenticate; instance->VerifyCertificate = wf_verify_certificate; instance->ReceiveChannelData = wf_receive_channel_data; wfc->instance = instance; context->channels = freerdp_channels_new(); return 0; }
BOOL wfreerdp_client_new(freerdp* instance, rdpContext* context) { wfContext* wfc = (wfContext*) context; if (!(wfreerdp_client_global_init())) return FALSE; if (!(context->channels = freerdp_channels_new())) return FALSE; instance->PreConnect = wf_pre_connect; instance->PostConnect = wf_post_connect; instance->Authenticate = wf_authenticate; instance->VerifyCertificate = wf_verify_certificate; wfc->instance = instance; wfc->settings = instance->settings; return TRUE; }