public static ConnectionHandle OpenConnection(IDictionary <string, string> connectionParams, out RfcErrorInfo errorInfo) { var rfcOptions = connectionParams.Select(x => new Interopt.RfcConnectionParameter { Name = x.Key, Value = x.Value }) .ToArray(); var ptr = Interopt.RfcOpenConnection(rfcOptions, (uint)rfcOptions.Length, out errorInfo); return(ptr == IntPtr.Zero ? null : new ConnectionHandle(ptr)); }