Solved

Connecting to DLL

Posted on 2002-06-26
4
236 Views
Last Modified: 2010-04-15
Hello,

Its a beginner question :

1) How easy is it to connect with C# to DLL ? is there some easy mechanism ?
2) The same question -> about   building ActiveX / OCX

Does the implementation is more like VB or VC ?

thank u
Asi
0
Comment
Question by:asi
[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 1

Expert Comment

by:xloop
ID: 7110254
It's very simple, you add your reference to the DLL/OCX via

Then add your DLL in the same directory as your application file.

No more entering dll's into the registry.

Simple as that!

Good luck
0
 
LVL 1

Expert Comment

by:xloop
ID: 7110255
It's very simple, you add your reference to the DLL/OCX via Project menu > Add Reference

Then add your DLL in the same directory as your application file.

No more entering dll's into the registry.

Simple as that!

So it's not really like VB or VC

Good luck
0
 
LVL 2

Expert Comment

by:flytiger
ID: 7112500
use C# command line complier

csc /target:exe /r:anything.dll  yourcode.cs

0
 
LVL 3

Accepted Solution

by:
jrspano earned 50 total points
ID: 7122058
1) How easy is it to connect with C# to DLL ? is there some easy mechanism ?
Depends on the kind of dll you want to connect to.  If it is a standard win32 dll you use the DllImport function in System.Runtime.InteropServices.  If it is an active x dll you set a reference to the dll just like in vb6 and then use it.  On the target machine you must make sure the activex dll is installed and registered just like you would have had to do before using it in vb6


2) The same question -> about   building ActiveX / OCX
It is very easy to build dll's and ocx's in c# to use in other .net languages.  Just set a reference to the dll/ocx project and you are done.  If you want to make an activex dll or ocx to use in another language like vb6, it is harder.  You have to wrap the dll/ocx and give it a strong name(guid).  then it can be installed and registered like other activex controls and used in vb6.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
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
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

623 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