FIX: DhRow.removeAll() Causes a


When you call DhRow.removeAll() the following exception occurs: Unknown error(0x800a0258)
at com/ms/wfc/html/om/IHTMLElement.setOuterHTML (
at com/ms/wfc/html/DhElementArray.removeInternal (
at com/ms/wfc/html/DhElementArray.remove (
at com/ms/wfc/html/DhBaseContainer.removeChildren (
at com/ms/wfc/html/DhBaseContainer.removeAll (


To work around this problem, remove each cell in the row individually using
the DhRow.remove() method. For example, do the following to remove all of the cells from a DhRow element called row1:
DhCell[] cells = row1.getCells();if (cells != null) {   for (int i = 0; i < cells.length; ++i)   row1.remove(cells[i]);}


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


Steps to Reproduce Behavior

  1. In Visual J++, select New Project from the File menu.
  2. In the New Project dialog box, click the New tab.
  3. In the Visual J++ Projects tree, click Web Pages.
  4. Click Code-Behind HTML.
  5. Click Open to create the project.
  6. Modify as follows:
    import*;import*;import*;public class Class1 extends DhDocument{   public Class1()   {      initForm();   }   private void initForm()   {   }   protected void onDocumentLoad(Object sender, Event e)   {      this.add(new DhHorizontalRule());      DhTable table=new DhTable();      add(table);      DhRow row1,row2;      DhCell cell;      row1=new DhRow();      table.add(row1);      cell=new DhCell("Cell1");      row1.add(cell);      cell=new DhCell("Cell2");      row1.add(cell);      cell=new DhCell("Cell3");      row1.add(cell);      row2=new DhRow();      table.add(row2);      cell=new DhCell("Cell3");      row2.add(cell);      cell=new DhCell("Cell4");      row2.add(cell);      cell=new DhCell("Cell5");      row2.add(cell);      row1.removeAll();// to workaround the problem, comment out the above call to removeAll// and uncomment the following lines://    DhCell[] cells = row1.getCells();//    if (cells != null) {//       for (int i = 0; i < cells.length; ++i)//          row1.remove(cells[i]);//    }   }}
  7. Modify Page1.html as follows:
    <HTML><BODY><hr><OBJECT classid=""     height=0 width=0 ... VIEWASTEXT><PARAM NAME=__CODECLASS VALUE=Class1><PARAM NAME=CABBASE VALUE=Project1.CAB></OBJECT><!-- Insert HTML here --></BODY></HTML>
  8. Run the project.
RESULT: The following exception error occurs: Unknown error(0x800a0258)


For support information about Visual J++ and the SDK for Java, visit the following Microsoft Web site:

Id. de artículo: 194898 - Última revisión: 02/14/2017 - Revisión: 1

Microsoft Visual J++ 6.0 Edición estándar