[問題] 呼叫unmanaged C++ function
我想用DllImport的方法,假如我這個C++ function是做sorting, input是int array
prototype是 void sort(int *buf, int count);
那我C#裡面用的型別應該要是什麼呢?
[DllImport("test.dll")]
protected static extern void sort(int[] buf, int count);
這樣可以嗎?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.138.75.52
※ 編輯: rollingcom 來自: 220.138.75.52 (06/24 22:51)
→
06/25 00:18, , 1F
06/25 00:18, 1F
→
06/25 12:58, , 2F
06/25 12:58, 2F
→
06/25 21:26, , 3F
06/25 21:26, 3F
C_Sharp 近期熱門文章
PTT數位生活區 即時熱門文章