473,408 Members | 2,009 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,408 software developers and data experts.

Trying to better understand dlls....

sam
I'm trying to better understand the relationship between unmanaged dlls
and accessing them from a managed language such as vb.net....

1-As I understand it, a DLL created in C++ as a win32 dll can be
accessed via a managed language as long as you export the functions and
use declare-type statements in the vb.net code and marshall the
passed/returned variables.

2-A DLL created in C++ as a MFC DLL seems to be similiar in those regards.

3-A DLL created in C++ as a CLR DLL doesn't need the functions
explicitly exported, and a managed language can access the functions in
the DLL without having to deal with Declare statements. Marshalling may
be required depending on the variables passed/returned.

Is this an accurate assessment?
Jun 15 '07 #1
3 1265
I would say :

- either you created a .NET dll. In this case by design, the DLL contains
the needed metadata so that it can be consumed by any other .NET application
(within CLS compliance)

- for any other kind of technology (exported functions or com classes) you
(or a tool) needs to create the information needed to access this outside
world (for com classes the DLL includes some metadata that a tool can be
used, function exported "à la declare" doesn't have any metadata).

Try :
http://msdn2.microsoft.com/en-us/library/sd10k43k.aspx
for details.

---
Patrice
"sam" <sp*******@gtnincs.coma écrit dans le message de news:
ek**************@TK2MSFTNGP04.phx.gbl...
I'm trying to better understand the relationship between unmanaged dlls
and accessing them from a managed language such as vb.net....

1-As I understand it, a DLL created in C++ as a win32 dll can be accessed
via a managed language as long as you export the functions and use
declare-type statements in the vb.net code and marshall the
passed/returned variables.

2-A DLL created in C++ as a MFC DLL seems to be similiar in those regards.

3-A DLL created in C++ as a CLR DLL doesn't need the functions explicitly
exported, and a managed language can access the functions in the DLL
without having to deal with Declare statements. Marshalling may be
required depending on the variables passed/returned.

Is this an accurate assessment?

Jun 15 '07 #2
sam
Patrice wrote:
I would say :

- either you created a .NET dll. In this case by design, the DLL contains
the needed metadata so that it can be consumed by any other .NET application
(within CLS compliance)
So Patrice, using the terminology I was using (based upon the default
projects in visual studio, would you say that a .NET DLL (as you put it)
would a a Visual Studio CLR DLL?
Jun 15 '07 #3
CLR is the Common Language Runtime. Visual Studio is just a development
tool.

So don't talk about Visual Studio here. You could as well use Notepad or any
other third party tool and still compile your code to obtain the same DLL.

Talking about a CLR DLL is IMO ambiguous as it could be thought of one DLL
that provide some of the CLR capabilities.

My personal preference is to say a .NET DLL (that is a DLL that is created
using the .NET Platform and intended to be primilarly consumed on the .NET
platform).

You use visual Studio to create .NET DLL or .NET applications.

--
Patrice

"sam" <sp*******@gtnincs.coma écrit dans le message de news:
Om**************@TK2MSFTNGP06.phx.gbl...
Patrice wrote:
>I would say :

- either you created a .NET dll. In this case by design, the DLL contains
the needed metadata so that it can be consumed by any other .NET
application (within CLS compliance)

So Patrice, using the terminology I was using (based upon the default
projects in visual studio, would you say that a .NET DLL (as you put it)
would a a Visual Studio CLR DLL?

Jun 15 '07 #4

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

Similar topics

1
by: mike | last post by:
I get the following line when trying to uncomment the extension=php_oci8.dll line in my php.ini file. ------------------------------------------------- PHP Warning: Unknown(): Unable to load...
0
by: Michael Peuser | last post by:
Hi, I tried to reduce the size of some binary distribution in removing the things I could expect on the presumed targets - generally a minimal installation including Tcl/Tk. The results are as...
51
by: Richard Hengeveld | last post by:
Hi all, I'm trying to understand how pointers for function parameters work. As I understand it, if you got a function like: void f(int *i) { *i = 0; }
85
by: masood.iqbal | last post by:
I know that this topic may inflame the "C language Taleban", but is there any prospect of some of the neat features of C++ getting incorporated in C? No I am not talking out the OO stuff. I am...
2
by: Johann Blake | last post by:
I can hardly believe I'm the first one to report this, but having gone through the newsgroup, it appears that way. I would like to open a solution in the VS.NET IDE that consists of multiple...
11
by: Devender Khari | last post by:
Hi Friends, I'm facing a situation as follows, need help on identifying possible issues. There is an MFC application developed in VC6.0, say ABCVC6.exe and another developed in VC.NET, say...
0
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs...
3
by: gopal | last post by:
I am developing an application in CSharp - windows forms based, which copies the DLLs both unmanaged and managed DLLs from a shared folder and will overwrite the existing versions of managed &...
17
by: Ryan Liu | last post by:
Hi, If I have many threads write to a variable(e.g. var++) and another thread read it on an interval base. For those writing thread, I know I need lock, or its value could be lower ( even I...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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.