看板 C_Sharp 關於我們 聯絡資訊
※ 引述《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
toki:那就是一般dll,用dllimport解決即可 11/21 13:29
silveryfox99:用DIIImport會找不到dll檔 11/21 16:09
silveryfox99:"無法載入 DLL 'test.dll': 找不到指定的模組。 11/21 16:09
silveryfox99:(發生例外狀況於 HRESULT: 0x8007007E)" 11/21 16:09
horngsh:DLL檔的路徑有寫對嗎? 要用@"X:\dir\test.dll"不然要用雙\ 11/21 17:00