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

ID: Q223344


The information in this article applies to:
  • Microsoft Visual J++, version 6.0
  • Microsoft Windows 95
  • Microsoft Windows 98


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 this to be a bug in the Microsoft products 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:

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

Q194295 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:


  3. import com.ms.wfc.app.*; 
  4. Add the following code to main( ):


  5. RegistryKey r = Registry.CURRENT_USER.createSubKey("Software\\Microsoft\\VisualStudio\\6.0\\Debugger");
    r.setValue("TestArray",new String[]{"aa","bb","cc"}); 
  6. Compile and run the code.


  7. 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.


© Microsoft Corporation 1999, All Rights Reserved.
Contributions by Joseph B. Hall, Microsoft Corporation

Additional query words:

Keywords : kbservicepack kbVJ600bug kbWinOS95 kbWinOS98 kbVS600sp2 kbVS600SP1 kbVS600sp3fix
Version : WINDOWS:6.0,95
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: May 19, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.