阅读:1672回复:0
注册表问题
我用Installshield做安装盘时,让其在某目录下注册一个驱动程序的路径,源码如下:
nRootKey = HKEY_LOCAL_MACHINE; if (RegDBSetDefaultRoot(nRootKey) < 0) then return -1; endif; szKey=\"SYSTEM\\\\CurrentControlSet\\\\Control\\\\VirtualDeviceDriv ers\"; if (RegDBKeyExist(szKey) < 0) then if (RegDBCreateKeyEx(szKey, \"\") < 0) then return -1; endif; endif; szClass=\"Vdd\"; szValue=WINDIR^\"\\\\system32\\\\drivers\\\\Mfvdd.dll\"; nsize = StrLength(szValue); if (RegDBSetKeyValueEx (szKey,szClass,REGDB_STRING_MULTI,szValue,nsize)<0) then MessageBox (\"注册vdd失败,请手动修改注册表!\", SEVERE); return -1; endif; nResult = CreateRegistrySet( \"\" ); 可是注册结果,注册表中那一项的数据值为 c:\\winnt\\system32\\\\drivers\\\\Mfvdd.dll... 后面怎么会多处三个点来,导致结果不能用, 如果手动把那三个点去掉就可以了,这是为什么哪?。 [编辑 - 11/22/03 by iriszhu] |
|