Код: Выделить всё
String serverName = "...", fileName = "...";
Dispatch dispatch = new Dispatch("dllx32conn.dbconn");
Dispatch.call(dispatch, "pass_para", serverName, fileName);
Поэтому я решил проанализировать функции dll, декомпилировав их с помощью JetBrains dotPeek. Вот что я нашел
Код: Выделить всё
using System;
using System.Data;
using System.Data.SqlClient;
using System.IO;
namespace dllx32conn
{
public class dbconn
{
public static string conn_str = "";
public static string strFilePath = "";
public static SqlConnection Conn = new SqlConnection();
public static DataTable tbl;
public static SqlDataAdapter dap;
public static void pass_para(string servname, string csvpth)
{
dbconn.conn_str = "Data Source=" + servname + ";Initial Catalog=Billing;User Id=Scd;Password=Smart11Siri";
dbconn.strFilePath = csvpth;
}
}
}
Подробнее здесь: https://stackoverflow.com/questions/269 ... -to-dispid