c# 调用c++ dll 返回值为数组指针 [问题点数:40分,结帖人hm947099313]

Bbs1
本版专家分:0
结帖率 100%
Bbs7
本版专家分:27143
Bbs7
本版专家分:25728
Bbs7
本版专家分:19221
Bbs1
本版专家分:0
Bbs7
本版专家分:20669
Bbs7
本版专家分:25728
Bbs7
本版专家分:24959
Bbs1
本版专家分:0
Bbs1
本版专家分:0
dll调用返回值问题
用v<em>c</em>6.0写RKY<em>dll</em>32.DLL时这样写rnint Rky(int Pa,<em>c</em>har *BFE)rn rn IF(pa=1)rn rn BUFFE= " ABCD ";rn rn return 0;rn rn 在VFP中rn DECLARE INTEGER Rky IN RkyDLL32.<em>dll</em> INTEGER , STRING @rnSTORE 1 TO PrnSTORE '' TO BFERrnRE = RKY(p,@BFER)rn为什么不会返回BFER="ABCD"呢,应怎样来修改<em>dll</em>文件才能得到re=0 BFER="ABCD"
C#调用非托管dll动态库返回值问题
函数原型:unsigned <em>c</em>har* FindToken() <em>返回值</em>是一个定长8字节的值rnrn我用C#如些<em>调用</em>:rn[DllImport("GDHidUserCtrl.<em>dll</em>", EntryPoint = "FindToken")]rn [return: MarshalAs(UnmanagedType.LPArray, SizeConst = 8)]rn internal stati<em>c</em> extern byte[] FindToken(); rn publi<em>c</em> stati<em>c</em> byte[] getUsbKey()rn rn return FindToken(); rn rnrn但运行时出现如下错误:rn无法封送处理“return value”: 无效的托管/非托管类型组合。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 rnrn异常详细信息: System.Runtime.InteropServi<em>c</em>es.MarshalDire<em>c</em>tiveEx<em>c</em>eption: 无法封送处理“return value”: 无效的托管/非托管类型组合。rnrn源错误: rnrnrn行 26: publi<em>c</em> stati<em>c</em> byte[] getUsbKey()rn行 27: rn行 28: return FindToken(); rn行 29: rn行 30: rn rnrn源文件: e:\UsbKey\App_Code\UsbKeyClient.<em>c</em>s 行: 28 rnrn堆栈跟踪: rnrnrn[MarshalDire<em>c</em>tiveEx<em>c</em>eption: 无法封送处理“return value”: 无效的托管/非托管类型组合。]rn UsbKeyClient.FindToken() +0rn UsbKeyClient.getUsbKey() in e:\UsbKey\App_Code\UsbKeyClient.<em>c</em>s:28rn testusbkey.Button1_Cli<em>c</em>k(Obje<em>c</em>t sender, EventArgs e) in e:\UsbKey\testusbkey.aspx.<em>c</em>s:20rn System.Web.UI.WebControls.Button.OnCli<em>c</em>k(EventArgs e) +75rn System.Web.UI.WebControls.Button.RaisePostBa<em>c</em>kEvent(String eventArgument) +98rn System.Web.UI.WebControls.Button.System.Web.UI.IPostBa<em>c</em>kEventHandler.RaisePostBa<em>c</em>kEvent(String eventArgument) +7rn System.Web.UI.Page.RaisePostBa<em>c</em>kEvent(IPostBa<em>c</em>kEventHandler sour<em>c</em>eControl, String eventArgument) +11rn System.Web.UI.Page.RaisePostBa<em>c</em>kEvent(NameValueColle<em>c</em>tion postData) +33rn System.Web.UI.Page.Pro<em>c</em>essRequestMain(Boolean in<em>c</em>ludeStagesBeforeAsyn<em>c</em>Point, Boolean in<em>c</em>ludeStagesAfterAsyn<em>c</em>Point) +4919rnrn 跪求各位高手帮小弟解决此问题,好急人啊!!!
C#调用dll返回值错误问题 (在线等~~)
我<em>调用</em>了一个DLLrn[DllImport("genTa<em>c</em>.<em>dll</em>")]rnpubli<em>c</em> stati<em>c</em> extern int genTa<em>c</em>(int gICDevId, byte[] keybuf, byte[] databuf, byte[] ta<em>c</em>buf);rnrn这是引用的地方rnbyte[] ta<em>c</em>buf = new byte[300];rnrn string strKeyElements = "1509021410000025";rn stringstr DataStream = "001509021400000002250002011002000004229000000035002008082610502510000025";rnrnrn Byte[] keybuf = En<em>c</em>oding.GetEn<em>c</em>oding("gb2312").GetBytes(strKeyElements);rn Byte[] databuf = En<em>c</em>oding.GetEn<em>c</em>oding("gb2312").GetBytes(strDataStream); rnrnrn int sl = genTa<em>c</em>(i<em>c</em>dev, keybuf, databuf, ta<em>c</em>buf);rnSl 本应该为 0 而现在 确不是 同样的代码在vs2005上可以运行,但是vs2003就不行 rn请大家帮帮忙
c#调用C++(DLL)返回值一个小问题!
[<em>c</em>ode=C#]rn<em>c</em>++ 的DLL入口函数:<em>c</em>har *fun<em>c</em>();rn<em><em>c</em>#</em><em>调用</em>声明:rn publi<em>c</em> <em>c</em>lass oneRouteIpS<em>c</em>anrn rn [DllImport("oneRouteIpS<em>c</em>an.<em>dll</em>",rn EntryPoint = "oneS<em>c</em>an",rn CharSet = CharSet.Ansi,rn CallingConvention = CallingConvention.StdCall)rn ]rn publi<em>c</em> stati<em>c</em> extern string oneS<em>c</em>an(); //此处的string对吗?我试怎么不行呢??rn rn[/<em>c</em>ode]
C#调用DLL返回值是乱码!!
<em>调用</em>DLL<em>返回值</em>是乱码,rnreturn sNewNumberNew;rnsNewNumberNew 为Char*rn在<em>dll</em>一切正常rnC#<em>调用</em>之后就乱码了!rnDLL函数:rn<em>c</em>har* _de<em>c</em>lspe<em>c</em>(<em>dll</em>export) AutoNumber(<em>c</em>har* sTable, <em>c</em>har* sFieldName, <em>c</em>har* sCode, int nStyle)rnrn<em><em>c</em>#</em><em>调用</em>:rnstring strdd = DLLClass.AutoNumber("PersonnelInfo", "id", "N", 2);rnrn请问高手怎么解决?rn
C# 调用C/C++ DLL
[<em>c</em>ode=<em>c</em>]typedef stru<em>c</em>t Id<em>c</em>Info rn <em>c</em>har name[30+1]; //rn <em>c</em>har sex[1+1]; //'1'男 '2'女 rn <em>c</em>har nation[2+1]; //民族 '01'-'57'rn <em>c</em>har birth[8+1]; //YYYYMMDDrn <em>c</em>har addr[70+1];rn <em>c</em>har pid[18+1];rn <em>c</em>har issue[30+1]; //发卡机关rn <em>c</em>har valid_start[8+1]; //rn <em>c</em>har valid_end[8+1]; //rn TId<em>c</em>Info;rnrn//读身份证,读取成功后,会在当前目录生成xp.bmp照片文件 // i<em>c</em><em>c</em><em>dll</em>.<em>dll</em>rnSTDAPI ReadId<em>c</em>Info(int ReaderHandle, TId<em>c</em>Info *pId<em>c</em>Info);rnrn[/<em>c</em>ode]rnrnrn求C#中该如何<em>调用</em>,谢谢!
C#调用C语言的DLL
C#<em>调用</em>C语言实现的DLL时,出现CoTaskMemFree(IntPtr ptr ) 的错误,查了一下,感觉是参数没有对应上,哪位大侠帮我看看是哪里的问题好吗,跪谢~rnrnC语言被<em>调用</em>代码:rntest.<em>dll</em>rn__de<em>c</em>lspe<em>c</em>(<em>dll</em>export) <em>c</em>har* fun(DWORD mode,<em>c</em>onst <em>c</em>har* password);rn<em>c</em>har* fun( DWORD mode, <em>c</em>onst <em>c</em>har* password);rnrnC#<em>调用</em>侧代码:rn stati<em>c</em> String <em>c</em>ode;rn [DllImport("test.<em>dll</em>", CharSet = CharSet.Ansi)]rn publi<em>c</em> stati<em>c</em> extern String fun(int mode, String password);rnrn stati<em>c</em> void Main(string[] args)rn rn String s = "123";rn <em>c</em>ode = obl_<em>c</em>rypto_hash(5, s);rn
C#调用C编写dll
[DllImport("P230_DLL_VC.DLL")]rnpubli<em>c</em> stati<em>c</em> unsafe extern int Rp<em>c</em>Close();rnrn<em>调用</em> int a=Rp<em>c</em>Close();rn出错:无法在 DLL P230_DLL_VC.DLL 中找到名为 Rp<em>c</em>Close 的入口点。rn请教一下如何解决。rn谢谢!
c#调用c语言Dll
程序实现了C语言生成动态链接库,以及C#的<em>调用</em>方法
c# 调用c动态dll
[b][<em>c</em>olor=#FF0000]请问下面<em>调用</em>正确吗?rn为什么我的程序<em>调用</em>后还是出现SSL初始化错误rnSSLLib.<em>dll</em>rn放在了bin下[/<em>c</em>olor][/b]rnrn[<em>c</em>ode=C#]rnint OPENSSL_init(intmode)rnrnrn[/<em>c</em>ode]rnrnrnrnrn[<em>c</em>ode=C#][DllImport("SSLLib.<em>dll</em>",CallingConvention=CallingConvention.Cde<em>c</em>l,EntryPoint="OPENSSL_init")]]rnpubli<em>c</em> stati<em>c</em> extern int OPENSSL_init(int mode);rnrnrnrn函数<em>调用</em>rnpubli<em>c</em> void test()rnrn //为什么这里初始化会出错?rn int i= OPENSSL_init(0);rnrnrn[/<em>c</em>ode]rnrnrnrn[<em>c</em>olor=#FF0000]1楼 bdmh回复:是什么<em>调用</em>约定啊,std<em>c</em>all还是<em>c</em>de<em>c</em>l,<em>c</em>默认是<em>c</em>de<em>c</em>lrnrnrnrn 答: 是 Cde<em>c</em>l.. 急死我了。 应该本地可以<em>调用</em>阿 为什么会这样 。 1点多就要测试了。rnrnrn2楼 evilant回复:SSL初始化错误,是不是找不到SSLib.<em>dll</em>?rnrnrn 答:rn SSLLib.<em>dll</em>放在程序bin->DeBug下了!rnrn3楼 guliang21 回复 :放到system32下试试rnrn 答:放了 。还是一样rnrn4楼 lizhibin11 大侠:回复:CallingConvention=CallingConvention.Cde<em>c</em>l把这个去掉rn 答: 去掉还是一样rnrn5楼 isjoe回复:是web项目吗?rn 答: winfrom[/<em>c</em>olor]rnrnrnrn
【C#】调用C语言生成的dll
C#<em>调用</em>C语言生成的<em>dll</em> using System; using System.Runtime.InteropServi<em>c</em>es; //与导入<em>dll</em>有关的命名空间 using System.Windows.Forms; <em>c</em>lass Example { //[导入<em>dll</em>,<em>dll</em>与exe在同一个文件夹下]导入<em>dll</em>中getCpuID1函数 [DllImport("CPUID32DLL.<em>dll</em>...
求救: c#调用 cdll
<em><em>c</em>#</em><em>调用</em> <em>c</em>的<em>dll</em>rn有两个传出参数 <em>c</em>har* password,<em>c</em>har* <em>c</em>orp_idrnrn<em>dll</em>内部定义rnunsigned long user_num;rn.....rnsprintf(<em>c</em>orp_id,"%06ld",user_num);rnrnunsigned <em>c</em>har <em>c</em>ur_word,<em>c</em>hk_word,pwd_word[17] = ""rn.....rnsprintf(password,"%s",pwd_word);rnrnrn我在<em><em>c</em>#</em>中用StringBuilder,password得不到值,<em>c</em>orp_id得出的值是正确的,是什么原因啊???rn
C#调用cdll问题
函数原型:int WINAPI rf_anti<em>c</em>oll(unsigned short i<em>c</em>dev, rn unsigned <em>c</em>har b<em>c</em>nt,rn unsigned <em>c</em>har *pSnr,rn unsigned <em>c</em>har *pLen)rn参数:i<em>c</em>dev:[IN] 通讯设备标识符rn b<em>c</em>nt: [IN] 取值4rn pSnr: [OUT]返回的卡序列号rn pLen: [OUT]返回序列号的长度rn返回:成功返回0rn我在<em><em>c</em>#</em>中应如何定义入口参数?rnpubli<em>c</em> stati<em>c</em> extern int rf_anti<em>c</em>oll(int dev, byte b<em>c</em>nt, out string pSnr, out int len)rn这个不行。报错:尝试读取或写入受保护的内存。这通常指示其他内存已损坏。
C#调用C代码DLL
首先我们新建一个C语言的WIN32项目 选择项目类型为DLL库 在新建的项目中我们添加C<em>c</em>ode.h,C<em>c</em>ode.<em>c</em>pp两个文件 Code.h extern &quot;C&quot; __de<em>c</em>lspe<em>c</em>(<em>dll</em>export) int Minus(int a, int b); extern &quot;C&quot; __de<em>c</em>lspe<em>c</em>(<em>dll</em>export) int Add(int a, int b); C<em>c</em>...
c#初学,调用cdll
<em>c</em>的头文件rnextern "C" void _export _std<em>c</em>all get_one_y<em>c</em>(int fa<em>c</em>, int y<em>c</em>_dot, float *y<em>c</em>_value);rnrn<em><em>c</em>#</em><em>调用</em>我这样写rn publi<em>c</em> <em>c</em>lass DllTestrn rn [DllImport("BaseDll.<em>dll</em>")]rn private extern stati<em>c</em> void get_one_y<em>c</em>(int fa<em>c</em>, int y<em>c</em>_dot, float *y<em>c</em>_value);rn rnrn提示“<em>指针</em>和和固定大小缓冲区只能在不安全的上下文中使用”,我这样写对吗,要怎么改,之后要如何用这个函数,帮忙写写吧,多谢了
C#调用C Dll的问题
在C#中<em>调用</em>C写的Dll,rn函数原型为 void GetPi<em>c</em>(<em>c</em>har * szCode, BYTE * pPi<em>c</em>ture)rnrn用C#建个窗口应用程序rnrn [DllImport("Pi<em>c</em>tureGenerator.<em>dll</em>", EntryPoint = "GetPi<em>c</em>")]rn stati<em>c</em> extern void GetPi<em>c</em>(string szCode, byte[] pPi<em>c</em>ture);rnrnrn private void Form1_Load(obje<em>c</em>t sender, EventArgs e)rn rn rn Byte[] pPi<em>c</em> = new Byte[9000];rn GetPi<em>c</em>("test", pPi<em>c</em>);rn rnrn这样是可以<em>调用</em>的。rnrn但是,同样的代码,放在WEB中就不行了。在运行到GetPi<em>c</em>时就会出错。说是 rnNullReferen<em>c</em>eEx<em>c</em>eption: 未将对象引用设置到对象的实例rn这是为什么啊,窗口程序的与WEB有什么不同么。
C#调用C DLL异常
最近在开发过程中需要使用C#<em>调用</em>C写的DLL,但在<em>调用</em>过程中遇到这个问题:“尝试读取或写入受保护的内存 这通常指示其它内存已损坏”,出现错误的地方可能为C#定义的结构体与C定义的结构体转换错误。详细如下:rn1.引用外部C的DLL:rn[<em>c</em>ode=<em>c</em>sharp][DllImport(@"C:\Users\Administrator\Do<em>c</em>uments\visual studio 2010\Proje<em>c</em>ts\CSQLDLL\Debug\CSQLDLL.<em>dll</em>", EntryPoint = "CDBWriteFun<em>c</em>")]rn publi<em>c</em> stati<em>c</em> extern int CDBWriteFun<em>c</em>(ref DB_INFO_CTL_TBL dbinfo, [In, Out] USR_INFO_TBL []usrinfo,int <em>c</em>ount);[/<em>c</em>ode]rn2.C#中结构体定义:rn[<em>c</em>ode=<em>c</em>sharp][Stru<em>c</em>tLayout(LayoutKind.Sequential)]rn publi<em>c</em> stru<em>c</em>t DB_INFO_CTL_TBLrn rn [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]rn publi<em>c</em> string byDBName; // DB Namern [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]rn publi<em>c</em> string byUsrName; // DB User Namern [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]rn publi<em>c</em> string byIPAddr; // IPrn [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]rn publi<em>c</em> string byDBPwd; // Passwordrn ;rn [Stru<em>c</em>tLayout(LayoutKind.Sequential)]rn publi<em>c</em> stru<em>c</em>t USR_INFO_TBLrn rn [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]rn publi<em>c</em> string byName;rn [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]rn publi<em>c</em> string byAge; rn ;[/<em>c</em>ode]rn3.C中的函数声明:rn[<em>c</em>ode=<em>c</em>]__de<em>c</em>lspe<em>c</em>(<em>dll</em>export) INT __std<em>c</em>all CDBWriteFun<em>c</em>( DB_INFO_CTL_TBL *dbinfo, USR_INFO_TBL *usrinfotbl,INT <em>c</em>ount );[/<em>c</em>ode]rn4.C中的结构体定义:rn[<em>c</em>ode=<em>c</em>]typedef stru<em>c</em>trnrn BYTE byDBName[20]; // DB Namern BYTE byUsrName[20]; // DB User Namern BYTE byIPAddr[20]; // IPrn BYTE byDBPwd[20]; // PasswordrnDB_INFO_CTL_TBL;rnrntypedef stru<em>c</em>trnrn BYTE byName[20]; rn BYTE byAge[20];rnUSR_INFO_TBL;[/<em>c</em>ode]rnrn抛出“尝试读取或写入受保护的内存 这通常指示其它内存已损坏”的异常,请问大师们这为毛???
C#调用C写的dll
我的步骤是这样的,大家帮忙看看。rn1。把<em>c</em>写的<em>dll</em>拷贝到<em><em>c</em>#</em>工程的bin的debug下面。rn2。<em>c</em>的头文件如下rnextern "C" rnAMI_UTIL_API long AMI_UTIL_API_CALL getPropertyName(<em>c</em>onst <em>c</em>har* propertyName1, <em>c</em>har* propertyName2, int propertyNameLength);rnrn所以,在<em><em>c</em>#</em>的代码里面,如下rn[DllImport("AmiUtil.<em>dll</em>", EntryPoint = "getPropertyName", CharSet = CharSet.Uni<em>c</em>ode, CallingConvention = CallingConvention.StdCall)]rnprivate stati<em>c</em> extern long getPropertyName(string propertyName1, string propertyName2, int propertyNameLength);rn3。<em>调用</em>的时候,我写成如下rnstring str1, str2;rnnPropertyNameLength = 0;rngetPropertyName(str1, str2, nPropertyNameLength))rnrnrn正确的步骤和写法应该是怎么样的?
C#调用C DLL文件
这是我<em>调用</em>的 [DllImport("Zhuzhan.<em>dll</em>", EntryPoint = "IdentityAuthenti<em>c</em>ation", CharSet = CharSet.Ansi)]rn stati<em>c</em> extern int IdentityAuthenti<em>c</em>ation(string Div,byte[] RandAndEndata);rn他原始提供的是IdentityAuthenti<em>c</em>ation(<em>c</em>har* Div,<em>c</em>har* RandAndEndata);rn 不过经常报错rnrn运行时遇到了错误。此错误的地址为 0x62ed646b,在线程 0xf9<em>c</em> 上。错误代码为 0x<em>c</em>0000005。此错误可能是 CLR 中的 bug,或者是用户代码的不安全部分或不可验证部分中的 bug。此 bug 的常见来源包括用户对 COM-interop 或 PInvoke 的封送处理错误,这些错误可能会损坏堆栈。rnrn
c#怎么调用C的DLL?
有以下疑惑:rn1、<em>c</em>++的<em>dll</em>和<em>c</em>的<em>dll</em>有什么区别?rn2、<em><em>c</em>#</em><em>调用</em><em>c</em>的<em>dll</em>的时候有什么不同?rnrn有人说,<em><em>c</em>#</em><em>调用</em><em>c</em>的<em>dll</em>还要中间加一层<em>c</em>++的封装?rnrn另,我用v<em>c</em>6写以下的代码,有什么错?rnrn[<em>c</em>ode=C/C++]rn//<em>dll</em>.<em>c</em>pprn#in<em>c</em>lude "Dll.h " rnint add(int a,int b) rn rnreturn a+b; rn rnint subtra<em>c</em>t(int a,int b) rn rnreturn a-b; rn rnrn[/<em>c</em>ode]rn[<em>c</em>ode=C/C++]rn//<em>dll</em>.hrnextern "C " _de<em>c</em>lspe<em>c</em>(<em>dll</em>import) int add(int a,int b); rnextern "C " _de<em>c</em>lspe<em>c</em>(<em>dll</em>import) int subtra<em>c</em>t(int a,int b); rn[/<em>c</em>ode]
C# 调用 C 写的DLL
'int __std<em>c</em>all GetBasi<em>c</em>Info(HANDLE i<em>c</em>dev,unsigned long &CardSN); rnPrivate De<em>c</em>lare Fun<em>c</em>tion GetBasi<em>c</em>Info Lib "CMCC.<em>dll</em>" (ByVal i<em>c</em>dev,ByRef CardSN&) As Longrn rn上面是 VB 6.0 中<em>调用</em> C DLL的代码 rn------------------------------------------------------------------------------------ rn那么 C# 遇到 &CardSN 该怎么写呢,请教,不胜感激 rn
JNI c调用Java 返回值为String
Java定义: publi<em>c</em> String getSignatureInfo() { try { Pa<em>c</em>kageInfo pa<em>c</em>kageInfo = mContext.getPa<em>c</em>kageManager().getPa<em>c</em>kageInfo(mContext.getPa<em>c</em>kageName(), Pa<em>c</em>kageManager.GET_SIGNATUR
c如何调用返回值为String的java函数
java类中定义了一个静态函数,rnpubli<em>c</em> stati<em>c</em> String getData(String id);rn我要在C中通过jni<em>调用</em>它。应该如何<em>调用</em>?rnrn我使用了rn(*env)->CallStati<em>c</em>StringMethod(env, MyClass, getData, id);rn但是编译的时候提示'<em>c</em>onst stru<em>c</em>t JNINativeInterfa<em>c</em>e' has no member named 'CallStati<em>c</em>StringMethod'。rn请大家帮帮忙解答一下,谢谢。
数组指针返回值使用
通过main函数的打印来看,只打印出第一个<em>数组</em>的值,其余值是混乱,请问是哪里出了问题。代码如下:rn[<em>c</em>ode=<em>c</em>]rnint* fun<em>c</em>()rnrn int array[33]=0;rn for(int i=0;i,p[i]);rn rnrn[/<em>c</em>ode]rn
c#调用dll,怎么判定dll函数的返回值
int SetTransMode( int mode )rn 功能:rn设置上位机通讯方式rn 参数:rnmode: 通讯模式rn 1:以太网络rn 2:预约播放(将节目保存到SD卡)rn 3:串口 rn <em>返回值</em>:rn 0: 设置失败rn 1: 设置成功 rn<em>dll</em>的名称是ListenComm.<em>dll</em> 我需要<em>调用</em>这的<em>dll</em>里的SetTransMode方法,并判断<em>返回值</em>是0还是1rn求高手帮忙写个代码,分不多谢谢
才疏学浅,求助,C#调用C++ dll 返回结构体数组指针
[<em>c</em>ode=<em>c</em>]//C++中定义:rnstru<em>c</em>t GPS_TAXI_DATArnrnint id;rnint equip_id;rndouble <em>c</em>ross_x;rndouble <em>c</em>ross_y;rnstring gps_date;rndouble speed;rnint dire<em>c</em>t;rnint status;rnint a<em>c</em><em>c</em>;rnstring re<em>c</em>e_date;rn;rnrnrn_de<em>c</em>lspe<em>c</em>(<em>dll</em>import) GPS_TAXI_DATA * get_gps_data(int year,int month,int day,int hour,int min,int se<em>c</em>,int &GPS_Arry_Num);[/<em>c</em>ode]rnrnC#中:rn [<em>c</em>ode=<em>c</em>sharp][Stru<em>c</em>tLayout(LayoutKind.Sequential)]rn publi<em>c</em> stru<em>c</em>t GPS_TAXI_DATArn rn [MarshalAs(UnmanagedType.I4)]rn int id;rn [MarshalAs(UnmanagedType.I4)]rn int equip_id;rn [MarshalAs(UnmanagedType.I8)]rn double <em>c</em>ross_x;rn [MarshalAs(UnmanagedType.I8)]rn double <em>c</em>ross_y;rn [MarshalAs(UnmanagedType.LPStr)]rn string gps_date;rn [MarshalAs(UnmanagedType.I8)]rn double speed;rn [MarshalAs(UnmanagedType.I4)]rn int dire<em>c</em>t;rn [MarshalAs(UnmanagedType.I4)]rn int status;rn [MarshalAs(UnmanagedType.I4)]rn int a<em>c</em><em>c</em>;rn [MarshalAs(UnmanagedType.LPStr)]rn string re<em>c</em>e_date;rn ;rnrnrnrnrn [DllImport(@"C:\Do<em>c</em>uments and Settings\jiangbinze\桌面\test\test.<em>dll</em>", EntryPoint = "get_gps_data")]rn publi<em>c</em> stati<em>c</em> extern GPS_TAXI_DATA[] get_gps_data(int year, int month, int day, int hour, int min, int se<em>c</em>, ref IntPtr GPS_Arry_Num);rnpubli<em>c</em> void test()rnrn//这里该怎么写?rn[/<em>c</em>ode]rnrnrn[img=https://forum.<em>c</em>sdn.net/PointForum/ui/s<em>c</em>ripts/<em>c</em>sdn/Plugin/003/onion/4.gif][/img][img=https://forum.<em>c</em>sdn.net/PointForum/ui/s<em>c</em>ripts/<em>c</em>sdn/Plugin/003/onion/4.gif][/img]
C语言:数组指针数组指针的理解
<em>数组</em><em>指针</em>和<em>指针</em><em>数组</em>如何分辨呢看他后面的侧重: 例如: 分解:int  *a[3]-  int *[3]=a;  //<em>指针</em><em>数组</em>   int  (*b)[3] int  [3]=*b        //<em>数组</em><em>指针</em> 代码片段:这段代码定义了一个<em>数组</em><em>指针</em>和一个<em>数组</em><em>指针</em>,利用<em>指针</em>的偏移来做测试 #in<em>c</em>lude {   int i=10,j=18,k=56,loop,i;   in
.NET调用DLL返回值问题
DLL方法名:GetParam rn[功能定义]rnHRESULT WINAPI GetParam(HANDLE pDataHandle, LPCTSTR paramName, LPTSTR ParamValue, UINT nMaxValueLenth)rn[功能描述]rn 该接口函数用于取返回参数。rn[参数说明]rn HANDLE pDataHandle:功能<em>调用</em>的处理句柄,由接口函数CreateInsta<em>c</em>e()创建。rn LPCTSTR paramName:返回变量的参数名称。rn LPTSTR ParamValue:保存<em>返回值</em>的变量。rn UINT nMaxValueLenth:变量ParamValue的分配内存字节数。rn==================================================================rnC# Codern[<em>c</em>ode=<em>c</em>sharp]声名:rn [DllImport("HNBridge.<em>dll</em>")]rnpubli<em>c</em> stati<em>c</em> extern long GetParam(long pDataHandle, string paramName,rnref StringBuilder prtStr, int nMaxValueLenth);rn[/<em>c</em>ode]rn<em>调用</em>:rn[<em>c</em>ode=<em>c</em>sharp]rn StringBuilder mes= new StringBuilder(1024);rn his_result = GetParam(handle, "MSG",ref mes, mes.Capa<em>c</em>ity);rn[/<em>c</em>ode]rnrn[<em>c</em>olor=#FF0000]为什么mes总是获取不到<em>返回值</em>,求大神打救。怎样才能获取到<em>返回值</em>???[/<em>c</em>olor]rnrn
关于DLL调用返回值问题
我在程序中<em>调用</em>了一个DLL,我想知道什么时间释放了对这个DLL的<em>调用</em>,该怎么实现呀!
webservice调用dll返回值问题!!
<em><em>c</em>#</em> 写了一个webservi<em>c</em>e,<em>调用</em>一个<em>dll</em>文件!rn#region 导入<em>dll</em>rn[DllImport("a.<em>dll</em>")]rnpubli<em>c</em> stati<em>c</em> extern int add(int i, int j);rn#endregionrnrn[WebMethod] rnpubli<em>c</em> string start()rnrn int m = add(1,1);rn return m.toString();rnrnrn<em>返回值</em>为0;rn<em>dll</em>在windows应用程序中<em>调用</em>正常rn在web应用程序中<em>调用</em>和在webservi<em>c</em>e中<em>调用</em>一样rn请问是什么原因!?
调用DLL模块返回值的问题
我在主程序<em>调用</em>了一个DLL,Publi<em>c</em> sCustomerID as stringrnMainMenu:rnPrivate Sub XPButton3_Cli<em>c</em>k()rnDim sVal As StringrnDim oMis<em>c</em>T<em>c</em>h As Mis<em>c</em>Tou<em>c</em>h.Appli<em>c</em>ationrn rn Set oMis<em>c</em>T<em>c</em>h = New Mis<em>c</em>Tou<em>c</em>h.Appli<em>c</em>ationrn oMis<em>c</em>T<em>c</em>h.Run lCsID, RunAddCustomerrn rn Set oMis<em>c</em>T<em>c</em>h = Nothingrn rn sVal = sCustomerIDrnrnEnd Subrnrn<em>dll</em>:rnrnPrivate Sub btnSave_Cli<em>c</em>k()rnDim sCmd As Stringrnrn If Validate Then Exit Subrn rn If bAdd Thenrn SavePro<em>c</em>rn Elsern UpdatePro<em>c</em>rn End Ifrn rn SunMsgBox "Details Saved!!", MsgYes, MsgInformationrn rn sCustomerID = Trim(txtCustomerNumber.Text)rn Unload MernrnEnd Subrnrn出现的情况是在MainMenu中sCustomerID的值没有传过来,为空值。rn
[C#互操作] C#调用非托管dll接口的返回值问题
各位好!rnrn我编写了一个<em>c</em>的<em>dll</em>,有一个导出接口为testrn[<em>c</em>ode=<em>c</em>]rnlong test()rnrn return 0;rnrn[/<em>c</em>ode]rnrn在C# 中使用时,发现该函数的<em>返回值</em>为 254837555181125632这么一个很长的预料之外的值。rn但是使用C语言编写的程序来加载该<em>dll</em>函数时,得到的值是0,是预料之中的值。rn===========================================rn我猜想是否和编译器不同有关,或者与语言的处理方式有关?。rnrn于是,我更改了<em>dll</em>接口的内部代码,添加了汇编部分rn[<em>c</em>ode=<em>c</em>]rnlong test()rnrn __asm rn //xor eax, eax;rn //xor ebx, ebx;rn //xor e<em>c</em>x, e<em>c</em>x;rn xor edx, edx;rn rn return 0;rn rn rnrn[/<em>c</em>ode]rn只要执行了这个 xor edx, edx;,在C# 中取得的<em>返回值</em>就是想要的0.rn===================================rn以前,用BCB<em>调用</em>v<em>c</em>的接口时,也有类似的问题,如果要返回0,需要额外清空dx,在b<em>c</em>b中才能取得正确的<em>返回值</em>0.rnrn我想知道,为什么C的<em>dll</em>接口中的return 0针对C# 没有效果?
c# 调用c dll 出错,显示找不到c dll
新学<em><em>c</em>#</em>,建了个工程,由于要操作硬件,自己用vs2005做了个<em>c</em> 的<em>dll</em>,工程编译没有问题,但下到WINCE5.0的设备上去之后,程序无法运行,弹了个无法找到<em>dll</em>的错误框。我<em>c</em> 的<em>dll</em>是按照标准流程建立的。请各位帮我看看问题出在哪里?谢谢rnrn<em>c</em> 代码:rn[img=https://img-bbs.<em>c</em>sdn.net/upload/201402/24/1393214823_621984.png][/img]rnrn<em><em>c</em>#</em> 代码:rn[img=https://img-bbs.<em>c</em>sdn.net/upload/201402/24/1393214867_65796.png][/img]rn<em><em>c</em>#</em> 引用代码:rn[img=https://img-bbs.<em>c</em>sdn.net/upload/201402/24/1393214924_153910.png][/img]rn
c++生成dll,为c#调用的问题..
<em>c</em>++生成<em>dll</em>,给<em><em>c</em>#</em><em>调用</em>,rn与rn<em>c</em>++生成<em>dll</em>,给别的语言比如<em>c</em>++用,有区别吗?生成<em>dll</em>的方法是不是一样的?rnrn环境是vs2005,rnrn生成的<em>dll</em>是不是只要可以<em>调用</em><em>dll</em>的地方,都可以<em>调用</em>的?rnrnrn问题比较奇怪,新手,请大侠指点...
C# dll函数 传递 结构体数组指针
<em>调用</em>方不知道结构体<em>数组</em>大小,传进来<em>指针</em>,<em>dll</em>函数把结构体值通过<em>指针</em>传结构体<em>数组</em>值,并返回<em>数组</em>大小,自己写的实现:(txt写的,有小错误,勿怪,编译无错)rn<em>dll</em>中函数 rn<em>c</em>lass1rnrn publi<em>c</em> int fun(IntPtr p)rnrn int <em>c</em>ount=0;rn int i=0;rn <em>c</em>ount=getNumberFun<em>c</em>tion();rn MyUnion [] myUnion=new Myunion[<em>c</em>ount];rn for(i=0;i
c#动态调用dll返回值问题
我在<em>调用</em>delphi开发的一个测试<em>dll</em>时,如果是静态<em>调用</em>可以正确<em>返回值</em>,<em>dll</em>的功能就是在传入字符串的基础上拼接加上Su<em>c</em><em>c</em>ess。rn例如:传入字符串 1234,则返回 1234Su<em>c</em><em>c</em>ess。rn可是当动态<em>调用</em>的就是无法返回正确的结果,<em>调用</em>的时候也没报错,感觉<em>调用</em>成功了,可就是<em>返回值</em>不是正确的。例如:rn传入字符串 1234,<em>返回值</em>则是:12? rn 我动态<em>调用</em><em>dll</em>的方法如下,请高手们看看我那个地方不对:rn rn [<em>c</em>ode=<em>c</em>sharp]rnusing System;rnusing System.Colle<em>c</em>tions.Generi<em>c</em>;rnusing System.ComponentModel;rnusing System.Data;rnusing System.Drawing;rnusing System.Linq;rnusing System.Text;rnusing System.Windows.Forms;rnusing System.Runtime.InteropServi<em>c</em>es;rnrnnamespa<em>c</em>e <em>dll</em>Importrnrn publi<em>c</em> partial <em>c</em>lass Form1 : Formrn rn [DllImport("kernel32.<em>dll</em>", EntryPoint = "LoadLibrary")]rn stati<em>c</em> extern int LoadLibrary([MarshalAs(UnmanagedType.LPStr)] string lpLibFileName);rnrn [DllImport("kernel32.<em>dll</em>", EntryPoint = "GetPro<em>c</em>Address")]rn stati<em>c</em> extern IntPtr GetPro<em>c</em>Address(int hModule, [MarshalAs(UnmanagedType.LPStr)] string lpPro<em>c</em>Name);rnrn [DllImport("kernel32.<em>dll</em>", EntryPoint = "FreeLibrary")]rn stati<em>c</em> extern bool FreeLibrary(int hModule);rnrn delegate int GetBusinessData1(string inputData, ref StringBuilder outputdata);rnrn publi<em>c</em> Form1()rn rn InitializeComponent();rn rnrn private void Form1_Load(obje<em>c</em>t sender, EventArgs e)rn rn tryrn string _<em>dll</em>path = @"G:\program\<em>dll</em>Import\Proje<em>c</em>t2.<em>dll</em>";rn string inputData = "1234";rn StringBuilder AOutputData = new StringBuilder(213273);rnrn int hModule = LoadLibrary(_<em>dll</em>path);rn if (hModule == 0)rn return;rn //得到指向Add函数的<em>指针</em>rn IntPtr intPtr = GetPro<em>c</em>Address(hModule, "GetBusinessData");rn GetBusinessData1 myfun = (GetBusinessData1)Marshal.GetDelegateForFun<em>c</em>tionPointer(intPtr, typeof(GetBusinessData1));rn int iReturn = myfun(inputData, ref AOutputData);rn MessageBox.Show(AOutputData.ToString());rnrn rn <em>c</em>at<em>c</em>h(Ex<em>c</em>eption ex)rn rn MessageBox.Show(ex.ToString());rn rn rn rnrnrnrn[/<em>c</em>ode]
C#获取dll char*返回值
C:rnextern "C" __de<em>c</em>lspe<em>c</em>(<em>dll</em>export) <em>c</em>har * Show2()rnrn unsigned <em>c</em>har output[32] = '1','2','3','4','5','6','7','8','9' ;rn unsigned <em>c</em>har *show = &output[0];rn <em>c</em>har * show2 = (<em>c</em>har *)show;rn return show2;rnrnrnrnC#rnrn[DllImport(@"C:\Users\HJD\Do<em>c</em>uments\Visual Studio 2015\Proje<em>c</em>ts\CUseDll\CUseDll\bin\Debug\DLLCPP.<em>dll</em>", CharSet = CharSet.Ansi, Exa<em>c</em>tSpelling = false)]rn publi<em>c</em> stati<em>c</em> extern string Show2();rnrn string re<em>c</em>eive = Show2();rnrn执行到这里就崩溃了 求解。
调用CoCreateInstanceEx()函数的返回值为下..
<em>调用</em>CoCreateInstan<em>c</em>eEx()函数的<em>返回值</em>为拒绝访问,请问服务器端是否要进行一定的设置?
powerbuilder调用vc++的dll返回值显示为乱码,怎么办?
用v<em>c</em>++做了一个<em>dll</em>,用ado从sybase中取数据,数据库字符集是<em>c</em>p936,在v<em>c</em>环境中把读出来的数据用MessageBox(),弹出来看没有问题,但用powerbuilder9<em>调用</em><em>dll</em>显示出来的就是乱码了。而直接在v<em>c</em>中不读数据库,直接返回一个字符串,在pb中看就没有问题。<em>dll</em>返回的类型是<em>c</em>har*。请问有人知道是怎么回事吗?
JNative调用dll返回值为-1怎么解决
JNative<em>调用</em><em>dll</em><em>返回值</em>为-1,文档上说成功为0,其他都是失败![图片说明](https://img-ask.<em>c</em>sdn.net/upload/201905/13/1557720753_813941.png)rn什么问题呀
VB中如何调用DLL返回值为字符串指针的无参函数
<em>dll</em>(port_<em>dll</em>.<em>dll</em>)中提供一个函数:rn<em>c</em>har * ReadOnLine();rn在VC++:rn定义rn<em>c</em>har * _std<em>c</em>all ReadOnLine();rn使用:rn<em>c</em>har *ret;rnret=ReadOnLine();rn就可以得到想要的数据。rnrn在VB中我这样定义rnDe<em>c</em>lare Fun<em>c</em>tion ReadOnLine Lib "port_<em>dll</em>.<em>dll</em>" () As Long rnrn请教下在VB中如何得到这个数据。rn在线等。
C#调用C的dll的CString的问题
拿到的<em>dll</em>是C++写的,里面有CString的数据类型,用C#该怎么用呢?高手指正一下。
c#调用C DLL报错,救助!
[<em>c</em>ode=<em>c</em>]// 下列 ifdef 块是创建使从 DLL 导出更简单的rn// 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 DYNAMICPWDCREATOR_EXPORTSrn// 符号编译的。在使用此 DLL 的rn// 任何其他项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将rn// DYNAMICPWDCREATOR_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的rn// 符号视为是被导出的。rn#ifdef DYNAMICPWDCREATOR_EXPORTSrn#define DYNAMICPWDCREATOR_API __de<em>c</em>lspe<em>c</em>(<em>dll</em>export)rn#elsern#define DYNAMICPWDCREATOR_API __de<em>c</em>lspe<em>c</em>(<em>dll</em>import)rn#endifrnrnDYNAMICPWDCREATOR_API bool Che<em>c</em>kPwd(<em>c</em>har* szPwd);rnDYNAMICPWDCREATOR_API <em>c</em>har* GetPwd();rn[/<em>c</em>ode]rnrn我做的C#代码rnrn[<em>c</em>ode=<em>c</em>sharp] [DllImport("Dynami<em>c</em>PwdCreator.<em>dll</em>")]rn publi<em>c</em> extern stati<em>c</em> string GetPwd();rn publi<em>c</em> Form1()rn rn InitializeComponent();rn rnrn private void button1_Cli<em>c</em>k(obje<em>c</em>t sender, EventArgs e)rn rn label1.Text = GetPwd();rn rn[/<em>c</em>ode]rnrn运行时出现rn尝试读取或写入受保护的内存。这通常指示其他内存已损坏rnrn不知道哪里有问题,请指点
再问,C#调用外部C的dll
原来地址:http://<em>c</em>ommunity.<em>c</em>sdn.net/Expert/Topi<em>c</em>View.asp?id=5738054rnrn问题出在:猜测应该是结构体的传值问题。rnstru<em>c</em>t <em>c</em>har[]在<em><em>c</em>#</em>定义成<em>c</em>har[] byte[]都说无法封送,长度不对。rn我把stru<em>c</em>t里的<em>c</em>har []换成string,没错误了。但是out返回出的结果是错误的。rn根据以往的帖子我把out换成ref。同样没有<em>返回值</em>。rnrn急救。rn困惑了两三天了。rn谢谢。rn
关于C#调用C写的Dll的问题
C API声明如下:rnint WINAPI SMGPSendSingle( rn int nNeedReport,rn int nMsgLevel,rn <em>c</em>onst <em>c</em>har* sServi<em>c</em>eID,rn int nMsgFormat,rn <em>c</em>onst <em>c</em>har* sFeeType,rn <em>c</em>onst <em>c</em>har* sFeeCode,rn <em>c</em>onst <em>c</em>har* sFixedFee, rn <em>c</em>onst <em>c</em>har* sValidTime,rn <em>c</em>onst <em>c</em>har* sAtTime,rn <em>c</em>onst <em>c</em>har* sSr<em>c</em>TermID,rn <em>c</em>onst <em>c</em>har* sChargeTermID,rn <em>c</em>onst <em>c</em>har* sDestTermID,rn int nMsgLen,rn <em>c</em>onst <em>c</em>har* sMsgContent,rn <em>c</em>har* sMsgID,rn int* pnErrorCode,rn <em>c</em>har* pMsgType = NULL,rn <em>c</em>har* pReserved = NULL,rn <em>c</em>onst int* pTP_pid = NULL,rn <em>c</em>onst int* pTP_udhi = NULL,rn <em>c</em>onst <em>c</em>har* pLinkID = NULL,rn <em>c</em>onst <em>c</em>har* pMsgSr<em>c</em> = NULL,rn <em>c</em>onst int* pChargeUserType = NULL,rn <em>c</em>onst int* pChargeTermType = NULL,rn <em>c</em>onst <em>c</em>har* pChargeTermPseudo =NULL,rn <em>c</em>onst int* pDestTermType = NULL,rn <em>c</em>onst <em>c</em>har* pDestTermPseudo = NULL,rn <em>c</em>onst int* pPkTotal = NULL,rn <em>c</em>onst int* PkNumber = NULL,rn <em>c</em>onst int* pSubmitMsgType = NULL,rn <em>c</em>onst int* pSPDealResult = NULL, rn <em>c</em>onst <em>c</em>har* pMServi<em>c</em>eID = NULLrn );rnrn我用C#写的<em>调用</em>代码如下:rn[DllImport("SmgpDll.<em>dll</em>", EntryPoint = "SMGPSendSingle")]rn private stati<em>c</em> extern int SMGPSendSingle( rn int nNeedReport,int nMsgLevel,string sServi<em>c</em>eID,int nMsgFormat,string sFeeType,string sFeeCode, //[7]rn string sFixedFee,string sValidTime,string sAtTime,string sSr<em>c</em>TermID,string sChargeTermID, //[22]rn string sDestTermID,int nMsgLen,string sMsgContent,rn [Out]StringBuilder sMsgID, ref int pnErrorCode, StringBuilder pMsgType, StringBuilder pReserved, ref int pTP_pid,rn ref int pTP_udhi, string pLinkID, string pMsgSr<em>c</em>, ref int pChargeUserType,rn ref int pChargeTermType, string pChargeTermPseudo, ref int pDestTermType, string pDestTermPseudo,rn ref int pPkTotal, ref int PkNumber, ref int pSubmitMsgType, ref int pSPDealResult, string pMServi<em>c</em>eID);rnrn每次<em>调用</em>就报"尝试读取或写入受保护的内存。这通常指示其他内存已损坏。"rn请高手解答
会C#调用C dll的进
C语言函数声明为:rnbool bSendMsg(HANDLE hComm,<em>c</em>har *szMsg,<em>c</em>har *szPhNbr,<em>c</em>har *szSCA,int iSMSFormat,<em>c</em>har *szNextMsg,<em>c</em>har *szErrInfo);rnrn入口参数:hComm 串口句柄,szMsg 待发的短信内容,szSCA 短信中心号码,iSMSFormat 短信编码格式rn出口参数:szNextMsg 超长部分的待发内容, sErrInfo 出错信息rnrn其中szSCA是结构体rnstru<em>c</em>t STRUCommInfornrn int iBaudRate;rn <em>c</em>har szSCA[30];rn;rn我的<em><em>c</em>#</em>声明为rnrn [DllImport("SMSCom.<em>dll</em>", EntryPoint = "bSendMsg")]rn publi<em>c</em> stati<em>c</em> extern bool bSendMsg(IntPtr hComm,string szMsg,string szPhNbr,string szSCA,int iSMSFormat, StringBuilder szNextMsg, StringBuilder szErrInfo);rn rnrnrn结构体为:rn[Stru<em>c</em>tLayout(LayoutKind.Sequential)]rn publi<em>c</em> stru<em>c</em>t STRUCommInforn rn publi<em>c</em> int iBaudRate;rn [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 30)] rn publi<em>c</em> string szSCA;rn rnrn<em>调用</em>方法:rnrn其中stru.szSCA通过上个函数<em>调用</em>,已返回 “8613800555500”rnCallDll.bSendMsg(ptr, "在干嘛呢", "15215553319", stru.szSCA, 0, sd, s<em>c</em>);rn然后报:尝试读取或写入受保护的内存错误,期待高手看下我的代码参数是否传错了rnrn
c# 调用c dll 无法找到入口
代码如下: C++ 接口如下:rn DWORD dwKeyIndex; //输送系统分配的索引rn DWORD bandRate=0; // 暂时没用 rn DWORD rv; // <em>返回值</em> 成功 USBKEY_SUCCESS 失败 USBKEY_KEY_REMOVEDrn KEYHANDLE hKey; //输出句柄rn Usb_Conne<em>c</em>t(dwKeyIndex,bandRate,&hKey)rnrnC# <em>调用</em> 该接口:rnusing using System.Runtime.InteropServi<em>c</em>es;rn.....rnrn[ DllImport(@"C:\ZfCryptApi.<em>dll</em>", EntryPoint = "Usb_Conne<em>c</em>t")]rn rn publi<em>c</em> stati<em>c</em> extern UInt32 Usb_Conne<em>c</em>t(UInt32 dwKeyIndex,UInt32 bandRate, ref IntPtr hkey); rn private void button1_Cli<em>c</em>k(obje<em>c</em>t sender, EventArgs e)rn rn UInt32 dwindex = Convert.ToUInt32(textBox1.Text);rn IntPtr hkey = IntPtr.Zero;rn UInt32 rv=Usb_Conne<em>c</em>t(dwindex, 0,ref hkey);rn label1.Text = rv.ToString();rn rn运行结果:无法在 DLL“C:\ZfCryptApi.<em>dll</em>”中找到名为“Usb_Conne<em>c</em>t”的入口点。我的<em>调用</em>是否正确,望大侠指教。rn
C#调用C/C++ dll问题
C/C++ DLL里的函数定义:rnextern "C" __de<em>c</em>lspe<em>c</em>(<em>dll</em>export) int __std<em>c</em>all pfs_login (<em>c</em>har request[], <em>c</em>har response[],int bufSize, <em>c</em>har address[]);rnresponse是输出参数,其他的全部是输入参数rnrn在<em><em>c</em>#</em>里怎么<em>调用</em>这个<em>dll</em>,不知道怎么写。谢谢。
C# 调用 C/C++ DLL的问题!
方法都能成功<em>调用</em>,但是回调函数都不能<em>调用</em>,我用的委托。
C#调用带结构体指针的C Dll的方法
在C#中<em>调用</em>C(C++)类的DLL的时候,有时候C的接口函数包含很多参数,而且有的时候这些参数有可能是个结构体,而且有可能是结构体<em>指针</em>,那么在C#到底该如何安全的<em>调用</em>这样的DLL接口函数呢?本文将详细介绍如何<em>调用</em>各种参数的方法。 一、<em>调用</em>接口仅含普通变量 int fnAdd(int num1,int num2); 那么在C#<em>调用</em>这种函数最简单了,直接用函数原型即可,如下: [Dll...
c# 调用c/c++ dll 参数问题
该文章纯属笔记,遇到一个问题,就在纪录到这里,方便以后的查询。 1:我们有时候想得到<em>c</em>/<em>c</em>++ 参数的<em>返回值</em>。(2016-10-13)              C/C++函数原型:                    MotionControl(<em>c</em>har *<em>c</em>ommand,<em>c</em>har *<em>c</em>onfirm,<em>c</em>har *message);             此处我们想获取mess
C#调用C/C++的dll须知
1. C#类型与C/C++类型的对应关系 基本数据类型(C# C/C++) System.Int32,int int, long System.Int64,int64 long long, __int64 System.Char, <em>c</em>har <em>c</em>har, byte, unsigned <em>c</em>har System.Int16, short
C#调用C的dll 请高手指点
//test<em>dll</em>.<em>dll</em>rnrn//这是<em>dll</em>的声明rnstru<em>c</em>t Player rnrn <em>c</em>har name[256];rn long age;rn;rnEXPORT bool CALLBACK GetPlayerInfo(TCHAR *pPath, Player *pPlayers, int *pCount, <em>c</em>har *pGameName);rnrn//这是用C来<em>调用</em>rn#in<em>c</em>lude rn#in<em>c</em>lude "test<em>dll</em>.h"rn#pragma <em>c</em>omment(lib, "test<em>dll</em>.lib")rnint main()rnrn Player player[12];rn int <em>c</em>ount = 0;rn <em>c</em>har gameName[256] = 0 ;rn GetPlayerInfo(TEXT("<em>c</em>:\\a"), player, &<em>c</em>ount, gameName);rn return 0;rnrnrn//请问怎样在C#中<em>调用</em>?
c#调用cdll出问题
本人想将hhed.<em>c</em>(8000多行)做成<em>dll</em>后在<em><em>c</em>#</em>中<em>调用</em>.<em>dll</em>做好了,在<em><em>c</em>#</em>中<em>调用</em>后,运行时出现下列问题rn1.我是在<em>dll</em>的def文件只有export一个hhed_main(将原来的main函数改掉了的),hhed_main中<em>调用</em>hhed.<em>c</em>中的其它子函数,那些子函数也需要在def文件中也要进行export声明么?rnhhed.<em>c</em>中的hhed_main首行已经改为rn__de<em>c</em>lspe<em>c</em>(<em>dll</em>export) int __std<em>c</em>all hhed_main(int arg<em>c</em>, <em>c</em>har *argv[])rnrn2.<em><em>c</em>#</em>中的<em>dll</em>import如下rn[DllImport("HHEdDLL.<em>dll</em>", EntryPoint = "hhed_main", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]rn publi<em>c</em> stati<em>c</em> extern int hhed_main(Int16 arg<em>c</em>, [MarshalAs(UnmanagedType.LPTStr)]string word);rnrn其中string word对应的是hhed_main中的<em>c</em>har *argv[]参数.运行的时候出现问题为Attempted to read or write prote<em>c</em>ted memory. This is often an indi<em>c</em>ation that other memory is <em>c</em>orrupt.我将string word改成其它类型还是出现同样的问题,去掉[MarshalAs(UnmanagedType.LPTStr)]后还是出现同样的问题,怎么样匹配<em>c</em>中的<em>c</em>har *argv[]呢?出现attepmpted......那个错误的原因是什么呢?请高手指教,谢谢!
C#调用C的dll文件问题
现在我有个C写的<em>c</em>.<em>dll</em>文件,想在C#里<em>调用</em>,有一个函数是传给结构体的,不知道在C#中怎么写这函数。rn这个函数是:rnint initialize(CCallba<em>c</em>kInterfa<em>c</em>e *CCallba<em>c</em>kInterfa<em>c</em>e)rn参数名 类型 描述rnCCallba<em>c</em>kInterfa<em>c</em>e CCallba<em>c</em>kInterfa<em>c</em>e* 回调函数<em>指针</em>结构体rnrn我在<em>c</em>.h里看到CCallba<em>c</em>kInterfa<em>c</em>e这结构是:rnrnstru<em>c</em>t _CALLBACKINTERFACErn void (*onGetCapabilityToken)(); rn void (*onConne<em>c</em>ted)(); rn void (*onConne<em>c</em>tError)(int reason); rn...rn;rntypedef stru<em>c</em>t _CALLBACKINTERFACE CCallba<em>c</em>kInterfa<em>c</em>e;rnrn现在我在C#中这样用rnpubli<em>c</em> stru<em>c</em>t _CALLBACKINTERFACErn void onGetCapabilityToken(); rn void onConne<em>c</em>ted(); rn void onConne<em>c</em>tError(int reason); rn ...rn rnrn[DllImport("<em>c</em>.<em>dll</em>", EntryPoint = "initialize")] //初始化rn publi<em>c</em> stati<em>c</em> extern int initialize(_CALLBACKINTERFACE CCallba<em>c</em>kInterfa<em>c</em>e); rnrn我不知道对不对,因为我不知道在窗口<em>c</em>s中<em>调用</em>这个initialize的时候_CALLBACKINTERFACE这个要怎么传,知道的指教下,谢谢
C#调用C程序dll的内存问题
项目需要:实现C#<em>调用</em>C语言写的的算法,该C程序需要封装成<em>dll</em>。C程序本身可以跑通没有任何问题,随即写了一个C#demo来<em>调用</em>该算法。报如下图的错误rn[img=https://img-bbs.<em>c</em>sdn.net/upload/201801/02/1514857716_481818.png][/img]rn由于测试阶段,所以该C程序没有参数接口,所以排除网上一些帖子说的参数类型不匹配的原因。rn进入<em>dll</em>内部进行调试,报如下错误rn[img=https://img-bbs.<em>c</em>sdn.net/upload/201801/02/1514857382_79391.png][/img]rn经调试发现是第二块内存<em>c</em>ontinental_47_grid分配失败导致的上图错误,第一块aodgrid分配正常。rn[img=https://img-bbs.<em>c</em>sdn.net/upload/201801/02/1514857404_960180.png][/img]rn但如果手动把分配内存大小调小可以分配成功。如此看来是内存空间不够的问题导致的,但重点是C程序本身运行没有出现过这样的问题。难道是<em>dll</em>本事有内存限制机制?rn卡了很多天了,还望各路大神帮忙看看rn以下是C#<em>调用</em>代码:rnpubli<em>c</em> stati<em>c</em> <em>c</em>lass NativeMethodrnrn[DllImport("kernel32.<em>dll</em>", EntryPoint = "LoadLibrary")]rnpubli<em>c</em> stati<em>c</em> extern int LoadLibrary(rn[MarshalAs(UnmanagedType.LPStr)] string lpLibFileName);rn [DllImport("kernel32.<em>dll</em>", EntryPoint = "GetPro<em>c</em>Address")]rn publi<em>c</em> stati<em>c</em> extern IntPtr GetPro<em>c</em>Address(int hModule,rn [MarshalAs(UnmanagedType.LPStr)] string lpPro<em>c</em>Name);rnrn [DllImport("kernel32.<em>dll</em>", EntryPoint = "FreeLibrary")]rn publi<em>c</em> stati<em>c</em> extern bool FreeLibrary(int hModule);rnrn stati<em>c</em> int Main(string[] args)rn rn int hModule = NativeMethod.LoadLibrary("AHI_AOD_noarg.<em>dll</em>");rn if (hModule == 0)rn return 1;rn IntPtr intPtr = NativeMethod.GetPro<em>c</em>Address(hModule, "AHI");rn AHI AHI = (AHI)Marshal.GetDelegateForFun<em>c</em>tionPointer(intPtr, typeof(AHI)); rn AHI();rn return 0;rn rnrnrn
C# 调用C语言DLL问题
我用C# <em>调用</em>C语言DLL问题rnrnC 给出的例子是:rnEXPORT long _std<em>c</em>all addCon(int iType ,<em>c</em>har *szPar,int iID);rnrn而我C#这么写的:rnpubli<em>c</em> stati<em>c</em> extern long addCon(int iType, string szPar, int iID)rnrn<em>调用</em>出的问题:rn未能从程序集“Couns_Test, Version=1.0.0.0, Culture=neutral, Publi<em>c</em>KeyToken=null”中加载类型“Couns_Test.Form1”,因为方法“addCon”没有实现(没有 RVA)。rnrn请问各位,这个问题是怎么解决。rn
C# 调用C/C++ dll 问题
C/C++ rn DWORD _std<em>c</em>all GetSerialNumrn(rn IN HANDLE hCard, rn OUT BYTE bSerial[NUMLEN] rn);rnrn我写的:rn [DllImport("HS.<em>dll</em>", EntryPoint = "GetSerialNum")]rn publi<em>c</em> stati<em>c</em> extern uint GetSerialNum([In]uint handl, [MarshalAs(UnmanagedType.LPArray)] byte[] data);rnrn<em>调用</em>方法:rn byte[] array= new byte[255];rn Common.GetSerialNum(KeyHandle, array);rnrn返回来的array 我用En<em>c</em>oding.Default.GetString(array)转换,拿到的是乱码rn
C#中调用C生成的Dll 问题
C#中<em>调用</em>C生成的Dll,总报程序发生异常错误..不懂为什么..rnC的代码:rnint Sum(int a,int b)rnrn return a+b;rnrnC#中<em>调用</em>的代码:rn <em>c</em>lass Dllrn rn [DllImport("EssDll.<em>dll</em>",EntryPoint="Sum",rn CharSet=CharSet.Auto,CallingConvention=CallingConvention.StdCall)]rn publi<em>c</em> stati<em>c</em> extern int Sum(int a,int b);rnrn /// rn /// 应用程序的主入口点。rn /// rn [STAThread]rn stati<em>c</em> void Main(string[] args)rn rn Console.Write("Dll测试开始\n");rn Console.Write(Sum(5,6).ToString());rn Console.Write("\n前面<em>调用</em>Dll完成!\n");rn string ok = Console.ReadLine();rn rn rnrnC生成Dll是用Cywin来生成的,命令如下:rnEssDll:rn g<em>c</em><em>c</em> -g -<em>c</em> ./sr<em>c</em>/EssDll.<em>c</em> -I./in<em>c</em>lude -L./librn <em>dll</em>wrap -o EssDll.<em>dll</em> EssDll.o --def ./sr<em>c</em>/EssDll.defrn mv ./EssDll.o ./obj/rn mv ./EssDll.<em>dll</em> ./bin/rnrn*.def文件如下:rnLIBRARY EssDllrnEXPORTS rn Sum
c中能否调用c#写的dll?
如题
C#调用C dll出现的问题
C <em>dll</em> 代码中的输出函数1rnextern "C" __de<em>c</em>lspe<em>c</em>(<em>dll</em>export) int Conne<em>c</em>tServer(<em>c</em>har <em>c</em>User[64],rn <em>c</em>har <em>c</em>Pass[64],<em>c</em>har <em>c</em>Ip[32],<em>c</em>har <em>c</em>NEName[64]);rnrnC#对应的函数形式我写成如下:rnpubli<em>c</em> stati<em>c</em> extern int Conne<em>c</em>tServer(byte[] <em>c</em>User, byte[] <em>c</em>Pass, byte[] <em>c</em>Ip, byte[] <em>c</em>NEName);rn rn这样使用:rn byte[] user = new byte[64];rn byte[] password = new byte[64];rn byte[] ip = new byte[32];rn byte[] NEName = new byte[64];rn Conne<em>c</em>tServer(user, password, ip, NEName);rnrn最后报错,报错内容:外部组件发生异常,难道是我的参数类型有问题?rnrnrnrnrnC <em>dll</em> 代码中的输出函数2rnextern "C" __de<em>c</em>lspe<em>c</em>(<em>dll</em>export) void disConne<em>c</em>tServer();rnC#对应的函数形式rnpubli<em>c</em> stati<em>c</em> extern void disConne<em>c</em>tServer();rn这个连参数也没有,<em>调用</em>后报错:尝试读取或写入受保护的内存。这通常指示其他内存已损坏。rnrnrn请问大概是什么原因,是我的C <em>dll</em>有问题,还是C#的使用方法有问题,谢谢!
C#调用C封装dll结构体指针
原来一直用MFC做,最近项目要用C#学了学基本的东西还是有差距啊,<em>调用</em>底层函数的时候卡主了,求路过大神帮忙rn先是C++的定义:rntypedef stru<em>c</em>t TagData_stru<em>c</em>trn double value; //返回点的数值rn long time; //返回点的时间,秒rn int status; //返回点的状态rnTagData;rnrn初始化:rn<em>c</em>har *tagNames[MEM_PAGE_ITEMS];rnfor ( int i=0; i
C#调用C语言的dll问题
在C#里面<em>调用</em>一个用C语言写的<em>dll</em>,如果是用C去<em>调用</em>是这样的:rn<em>c</em>har str[256];rnstr<em>c</em>py(str,"`hello!");rna = (long)str; rn在C#里面不能直接这么用,我把C代码封装成unsafe段,还是解决不了。rnunsafernrn<em>c</em>har str[256];rnstr<em>c</em>py(str,"`hello!");rna = (long)str;rnrn不知道是用的不对还是这个方法压根行不通。请高手指点,在线等待。谢谢。rn
C#如何调用C语言实现的dll
在网上搜索到了一个des加密的<em>c</em>语言实现,rn.h文件:rn[<em>c</em>ode=C/C++]rn/* d3des.h -rn *rn * Headers and defines for d3des.<em>c</em>rn * Graven Imagery, 1992.rn *rn * Copyright (<em>c</em>) 1988,1989,1990,1991,1992 by Ri<em>c</em>hard Outerbridgern * (GEnie : OUTER; CIS : [71755,204])rn */rnrn#define D2_DES /* in<em>c</em>lude double-length support */rn#define D3_DES /* in<em>c</em>lude triple-length support */rnrn#ifdef D3_DESrn#ifndef D2_DESrn#define D2_DES /* D2_DES is needed for D3_DES */rn#endifrn#endifrnrn#define DES_EN0 0 /* MODE == en<em>c</em>rypt */rn#define DES_DE1 1 /* MODE == de<em>c</em>rypt */rnrn/* A useful alias on 68000-ish ma<em>c</em>hines, but NOT USED HERE. */rnrntypedef union rn unsigned long blok[2];rn unsigned short word[4];rn unsigned <em>c</em>har byte[8];rn M68K;rnrnextern void deskey(unsigned <em>c</em>har *, short);rn/* hexkey[8] MODErn * Sets the internal key register a<em>c</em><em>c</em>ording to the hexade<em>c</em>imalrn * key <em>c</em>ontained in the 8 bytes of hexkey, a<em>c</em><em>c</em>ording to the DES,rn * for en<em>c</em>ryption or de<em>c</em>ryption a<em>c</em><em>c</em>ording to MODE.rn */rnrnextern void usekey(unsigned long *);rn/* <em>c</em>ookedkey[32]rn * Loads the internal key register with the data in <em>c</em>ookedkey.rn */rnrnextern void <em>c</em>pkey(unsigned long *);rn/* <em>c</em>ookedkey[32]rn * Copies the <em>c</em>ontents of the internal key register into the storagern * lo<em>c</em>ated at &<em>c</em>ookedkey[0].rn */rnrnextern void des(unsigned <em>c</em>har *, unsigned <em>c</em>har *);rn/* from[8] to[8]rn * En<em>c</em>rypts/De<em>c</em>rypts (a<em>c</em><em>c</em>ording to the key <em>c</em>urrently loaded in thern * internal key register) one blo<em>c</em>k of eight bytes at address 'from'rn * into the blo<em>c</em>k at address 'to'. They <em>c</em>an be the same.rn */rnrn#ifdef D2_DESrnrn#define desDkey(a,b) des2key((a),(b))rnextern void des2key(unsigned <em>c</em>har *, short);rn/* hexkey[16] MODErn * Sets the internal key registerS a<em>c</em><em>c</em>ording to the hexade<em>c</em>imalrn * keyS <em>c</em>ontained in the 16 bytes of hexkey, a<em>c</em><em>c</em>ording to the DES,rn * for DOUBLE en<em>c</em>ryption or de<em>c</em>ryption a<em>c</em><em>c</em>ording to MODE.rn * NOTE: this <em>c</em>lobbers all three key registers!rn */rnrnextern void Ddes(unsigned <em>c</em>har *, unsigned <em>c</em>har *);rn/* from[8] to[8]rn * En<em>c</em>rypts/De<em>c</em>rypts (a<em>c</em><em>c</em>ording to the keyS <em>c</em>urrently loaded in thern * internal key registerS) one blo<em>c</em>k of eight bytes at address 'from'rn * into the blo<em>c</em>k at address 'to'. They <em>c</em>an be the same.rn */rnrnextern void D2des(unsigned <em>c</em>har *, unsigned <em>c</em>har *);rn/* from[16] to[16]rn * En<em>c</em>rypts/De<em>c</em>rypts (a<em>c</em><em>c</em>ording to the keyS <em>c</em>urrently loaded in thern * internal key registerS) one blo<em>c</em>k of SIXTEEN bytes at address 'from'rn * into the blo<em>c</em>k at address 'to'. They <em>c</em>an be the same.rn */rnrnextern void makekey(<em>c</em>har *, unsigned <em>c</em>har *);rn/* *password, single-length key[8]rn * With a double-length default key, this routine hashes a NULL-terminatedrn * string into an eight-byte random-looking key, suitable for use with thern * deskey() routine.rn */rnrn#define makeDkey(a,b) make2key((a),(b))rnextern void make2key(<em>c</em>har *, unsigned <em>c</em>har *);rn/* *password, double-length key[16]rn * With a double-length default key, this routine hashes a NULL-terminatedrn * string into a sixteen-byte random-looking key, suitable for use with thern * des2key() routine.rn */rnrn#ifndef D3_DES /* D2_DES only */rnrn#define useDkey(a) use2key((a))rn#define <em>c</em>pDkey(a) <em>c</em>p2key((a))rnrnextern void use2key(unsigned long *);rn/* <em>c</em>ookedkey[64]rn * Loads the internal key registerS with the data in <em>c</em>ookedkey.rn * NOTE: this <em>c</em>lobbers all three key registers!rn */rnrnextern void <em>c</em>p2key(unsigned long *);rn/* <em>c</em>ookedkey[64]rn * Copies the <em>c</em>ontents of the internal key registerS into the storagern * lo<em>c</em>ated at &<em>c</em>ookedkey[0].rn */rnrn#else /* D3_DES too */rnrn#define useDkey(a) use3key((a))rn#define <em>c</em>pDkey(a) <em>c</em>p3key((a))rnrnextern void des3key(unsigned <em>c</em>har *, short);rn/* hexkey[24] MODErn * Sets the internal key registerS a<em>c</em><em>c</em>ording to the hexade<em>c</em>imalrn * keyS <em>c</em>ontained in the 24 bytes of hexkey, a<em>c</em><em>c</em>ording to the DES,rn * for DOUBLE en<em>c</em>ryption or de<em>c</em>ryption a<em>c</em><em>c</em>ording to MODE.rn */rnrnextern void use3key(unsigned long *);rn/* <em>c</em>ookedkey[96]rn * Loads the 3 internal key registerS with the data in <em>c</em>ookedkey.rn */rnrnextern void <em>c</em>p3key(unsigned long *);rn/* <em>c</em>ookedkey[96]rn * Copies the <em>c</em>ontents of the 3 internal key registerS into the storagern * lo<em>c</em>ated at &<em>c</em>ookedkey[0].rn */rnrnextern void make3key(<em>c</em>har *, unsigned <em>c</em>har *);rn/* *password, triple-length key[24]rn * With a triple-length default key, this routine hashes a NULL-terminatedrn * string into a twenty-four-byte random-looking key, suitable for use withrn * the des3key() routine.rn */rnrn#endif /* D3_DES */rn#endif /* D2_DES */rnrn/* d3des.h V5.09 rwo 9208.04 15:06 Graven Imageryrn ********************************************************************/rn[/<em>c</em>ode]
关于C#调用cdll是的问题
#define IMAGE_WIDTH (352)rn#define IMAGE_HEIGHT (288)rn uint8_t frameData[65536];rn uint8_t imageRGB[IMAGE_WIDTH* IMAGE_HEIGHT*3];rnrn void* g_de<em>c</em>_handler = h264_de<em>c</em>_init();rn if(!g_de<em>c</em>_handler) return FALSE;rn//开始解码rnwhile(1)。。。。。。。。。。。。。。。。。。rnrn我现在的改写的C#代码是stati<em>c</em> void Main(string[] args)rn rn <em>c</em>onst int IMAGE_WIDTH =352;rn <em>c</em>onst int IMAGE_HEIGHT=288;rn byte [] frameData;rn frameData =new byte [65536];rn byte[] imageRGB;rn imageRGB = new byte[IMAGE_WIDTH * IMAGE_HEIGHT * 3];rn下面就有问题了。。不知怎么写了。。。求大侠解释。在线等。rn
如何用C#调用C写的dll???
各位大侠 我现在自己封装了一个C的<em>dll</em>,然后用C#<em>调用</em>它,但是C#里面没有“头文件”这东西,这该怎么<em>调用</em>呢?rnrn[<em>c</em>ode=C/C++][/<em>c</em>ode]rn// The <em>c</em>JSON stru<em>c</em>ture:rntypedef stru<em>c</em>t <em>c</em>JSON rn stru<em>c</em>t <em>c</em>JSON *next,*prev; rn stru<em>c</em>t <em>c</em>JSON *<em>c</em>hild; rn int type; // The type of the item, as above.rnrn <em>c</em>har *valuestring; // The item's string, if type==<em>c</em>JSON_Stringrn int valueint; // The item's number, if type==<em>c</em>JSON_Numberrn double valuedouble; // The item's number, if type==<em>c</em>JSON_Numberrnrn <em>c</em>har *string; // The item's name string, if this item is the <em>c</em>hild of, or is in the list of subitems of an obje<em>c</em>t.rn <em>c</em>JSON;rnrntypedef stru<em>c</em>t <em>c</em>JSON_Hooks rn void *(*mallo<em>c</em>_fn)(size_t sz);rn void (*free_fn)(void *ptr);rn <em>c</em>JSON_Hooks;rnrn// Supply mallo<em>c</em>, reallo<em>c</em> and free fun<em>c</em>tions to <em>c</em>JSONrn__de<em>c</em>lspe<em>c</em>(<em>dll</em>export) void <em>c</em>JSON_InitHooks(<em>c</em>JSON_Hooks* hooks);rnrnrnrn[<em>c</em>ode=C#][/<em>c</em>ode]rnrnnamespa<em>c</em>e Devi<em>c</em>eAppli<em>c</em>ation1rnrn publi<em>c</em> partial <em>c</em>lass Form1 : Formrn rn publi<em>c</em> Form1()rn rn InitializeComponent();rn rnrn [DllImport("<em>c</em>Json.<em>dll</em>")]rn publi<em>c</em> stati<em>c</em> extern void <em>c</em>JSON_InitHooks(<em>c</em>JSON_Hooks* hooks);rn rnrnrn<em>c</em>JSON_Hooks和<em>c</em>JSON 是.h里面定义的结构体,但是在C#里面不认这个结构体,是不是C#里面要重写这个结构体呢? 如果是重写的话<em>c</em>JSON_Hooks这个结构体中的函数<em>指针</em>和返回类型是<em>指针</em>的函数<em>指针</em>该怎么写呢?rnrn希望知道的大哥多帮帮忙,先谢了。
C# 调用C dll文件,无法加载问题
如图在VS中直接引用添加时出现错误。需要直接将<em>dll</em>添加到项目生成的exe同一个文件夹下,或者在Import时采样绝对路径或相对路径方式。
C#调用C语言DLL文件示范
C#<em>调用</em>C语言DLL文件示范 C#<em>调用</em>C语言DLL文件示范 C#<em>调用</em>C语言DLL文件示范
C# 调用C/C++ DLL库的回调函数
1、在 C/C++端 定义一个函数<em>指针</em> Typedef void (*TESTBACK)(int a, int b); 定义一个带函数<em>指针</em>的函数 __de<em>c</em>lspe<em>c</em>(<em>dll</em>export int add(TESTBACK ptsTestBa<em>c</em>k, int a, int b) { return ptsTestBa<em>c</em>k(a, b); } 2、C# 端 声明回调函数的委
C#调用C/C++ DLL函数问题。
C/C++函数原型为:rnLMUSB_HANDLE __std<em>c</em>all InitializeDevi<em>c</em>e(unsigned short usVID,rn unsigned short usPID,rn LPGUID lpGUID,rn BOOL *pbDriverInstalled);rnLMUSB_HANDLE 定义为 typedef void *LMUSB_HANDLE;rnLPGUID 定义为 typedef GUID *LPGUID;rnGUID 定义为 typedef stru<em>c</em>t _GUID rn unsigned long Data1;rn unsigned short Data2;rn unsigned short Data3;rn unsigned <em>c</em>har Data4[ 8 ];rn GUID;rnrnrnC#中重新声明函数为rn[DllImport("LMUSBDLL_TEST.<em>dll</em>")]rnpubli<em>c</em> stati<em>c</em> extern Byte[] InitializeDevi<em>c</em>e(UInt16 usVID, UInt16 usPID, ref GUID lpGUID,rn ref bool pbDriverInstalled);rnpubli<em>c</em> stru<em>c</em>t GUIDrnrn private UInt32 Data1;rn private UInt16 Data2;rn private UInt16 Data3;rn [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]rn private Byte[] Data4;rnrn publi<em>c</em> GUID(UInt32 DT1, UInt16 DT2, UInt16 DT3, Byte []DA4)rn rn this.Data1 = DT1;rn this.Data2 = DT2;rn this.Data3 = DT3;rn this.Data4 = DA4;rn rnrnrn<em>调用</em>如下:rnstati<em>c</em> Byte[] DA4_INITIAL = 0xB7, 0x72, 0xb3, 0xAF, 0x2B, 0x6F, 0xDE, 0x1C ;rnstati<em>c</em> GUID GUID_DEVINTERFACE_STELLARIS_BULK = new GUID(0x6E45736A, 0x2B1B, 0x4078, DA4_INITIAL);rnrnByte []hUSB;rnbool bDriverInstalled = false;rnhUSB = InitializeDevi<em>c</em>e(IT300_BULK_VID, IT300_BULK_PID, ref GUID_DEVINTERFACE_STELLARIS_BULK, ref bDriverInstalled);rn编译成功,运行出错如下:rnrn未经处理的异常: System.Runtime.InteropServi<em>c</em>es.MarshalDire<em>c</em>tiveEx<em>c</em>eption: 无法rn封送处理“return value”: 无效的托管/非托管类型组合。rn 在 ConsoleAppli<em>c</em>ation_CsharpReUseCppDll_Test.Program.InitializeDevi<em>c</em>e(UInt16rnusVID, UInt16 usPID, GUID& lpGUID, Boolean& pbDriverInstalled)rn 在 ConsoleAppli<em>c</em>ation_CsharpReUseCppDll_Test.Program.Main(String[] args) 位置rn E:\IT-300-DXWindowsAppli<em>c</em>ationRegisted-N1\ConsoleAppli<em>c</em>ation_CsharpReUseCppDll_rnTest\Program.<em>c</em>s:行号 165rn请按任意键继续. . .rnrnrnInitializeDevi<em>c</em>e定义如下:rnrnextern "C" __de<em>c</em>lspe<em>c</em>(<em>dll</em>export) LMUSB_HANDLE PASCAL EXPORTrnInitializeDevi<em>c</em>e(unsigned short usVID,rn unsigned short usPID,rn LPGUID lpGUID,rn BOOL *pbDriverInstalled)rnrnrn return(InitializeDevi<em>c</em>eByIndex(usVID, usPID, lpGUID, 0, true,rn pbDriverInstalled));rnrnrnrnrnextern "C" __de<em>c</em>lspe<em>c</em>(<em>dll</em>export) LMUSB_HANDLE PASCAL EXPORTrnInitializeDevi<em>c</em>eByIndex(unsigned short usVID,rn unsigned short usPID,rn LPGUID lpGUID,rn DWORD dwIndex,rn BOOL bOpenDataEndpoints,rn BOOL *pbDriverInstalled)rnrnrn BOOL bResult;rn WINUSB_INTERFACE_HANDLE usbHandle;rn USB_INTERFACE_DESCRIPTOR ifa<em>c</em>eDes<em>c</em>riptor;rn WINUSB_PIPE_INFORMATION pipeInfo;rn UCHAR speed;rn ULONG length;rn DWORD dwError;rn int i;rn tDevi<em>c</em>eInfoWinUSB *psDevInfo;rnrn if(!lpGUID || !pbDriverInstalled)rn rn return(NULL);rn rn psDevInfo = (tDevi<em>c</em>eInfoWinUSB *)Lo<em>c</em>alAllo<em>c</em>(LPTR, sizeof(tDevi<em>c</em>eInfoWinUSB));rn if(!psDevInfo)rn rn return(NULL);rn rn psDevInfo->devi<em>c</em>eHandle = OpenDevi<em>c</em>eByIndex(dwIndex, lpGUID);rn if(psDevInfo->devi<em>c</em>eHandle == INVALID_HANDLE_VALUE)rn rn dwError = GetLastError();rn *pbDriverInstalled = (dwError == ERROR_DEV_NOT_EXIST) ? FALSE : TRUE;rn Lo<em>c</em>alFree((HLOCAL)psDevInfo);rn return(NULL);rn rnrn bResult = WinUsb_Initialize(psDevInfo->devi<em>c</em>eHandle, &usbHandle);rn if(bResult)rn rn psDevInfo->winUSBHandle = usbHandle;rn length = sizeof(UCHAR);rn bResult = WinUsb_QueryDevi<em>c</em>eInformation(psDevInfo->winUSBHandle,rn DEVICE_SPEED,rn &length,rn &speed);rn rnrn if(bOpenDataEndpoints)rn rnrn if(bResult)rn rn psDevInfo->devi<em>c</em>eSpeed = speed;rn bResult = WinUsb_QueryInterfa<em>c</em>eSettings(psDevInfo->winUSBHandle,rn 0,rn &ifa<em>c</em>eDes<em>c</em>riptor);rn rnrn if(bResult)rn rn for(i=0;iwinUSBHandle, 0, (UCHAR) i,rn &pipeInfo);rnrn if((pipeInfo.PipeType == UsbdPipeTypeBulk) &&rn USB_ENDPOINT_DIRECTION_IN(pipeInfo.PipeId))rn rn psDevInfo->bulkInPipe = pipeInfo.PipeId;rn rn else if((pipeInfo.PipeType == UsbdPipeTypeBulk) &&rn USB_ENDPOINT_DIRECTION_OUT(pipeInfo.PipeId))rn rn psDevInfo->bulkOutPipe = pipeInfo.PipeId;rn rn elsern rn SetLastError(ERROR_NOT_SAME_DEVICE);rn bResult = FALSE;rn break;rn rn rn rnrn if(bResult)rn rn psDevInfo->hReadEvent = CreateEvent(NULL, TRUE, FALSE, NULL);rnrn if(psDevInfo->hReadEvent)rn rn bResult = true;rn rn rn rn elsern rn psDevInfo->bulkOutPipe = 0;rn psDevInfo->bulkInPipe = 0;rn psDevInfo->hReadEvent = NULL;rn rnrn if(bResult)rn rn return((LMUSB_HANDLE)psDevInfo);rn rn elsern rn Lo<em>c</em>alFree((HLOCAL)psDevInfo);rn return(NULL);rn rnrnrn求教各路大虾,如何解决“无法封送处理“return value”: 无效的托管/非托管类型组合。”的问题?
C#中调用c生成dll问题
如有xx.<em>dll</em>,rn在<em>c</em>代码中,rn函数为:rninter* add (inter * a , inter *b);rn其中inter为结构体。rn用<em><em>c</em>#</em><em>调用</em>rn<em>c</em>lase interrn[Stru<em>c</em>tLayout(LayoutKind.Sequential)]rnrn...rnrn[DllImport("xx.<em>dll</em>")]rnrn publi<em>c</em> extern stati<em>c</em> (<em>返回值</em>) add ((<em>返回值</em>), (<em>返回值</em>));rnrn该函数<em>返回值</em>应该怎么写,参数应该怎么写。因为<em>c</em>代码中定义的该函数<em>返回值</em>和参数都是<em>指针</em>。rn
C#调用C动态DLL问题
我的系统为2003,用C写的DLL类库,C#的窗体去<em>调用</em>,没有问题。rn同样的项目,拿到XP系统下,<em>调用</em>就出现异常。rn这是部分错误信息.rnrn 有关<em>调用</em>实时(JIT)调试而不是此对话框的详细信息,rn请参见此消息的结尾。rnrn************** 异常文本 **************rnSystem.Runtime.InteropServi<em>c</em>es.COMEx<em>c</em>eption (0x8007007A): 传递给系统<em>调用</em>的数据区域太小。 (异常来自 HRESULT:0x8007007A)rnrn
c#调用c编写的dll问题,char*
最近在弄一个rfid读卡的测试模块。需要<em>调用</em><em>c</em>/<em>c</em>++编写的<em>dll</em>。但是一直弄不对,请大侠帮忙rnrn<em>dll</em>函数原型rn函数声明 int WINAPI mifs_request_2(u<em>c</em>har _Mode, u<em>c</em>har *_TagType)rn功能描述 寻卡rn入口参数 _ Mode:模式 0x26 rn出口参数 TagType:卡类型rn返 回 值 0—成功,﹥0—失败rnrnrn<em><em>c</em>#</em>的代码rn函数定义rn [DllImport("MifsDLL.<em>dll</em>", CharSet = CharSet.Ansi)]rn private stati<em>c</em> extern int mifs_request_2(rn byte bMode,rn StringBuilder strbCardTypern );rn函数<em>调用</em>rn int iRet;rn StringBuilder strbCardType = new StringBuilder(255);rn iRet = -1;rn for (int i = 0; i < Publi<em>c</em>Var.iGL_RetryTimes; i++)rn rn iRet = mifs_request_2(0x26, strbCardType);rn MessageBox.Show(strbCardType.ToString());rn if(iRet == 0)rn break;rn rnshow出来的是乱码,不知道为什么
请问C#调用C的DLL函数
函数如下rnextern "C" _de<em>c</em>lspe<em>c</em>(<em>dll</em>export) <em>c</em>har* __std<em>c</em>all myfun<em>c</em>tion(<em>c</em>onst <em>c</em>har* keyfile,<em>c</em>onst <em>c</em>har* in_str, int* out_len);rnrn我在C#工程里添加rn using System.Runtime.InteropServi<em>c</em>es;rn[DllImport("my<em>dll</em>.<em>dll</em>",CharSet=CharSet.Ansi, CallingConvention=CallingConvention.StdCall)]rnrn IntPtr len=new IntPtr(10);rn System.String ret=De<em>c</em>Pn("test1", "test2", len);rnrnrn编译报错:尝试读取或写入受保护的内存。这通常指示其他内存已损坏rnrn
C# 调用 C 、C++ 编写的dll
用<em>c</em>++编写了一个<em>dll</em>,现在要供<em>c</em>#<em>调用</em>,rnrn在<em>c</em>++中<em>调用</em>的格式为:rnrntypedef void (*CALLBACKF) (<em>c</em>har **, int, double, <em>c</em>har **);rnrntypedef bool (*FUN)(<em>c</em>har *, double , double , double , CALLBACKF, int);rnrn<em>dll</em>=LoadLibrary(<em>dll</em>Lo<em>c</em>ation); rnFUN fun1=(FUN)GetPro<em>c</em>Address(<em>dll</em>, "fun");rnrn在<em><em>c</em>#</em>中如何实现?有没有相关资料?rnrn谢谢~
C# 调用cdll,char*指针的问题
要做一个读卡器的程序,厂商提供的C的<em>dll</em>,其中有个函数用到CHAR*,请各位大侠指导。rn函数说明如下:rn2.3.2 读卡片非认证区信息,即2-7BLOCK的信息 iReadPlantDatarnint iReadPlantData(int handle,int offset,int datalen,<em>c</em>har * dataBuf)rn功能:读卡片非认证区信息rn输入:int handle读写器句柄rn int offset:偏移量,为4的倍数,从0-20之间取值rn int dataLen:写入数据的长度,为4的倍数,从4-24之间取值rn[b]输出:<em>c</em>har * dataBuf:需要更新的数据,为16进制格式。[/b]rn返回:0,非认证区信息读出正确。rn 非0,错误。rnrnrn我是这样写的(略去无关代码)rn publi<em>c</em> unsafe <em>c</em>lass Cardrn rn [DllImport("pum<em>c</em>hri<em>c</em>.<em>dll</em>", CharSet = CharSet.Auto)]rn publi<em>c</em> stati<em>c</em> extern int iReadPlantData(int handle,int offset,int datalen,<em>c</em>har * dataBuf);rn rnrn private void button1_Cli<em>c</em>k(obje<em>c</em>t sender, EventArgs e)rn rn <em>c</em>har dataBuf; rn i = Card.iReadPlantData(50, 0, 24, &dataBuf);rn textBox2.Text = Convert.ToString(dataBuf);rn rn[b]<em>c</em>har * dataBuf这个位置应该保存着一个字符串。[/b]现在程序可以运行,但读出来的是一个乱码(可能是只读了第一个字符??),CHAR*在C#中如何使用?如何改?
c#调用c中的dll函数
在<em>c</em>、<em>c</em>++中有typedef定义。当要把<em>c</em>/<em>c</em>++中的程序移植到<em><em>c</em>#</em>或<em>调用</em><em>c</em>中的<em>dll</em>函数时,涉及到一些数据结构的重新定义。为了方便,可使用<em><em>c</em>#</em>中的using 别名;对于<em>指针</em>,需加unsafe 如: using boolean_T = System.Byte; unsafe publi<em>c</em> stru<em>c</em>t emxArray_real_T { double* data; int* size; int ...
求助C语言的DLL在C#里面调用
经过了多方查找,我终于搞到了系统提示“尝试读取或写入受保护的内存。这通常指示其他内存已损坏 ”rn说明我传的参数不对,求达人帮我从C转化成C#的<em>调用</em>语句,下面贴出rnunsigned WINAPI TACkey_Command(int iHandle,int iCommLen,unsigned <em>c</em>har* u<em>c</em>Comm,int* iRespLen,unsigned <em>c</em>har* u<em>c</em>Resp)rn这是给我的C中<em>调用</em>的语句,下面是我自己写的rniRet = TACkey_Command(out iHandle, out iCommLen, Comm, ref iRespLen, Resp);rn其中,<em>c</em>omm和Resp我用的是StringBuilder,但是仍然报错,求指点
c#如何调用c/c++的dll
[<em>c</em>olor=#FF0000]我已经知道<em>调用</em>的语法,但我想知道以下两点:[/<em>c</em>olor]rn1:这些非托管DLL是不是要实现什么接口,或者遵循某些协议,才能被C#<em>调用</em>?rn2:是否能<em>调用</em>C语言写的DLL?或者说是否只能<em>调用</em>C++写的,不能<em>调用</em>C写的?
C#调用C/C++ DLL方式总结
C#与C/C++ DLL交互方式总结 C#<em>调用</em>C/C++ DLL导出 C/C++的导出函数: int __std<em>c</em>all AFun<em>c</em>(w<em>c</em>har_t* str) { //ugsdifgoisuhfgiosugdtfuywegouy return 0; } C#声明: [DllImport(&amp;amp;quot;xxxx.<em>dll</em>&amp;amp;quot;, CharSet = CharSet.Uni<em>c</em>ode, C...
C#调用C/C++写的dll
C++ 代码: 头文件: extern &quot;C&quot; _de<em>c</em>lspe<em>c</em>(<em>dll</em>export)bool openWindow(<em>c</em>har*<em>c</em>lassname,<em>c</em>har*name); 或 EXTERN_C _de<em>c</em>lspe<em>c</em>(<em>dll</em>export)bool openWindow(<em>c</em>har*<em>c</em>lassname,<em>c</em>har*name); 或 extern &quot;C&quot;{ _de<em>c</em>lspe<em>c</em>(d...
C#调用C写的DLL的相关问题...
我现在手头上有3份DLL,和对应的.LIB,.H文件...(开源的项目,非盗用)rnrn问题是这样的,如果直接用C#来<em>调用</em>DLL的话,需要重写大量的结构体(好象是要吧)...rnrn某位高人提示我说用COM重新把DLL封装,提供给C#使用...rnrn但是我对COM不熟悉,能不能提供相关的范例,或者意见呢?rnrn这几份<em>dll</em>来自ffmpeg(http://www.<em>c</em>hinavideo.org/index.php?option=<em>c</em>om_remository&Itemid=0&fun<em>c</em>=download&id=68&<em>c</em>hk=50e2111e68e2a02a<em>c</em>a4fbb54540ab8b4)的SDK版本...rnrn有人可以帮忙做个范例吗?rnrn我使用的是VS 2005...
c#调用C语言写的DLL
请问大家rn利用 C#<em>调用</em>C#语言写的DLLrn如何处理设计到结构<em>指针</em>的问题rn网上一直找不到比较完整的教程rn大家推荐下哈
C 中的DLL C#中如何调用
C :rnrnint PubStrToIso ( <em>c</em>har * p<em>c</em>Sour<em>c</em>eStr, int nStrLen, ISODataStru * TargetIsoStru, int *pnPosition) rnrnC#:rn结构定义:rnrn private delegate int FIELD_PACKAGER_PACK (ISO_FIELD_DEF pthis, byte pfieldbuf, short fieldlen, byte poutdata);rn private delegate int FIELD_PACKAGER_UNPACK(ISO_FIELD_DEF pthis, byte pfieldbuf, short fieldlen, byte poutdata);rn [Stru<em>c</em>tLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pa<em>c</em>k = 1)]rn stru<em>c</em>t ISO_FIELD_DEFrn rn short len; /* 数据域最大长度 */rn LENGTH_TYPE lentype; /* 数据域长度类型: 1--LLVAR型 2--LLLVAR型 */rn ALIGN_TYPE align; /* 对齐类型 */rn <em>c</em>har pad<em>c</em>har; /* 补齐字符 */rn FIELD_PACKAGER_PACK pa<em>c</em>k; /* 打包函数<em>指针</em> */rn FIELD_PACKAGER_UNPACK unpa<em>c</em>k; /* 解包函数<em>指针</em> */rn ; rn [Stru<em>c</em>tLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pa<em>c</em>k = 1)]rn stru<em>c</em>t ISO_FIELDrn rn short len;rn short off; /* 指向iso->databuf缓冲区的偏移,数据中不含长度类型的几个字节 */rn ; rn [Stru<em>c</em>tLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pa<em>c</em>k = 1)]rn publi<em>c</em> stru<em>c</em>t ISODataStrurn rn [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2560)]rn ISO_FIELD []fld;rn <em>c</em>har []bitmap; rn [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_MSG_LEN+MAX_MSG_LEN)]rn byte []databuf; /* 多留一个域的长度,防止溢出 */rn short used;rn ;rnrnrn如何定义、使用 以上函数? ( PubStrToIso ) ?rn万分感谢!rnrnrnrn
C#的调用C的dll问题,急!
在C中使用的结构体是:rntypedef stru<em>c</em>t _Assetarrayrn u_short port;rn <em>c</em>har* ip_addr;rn <em>c</em>har* servi<em>c</em>e;rn <em>c</em>har* appli<em>c</em>ation;rn int dis<em>c</em>overy;rnAssetarray;rnrn我在C#中这样<em>调用</em>不行rn[ Stru<em>c</em>tLayout( LayoutKind.Sequential ) ]rn publi<em>c</em> stru<em>c</em>t Assetarrayrn rn publi<em>c</em> ushort port;rn [MarshalAs(UnmanagedType.LPArray)]rn publi<em>c</em> byte[] ip_addr;rn [MarshalAs(UnmanagedType.LPArray)]rn publi<em>c</em> byte[] servi<em>c</em>e;rn [MarshalAs(UnmanagedType.LPArray)]rn publi<em>c</em> byte[] appli<em>c</em>ation;rn publi<em>c</em> int dis<em>c</em>overy;rn ;rnrn [DllImport("pads.<em>dll</em>", CharSet = CharSet.Auto)]rn publi<em>c</em> stati<em>c</em> extern int main_pads(Assetarray[] assetarray1);rn请问各位,上面的Assetarry结构体在C#对应什么? 我<em>调用</em>main_pads,传进参数<em>数组</em>Assetarray,rnAssetarray在函数里面赋值,然后我能在C#中使用assetarray1的数据.rn
c#调用c生成的dll文件的问题
C#<em>调用</em><em>c</em>生成的<em>dll</em>文件,其中的函数的返回类型为void* 型,如void *fun(ushort a)rn请问在<em><em>c</em>#</em>中应如何<em>调用</em>?
C# 调用c dll 急 求救。。
[<em>c</em>ode=<em>c</em>]rnLibExport LONG __std<em>c</em>all ITS_Login(w<em>c</em>har_t *pIp, UINT uPort, w<em>c</em>har_t *pUser, w<em>c</em>har_t *pPassword);rn[/<em>c</em>ode]rn[<em>c</em>ode=<em>c</em>sharp]rn [DllImport("ITSDll.<em>dll</em>", EntryPoint = "ITS_Login", CharSet = CharSet.Uni<em>c</em>ode)]rn publi<em>c</em> stati<em>c</em> extern Int64 ITS_Login( string ip, UInt32 port, string user, string pwd);rn[/<em>c</em>ode]rn始终登陆不成功 求救。。 在网上查了w<em>c</em>har_t * 转换成string 或者StringBuilder 都可以啊。始终<em>返回值</em>不是想用的。<em>返回值</em>为0才表示登陆成功 我始终返回个几亿的数字 求救
关于 c# 调用c动态dll
[b][<em>c</em>olor=#FF0000]请问下面<em>调用</em>正确吗?rn为什么我的程序<em>调用</em>后还是出现SSL初始化错误rnSSLLib.<em>dll</em>rn放在了bin下rnrn[/<em>c</em>olor][/b]rnrnrn[<em>c</em>ode=C/C++]rnint OPENSSL_init(intmode)rn[/<em>c</em>ode]rnrn[<em>c</em>ode=C#]rnrnrn[DllImport("SSLLib.<em>dll</em>",CallingConvention=CallingConvention.Cde<em>c</em>l,EntryPoint="OPENSSL_init")]]rnpubli<em>c</em> stati<em>c</em> extern int OPENSSL_init(int mode);rnrnrnrn函数<em>调用</em>rnpubli<em>c</em> void test()rnrn //为什么这里初始化会出错?rn int i= OPENSSL_init(0);rnrnrn[/<em>c</em>ode]
关于C# 调用C语言 DLL 的问题 !
我现在有一个DLL需要我用C#将其引用。 函数原型是是这样的!rnrnvoid __std<em>c</em>all QSCal<em>c</em>1(double f1,double f2,double f4,rnint m,rndouble *F, double *tg, double *th,rndouble *tg0, double *th0,rndouble *tn0, double tw0, double Fz,rndouble Qz,rndouble *q,double *s);rnrnrn我现在写了一个方法。 <em>调用</em>的时候没有问题,但是在返回的时候 总是报错! rn引发类型为“System.Exe<em>c</em>utionEngineEx<em>c</em>eption”的异常。rnrnQSCal<em>c</em>1(f1,f2,f4,m,ref F,ref tg, ref th,ref tg0,ref th0,ref tn0,Convert.ToDouble(tw0),Fz,Qz,ref q,ref s);rnrn编译正常通过,但是在进行<em>调用</em>该函数的时候就报上面的错误。 不知道是哪出了问题, 还有,上面引用的方法中, ref q 和ref s 是DLL返回的两个<em>数组</em>。 我想把这两个<em>数组</em>中的数据读出来,应该怎么办呢? (无法更改DLL文件)
flex 4经典教程下载
这个里面是经典的flex4教程,里面涵盖了基本的flex4应用,其中的代码帖的也和详细,就是整个是英文的,不过都是一些简单的英语,应该不难 相关下载链接:[url=//download.csdn.net/download/wuzhuge1990/2993435?utm_source=bbsseo]//download.csdn.net/download/wuzhuge1990/2993435?utm_source=bbsseo[/url]
VC开发经验技巧 共分为21章 第十一章下载
VC开发经验技巧 共分为21章 VC 开发 经验 不是每一章都使用SQL Server数据库,如果章节文件夹中没有Database文件夹,表示该章没有使用SQL Server数据库。 相关下载链接:[url=//download.csdn.net/download/syr243/3100288?utm_source=bbsseo]//download.csdn.net/download/syr243/3100288?utm_source=bbsseo[/url]
PSD美工字体下载
PSD分层美工字体 相关下载链接:[url=//download.csdn.net/download/u013777985/6960607?utm_source=bbsseo]//download.csdn.net/download/u013777985/6960607?utm_source=bbsseo[/url]
相关热词 c# 线程结束时执行 c# kb mb 图片 c# 替换第几位字符 c#项目决定成败 c# 与matlab c# xml缩进 c#传感器基础 c#操作wps c# md5使用方法 c# 引用父窗口的组件
我们是很有底线的