我用installshiled打包,用RegDBSetKeyValueEx设置REGDB_BINARY值编译报错:string literal exceess 255 characters,怎么解决这个问题了?

解决方案 »

  1.   

    RegDBSetDefaultRoot ( HKEY_LOCAL_MACHINE );
    RegDBSetKeyValueEx ( "SOFTWARE\\Microsoft\\Internet Explorer\\Plugins\\Extension\\.pbd" , "" , REGDB_STRING , "" , -1 );
    RegDBSetKeyValueEx ( "SOFTWARE\\Microsoft\\Internet Explorer\\Plugins\\Extension\\.pbd" , "Content Type" , REGDB_STRING , "application/vnd.powerbuilder6" , -1 );
      

  2.   

    我说的是REGDB_BINARY型的,REGDB_STRING我已经做好了
      

  3.   

    RegDBSetKeyValueEx ( svDB +"\\Engines\\Xbase" , "Deleted" , REGDB_BINARY , "00" , -1 );
      

  4.   

    我也是这么做的,可是我的值很长,所以报错:string literal exceess 255 characters
      

  5.   

    最后一个参数nSize要指定的.
    nSize Specifies the size—in bytes—of the data to be set. You can specify -1 in this parameter when nType is REGDB_STRING, REGDB_STRING_EXPAND, or REGDB_NUMBER, and InstallShield will set the size. However, with REGDB_BINARY and REGDB_STRING_MULTI, you must always specify the number of bytes of binary data that you are storing. 
    http://helpnet.installshield.com/robo/projects/InstallShieldXLangRef/LangrefRegDBSetKeyValueEx.htm