Solved

Referencing ActiveX Components in .NET

Posted on 2004-03-29
5
416 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

747 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now