473,406 Members | 2,849 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

C# Dll in a non dot net environment

Is it possible to use a c# dll in an environment where the dot net framework has not been installed ?

For example will a C++ wrapper do the job?

Thanks.
DD
Nov 17 '05 #1
5 1047
No to both questions.
Think of this; even the simplest C# DLL needs the CLR and call's methods
implemented in the framework classes, how would this possibly work without
it?

Willy.
"Dave52" <Da****@discussions.microsoft.com> wrote in message
news:93**********************************@microsof t.com...
Is it possible to use a c# dll in an environment where the dot net
framework has not been installed ?

For example will a C++ wrapper do the job?

Thanks.
DD

Nov 17 '05 #2
However it can be used from a non-.NET client, such as VB6, by making it a COM object. How though, I don't know.

"Willy Denoyette [MVP]" wrote:
No to both questions.
Think of this; even the simplest C# DLL needs the CLR and call's methods
implemented in the framework classes, how would this possibly work without
it?

Willy.
"Dave52" <Da****@discussions.microsoft.com> wrote in message
news:93**********************************@microsof t.com...
Is it possible to use a c# dll in an environment where the dot net
framework has not been installed ?

For example will a C++ wrapper do the job?

Thanks.
DD


Nov 17 '05 #3
Beeeeeeeeeves wrote:
However it can be used from a non-.NET client, such as VB6, by making
it a COM object. How though, I don't know.


Yes, but the answer is the same. Interop will provide a wrapper letting
the client think that it is working with a COM object but behind the
scenes, you'll still have .Net code running, and you'll still need the
CLR.

--
Patrick Philippot - Microsoft MVP
MainSoft Consulting Services
www.mainsoft.fr
Nov 17 '05 #4

"Beeeeeeeeeves" <Be***********@discussions.microsoft.com> wrote in message
news:91**********************************@microsof t.com...
However it can be used from a non-.NET client, such as VB6, by making it a
COM object. How though, I don't know.


You don't make it a COM object, the CLR presents it as a COM object to the
client through a CCW (Com Callable Wrapper).

Willy.
Nov 17 '05 #5
Nope. Basically there are 2 reasons.
1. C# dll is not compiled to native code. Rather it is compiled to IL (Intermediate language). .Net framework compiles the IL to native at the runtme.

2. C# dlls PE file structure is not same as the native PE file structure.

Hope this helps

Buddhike de Silva (www.buddhike.net)

"Dave52" wrote:
Is it possible to use a c# dll in an environment where the dot net framework has not been installed ?

For example will a C++ wrapper do the job?

Thanks.
DD

Nov 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Vijay Kumar R Zanvar | last post by:
Hi clc, I want to know few examples of freestanding environments. -- "There's money in this case, Watson," he continued, glancing out of the window, "if there is nothing else." - A Scandal...
4
by: Bill Davidson | last post by:
All: I've found the 'Environment.GetEnvironmentVariable()' method; but how do I create and/or set an environment variable? Thanks, Bill
4
by: | last post by:
Hi all, I am trying to append a certain string to the PATH environment variable programmatically. I am able to read what is in the variable using the System.Environment method...
10
by: Edward | last post by:
I've just taken over maintaining a system from a colleague who has left. I find the following line in her code: Dim params(2) As SqlClient.SqlParameter params(0) = New...
6
by: Matt | last post by:
Is there a way to retrieve the Windows Environment Variables (Such as User ID) with Javascript in IE?
6
by: Fuzzyman | last post by:
Hello all, I would like to set a Windows Environment variable for another (non-child) process. This means that the following *doesn't* work : :: os.environ = value In the ``win32api``...
11
by: rossum | last post by:
I want to declare a const multi-line string inside a method, and I am having some problems using Environment.NewLine. I started out with: class foo { public void PrintStuff() { const...
0
by: Joe HM | last post by:
Hello - I am putting together a little ConsoleApplication that is supposed to check for an Environment Variable and create it if it does not exist. I found some code that will add a new...
3
by: smitty1e | last post by:
Just a fun exercise to unify some of the major input methods for a script into a single dictionary. Here is the output, given a gr.conf file in the same directory with the contents stated below: ...
1
by: replysonika | last post by:
Hello, I run a Java app with subprocess from Python script. This python script is called from another Python Wrapper. python = subprocess.Popen(, stdout=subprocess.PIPE,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.