Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm sure this question gets asked quite a bit, however I've looked around and simply cannot find any good(detailed and explained in-depth)
Articles about this subject. So to get started here is what I need/want and what I'm working with.

First off I'm relatively new to programing and plan to make it a career choice after I finish my term I the armed forces. So please take that
Into consideration.

Wants/needs:
I'm writing a program that is all for experience and plan to release the source once all the features I have planned out are complete.
Thus I have hit a reinforced brick wall when it comes to Interop. I have a C++ library thats sole purpose is to convert standard image
files(jpg, gif, tga, etc) to a format(I believe it's called VMT or VXT) which a game I've played for years uses. Anyways I found this library
which a fellow gamer has created that does this. I've asked permission to use his library with my program.

What I have:
DLL, source code to the library, Visual Studio Pro 2008, on and off programing for the past 3 years( this is my first "big" project that peopleare looking forward to. I've actually came up with this idea when I first started programming. I've learned a lot since then but as you can tell there is still plenty more to learn ).

So what I'm really asking for are references of detailed info so I can further my learning in this language.

Any and all help is greatly appreciated!

<b><b></b></b>
Posted

Your best bet is to google variations of "c# interop services", and look for stuff that resembles what you unmanaged DLL does as far as return types and parameter types are concerned. You didn't mention if it was a standrad C++ dll or a MFC DLL (or what *kind* of MFC dll) it is, so you should consider that when you build your search phrase. Lastly, try to make just one function int he DLL work correctly through interop, and then use that as an example to do the rest.

Of course, your other option is to convert your unmanaged code to a managed C++ assembly. It shouldn't be that hard.
 
Share this answer
 
v5
Comments
Jdlogic 17-Aug-11 14:58pm    
I appreciate the quick reply, I will look into this as I'm currently at work. I will get back with either more questions or a solution.
Have a look at this blog post (you can skip the native to managed part)http://blogs.msdn.com/b/deeptanshuv/archive/2005/06/26/432870.aspx[^]

Edit: oh, if you care I googled "C# dll interop c++" to find that blog post
 
Share this answer
 
v2
Comments
Jdlogic 17-Aug-11 14:59pm    
I did check out the blog but it's a little too much for my phone ATM so I will have to check when I have time. It's much appreciated.
Here is an article that shows how to mix native and managed C++ code: Using ACE with C++ CLI[^]

Best regards
Espen Harlinn
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900