我的程序的操作顺序是(通过dll调用创建文件->读取创建的文件)
但它不起作用。
调用dll后ReadAllLine函数不起作用,进入无限等待状态。使用的cpu也是0。
如何运行函数并读取文件?
[DllImport("Pcap_Parsing.dll", EntryPoint = "DEC_Parsing", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
string FilePath = "file~~~/~~~/~~~.pcap"
string[] FileLines;
public static extern void DEC_Parsing(string fn);
Parsing(FilePath); //file create test.ini
FileLines = System.IO.File.ReadAllLines(~~~~path/test.ini); //When this function is executed, the cpu usage becomes 0 and it is in an infinite wait state.