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、初始化   

你可能感兴趣的:(C#,学习笔记)