C#根據Debug、Release模式動態加載dll
//根據Debug、Release狀態動態加載dll文件
#if (DEBUG)
const string dllPathCamera = @".\IPCamerad.dll";
const string dllPathDetect = @".\FaceAnalysisModulesd.dll";
#else
const string dllPathCamera = @".\IPCamera.dll";
const string dllPathDetect = @".\FaceAnalysisModules.dll";
#endif
#region 調用高偉傑網絡攝像頭DLL
[DllImport(dllPathCamera, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern int InitIPCamera(); //1、初始化
#if (DEBUG)
const string dllPathCamera = @".\IPCamerad.dll";
const string dllPathDetect = @".\FaceAnalysisModulesd.dll";
#else
const string dllPathCamera = @".\IPCamera.dll";
const string dllPathDetect = @".\FaceAnalysisModules.dll";
#endif
#region 調用高偉傑網絡攝像頭DLL
[DllImport(dllPathCamera, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern int InitIPCamera(); //1、初始化
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.