Sign in to follow this  
Subotron

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this