Jump to content
  • Advertisement
Sign in to follow this  

Using my C++ engine (with win32 parts) in C#

This topic is 3942 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've created sort of an engine in C++, which I want to use for a game project. However, I would like to do the map editor in C#. For this I'd still require access to my engine, which is a library. Now, I've read about P/Invoke, and writing wrapped managed classes or something so I can call my Native classes in C#. I foresee one problem though. My engine is heavily based on a Window Manager module that I use to create windows, handle messages, etc. Obviously all this is Win32 based, C++ code. Since it is present in initialization, but also the main loop is based on handling messages through the window manager's callback, I think it would be a pain to remove this. Is there any way I would be able to make this work in C#? Would it require removing the window manager, which means I have to rewrite my main loop, or can it be done some other, clever way?

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.

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!