dllimport 如何指定路径

dllimport可以使用绝对路径

DllImport(@"C:\OJ\Bin\Judge.dll")

也要以使用相对路径

DllImport(@"..\dll\Judge.dll")

..的意思是上一级目录,这样就能找到dll文件了

猜你喜欢

转载自www.cnblogs.com/sharestone/p/11246378.html