Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Redistributing ActiveX component (ocx)

Posted on 2003-03-26
5
Medium Priority
?
480 Views
Last Modified: 2013-11-25
Have developed a ActiveX component in (visual studio win2000)C++ and now whants it to be distributed and started from my webbpage:
1.User gets in webbpage
     check if Component installed
     if not, install and register component
     then start application

2.The way it is now I can't even manually install and register ocx on other computers, even if I copies the whole project and compiles again:
      when trying to register I get LoadLibrary(xxx.ocx) failed.
3. Which files must be distributed to make ActiveX componets work?

My question is how to do 1,3 and why 2 i happening

 -Daniel-
0
Comment
Question by:tankthall
5 Comments
 
LVL 3

Expert Comment

by:Nosfedra
ID: 8210768
Have you registered the component using Regsvr32?
You should call regsvr32 your_ocx_name to add the control entries into the Windows registry.

Your OCX should be exporting a function called DLLRegisterServer. If you used the wizard to generate your component frame, that function should be right there, between the global functions of the module.

Essentially, the regsvr32 loads the library (OCX), obtains the pointer to the DLLRegisterServer function and calls it.

Have you proceeded with these steps?
0
 
LVL 3

Expert Comment

by:VBtom
ID: 8210789
To install an ocx on a foreign computer:
*it should be copied to c:\windows\system
*then "Regsvr32.exe NameOfYourStuff.ocx" should be run to make windows recognize it. (I guess that's what wasn't done and because of this it didn't work.)

This if you sit before the computer, I have no idea of how to do it from a webpage
0
 

Author Comment

by:tankthall
ID: 8211290
I have tried to reg xxx.ocx with resvr32 resulting in error: LoadLibrary failed

But the main question is how to make i autoinstall, when visitor gets in to my webbpage... like any other ActiveX componets do when I enter webbpage with ActiveX component.

When I redistribute ActiveX comp. via LAN it works in differnt computer, but if the same computer visits (after deleting activeX comp.) webbpage with exactly the same files it fails:

ActiveX comp inserted in webpage by object-tag, ocx and inf-fil zipped into cab-file makes it work localy but not by weppage why?
0
 
LVL 9

Accepted Solution

by:
tkalchev earned 360 total points
ID: 8216588
You can try to do 2 things :

1. If you have InstallShield Developer Software, then you can build so called "Web Setup", the software will create a Web-page for you, which will install your ocx or whatever on any computer.

2. You can add CODEBASE into the OBJECT tag :

Now your declaretion  looks like :

<OBJECT id=SOME_ID classid=clsid:SOME_CLSID>
<PARAM NAME="SomeParameter1" VALUE="SomeValue">
...

</OBJECT>

Make it like :

<OBJECT id=SOME_ID classid=clsid:SOME_CLSID
CODEBASE="http://www.your.web.server.com/somedir/setupfile.cab">
<PARAM NAME="SomeParameter1" VALUE="SomeValue">
...

</OBJECT>

Where http://www.your.web.server.com/somedir/setupfile.cab is teh full URL of your CAB file, containing the oc, inf and any other files, required for the ocx to work.

Consider http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/properties/codebase.asp for any other options of CODEBASE directive
0
 

Author Comment

by:tankthall
ID: 8217210
Allready found second solution, but a good answer so you get may points... thanks!

 -Daniel-
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question