private RpcConnect ( string server, string userDN, string domain, string userName, string password, string rpcProxyOptions ) : bool | ||
server | string | Server to connect. |
userDN | string | UserDN used to connect server |
domain | string | Domain name |
userName | string | User name used to logon |
password | string | User Password |
rpcProxyOptions | string | Rpc proxy parameter |
Результат | bool |
private bool RpcConnect(string server, string userDN, string domain, string userName, string password, string rpcProxyOptions)
{
string userSpn = Regex.Replace(this.MapiContext.SpnFormat, @"\[ServerName\]", this.originalServerName, RegexOptions.IgnoreCase);
this.cxh = this.rpcAdapter.Connect(server, domain, userName, userDN, password, userSpn, this.MapiContext, rpcProxyOptions);
if (this.cxh != IntPtr.Zero)
{
this.IsConnected = true;
return true;
}
else
{
return false;
}
}
}