作者james999 (无伤大雅)
看板Web_Design
标题[问题] Web API 2 DllImport失败疑问
时间Wed Dec 6 18:14:32 2017
今日用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://webptt.com/cn.aspx?n=bbs/Web_Design/M.1512555275.A.E55.html
1F:→ james999: 问题已解决!Windows不能在载入dll时建立线程. 12/07 21:11