FIX: RegistryKey.setValue() Doesn't Work Correctly for String[] (223344)



The information in this article applies to:

  • Microsoft Visual J++ 6.0
  • the operating system: Microsoft Windows 95
  • the operating system: Microsoft Windows 98

This article was previously published under Q223344

SYMPTOMS

After calling setValue( ) on a RegistryKey object, REGEDIT doesn't display the expected value for the key. This only happens on Windows 9x.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This bug was corrected in Visual Studio 6.0 Service Pack 3. For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:

194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new Console Application.
  2. Import the following package:
    import com.ms.wfc.app.*;
  3. Add the following code to main( ):
    RegistryKey r = Registry.CURRENT_USER.createSubKey("Software\\Microsoft\\VisualStudio\\6.0\\Debugger");
    r.setValue("TestArray",new String[]{"aa","bb","cc"});
  4. Compile and run the code.
  5. View the specified key in REGEDIT.

    With Visual Studio 6.0 Service Pack 3, the key "TestArray" should hold "61 61 00 62 62 00 63 63 00 00" when viewed in REGEDIT.

Modification Type:MajorLast Reviewed:11/17/2003
Keywords:kbBug kbfix kbVS600sp3fix KB223344 kbAudDeveloper