作者silveryfox99 (银狐)
看板C_Sharp
标题Re: [问题] dll的使用?
时间Wed Nov 21 11:53:39 2007
※ 引述《toki (いまがその时だ)》之铭言:
: ※ 引述《silveryfox99 (银狐)》之铭言:
: : 小弟用vs2005开发c# project
: : 目前手上有一个c/c++的dll
: : 但是苦无使用的方法
: : 使用regsvr32
: 这个是给 COM/ActiveX 物件用的,对一般 DLL 而言,这个指令没有意义
: 那个 dll 的 document 有要求你要先执行这个命令?
无
dll的document里使用的方法是Visual Studio 6.0
To set 'Code Generation' option:
1. In Project Settings (Alt+F7), choose the 'C/C++' tab
2. In the 'Category' combo box, select 'Code Generation'.
3. In the 'Use run-time Library' set the option according to the table below.
To set the preprocessor flags:
1. In Project Settings (Alt+F7), choose the 'C/C++' tab
2. In the 'Category' combo box, select 'Preprocessor'.
3. In the 'Preprocessor definitions' add the preprocessor flag.
而小弟使用的是vs2005
: : 出现
: : "xx.dll已载入﹐但是找不到DllRegisterServer进入点
: : 无法登录这个档案"
: : 请高手指教﹐谢谢
: Try google "c# dllimport",但是你必需先拥有这个 dll 里面 function 的宣告
func宣告已有﹐只是找不到能够使用这个dl的方法
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 210.243.151.204
1F:推 toki:那就是一般dll,用dllimport解决即可 11/21 13:29
2F:→ silveryfox99:用DIIImport会找不到dll档 11/21 16:09
3F:→ silveryfox99:"无法载入 DLL 'test.dll': 找不到指定的模组。 11/21 16:09
4F:→ silveryfox99:(发生例外状况於 HRESULT: 0x8007007E)" 11/21 16:09
5F:推 horngsh:DLL档的路径有写对吗? 要用@"X:\dir\test.dll"不然要用双\ 11/21 17:00