BC97Chapter 38The Navigator and Other Environment ObjectsThe idea of using the tag instead of the tag is that the tag loadsa specific plug-in, whereas the mimetype of the data referenced by the tag lets thebrowser determine which plug-in to use for that mimetype. It s not uncommon, therefore, tosee an tag definition surround an tag both referencing the same exter- nal data file. If the optimum plug-in fails to load, the tag is observed, and thebrowser tries to find any plug-in for the file s mimetype. With an objectelement as part of the HTML page, the element itself is a valid object evenif the plug-in fails to load. Therefore, you must do more to validate the existence of the loadedplug-in than simply test for the existence of the objectelement. To that end, you need toknow at least one scriptable property of the plug-in. Unfortunately, not all scriptable plug-insare fully documented, so you occasionally must perform some detective work to determinewhich scriptable properties are available. While you re on the search for clues, you can alsodetermine the version of the plug-in and make it a minimum version that your objectele- ment allows to load. Tracking down plug-in detailsNot everyone has access to the Microsoft programming development environments (for exam- ple, Visual Studio) through which you can find out all kinds of information about an installedActiveX control. If you don t have access, you can still dig deep to get most (if not all) of theinformation you need. The tools you can use include the Windows Registry Editor (regedit), The Evaluator (Chapter 13), and, of course, your text editor and WinIE4+ browser. The followingsteps take you through finding out everything you need to know about the Windows MediaPlayer control: 1.If you don t know the guidfor the Media Player (most people get it by copying some- one else s code that employs it), you can use the Registry Editor (regedit.exe) to findit. Open the Registry Editor (in Win95/98/NT/XP, choose Run from the Start menu andenter regedit; if that option is not available in your Windows version, search for thefile named regedit). 2.Expand the HKEY_CLASSES_ROOTfolder. 3.Scroll down to the nested folder named CLSID, and click that folder. 4.Choose Edit/Find, and enter Windows Media Player. If you were searching for a differ- ent plug-in, you would enter an identifying name (usually the product name) in this place. 5.Keep pressing F3 (Find Next) until the editor lands upon a folder whose default value(in the right side of the Registry Editor window) shows Windows Media Player. 6.The number inside curly braces next to the highlighted folder is the plug-in s guid. Right- click the number and choose Copy Key Name. Paste the number into your documentsomewhere for future reference. Eventually, it will be part of the value assigned to theclassidattribute of the objectelement. 7.Expand the highlighted folder. 8.Click the folder named InprocServer32. The default value should show a pathname to the actual ActiveX control for the Windows Media Player plug-in. 9.Right-click the (Default) name for the path and choose Modify. The full pathname isvisible in an editable field. 10.Armed with this pathname information, open My Computer and locate the actual fileinside a directory listing.
This entry was posted
on Wednesday, March 26th, 2008 at 7:08 pm and is filed under JBOSS .
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response , or trackback from your own site.