Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 184975 - Last Review: May 11, 2006 - Revision: 3.0
BUG: Setting TreeView1.ImageList Causes Err in Internet Explorer
This article was previously published under Q184975
Setting the ImageList property of the TreeView control in script causes
Microsoft Internet Explorer 4.0x to display the following application
error:
The instruction at "0x70423bb0" referenced memory at "0x00000010". The
memory could not be "read".
Set the ImageList property by using a <PARAM> tag as part of the <OBJECT>
tag, like so:
<PARAM NAME="ImageList" VALUE="myImageList">
NOTE: myImageList is your ImageList that was created by using the <OBJECT>
tag. Please see the MORE INFORMATION section for HTML code that demonstrates this bug and the resolution.
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
The following HTML code demonstrates the bug described in this article and
the resolution.
Sample Code
<HTML>
<HEAD>
<TITLE>BUG: TreeView1.ImageList application error in Internet
Explorer 4</TITLE>
<SCRIPT LANGUAGE="VBScript">
<!--
Option Explicit
Sub Window_OnLoad()
Dim node
Set node = TreeView1.Nodes.Add(,,"KEY1", "Test1")
node.expanded=true
node.Image=1
Set node = TreeView1.Nodes.Add("KEY1", 4, "KEY2", "Test2")
node.Image=1
Set node = TreeView1.Nodes.Add("KEY1", 4, "KEY3", "Test3")
node.Image=1
' The following line causes the application error
' described in this article:
'
' TreeView1.ImageList = myImageList
End Sub
-->
</SCRIPT>
</HEAD>
<BODY>
<!-- You may need to create a license pack for the final
version of this page so that the comctl32 will be licensed
to run on your system. Please see the Internet Client SDK
for more information about licensing and license pack files.
-->
<!-- <OBJECT CLASSID = "clsid:5220cb21-c88d-11cf-b347-00aa00a28331">
<PARAM NAME="LPKPath" VALUE="YourLicensePack.lpk">
</OBJECT>
-->
<OBJECT ID="TreeView1" WIDTH=100 HEIGHT=100
CLASSID="CLSID:0713E8A2-850A-101B-AFC0-4210102A8DA7"
CODEBASE="http://activex.microsoft.com/controls/vb5/comctl32.cab
#version=5,1,43,19">
<PARAM NAME="_ExtentX" VALUE="2646">
<PARAM NAME="_ExtentY" VALUE="2646">
<PARAM NAME="_Version" VALUE="327682">
<PARAM NAME="Style" VALUE="7">
<PARAM NAME="Appearance" VALUE="1">
<PARAM NAME="ImageList" VALUE="myImageList">
</OBJECT>
<OBJECT ID="myImageList" WIDTH=39 HEIGHT=39
CLASSID="CLSID:58DA8D8F-9D6A-101B-AFC0-4210102A8DA7"
CODEBASE="http://activex.microsoft.com/controls/vb5/comctl32.cab
#version=5,1,43,19"
DATA="DATA:application/x-oleobject;BASE64,j43aWGqdGxCvwEIQECqNpy
FDNBIIAAAA7QMAAO0DAACAfuHmAgAFADEAAAAQ
ABAA/wD/AP//QQAB782rAAAFANTrZgBBAEEA/////////wAAAAAAAQAAAAEG
AAAAQwBhAG0AZQByAGEAAQAAAAEAAABsdAAA+AAAAEJN9gAAAAAAAAB2AAAA
KAAAABAAAAAQAAAAAQAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AIAAAIAAAACAgACAAAAAgACAAICAAACAgIAAwMDAAAAA/wAA/wAAAP//AP8A
AAD/AP8A//8AAP///wCIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIhwB4iI
iIcAAAAAAAB4gHcAd3cAdwiAdwd3d3B3CIB3B4d3cHcIgHcH+HdwdwiA/wB3
dwD/CID/8AAAD/8IgAAAAAAAAAiIAIcP8HgAiIiIiHAHiIiIiIiIiIiIiIiI
iIiIiIiIiEUA+EcA
">
</OBJECT>
</BODY>
</HTML>
Sample Code for Internet Explorer 6.0
<HTML>
<HEAD>
<TITLE>Treeview 6.0 With ImageList 6.0</TITLE>
<SCRIPT LANGUAGE="VBScript">
<!--
Option Explicit
Sub Window_OnLoad()
Dim newNode
'set TreeView1.ImageList = myImageList
Set newNode = TreeView1.Nodes.Add(,,"KEY10088","Test1")
newNode.expanded=true
newNode.Image=1
Set newNode = TreeView1.Nodes.Add("KEY10088",4,"KEY10089","Test2")
newNode.Tag = "10089"
newNode.Image=1
Set newNode = TreeView1.Nodes.Add("KEY10088",4,"KEY10090","Test3")
newNode.Tag = "10090"
newNode.Image=1
End Sub
-->
</SCRIPT>
</HEAD>
<BODY>
<OBJECT id=myImageList
style="LEFT: 0px; TOP: 0px" data=data:application/x-oleobject;base64,I38kLJGF0RGxagDA8Cg2KCFDNBIIAAAA7QMAAO0DAACAfuHmAgAFADIAAAAQABAA/wD/AP//QQAB782rAAAFAIFsqHdBAEEA/////////wBoeCIAAgAAAAEGAAAAQwBhAG0AZQByAGEAAAIAAAABAAAAbHQAAPYAAABCTfYAAAAAAAAAdgAAACgAAAAQAAAAEAAAAAEABAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8AiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIcAeIiIiHAAAAAAAAeIB3AHd3AHcIgHcHd3dwdwiAdweHd3B3CIB3B/h3cHcIgP8Ad3cA/wiA//AAAA//CIAAAAAAAAAIiACHD/B4AIiIiIhwB4iIiIiIiIiIiIiIiIiIiIiIiIgCAAAAbHQAAOYBAABCTeYBAAAAAAAANgAAACgAAAAMAAAADAAAAAEAGAAAAAAAsAEAAMQOAADEDgAAAAAAAAAAAAD///////////////////8AAAAAAAAAAAD///////////////////////////////8AAAAAAAAAAAAAAAD///////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAD///////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////////////////////////////////////////////////////////////////8=
classid=clsid:2C247F23-8591-11D1-B16A-00C0F0283628>
</OBJECT>
<OBJECT ID="TreeView1" WIDTH=100 HEIGHT=100
CLASSID="CLSID:C74190B6-8589-11D1-B16A-00C0F0283628">
<PARAM NAME="_ExtentX" VALUE="2646">
<PARAM NAME="_ExtentY" VALUE="2646">
<PARAM NAME="_Version" VALUE="327682">
<PARAM NAME="Style" VALUE="7">
<PARAM NAME="Appearance" VALUE="1">
<PARAM NAME="ImageList" VALUE="myImageList">
</OBJECT>
</BODY>
</HTML>
For more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:
APPLIES TO
- Microsoft Internet Explorer 4.0 128-Bit Edition
- Microsoft Internet Explorer 4.01 Service Pack 2
- Microsoft Internet Explorer 5.0
- Microsoft Internet Explorer 5.5
- Microsoft Internet Explorer (Programming) 6.0
Retired KB Content DisclaimerThis article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate