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 / Calling DBP DLLs from C++?

Author
Message
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 6th May 2008 19:57
Sorry for only having two words on English in the title, but I'm assuming you understand what I mean. I know it sounds like a silly question since I can just use the DGDK functions, but I feel like expanding my scripting language today and I thought that maybe calling the DLLs would be a more flexible way of doing things, especially since I can call new ones. Anyone know how I could go about doing this assuming I have a string for a command and a list of parameters?

Thanks

Don't you just hate that Zotoaster guy?
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 6th May 2008 20:07
Yes, but it takes a bit from several columns...

1. Define function pointer types:



That's a few of them...

2. Declare pointers and some handles...


3. Make the linkage based on the DLL you want to use. First. you need to get and save the globstruct pointer, of course...


Use them like this:

dbMakeMemblock(memblock, mbsize);
pbyte = (LPBYTE)dbGetMemblockPtr(memblock);
dbDeleteMemblock(memblock);
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 6th May 2008 22:01
That's crazily complicated code, but not exactly what I'm looking for. I think in that code you have to so something for every function you want to call, which doesn't really work for me, I want it to call any function that is in any DLL inside a dir. Also, I don't want to call it and use it as a C++ function, as you used in your examples, though I think that could be easily changed.

To put it more succinctly, I want my scripting language to do exactly what DBP does, except for compile to an EXE. I already have the whole scripting engine, I just need it to call the commands

Don't you just hate that Zotoaster guy?

Login to post a reply

Server time is: 2024-10-07 23:21:16
Your offset time is: 2024-10-07 23:21:16