Article ID: 320940 - Last Review: May 11, 2006 - Revision: 5.0 SAMPLE: PictureDownload.exe Enables Population of an ImageList with URLsThis article was previously published under Q320940 On This PageSUMMARY
The PictureDownload.exe sample demonstrates how you can restore to your Web pages the ImageList functionality that is lost after you apply the Security Update Q313675. The sample in this article applies to Internet Explorer that runs on Microsoft Windows 98, Microsoft Windows NT 4.0 SP6a and later, Microsoft Windows 2000 SP3 and later, and Microsoft Windows XP. MORE INFORMATIONThe following file is available for download from the Microsoft Download Center: Collapse this image ![]() For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base: 119591
(http://support.microsoft.com/kb/119591/EN-US/
)
How to Obtain Microsoft Support Files from Online Services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.
The PictureDownload.exe file contains the following files:
Collapse this table
NOTE: The main directory of the uncompressed sample is a Microsoft Visual C++ .NET project. The subdirectory PictureDownloadVC6 contains the same code, except in a Visual C++ 6.0 project. Security Update Q313675 disables a feature that is known as Inline Data in Internet Explorer. You can use the Inline Data feature to allow base64-encoded binary data to be assigned to an ActiveX control. However, you may have already written Web pages that use the TreeView control and the ImageList control as described in the Microsoft Knowledge Base article Q184975 that is listed in the "References" section of this article. In this sample, the images of the ImageList control are loaded by encoding all of the images in base64. Then you can assign the later string to the DATA attribute of the <OBJECT> tag of the ImageList. This is the feature that Security Update Q313675 disables. However, you can easily develop a small ActiveX control that fetches .bmp images and then returns the IDispatch pointer from the IPictureDisp image, which is the COM/OLE interface that ImageList requires to add an image. This workaround has two advantages:
PictureDownload.dllPictureDownload.dll defines a simple ActiveX control with a single external method, DownloadPicture, which takes a URL reference to an image and returns an IDispatch. You can do this if you use the COM function OleLoadPicturePath as shown in the following sample:PictureDownload.htmAfter you compile the component, you must instrument your HTML file to load the ImageList from the PictureDownload component instead of from the DATA attribute of the <OBJECT> tag of the ImageList. You must first include an <OBJECT> tag for your own component:Deploy PictureDownloadTo deploy the PictureDownload method, you must create a cabinet (.cab) file for the Internet Component download. If you use the Microsoft Visual C++ .NET project, you can use the Cabinet Project type under Setup and Deployment Project.
Internet Component Download NOTE: The DownloadPicture method accepts absolute URL inputs only. If an error occurs you must verify that the URL passed to the function is a valid URL.
http://msdn.microsoft.com/library/default.asp?url=/workshop/delivery/download/overview/entry.asp (http://msdn.microsoft.com/library/default.asp?url=/workshop/delivery/download/overview/entry.asp) REFERENCESFor additional information, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
317599
(http://support.microsoft.com/kb/317599/EN-US/
)
ActiveX Inline Data Streaming Functionality Is Disabled After You Install the Q313675 Security Patch
313675
(http://support.microsoft.com/kb/313675/EN-US/
)
MS01-058: File Vulnerability Patch for Internet Explorer 5.5 and Internet Explorer 6
184975
(http://support.microsoft.com/kb/184975/EN-US/
)
BUG: Setting TreeView1.ImageList Causes Err in Internet Explorer
For more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:http://msdn.microsoft.com/ie/
(http://msdn.microsoft.com/ie/)
http://support.microsoft.com/iep (http://support.microsoft.com/iep) | Article Translations
|

Back to the top

