c++builder怎样调用c#作的dll啊 _net技术 - c# - csdn社区 community_csdn_net.htm
来自「Borland C++ 动态链接库调用方法使用」· HTM 代码 · 共 359 行 · 第 1/2 页
HTM
359 行
2003-09-02 20:56:31 得分 <EM>6</EM></SPAN></H3>
<P>我想也许你可以用VC.NET包装一下,不过无论如何你的程序都脱不开.NET Framework<A
href="http://topic.csdn.net/t/20030902/08/2213237.html#">Top</A></P>
<H3><STRONG><A class=anchor name=r_15101328>8 楼</A>Behard(我爱天安门)<INPUT class=user1 title="一级用户 该版得分小于等于100分" type=button></STRONG><SPAN>回复于
2003-09-03 09:11:01 得分 <EM>3</EM></SPAN></H3>
<P>没有 VC.net 没有权利发言<A
href="http://topic.csdn.net/t/20030902/08/2213237.html#">Top</A></P>
<H3><STRONG><A class=anchor name=r_15164513>9 楼</A>hongliqiu(在火中)<INPUT class=user1 title="一级用户 该版得分小于等于100分" type=button></STRONG><SPAN>回复于
2003-09-05 09:40:11 得分 <EM>3</EM></SPAN></H3>
<P>不知道,听课来了。<A
href="http://topic.csdn.net/t/20030902/08/2213237.html#">Top</A></P>
<H3><STRONG><A class=anchor name=r_15165141>10 楼</A>wenyongjie(我们的目标是:没有蛀牙!!)<INPUT class=user1 title="一级用户 该版得分小于等于100分" type=button></STRONG><SPAN>回复于
2003-09-05 09:55:10 得分 0 </SPAN></H3>
<P>我作了一下,没有成功,现把代码帖出,各位看下有哪些要改一下! <BR> 这是C#的DLL <BR>
using System; <BR> <BR> namespace CBDLL
<BR> { <BR> /// <summary>
<BR> /// Class1 的摘要说明。 <BR> ///
</summary> <BR> public class Class1
<BR> { <BR> public Class1() <BR> {
<BR> // <BR> // TODO: 在此处添加构造函数逻辑
<BR> // <BR> } <BR> public string
test(string str) <BR> { <BR> return(str);
<BR> } <BR> } <BR> } <BR> CB
动态调用 <BR> private: // User declarations
<BR> String (__stdcall *test)(String str);//声明
<BR> <BR> void __fastcall
TForm1::Button1Click(TObject *Sender)//双击Button1调用 <BR> {
HINSTANCE DLLInst = NULL; <BR>
String s; <BR> if( NULL
== DLLInst ) DLLInst =
LoadLibrary("CBDLL.dll"); //上面的 Dll <BR>
if (DLLInst) { <BR>
test=(String
(__stdcall*)(String str)) GetProcAddress(DLLInst,"_test@0");
<BR>
if (test) <BR>
{ s=test(Edit1->Text);
ShowMessage(s); } <BR>
else
ShowMessage("不能取得函数test指针"); <BR> }
<BR> else
ShowMessage("加载CBDLL.dll错误!"); <BR>
FreeLibrary(DLLInst); <BR> } <BR> <BR>
出现如下提示: 不能取得函数test指针<A
href="http://topic.csdn.net/t/20030902/08/2213237.html#">Top</A></P>
<H3><STRONG><A class=anchor name=r_15855833>11 楼</A>yhz(耗子)<INPUT class=user1 title="一级用户 该版得分小于等于100分" type=button></STRONG><SPAN>回复于
2003-09-28 15:54:18 得分 <EM>6</EM></SPAN></H3>
<P>你用 depends 去检查一下你的 test 的名字还是不是 test
??? <BR> <BR> 我现在手头上没有
VC.net,不过我估计在编译的时候,编译器把输出名字改了。 <BR> <BR> 或者你在
DLL 的输出函数里面加上 __stdcall 试试看?<A
href="http://topic.csdn.net/t/20030902/08/2213237.html#">Top</A></P>
<H3><STRONG><A class=anchor name=r_15857008>12 楼</A>zhouzhouzhou(人生程序)<INPUT class=user4 title="四级用户 该版得分小于等于2000分,大于1000分" type=button></STRONG><SPAN>回复于
2003-09-28 16:23:10 得分 <EM>3</EM></SPAN></H3>
<P>不是吧, <BR> <BR> 暈<A
href="http://topic.csdn.net/t/20030902/08/2213237.html#">Top</A></P>
<H3><STRONG><A class=anchor name=r_15861457>13 楼</A>storm97(风暴不再)<INPUT class=star2 title="二星用户 该版得分小于等于30000分,大于10000分" type=button></STRONG><SPAN>回复于
2003-09-28 18:37:32 得分 <EM>11</EM></SPAN></H3>
<P>http://www.csdn.net/develop/article/21/21259.shtm<A
href="http://topic.csdn.net/t/20030902/08/2213237.html#">Top</A></P>
<H4><STRONG>相关问题</STRONG></H4>
<DIV class=relation>
<UL>
<LI><A href="http://topic.csdn.net/t/20021223/16/1292303.html"
rel=external>简单调用DLL函数C++ Builder !</A>
<LI><A href="http://topic.csdn.net/t/20010912/10/283360.html" rel=external>C++
Builder中如何调用VC++编写的.dll?</A>
<LI><A href="http://topic.csdn.net/t/20011026/13/341543.html"
rel=external>如何在DELPHI中调用C++ BUILDER写的DLL文件? </A>
<LI><A href="http://topic.csdn.net/t/20011208/19/410659.html"
rel=external>用C++Builder开发的DLL怎样在Delphi中调用?</A>
<LI><A href="http://topic.csdn.net/t/20011214/17/421860.html" rel=external>C++
Builder 如何调用动态连接库(*.DLL)中的函数</A>
<LI><A href="http://topic.csdn.net/t/20020301/10/548846.html" rel=external>C++
Builder中调用delphi做的dll的问题</A>
<LI><A href="http://topic.csdn.net/t/20020422/11/665898.html"
rel=external>在PB中如何调用C++Builder开发的DLL</A>
<LI><A href="http://topic.csdn.net/t/20020529/14/762024.html"
rel=external>关于C++ Builder中 调用DLL的问题?</A>
<LI><A href="http://topic.csdn.net/t/20050304/14/3824661.html"
rel=external>delphi下的dll如何改到c++builder下调用???</A>
<LI><A href="http://topic.csdn.net/t/20050308/13/3833762.html"
rel=external>vb的dll如何在c++builder中调用?</A> </LI></UL></DIV></DIV></DIV>
<DIV id=sidebar>
<H3>关键词</H3>
<DIV>
<UL>
<LI><A href="http://tag.csdn.net/tag/.net/" rel=external>.net</A>
<LI><A href="http://tag.csdn.net/tag/c#/" rel=external>c#</A>
<LI><A href="http://tag.csdn.net/tag/c++builder/" rel=external>c++builder</A>
<LI><A href="http://tag.csdn.net/tag/函数/" rel=external>函数</A>
<LI><A href="http://tag.csdn.net/tag/动态库/" rel=external>动态库</A>
<LI><A href="http://tag.csdn.net/tag/指针/" rel=external>指针</A>
<LI><A href="http://tag.csdn.net/tag/应用程序/" rel=external>应用程序</A>
<LI><A href="http://tag.csdn.net/tag/开发平台/" rel=external>开发平台</A>
<LI><A href="http://tag.csdn.net/tag/文件/" rel=external>文件</A>
<LI><A href="http://tag.csdn.net/tag/连接/" rel=external>连接</A> </LI></UL></DIV>
<H3>得分解答快速导航</H3>
<DIV>
<UL>
<LI>帖主:<A
href="http://topic.csdn.net/t/20030902/08/2213237.html#Top">WYJBCB</A>
<LI><A
href="http://topic.csdn.net/t/20030902/08/2213237.html#r_15078236">Iamsnowgirl</A>
<LI><A
href="http://topic.csdn.net/t/20030902/08/2213237.html#r_15093641">yhz</A>
<LI><A
href="http://topic.csdn.net/t/20030902/08/2213237.html#r_15094081">zjqyb</A>
<LI><A
href="http://topic.csdn.net/t/20030902/08/2213237.html#r_15094609">ThinkX</A>
<LI><A
href="http://topic.csdn.net/t/20030902/08/2213237.html#r_15101328">Behard</A>
<LI><A
href="http://topic.csdn.net/t/20030902/08/2213237.html#r_15164513">hongliqiu</A>
<LI><A
href="http://topic.csdn.net/t/20030902/08/2213237.html#r_15855833">yhz</A>
<LI><A
href="http://topic.csdn.net/t/20030902/08/2213237.html#r_15857008">zhouzhouzhou</A>
<LI><A
href="http://topic.csdn.net/t/20030902/08/2213237.html#r_15861457">storm97</A>
</LI></UL></DIV>
<H3>相关链接</H3>
<DIV>
<UL>
<LI><A href="http://dotnet.csdn.net/" target=_blank>CSDN .NET频道</A>
<LI><A
href="http://www.dearbook.com.cn/Book/SearchBook.aspx?sortid=6&sorttype=smallsort"
target=_blank>.NET类图书</A>
<LI><A
href="http://www.dearbook.com.cn/Book/SearchBook.aspx?sortid=10&sorttype=smallsort"
target=_blank>C#类图书</A>
<LI><A href="http://www.codechina.net/resource/sort.php/243"
target=_blank>.NET类源码下载</A> </LI></UL></DIV>
<H3>广告也精彩</H3>
<DIV>
<SCRIPT
src="C++Builder怎样调用C#作的DLL啊 _NET技术 - C# - CSDN社区 community_csdn_net.files/show_ads.js"
type=text/javascript></SCRIPT>
</DIV>
<H3>反馈</H3>
<DIV>请通过下述方式给我们反馈<BR><IMG alt=反馈
src="C++Builder怎样调用C#作的DLL啊 _NET技术 - C# - CSDN社区 community_csdn_net.files/feedback.gif"></DIV></DIV>
<DIV class=clear></DIV></DIV>
<DIV class=CSDN-PHF id=CSDNPF>
<HR>
<A class=biaoshi
href="http://www.hd315.gov.cn/beian/view.asp?bianhao=010202001032100010"
rel=external> </A>
<DIV><A href="http://www.csdn.net/intro/intro.asp?id=2" rel=external>网站简介</A>-<A
href="http://www.csdn.net/intro/intro.asp?id=5" rel=external>广告服务</A>-<A
href="http://www.csdn.net/map/map.shtm" rel=external>网站地图</A>-<A
href="http://www.csdn.net/help/help.asp" rel=external>帮助</A>-<A
href="http://www.csdn.net/intro/intro.asp?id=9" rel=external>联系方式</A>-<A
href="http://job.csdn.net/Jobs/f9c75c9f2ad14404a604669b757b9ed0/viewcompany.aspx"
rel=external>诚聘英才</A>-<A href="http://www.csdn.net/english/"
rel=external>English</A>-<A
href="javascript:navigate('mai'%20+%20'lto:'%20+%20'webm'%20+%20'aster@c'%20+%20'sdn.n'+'et?subject=向CSDN报告问题')"
rel=external>问题报告</A></DIV>
<DIV>北京百联美达美数码科技有限公司 版权所有 京 ICP 证 020026 号</DIV>
<DIV>Copyright © 2000-2006, CSDN.NET, All Rights Reserved</DIV>
<SCRIPT
src="C++Builder怎样调用C#作的DLL啊 _NET技术 - C# - CSDN社区 community_csdn_net.files/counter.js"
type=text/javascript></SCRIPT>
<SCRIPT
src="C++Builder怎样调用C#作的DLL啊 _NET技术 - C# - CSDN社区 community_csdn_net.files/jsframework.js"
type=text/javascript></SCRIPT>
<SCRIPT type=text/javascript>/*<![CDATA[*/Include("Csdn.IM.NoticeWindow");/*]]>*/</SCRIPT>
<SCRIPT
src="C++Builder怎样调用C#作的DLL啊 _NET技术 - C# - CSDN社区 community_csdn_net.files/clickeye.js"></SCRIPT>
<HR>
</DIV></DIV></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?