[問題] Web API 2 DllImport失敗疑問
今日用Web API 2調用C wrapper的dll庫,
但是發現調用到接口函數時,程序就卡住了,
嘗試把參數EntryPoint改成不存在函數名稱時,
也是直接卡住,而不是報入口不存在...
不太確定是哪裡有誤,想請板上前輩指導,謝謝。
[DllImport(@"dllTest3.dll", EntryPoint = "initRtspServer", CharSet =
CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
public static extern int initRtspServer(ushort port);
protected void Application_Start()
{
GlobalConfiguration.Configure(WebApiConfig.Register);
ushort portGo = 3356;
int abc = initRtspServer(portGo);
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 122.116.193.176
※ 文章網址: https://www.ptt.cc/bbs/Web_Design/M.1512555275.A.E55.html
→
12/07 21:11,
7年前
, 1F
12/07 21:11, 1F
Web_Design 近期熱門文章
PTT數位生活區 即時熱門文章