亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

關于調用com組件的問題

關于調用com組件的問題

米脂 2018-11-20 05:02:13
com組件名稱 s.dll包含方法簽名如下int CreateKey(char* dkey, int dkeyLen, char* ekey, int ekeyLen);c#這樣調用[DllImport( "s.dll" , EntryPoint="CreateKey" ,CharSet = CharSet.Ansi)]public static extern int CreateKey(out string decryptKey , int decryptKeyLen ,out string encryptKey , int encryptKeyLen );調用代碼如下:string dkey = "";string ekey = "";int dlen = 32;int elen = 32;CreateKey(out dkey, dlen, out ekey, elen); 看起來似乎正確,調用的時候確報如下錯誤Additional Information: The runtime has encountered a fatal error. The address of the error was at 0x79e71bd7, on thread 0x7b0. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.郁悶...
查看完整描述

2 回答

?
幕布斯7119047

TA貢獻1794條經驗 獲得超8個贊

把dll傳上來看看

查看完整回答
反對 回復 2018-11-21
  • 2 回答
  • 0 關注
  • 493 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號