Solved

Referencing ActiveX Components in .NET

Posted on 2004-03-29
5
419 Views
Last Modified: 2012-06-27
I am trying to use FTP features contained in InetCtlsObjects (MSINET.OCX) so I went Project > Add Reference... and clicked Browse and selected the file out of C:\WINDOWS\system32\.

But I got this error:

A reference to 'C:\WINDOWS\system32\MSINET.OCX' could not be added. Could not create the wrapper assembly for the ActiveX type library 'C:\WINDOWS\system32\MSINET.OCX\1' You may need to register it.


So I was wondering how I could go about fixing this problem, possibly registering it first, if so, how??

I am working on this project between home and school but I swear this component was working before at home (the same project works fine at school and references InetCtlsObjects just fine)

Does anyone have any ideas??

Thanks!
Jim Vosika
http://www.tinyclick.com
0
Comment
Question by:jvosika
  • 3
  • 2
5 Comments
 
LVL 15

Expert Comment

by:Timbo87
ID: 10708569
Start the Visual Studio .NET 2003 Command Prompt. It should be in the start menu in Visual Studio .NET Tools.
CD to c:\windows\system32
Type in: regasm msinet.ocx
and press enter.
0
 

Author Comment

by:jvosika
ID: 10708905
I was so excited but then the stupid thing errored out, here is what it said:

RegAsm error: Failed to load 'C:\WINDOWS\system32\msinet.ocx' because it is not a valid .NET assembly

Could my file be corrupt?
0
 

Author Comment

by:jvosika
ID: 10708996
I just downloaded a new msinet.ocx file off the net and that did nothing, I got the same error :(
0
 
LVL 15

Accepted Solution

by:
Timbo87 earned 500 total points
ID: 10709001
Try adding it on the toolbar. Right click the toolbar, Add/Remove Items, select the COM Components tab, and add Microsoft Internet Transfer Control. This will generate a wrapper class for the DLL. If this doesn't work then there may indeed be something wrong with the file.
0
 

Author Comment

by:jvosika
ID: 10709037
That did it! Thank you very much!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

828 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