Re: [問題] 也許這是一個unsafe的問題吧

看板C_Sharp作者 (躂躂..)時間18年前 (2008/02/21 23:45), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/3 (看更多)
※ 引述《AdamHsu (AdamHsu)》之銘言: : [DllImport(dllName, CharSet = CharSet.Ansi, CallingConvention = : CallingConvention.Cdecl)] : public static unsafe extern Int32 query_ex(void* session_handle, : ref Int32 TStatus, UInt32 Type, message* Buffer, : sbyte BFlag, void* RBuffer, ref UInt32 RBuffer_Length, 這裡改成 IntPtr : ref UInt32 TID, ref UInt32 ORID); : // 以下是RBuffer使用前的處裡,其他部分的參數礙於篇幅先行掠過 : IntPtr ptr1 = Marshal.AllocHGlobal(64000); 傳的時候直接用 ptr1 傳試試吧~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.139.133.162
文章代碼(AID): #17lPojkJ (C_Sharp)
討論串 (同標題文章)
文章代碼(AID): #17lPojkJ (C_Sharp)