How Internet Component Download Works Joshua Lee Developer Support Professional Internet Client Team - PowerPoint PPT Presentation

1 / 42
About This Presentation
Title:

How Internet Component Download Works Joshua Lee Developer Support Professional Internet Client Team

Description:

How Internet Component Download Works. Joshua Lee. Developer Support Professional ... Executing Files by Hyperlink and the File Download Dialog. 6. CAB File ... – PowerPoint PPT presentation

Number of Views:678
Avg rating:3.0/5.0
Slides: 43
Provided by: supportM
Category:

less

Transcript and Presenter's Notes

Title: How Internet Component Download Works Joshua Lee Developer Support Professional Internet Client Team


1
How Internet Component Download WorksJoshua
LeeDeveloper Support ProfessionalInternet
Client TeamMicrosoft Corporation
2
Introduction
  • Since Internet Explorer 3
  • Complicated process
  • Machine dependent
  • Not to download
  • Fails silently

3
Overview
  • Ways of Internet Download
  • The Download Process
  • Example ActiveX Control
  • When it Goes Wrong
  • How About ActiveX Document
  • Common Problems
  • Need More Help?
  • QA

4
Ways of Internet Download
  • Direct Navigation
  • Via CAB and INF File
  • Other Ways

5
Direct Navigation
  • http//microsoft.com/default.htm
  • http//microsoft.com/myprogram.exe
  • Download .html, .doc, .xls, .exe directly
  • Easy, but no dependencies
  • Q232077 INFO Executing Files by Hyperlink and
    the File Download Dialog

6
CAB File
  • Since Windows 95
  • Compression
  • Single or multiple CABs
  • Designed for Win32 installation
  • Incorporated for Internet

7
Via INF and CAB File
  • Most common (Since IE 3)
  • Designed for Win32 installation
  • Complex setup instructions
  • Adding/modifying registry entries
  • Custom destination directories

8
Other options
  • Via CAB with OSD File
  • File Transfer Protocol (FTP)
  • Choosing a packaging and distribution method
  • http//msdn.microsoft.com/workshop/delivery/downlo
    ad/overview/method.asp

9
The Download Process
  • Preparation
  • Create HTML Page
  • Actual Download Process
  • Display the Component

10
Preparation
  • Creating the component
  • Packaging the Component
  • Signing the Component
  • Create the Web page

11
Tag
  • CODEfilename TYPEMIME-type
  • CLASSID
  • CODEBASE
  • CODE
  • TYPE
  • http//msdn.microsoft.com/workshop/author/dhtml/re
    ference/objects/object.asp

12
ActiveX Control Example
  • VB ActiveX Control
  • VB Runtime
  • OLE Files

13
HTML Page
  • http//MyServer/Mypage.htm
  • CLASSID"CLSIDE94F13CE-43BF-4FDB-A85F-C1C718F1F7E
    4"
  • CODEBASEMyTime.CABversion1,0,0,3"

14
CODEBASE
  • Full URL path
  • CODEBASEhttp//www.this.com/controls/myCab.cabve
    rsion...
  • Relative URL
  • CODEBASEcontrols/myCab.cabversion...
  • No URL
  • CODEBASEversion...

15
Actual Download Process
  • Six-step process
  • Process tag
  • Determine if download is needed
  • Download CAB File
  • Process CAB (INF) File
  • Install components
  • Display the control

16
Get Information
  • MSHTML.DLL
  • HKEY_CLASSES_ROOT\CLSID
  • Permission to run the component
  • Q240797 How to Stop an ActiveX Control from
    Running in Internet Explorer

17
Get Information (continued)
  • URLMON.DLL
  • CodeBaseSearchPath
  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Cur
    rentVersion\Internet Settings
  • Permission to add an registry entry
  • Machine Information
  • Office/IE component
  • Internet Security Settings

18
Permission Checking
  • Check for correct zone

19
Process the Cab File
  • URLMON.DLL
  • Download the main CAB file
  • Process the INF file
  • Install the components
  • Register the components

20
Download the main CAB file
  • Security dialog box
  • Certificates dialog box
  • Temporary Internet Files Folder

21
INF File
  • Each line is one command
  • Version Section
  • Optional
  • For Hooks
  • Setup Hooks Section
  • Add.Code Section

22
Setup Hooks Section
  • Unconditional hooks
  • Registry modification
  • Advpack.dll
  • When and How to use Hooks
  • http//msdn.microsoft.com/workshop/delivery/downlo
    ad/overview/hooks.asp

23
Add.Code
  • Add.Code
  • myTime.ocxmyTime.ocx
  • msvbvm60.dllmsvbvm60.dll
  • oleaut32.dlloleaut32.dll
  • olepro32.dllolepro32.dll
  • asycfilt.dllasycfilt.dll
  • stdole2.tlbstdole2.tlb
  • comcat.dllcomcat.dll

Read and Process
24
myTime.ocx
  • myTime.ocx
  • file-win32-x86thiscab
  • RegisterServeryes
  • clsidE94F13CE-43BF-4FDB-A85F-C1C718F1F7E4
  • DestDir
  • FileVersion1,0,0,4

25
comcat.dll Section
  • comcat.dll
  • hookcomcat.cab_Installer
  • FileVersion6,0,84,95
  • comcat.cab_Installer
  • file-win32-x86 http//activex.microsoft.com/contr
    ols/vb6/VBRun60.cab
  • runEXTRACT_DIR\VBRun60.exe

26
Install the Component
  • Check the versioning of the component
  • Occache.dll
  • Windows 95/98 with IE 4.0 and later
  • \WINDOWS\Downloaded Program Files
  • Windows NT 4.0 and Windows 2000 with IE 4.0 and
    later
  • \winnt\Downloaded Program Files.

27
Add.Code
  • Add.Code
  • myTime.ocxmyTime.ocx
  • msvbvm60.dllmsvbvm60.dll
  • oleaut32.dlloleaut32.dll
  • olepro32.dllolepro32.dll
  • asycfilt.dllasycfilt.dll
  • stdole2.tlbstdole2.tlb
  • comcat.dllcomcat.dll

Read and Process
Install
28
Display the Control
  • MSHTML.DLL
  • CoCreateInstance function
  • CLASSID from Tag

29
What Happens When it Fails
  • ?CodeDownloadErrorLog
  • Temporary Internet Files Folder
  • Code Download Log Viewer Tool
  • Q252937 HOWTO Find Information About Why Code
    Download Failed
  • Q254648 HOWTO Read the Code Download Error Log

30
No Error Log?
  • Successful
  • Fails before it downloads
  • Fails to display
  • Runtime Error
  • Internal Error

31
What Else to Check
  • Internet Options Setting
  • Security
  • Certificate
  • Registry
  • Temporary Internet Files Folder

32
What Else to Check (continued)
  • Downloaded Program Files Folder
  • DLLs version
  • DLL Help Database
  • http//support.microsoft.com/dllhelp

33
How About ActiveX Document
  • Very similar to ActiveX Control
  • Not Tag
  • Direct Navigation
  • Since IE 4.01 SP1
  • No Signing
  • Data Sniffing
  • SetCodebase Tool
  • http//msdn.microsoft.com/vbasic/downloads/downloa
    d.asp?ID038

34
File Download Dialog
35
.vbd Registry Entry
  • My Computer\HKEY_CLASSES_ROOT\.vbd
  • Delete it

36
Common Problems
  • Control Creation
  • Initialize and Terminated Events
  • Single Threaded
  • Object Safe?
  • IObjectSafety Interface
  • Registry Marking

37
Common Problems (continued)
  • Packaging
  • Only include necessary components
  • Include all dependencies
  • MDAC (Q251325)
  • BAT (PDW Support Directory)
  • Cabarc.exe, Makecab.exe (Cabinet SDK)
  • http//msdn.microsoft.com/workshop/management/cab/
    cabdl.asp
  • DUBUILD.EXE (Microsoft SDK for JAVA)
  • For Java Only

38
Common Problems (continued)
  • Signing
  • Valid Certificate
  • Authenticode Tools
  • IE Version Dependent
  • For IE 5
  • http//msdn.microsoft.com/downloads/tools/authenti
    code/authcode.asp
  • For IE 4
  • http//msdn.microsoft.com/downloads/tools/authcode
    ie4/authcodeie4.asp

39
Need More?
  • Internet Component Download Online
    Trouble-shooter
  • http//support.microsoft.com/support/tshoot/
  • WebCast Java Code Download -- Common Problems
    and How to Avoid Them
  • Rafael M. Munoz
  • WebCast Tips for Developing ActiveX Controls
    Using ATL and MFC
  • Nathan Manis

40
Other Help
  • Create ActiveX controls
  • http//msdn.microsoft.com/workshop/components/acti
    vex/intro.asp
  • INF File Architecture
  • http//msdn.microsoft.com/workshop/delivery/downlo
    ad/overview/infarchitecture.asp
  • Java Component Download
  • http//support.microsoft.com/support/kb/articles/Q
    181/3/74.asp

41
Questions?
42
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com