[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

What dll's should be distributed with MFC ActiveX control

Posted on 2010-03-29
5
Medium Priority
?
708 Views
Last Modified: 2013-11-20
Hi,

I have developed a MFC ActiveX control in Visual Studio 2008. It is a simple control that checks registry keys. I have compiled release version and packaged it in .cab file. ActiveX control works fine in web browser on the machines that have Visual Studio 2008.

However, it does not get registered on machines that do not have Visual Studio 2008. It seems to be some missing Dlls issue.

Please let me know which dlls should be packaged in .cab file along with .ocx file for ActiveX control to work on machines that do not have Visual Studio 2008. ActiveX control is used in HTML Web Page in Internent Explorer.

Regards,
Sunil
0
Comment
Question by:sunil1863
  • 2
  • 2
5 Comments
 
LVL 33

Expert Comment

by:pgnatyuk
ID: 29011015
You can try Dependency Walker to detect it:
http://www.dependencywalker.com/

It does not always work in such cases when you need to register an ActiveX.
You can launch REGSVR32.EXE on the target computer in the command line and you will see the error.

So I think it will help if you can install Redistributable Package
http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en

This package is installed independently from you cab and before it.
0
 

Author Comment

by:sunil1863
ID: 29089895
I have tried Static Linking of MFC in Visual Studio 2008 and able to get the ActiveX control downloaded to client browser and run. I tried it in Vista, Windows 7. My requirement is that user should not have to be prompted for installing the VC redistributable package. ActiveX control should automaticall work from the web page without any prompts or manual installs.
0
 
LVL 33

Accepted Solution

by:
pgnatyuk earned 1500 total points
ID: 29091703
It is absolutely correct. The question is only one - why you used an MFC code in it?
Check all dependencies, use single-threaded C run-time libraries, try to link MFC statically,...
Better was to develop your control with ATL only.
Firstly be sure that this redistributable package really helps. If we do not know it for sure, we are just speculating here.
 
0
 
LVL 39

Expert Comment

by:itsmeandnobodyelse
ID: 29926220
>>>> You can launch REGSVR32.EXE on the target computer in the command line and you will see the error.

I would go that way pgnatyuk has suggested. Open a command window and navigate to the folder where your axtive-x resides and call regsvr32:

 c:
 cd \myprojects\myactivex\Release
 regsvr32 myactivex.ocx

The regsvr32 tries to launch the active-x and will output error messages if a linked dll is missing.

You could retrieve that missing dll from the distribution kit or from system32 folder of your developer machine. Simply put it in the same folder where  active-x is and try again.

Probably only the current mfcxx.dll and the current msvcrtxx.dll were missing where xx is 90 for VS2008.
0
 

Author Closing Comment

by:sunil1863
ID: 31708501
I used Static Linking to MFC eventually. The redistributable MFC hint gave me the idea to go for static linking of MFC.
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

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

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Before we dive into the marketing strategies involved with creating an effective homepage, it’s crucial that EE members know what a homepage is. In essence, a homepage is the introductory, or default page, of a website that typically highlights the …
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

607 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