資源簡(jiǎn)介
c#調(diào)用vc++的DLL 例子源碼下載
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Collections;
using?System.Text;
using?System.Runtime.InteropServices;
namespace?CxUseDll
{
????public?delegate?void?cb_func(int?a);
????class?Cx
????{
????????
????????[DllImport(“diaCallBackDll.dll“)]
????????public?static?extern?void?show();
????????[DllImport(“diaCallBackDll.dll“?CallingConvention?=?CallingConvention.StdCall)]
????????public?static?extern?int?add_CallBack_test(int?a?int?b?cb_func?f);
????????public?static?void?cb_funcc(int?re)
????????{
????????????Console.WriteLine(“result=[{0}]“?re);
????????????return;
????????}
????????static?void?Main(string[]?args)
????????{
????????????//show();
???????????int?i?=??add_CallBack_test(7?2?cb_funcc);
????????????Console.Read(
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????5120??2014-11-04?11:07??C#_Cpp\Cpp\CxUseDll\bin\Debug\CxUseDll.exe
?????文件??????11776??2014-11-04?11:07??C#_Cpp\Cpp\CxUseDll\bin\Debug\CxUseDll.pdb
?????文件??????11608??2014-11-04?11:05??C#_Cpp\Cpp\CxUseDll\bin\Debug\CxUseDll.vshost.exe
?????文件????1331304??2014-11-04?11:04??C#_Cpp\Cpp\CxUseDll\bin\Debug\diaCallBackDll.dll
?????文件????1331290??2014-11-04?10:52??C#_Cpp\Cpp\CxUseDll\bin\Debug\TestDll.dll
?????文件???????5120??2014-11-04?11:13??C#_Cpp\Cpp\CxUseDll\bin\x86\Debug\CxUseDll.exe
?????文件??????13824??2014-11-04?11:13??C#_Cpp\Cpp\CxUseDll\bin\x86\Debug\CxUseDll.pdb
?????文件??????11608??2014-11-04?11:14??C#_Cpp\Cpp\CxUseDll\bin\x86\Debug\CxUseDll.vshost.exe
?????文件????1331304??2014-11-04?11:13??C#_Cpp\Cpp\CxUseDll\bin\x86\Debug\diaCallBackDll.dll
?????文件???????5812??2014-11-04?10:58??C#_Cpp\Cpp\CxUseDll\CxUseDll.csproj
?????文件????????452??2014-11-04?10:58??C#_Cpp\Cpp\CxUseDll\CxUseDll.csproj.user
?????文件????????897??2014-11-04?11:08??C#_Cpp\Cpp\CxUseDll\CxUseDll.sln
????..A..H.?????16384??2014-11-04?11:20??C#_Cpp\Cpp\CxUseDll\CxUseDll.suo
?????文件????????138??2007-07-26?16:32??C#_Cpp\Cpp\CxUseDll\obj\CxUseDll.csproj.FileList.txt
?????文件????????360??2014-11-04?11:07??C#_Cpp\Cpp\CxUseDll\obj\Debug\CxUseDll.csproj.FileListAbsolute.txt
?????文件???????5120??2014-11-04?11:07??C#_Cpp\Cpp\CxUseDll\obj\Debug\CxUseDll.exe
?????文件??????11776??2014-11-04?11:07??C#_Cpp\Cpp\CxUseDll\obj\Debug\CxUseDll.pdb
?????文件???????5075??2014-11-04?11:07??C#_Cpp\Cpp\CxUseDll\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件????????376??2014-11-04?11:14??C#_Cpp\Cpp\CxUseDll\obj\x86\Debug\CxUseDll.csproj.FileListAbsolute.txt
?????文件???????5120??2014-11-04?11:13??C#_Cpp\Cpp\CxUseDll\obj\x86\Debug\CxUseDll.exe
?????文件??????13824??2014-11-04?11:13??C#_Cpp\Cpp\CxUseDll\obj\x86\Debug\CxUseDll.pdb
?????文件???????5082??2014-11-04?11:13??C#_Cpp\Cpp\CxUseDll\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件????????825??2014-11-04?11:13??C#_Cpp\Cpp\CxUseDll\Program.cs
?????文件???????1278??2007-07-26?13:57??C#_Cpp\Cpp\CxUseDll\Properties\AssemblyInfo.cs
?????文件???????1534??2014-11-04?10:46??C#_Cpp\Cpp\CxUseDll\UpgradeLog.xm
?????文件???????3348??2014-11-04?10:46??C#_Cpp\Cpp\CxUseDll\_UpgradeReport_Files\UpgradeReport.css
?????文件??????12505??2010-05-04?01:19??C#_Cpp\Cpp\CxUseDll\_UpgradeReport_Files\UpgradeReport.xslt
?????文件?????????69??2014-11-04?10:46??C#_Cpp\Cpp\CxUseDll\_UpgradeReport_Files\UpgradeReport_Minus.gif
?????文件?????????71??2014-11-04?10:46??C#_Cpp\Cpp\CxUseDll\_UpgradeReport_Files\UpgradeReport_Plus.gif
?????文件????1331304??2014-11-04?11:13??C#_Cpp\Cpp\diaCallBackDll\Debug\diaCallBackDll.dll
............此處省略85個(gè)文件信息
- 上一篇:多選的combox
- 下一篇:C# wpf 仿360界面 (winform)
評(píng)論
共有 條評(píng)論