我修改注册表,自动加载dll文件,但是只能打开cad,dll并没有加载,下面是部分代码,
RegistryKey Autodesk = SOFTWARE.OpenSubKey("Autodesk", true); RegistryKey AutoCAD = Autodesk.OpenSubKey("AutoCAD", true); RegistryKey R16_2 = AutoCAD.OpenSubKey("R17.2", true); RegistryKey ACAD = R16_2.OpenSubKey("ACAD-7001:804", true); RegistryKey Applications = ACAD.OpenSubKey("Applications", true); RegistryKey MXCAD = Applications.CreateSubKey("MXCAD"); MXCAD.SetValue("LOADCTRLS", 0x02); MXCAD.SetValue("LOADER",GetModuleDir()+ @"CADBuilde.dll"); MXCAD.SetValue("MANAGED", 0x01); 谢谢指教! |