Solved

Referencing ActiveX Components in .NET

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 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

19 Experts available now in Live!

Get 1:1 Help Now