Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Wrapping c++ library for use in .Net

Author
Message
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 20th Jan 2009 00:46
Now I have converted my D3DFunc dll to a static library that can be used in DGDK, I would like to take this on a step and make this available in .Net.

I know this is possible as it is how the .Net version of DGDK was created, but I have no idea how to go about it.

Can anybody point me in the right direction?

Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 20th Jan 2009 08:36
Here is the best guide I found. Surprisingly google doesn't bring up many good ones:
http://www.ondotnet.com/pub/a/dotnet/2004/03/29/mcpp_part3.html

The guide focuses on wrapping a class, but if you want to wrap normal functions you can use static member functions in the managed class.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 21st Jan 2009 20:33
Ask kBessa

[b]Yuor signutare was aresed by a deslyxic mud...
BOX2D V2 HAS HELP FILES! AND A WIKI!
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 21st Jan 2009 20:54
I'm pretty sure kbessa created his plugins directly in .net. I may be wrong but he is using the slimDX .net library.

A73
15
Years of Service
User Offline
Joined: 21st Jan 2009
Location:
kBessa
18
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 22nd Jan 2009 09:46
All my released plugins were indeed made using SlimDX, so my code is 100% managed, C#.

You could problably just write a CLI/C++ (previously known as Managed C++) wrapper that calls you lib and expose methods to .NET.

The thing is, they problably won't work that way because you will try to call original DarkGDK methods, and you should be calling DarkGDK.NET methods. I think you'll have to make a different version for .NET, but it would be better if you chat with APEXnow. Try #dgdk-net @ irc.devhat.net

[center][center]
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 22nd Jan 2009 22:07
Thanks for the input everyone. I'm starting to think that I may be better off waiting for APEXnow to put the missing GDK methods that I require into the .Net version. I can then use the SlimDX library as I had for the code I had already converted.

Login to post a reply

Server time is: 2024-11-25 11:21:52
Your offset time is: 2024-11-25 11:21:52