?
Solved

First C# / .NET project.... ActiveX DLL?

Posted on 2003-04-01
4
Medium Priority
?
330 Views
Last Modified: 2006-11-17
I am a long time VB Programmer, so writing vb activex dll's is pretty easy for me, but I have a need to do one in c# (mainly I want to learn c#).

Please let me know if what I want to do it possible:
I want to create an activex dll that loads from a local html page (non-web server).  
The DLL will basically open a file and read/write to it based on commands sent to it from the html page.

Does anyone have any samples that do this? or something like it?

Thanks!
Chris

0
Comment
Question by:MeyerCa
[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
  • 2
4 Comments
 
LVL 11

Expert Comment

by:rdrunner
ID: 8246409
Where will this local webpage be located ?

Will you access this DLL from the .NET framework or from a "simple" asp page?

B.t.W: I am forced to do the same transition....

I found the easiest way to get an answer of how this should work in C# or VB.NET is to create an "old" project in VB6 and open it in VB.NET and let the IDE do the translation. I know this is cheap but it usulally works ;)

0
 
LVL 1

Author Comment

by:MeyerCa
ID: 8246437
The HTML page would be located on a CD.  My App will install the ActiveX object, then the HTML will use it.

It wouldnt be running throught the .Net framework, it should just be an activeX object embedded in the HTML page, and Ill probably be using javascript to make calls to it.

Thanks,
Chris
0
 

Accepted Solution

by:
cral_almodovar earned 300 total points
ID: 8260459
Bad news: It's not possible to create ActiveX DLLs in .NET, using C# or any other language (COM and ActiveX technologies are considered "legacy" stuff in the .NET world). The closest equivalent of an ActiveX DLL in the .NET Framework is the .NET class library.

Good news: .NET provides extensive COM/ActiveX  interoperability features. For example, you can use the "regasm.exe" utility to create a "wrapper" to a .NET class library so that you can use the library from your COM-based applications (i.e. you can add a reference to the library in VB's Project+References window).

What you can do: Create a .NET class library (using C#, VB.NET, or any other language supported by .NET) and create a "wrapper" for it using the "regasm.exe" utility that comes with the .NET Framework SDK. Your application can now use the .NET class library as if it's an ActiveX DLL.

Note that there will be some security considerations if you call the .NET class library from an HTML page.
0
 
LVL 1

Author Comment

by:MeyerCa
ID: 8261422
Thank you much! this is exactly what I was looking for.

Chris
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Suggested Courses

762 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