Solved

Referencing ActiveX Components in .NET

Posted on 2004-03-29
5
420 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

Suggested Solutions

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

738 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