Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

bangz

C++ dll in C#

This topic is 5222 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

I'm trying to import my Graphics Engine (which i have wrapped up in a dll) into a C# project, but I definately dont want to have to list all the classes and functions! What solutions are there? I could use a COM interface, but they look a little to complicated for what I want? Anyways, any ideas? Regards, Bangz. edit: something like importing an export library in c++... [edited by - bangz on June 4, 2004 11:00:31 AM]

Share this post


Link to post
Share on other sites
Advertisement
Err if it''s all C# (or .Net) then you''re laughing cos reflection is built into C#. It''s all very COM in the background, but it''s more or less transparent if you want it to be as a developer.

When you''ve built your Graphics Engine .Net dll all you should need to do to import it is to use import like you do with the System stuff at the top of your class file, and make sure it''s referenced by your compiler. Then you use it like you would other imported stuff (like the Forms stuff).

Share this post


Link to post
Share on other sites
Yup. Look into generating type libraries, importing them into .NET projects and creating interop assemblies from type libraries.

COM is a good way to go

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!