我调用为: public short AcctID; public void CallDLL(string acc_nbr)
{
AcctID=getAcctIDByNum(acc_nbr, ppc, zhID);
}
{
AcctID=getAcctIDByNum(acc_nbr, ppc, zhID);
}
解决方案 »
- 求教——未处理的“System.Data.OleDb.OleDbException”类型的异常出现在 system.data.dll 中
- 谁能帮我解释下什么是类型(type)啊 谢谢
- 技术方面想请教一下各路英雄!!!谢谢
- C#(asp.net)开发难点在那里?
- 只是在form中添加了一个按纽,就出现:未处理的“System.ArithmeticException”类型的异常出现在 system.drawing.dll 中??
- C#写word插件的ribbon下拉框的问题
- "网上编译器"这样的WEB SERVIC怎样实现
- 我想得到Graphic对象的范围尺寸[有关打印时自动换行的用途]
- 请问"状态服务器"是什么?
- 关于安装的问题!
- 请问 winform里面怎么实现搜索的结果 关键字带颜色或则高亮
- 问个关于GDI+双缓冲画布的问题..高手快来吧谢谢了
class TestCopy
{
// The unsafe keyword allows pointers to be used within the following method:
static unsafe void Copy(byte[] src, int srcIndex, byte[] dst, int dstIndex, int count)
{
if (src == null || srcIndex < 0 ||
dst == null || dstIndex < 0 || count < 0)
{
throw new System.ArgumentException();
} int srcLen = src.Length;
int dstLen = dst.Length;
if (srcLen - srcIndex < count || dstLen - dstIndex < count)
{
throw new System.ArgumentException();
} // The following fixed statement pins the location of the src and dst objects
// in memory so that they will not be moved by garbage collection.
fixed (byte* pSrc = src, pDst = dst)
{
byte* ps = pSrc;
byte* pd = pDst; // Loop over the count in blocks of 4 bytes, copying an integer (4 bytes) at a time:
for (int i = 0 ; i < count / 4 ; i++)
{
*((int*)pd) = *((int*)ps);
pd += 4;
ps += 4;
} // Complete the copy by moving any bytes that weren't moved in blocks of 4:
for (int i = 0; i < count % 4 ; i++)
{
*pd = *ps;
pd++;
ps++;
}
}
} static void Main()
{
byte[] a = new byte[100];
byte[] b = new byte[100]; for (int i = 0; i < 100; ++i)
{
a[i] = (byte)i;
} Copy(a, 0, b, 0, 100);
System.Console.WriteLine("The first 10 elements are:"); for (int i = 0; i < 10; ++i)
{
System.Console.Write(b[i] + " ");
}
System.Console.WriteLine("\n");
}
}来自MSDN
为什么要用这么BT的定义呢....
先问清楚下在C++中 char **&ppcZHMSG 是不是等价于 char *ppcZHMSG ?
如果是
[DllImport("VCDLL.dll", EntryPoint="getAcctIDByNum",CallingConvention=CallingConvention.StdCall,CharSet=CharSet.Ansi)]
static extern short getAcctIDByNumstring pcDHHM, ref string ppcZHMSG, ref string ppcZHID);
应该就是正确的了