首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

Delphi調用一個外部Dll的問題?解决办法

2012-03-06 
Delphi調用一個外部Dll的問題?如題!Delphi調用一個外部Dll,只有一個Dll文件和該Dll的一段說明!請高手進來,

Delphi調用一個外部Dll的問題?
如題!Delphi調用一個外部Dll,只有一個Dll文件和該Dll的一段說明!
請高手進來,看看如何調用這個DLL?分不夠可加!!!

Dll文件名:dbx32sql.dll
Dll文件說明如下:

To   use   this   you   have   one   of   two   constructors   to   use.   Please   see   example   execution   below.

string   dbName   =   "Temp_zcgl ";

string   serverName   =   "172.20.1.107 ";.

string   username   =   "shopfloor ";

string   userpwd   =   "shopfloor ";
///   Using   the   standard   constructor   and   inputing   all   information
///   From   the   constructor.     This   will   automatically   instantiate   the   setConnection   Member
  private   dbx32sql.Connect   conn   =   new   dbx32sql.Connect(dbName,   serverName,   username,   userpwd);

///   Using   the   non   standard   constructor   with   no   inputs.   Must   initiate   setConnection;

private   dbx32sql.Connect   conn   =   new   dbx32sql.Connect();
conn.Database   =   dbName;
conn.Server   =   serverName;
conn.username   =   username;
conn.userpwd   =   userpwd;
conn.setConnection;

 
try
{
        if   (conn.Open)
        {
                string   sqlGet   =   "SELECT   COUNT   (ID)   FROM   authors ";
                SqlCommand   cmdGet   =   new   SqlCommand(sqlGet,   conn.Connection);
                int   Count   =   (int)cmdGet.ExecuteScalar();
                CmdGet.Dispose();
        }
        else
        {
                //   Input   your   error   handling   here;
        }
}
catch(Exception   ex)
{
        //insert   other   error   handling.
}
finally
{
        conn.Close();
}

請高手進來,看看如何調用這個DLL?分不夠可加!!!


[解决办法]
接口的名字参数都没哦~~
[解决办法]
例子用的是Java吗?
函数接口声明在什么地方?找到那个先!

热点排行