Link to home
Start Free TrialLog in
Avatar of IronFoot
IronFoot

asked on

ActiveX User Document and my home page

I created a simple ActiveX User Document and compiled it with VB 6.  I then used the Packaging and Deployment Wizard to make an Internet package for me.  I uploaded the .CAB file, the .VBD file and the sample .htm file the wizard created.  In the code, it said:

<OBJECT ID="userdocument1"
CLASSID="CLSID:"
CODEBASE="project1.cab#version=1,0,0,0">
</OBJECT>

When I view the page on my machine, it looks fine.  When I go to another machine, it gives me the download a file dialog box, and tries to download the .vbd file.  What gives?  Do I need the CLSID in my html code?  If so, where do I find it?  It seems like the browser is trying to download the .vbd file and is not installing the CAB file.  Does anyone have any suggestions or experience with this?
Avatar of hes
hes
Flag of United States of America image

Yes you have to have the CLSID. When IE see's a vbd file it will try and download the the users pc teh cab and vbd file install them and register the vbd. The bad side is inorder for IE to allow the download to proceed the user must set the security to very low.
Avatar of stefanx
stefanx

What is the hassle with VB6 and ActiveX Document distribution? This kind of question pops up every now and then. This was hardly a Problem in VB5. Does this "Packaging & Deployment Wizard" in VB6 suck big time? If anyone has a comment, please post it here - I'm looking at upgrading to VB6 but so far I'm not hearing too great things about it.
Avatar of IronFoot

ASKER

Where can I find the CLSID for that CAB?
Ok, I've gathered that I really do need the Class ID for my User Document.. For the love of God, how do I find it??!?!?
Once again, I don't know about the VB6 deployment package but in VB5, the setup wizard makes three files :

The vbd, the cab file and a sample htm file. It also makes a subdirectory in the directory to which it wrote these 3 files called support. In this directory, there is a .inf file that, if you read it, contains the class ID for your document.

Hope this is also applicable to VB6
Incidentally, I recall from the VB5 side that if you used anything that did not correctly specify its dependencies, then you would get the download vbd file to disk. Maybe make sure that none of the controls that you are using on the ActiveX Document perhaps need other dependent files. This is normally discussed in a control's help file under shipping, distribution or distributable components.
ASKER CERTIFIED SOLUTION
Avatar of Mirkwood
Mirkwood

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Mirkwood, thanks for your help.  I'm still having problems finding the Class ID.  Where do I put the code you gave me in my User Document?  And what does it do?

Why wouldn't the packaging and deployment wizard put the ID in the sample HTM file and make all of this easier!

Also, I looked in the sample .INI file and didn't find it there, either.  I found a bunch of CLSIDs for other things, but not for my project.  Darn.

Thanks again for your help
This code should be placed in another project. It can be used to convert a progid to a clsid.

Have you tried the registry.
HKEY_LOCAL_MACHINE\<projectname.clsname>\CLSID
?
Mirkwood, thanks again for your help.. I can't find my program in the registry at that location.. I will search for it after submitting this comment.  

So I put your code in another project and then run it?
Mirkwood, thanks again for your help.. I can't find my program in the registry at that location.. I will search for it after submitting this comment.  

So I put your code in another project and then run it?
Mirk, I found the CLSID in the registry where you said, under Software, Classes!

Let me see if that does anything...
I think I'm almost there.  I put that CLSID in the <object> tag in the html page.  When I viewed it from another machine's browser, it asked me if I wanted to download and install the .cab, I said yes.. It loaded for a while, and then gave me the same download file dialog box.  Darn!  So close!
Mirk, that did it.. a million thanks!!!