日期:2014-05-18  浏览次数:20895 次

regsvr32注册问题
小弟近来做一个小程序,需要注册dll,于是用了ShellExcute,代码如下:

[code=C#][/code] StringBuilder regexe;

regexe = new StringBuilder("C:\\Windows\\System32\\regsvr32.exe ");

 ShellExecute((IntPtr)0, new StringBuilder("OPEN"),regexe , new StringBuilder(Directory.GetCurrentDirectory() + "\\GK.dll"), null, 1);


发现在D,E,F,G.....盘注册无误,但打包安装到C盘的program files 下后就出错错误提示为“Load Library"C:\program"失败-找不到指定模块”


求解决办法

------解决方案--------------------

new StringBuilder("\"" + Directory.GetCurrentDirectory() + "\\GK.dll\""), null, 1);