/// <summary> /// Setup a connection with a mserver at a host:port and login with username and password. /// If host == NULL, the local host is accessed. If host starts with a '/' and the system /// supports it, host is actually the name of a UNIX domain socket, and port is ignored. /// If port == 0, a default port is used. If username == NULL, the username of the owner of /// the client application containing the Mapi code is used. If password == NULL, the password /// is omitted. The preferred query language is any of {sql,mil,mal,xquery }. /// On success, the function returns a pointer to a structure with administration about the connection. /// </summary> /// <param name="host"></param> /// <param name="port"></param> /// <param name="username"></param> /// <param name="password"></param> /// <param name="lang"></param> /// <param name="dbname"></param> /// <returns></returns> public static MapiConnection MapiConnect(string host, int port, string username, string password, string lang, string dbname) { return(new MapiConnection(CMapiLib.mapi_connect(host, port, username, password, lang, dbname))); }