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.

AppGameKit Classic Chat / Need a little help making a DLL to benefit plugin makers.

Author
Message
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 1st May 2017 18:28
The devil is in the strings.

I've been working on a plugin in C# for about a week. Everything is working fine except the ability to pass a string back to AppGameKit from the plugin.
Passing other data types back and forth works great, and passing strings to the plugin works, but not passing a string back to the AppGameKit app.

The reason is that from the plugin you have to call the AppGameKit command CreateString(). Looking into how this might be done led me to
a few options, most of which I didn't fully understand because I'm not a C++ guru. The one option that sounds the simplest is to write a
wrapper DLL in C++ for the CreateString() and DeleteString() commands to include with my plugin.

If there is an experienced C++ coder lurking out there that could lend a hand or suggestion, these 2 AppGameKit commands are all that anyone
really needs to unlock the full potential to make plugins from several other languages.

MadBit
VIP Member
Gold Codemaster
15
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 9th May 2017 07:53
I'm not a C # expert. In C ++ is this the minimum you need, if you want to use strings.

.cpp


.h


I do not know how to assign in c # the function pointer. I had read something from 'delegate'. But that can better answer others who are familiar with c #.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Pixie-Particle-Engine

Login to post a reply

Server time is: 2024-09-30 03:21:17
Your offset time is: 2024-09-30 03:21:17