C# 调用带 out 参数 读取返回值问题
这是接口文档我调用这个方法怎么去2-8那些返回值我的代码如下[DllImport("XNHInterface.dll")]staticexternintgetPerson...
这是接口文档
我调用这个方法 怎么去2 - 8那些返回值
我的代码如下
[DllImport("XNHInterface.dll")]
static extern int getPersonInfo(string personNo, string flag, string name, string sex, string birthday, string idCard, string hMaster, string errorMsg);
private void button3_Click(object sender, EventArgs e)
{
string personNo = "220382010799000101";
string flag = "";
string name = "";
string sex = "";
string birthday = "";
string idCard = "";
string hMaster = "";
string errorMsg = "";
int i = getPersonInfo(personNo, flag, name, sex, birthday, idCard, hMaster, errorMsg);
} 展开
我调用这个方法 怎么去2 - 8那些返回值
我的代码如下
[DllImport("XNHInterface.dll")]
static extern int getPersonInfo(string personNo, string flag, string name, string sex, string birthday, string idCard, string hMaster, string errorMsg);
private void button3_Click(object sender, EventArgs e)
{
string personNo = "220382010799000101";
string flag = "";
string name = "";
string sex = "";
string birthday = "";
string idCard = "";
string hMaster = "";
string errorMsg = "";
int i = getPersonInfo(personNo, flag, name, sex, birthday, idCard, hMaster, errorMsg);
} 展开
2个回答
展开全部
// Try:
[DllImport("XNHInterface.dll"", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
static extern int getPersonInfo(string personNo, string flag, string name, string sex, string birthday, string idCard, string hMaster, string errorMsg);
// call:
int i = getPersonInfo(out personNo,out flag,out name,out sex,out birthday,out idCard,out hMaster,out errorMsg);
2013-12-03
展开全部
int i = getPersonInfo(personNo,out flag, out name,out sex,out birthday,out idCard,out hMaster, out errorMsg);
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询