Jump to content
  • Advertisement
Sign in to follow this  
yuppies

creating DLL in C#?

This topic is 5408 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ive search if it is possible to create DLL in C# and it i found that its posibble.. however somethings bugging my mind.. Is the DLL created in C# can be access/used in my C++ App? or like any other DLL that was created in C++? Or is the DLL in C# can be treated as the same with those DLL created in C++? like it can be link into any application no matter if its .net or not.. thanks

Share this post


Link to post
Share on other sites
Advertisement
The only thing DFFs created by a traditional compiler and DLLs created by a .NET compiler got in common are the file extension "dll".

Same thing with EXEs. .net "exe" files are by default not executable, you need to have the .NET CLR installed.

Why Microsoft has chosen to use the same file extensions is beyond my horizon of understanding, but it is the way it is. :)

So, to answer you question:
A DLL created with C# cannot by accessed by a C++ App like any other DLL that was created in C++.

You could, however, use the CLR (if it is installed) to load a .NET DLL or EXE (there's not really a difference) and access it.

I hope that helps!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Managed Code ( i.e. C# ) cannot be accessed by unmanaged Code ( i.e. normal C++ ). You can however create interfaces that allow the managed code to work as a COM object that can be instatiated by unmanaged code.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!