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.

Program Announcements / Dev-C++ DarkBASIC Professional Plugin Template

Author
Message
Mugen Wizardry
User Banned
Posted: 13th Jul 2007 03:00 Edited at: 13th Jul 2007 03:15
Hi, DBUser! ^_^

Ok, I'm now completely lost... I got the V3 Template FINALLY to compile, however, I'm having 2 main problems with the DLL, once I call my function in DBPro...

I need to know how I should fix "START MY PLUGIN" in commands.rc , I need to know whether or not I should add "START MY PLUGIN" into main.cpp , and if so, how exactly should I go about adding "START MY PLUGIN" as a function in main.cpp. The other small problem I'm having, is that DBPro is crashing everytime I do 1 of 2 things..

1) I simply startup using my DBPro code like this:



OR

2) I use both commands like this:



Here are my Template codes:

main.cpp


header.h


commands.rc


DBPPluginTemplate.h


and FINALLY, I've added a few lines, and commented a few lines that you'll probably recognize right off the bat. Anyways, here's my included DBPGlobStruct file:

DBPGlobStruct.h


ANY help would be GREATLY appreciated

Thanks again, DB! ^_^

~M.W~
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 13th Jul 2007 04:47
Would you mind telling me what exactly the errors are? Thanks ^_^

Also, off the bat, I notice that the "startup" function doesn't exist. Read the DBP help file, technical section... Look for third party plugins, and it will tell you about the RC table.


Cheers,

-naota

Gamers for sale
18
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 13th Jul 2007 06:03 Edited at: 13th Jul 2007 06:13
I downloaded everything and I am getting an error. I found that it was a file from the lib folder. I just checked the website and there is only one file in the lib folder.

Could you add the rest of the files?

Compiler Log:


Error:



Thanks for the files!

GFS

Dark World Website Launched! http://www.darkworldengine.co.nr
[/href]Blog with updates of Dark World Launched! http://www.darkworldengine.blogspot.com
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 13th Jul 2007 06:49
@GFS
It sounds like your directories are messed up.

Try making a project with THIS EXACT NAME: "SimpleTestProject" <- But without the quotes.

Make sure it is place in THIS EXACT FOLDER: "C:\dev-cpp\Projects\SimpleTestProject" <- But without the quotes. If any folders along the way (Such as projects) don't exist, create them.

The .dev should now be here:
C:\Dev-Cpp\Projects\SimpleTestProject\SimpleTestProject.dev



Cheers,

-naota

Gamers for sale
18
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 13th Jul 2007 20:32 Edited at: 13th Jul 2007 20:32
Ok. I tried it and still the same problems.

Could it be because:

Quote: "I just checked the website and there is only one file in the lib folder. "


In the dev c++ that I uninstalled I remember there being more then one file in the lib folder.

Anyways here's the results:


Dark World Website Launched! http://www.darkworldengine.co.nr
[/href]Blog with updates of Dark World Launched! http://www.darkworldengine.blogspot.com
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 13th Jul 2007 22:27
You are supposed to just copy and paste the files... Keeping all other existing files.


Cheers,

-naota

Gamers for sale
18
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 14th Jul 2007 04:15 Edited at: 14th Jul 2007 04:16
...It still doesn't work. I looked into the problem and I think it may be some stray configuation files from the newest version that I had installed previously. I uninstalled it, but I think the files may still be there. I followed the path when it was installed to find that there was no folder there. I think it may be hidden. I will check in a few. The problem is still with Dark Basic Professional not being able to pick up the commands from the dll.

Edit: Just Checked. No configuration file here. I don't know if there is any other configuration file. I will reinstall and check each path.

I will have look into this. Let me know of anything else I can try.

GFS

Dark World Website Launched! http://www.darkworldengine.co.nr
[/href]Blog with updates of Dark World Launched! http://www.darkworldengine.blogspot.com
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 14th Jul 2007 12:21
@Gamers for sale
I don't know what your problem is, sorry. Maybe you should upload your Dev-C++ directory this time? (Can't guarentee I will be able to get to it quickly, I will be taking my computer in for repairs soon)


Cheers,

-naota

Gamers for sale
18
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 15th Jul 2007 19:50 Edited at: 15th Jul 2007 19:50
Is it possible to use the template in Microsoft Visual C++?

Quote: "DB user, why didn't you make a template for VC++ or C# instead of Dev-cpp?

Sorry you are having problems. For MSVC++ version 6.0, sure, for C# of any version, no. You will need version 6.0, I am not using any other version, sorry."


Do you have this done yet or could you just copy and paste code into visual c++ to get it to work?

I saw that it was against the template, but is it possible to let me use it in VC++ to compile my dlls or will it not work by copy and pasting it?

GFS

Dark World Website Launched! http://www.darkworldengine.co.nr
[/href]Blog with updates of Dark World Launched! http://www.darkworldengine.blogspot.com
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 16th Jul 2007 02:27
Currently, I will NOT allow anyone to use this in MSVC++. I consider it an illegal act, as it is against the license. Please wait for me to release an MSVC++ version, thank you.


Cheers,

-naota

Ps: The above is for my own security reasons... Please do respect them... The above is also not meant to be offensive.

Gamers for sale
18
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 21st Jul 2007 19:39 Edited at: 21st Jul 2007 19:41
Yeah!

I got my dll to work finally!

I had to toy around with it for a while and I got it to work. I found out that the paths were screwed up.

The only problem I am having is the dll crashes when I run my command. It might be the dll function is screwed up a bit.

I attached the source.

GFS

Dark World Website Launched! http://www.darkworldengine.co.nr
[/href]Blog with updates of Dark World Launched! http://www.darkworldengine.blogspot.com
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 21st Jul 2007 23:47
@GFS
Could you also explain how you fixed this error? I will add it to my tutorial page... (Eventually)

Unfortunately I can't have a look at your source now, my comp is all screwed up.. But did you remember "StartFunction" at the begining of your function?


Cheers,

-naota

Gamers for sale
18
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 22nd Jul 2007 01:02
Same problem when I try that.

Here's the source:

Main:




I changed the IP address to all 9's. I know I have the IP correct.

Thanx for your help!

GFS

Dark World Website Launched! http://www.darkworldengine.co.nr
[/href]Blog with updates of Dark World Launched! http://www.darkworldengine.blogspot.com
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 22nd Jul 2007 01:52
@GFS
I see the problem.

You must include at least one DBP networking command, somewhere in your code... Try this (DBP code):


Hope that helps.


Cheers,

-naota

Gamers for sale
18
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 22nd Jul 2007 02:56 Edited at: 22nd Jul 2007 02:56
Is there a way to create a variable, store a string in it, and return or set that string by using dbpro commands?

Something like:


I think the variable is out of scope. It might have to be a global scope, but I don't know how to set it up that way.

GFS

Dark World Website Launched! http://www.darkworldengine.co.nr
[/href]Blog with updates of Dark World Launched! http://www.darkworldengine.blogspot.com
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 23rd Jul 2007 01:24
That question is for either C++, or DarkBasic Professional discussion.


Cheers,

-naota

Lucifer
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location:
Posted: 23rd Jul 2007 22:21
this may well be a silly question but,

i folowed the tutorial and all, but when i try to compile it to a .dll file it just makes some makefile.win file, i dont know if the dll has been compiled or where it is..


oh praise the lord, praise furry jesus
Gamers for sale
18
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 24th Jul 2007 00:08
@Aaron Miller:

Can you add the type LPSTR to LPSTR?

Like this:


I tried and it said that something like invalid operators. Is LPSTR some type defined in the template some where?

Thanks

GFS

Dark World Website Launched! http://www.darkworldengine.co.nr
[/href]Blog with updates of Dark World Launched! http://www.darkworldengine.blogspot.com
Gamers for sale
18
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 24th Jul 2007 02:26 Edited at: 24th Jul 2007 02:43
@Aaron Miller:

I also have another problem:

Here is the code:


For some reason it doesn't work when I return something because when set the first parameter CommandID to 1 it comes back as something totally different.

GFS

Dark World Website Launched! http://www.darkworldengine.co.nr
[/href]Blog with updates of Dark World Launched! http://www.darkworldengine.blogspot.com
fpsfreak
16
Years of Service
User Offline
Joined: 18th Jun 2007
Location:
Posted: 24th Jul 2007 20:04
Can someone post up a video of them extracting out of the rar the files and then compiling the dll in Dev C++ i keep getting a error with header.h Please somebody put up a video.
Gamers for sale
18
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 24th Jul 2007 20:31 Edited at: 24th Jul 2007 20:37
@fpsfreak:

As I have said before these are the top most problems users have:

Quote: "Does your project name have no spaces?

Example: MyProject

Instead of: My Project

It could also be because:

Quote: "// You must have at least ONE command for this to compile correctly."

You would need code here:


and here:


to get the file to compile correctly."


Let me know if it something else.

@Aaron Miller:

Check the two posts I posted before and...

I am working on changing the offset for rotating an object. I think the origin is in the center and I need to change it. I think you can use DirectX that you have built into the plugin, but I don't know how to get this to work for a DBPro object.

I found these structures in the Extra data:
sPositionProperties

sPositionVectors

sPositionData

and I know you have to include directx to get it to work by using the flag. I am just having trouble using a variable in the structure and applying it to an object.

GFS

Dark World Website Launched! http://www.darkworldengine.co.nr
[/href]Blog with updates of Dark World Launched! http://www.darkworldengine.blogspot.com
Gamers for sale
18
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 24th Jul 2007 23:02 Edited at: 25th Jul 2007 00:09
I finally found out what was the problem with the dll commands not working with Dark Basic Pro.

After compiling the file several times the commands stop working.

Why? I don't know.

All I know is how to fix it copy and paste the code into a new project and everything will work fine.


P.S. You should create a FAQ to help most of the people here asking the same questions.

It would be nice if you added my posts like this post, the dev pack links post, and other posts that would be helpful to the

FAQ.

Edit: Most of my posts:
Quote: "Does your project name have no spaces?

Example: MyProject

Instead of: My Project

It could also be because:

Quote: "You must have at least ONE command for this to compile correctly."

You would need code here:


and here:

to get the file to compile correctly.

Dev Pack: http://www.devpaks.org/details.php?devpak=136

Dev C++ version 4.9.8.0:
http://sourceforge.net/project/showfiles.php?group_id=10639&package_id=12148"


You could put this in a form of a tutorial explaining how to create a basic project and every possible dll function you could create.

Also, another problem that other people may have is adding one command per category used in a do not call function.

@Mugen Wizardry:

Quote: "// 1 "START MY PLUGIN%0%startup" // *void*
// 1 "STARTUP%0%StartupFunction" // void StartupFunction(void);
// 2 "GETVALUE[%L%GetValueFunction" // int GetValueFunction(void);
// 3 "GETSUM[%LLL%GetSumFunction" // int GetSumFunction(int p0, int p1);
1 "MESSAGEBOX%LL%MessageBoxA" // string MessageBoxFunction(string message$, string title$)"


I did notice that this was commented. Is this on purpose. That could be one problem.

Another problem could be that you didn't use the StartFunction flag at the beginning of your code.

Example:


The last question you would have to ask Aaron Miller.

GFS

Dark World Website Launched! http://www.darkworldengine.co.nr
[/href]Blog with updates of Dark World Launched! http://www.darkworldengine.blogspot.com
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 27th Jul 2007 07:22
Ok, ask questions over here: Aex.Uni Forums.

Please make your own topic in the proper forum, thank you.


Cheers,

-naota

Lordcorm
17
Years of Service
User Offline
Joined: 24th Sep 2006
Location: Hyde Park, Utah
Posted: 30th Jul 2007 18:35
Hey any way i could access the Direct3D device handler with this? and can i also get the HWND handler also?

DarkLegion Studios - Coming Soon
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 4th Aug 2007 08:25
g_pDirect3D/dbGetDirect3D()
g_pDirect3DDevice/dbGetDirect3DDevice()
GetGlobStruct()->hWnd



Cheers,

-naota

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 5th Aug 2007 06:23
About MSVC++ and the SDK, that can't be done. I have to return my copy of MSVC++ 6.0. Because of this, you may use this in whatever IDE you wish, but I can only give support on Dev-C++.


Cheers,

-naota

Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 10th Aug 2007 01:01
@Aaron
The fix you suggested for the plugin, only fixes some of the errors
It's because of the SAFE_DELETE_ARRAY command in the destructor of sCustomObject. It doesn't like using that command on a void pointer. The only thing I can think of, is that on your pc, the variable is not defined as a void pointer, or you have a different Dev-C++ compiler version. I could get it to compile, by commenting out the offending line, but I don't know if this will cause problems

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 10th Aug 2007 05:06
@Diggsey
It will cause memory leaks... Just accept the warning as I attempt fixing it.


@Everyone
Okay, I'm gonna make this work with Code::Blocks. I'm gonna aim for, at the very least, MinGW and MSVC++ compiler support. I may go a step further with Digital Mars C++ support, and hell, maybe even Borland C++ as well.


Cheers,

-naota

Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 10th Aug 2007 12:22 Edited at: 10th Aug 2007 13:06
Thanks

edit:
When I use the InitPlugin command from inside DBPro, I get an 'Unhandled win32 exception'

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 11th Aug 2007 00:12 Edited at: 11th Aug 2007 00:13
Hmm, I will have a more detailed look at it... But I'm gonna need the new source you have.

EDIT!
woops! You need to load the DLL... I can't remember exactly what it was, but if it's not loaded, you will be in trouble... If it's a DBP DLL, make sure that that DBP DLL is even included in the executable!


Cheers,

-naota

Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 11th Aug 2007 12:21 Edited at: 20th Aug 2007 17:59
Gamers for sale
18
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 18th Aug 2007 05:38
How far are you with the next template?

Even though I got it to work, I found a use for it in MSVC++.

GFS

Dark World Website Launched! http://www.darkworldengine.co.nr
[/href]Blog with updates of Dark World Launched! http://www.darkworldengine.blogspot.com
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 24th Aug 2007 00:37
Hey all!

Okay, DBPPluginSDK Version 4 is planned to support Dev-C++, Code::Blocks, and MSVC++ 2005 Express Edition. I can no longer test MSVC++ 6.0, unless someone wants to donate that to me.

Planned compiler support: MingW, MSVC++, and Digital Mars C++.

The next template should be released within a week, regardless of how many compilers are supported.


Cheers,

-naota

Quote: "I quoted myself."

NG Website Aex.Uni forums
TEH_CODERER
20
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 24th Aug 2007 15:54
If this is considered unrelated (more to do with C++ for example) then I'm sorry and please just ignore it. I was just wondering if it was possible to then use commands from other DBP plugins through your own plugin. For example, using commands from Sparky's collision dll in my own plugin to do raycasting. Thanks in advance.

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 27th Aug 2007 00:46 Edited at: 27th Aug 2007 02:31
It's possible, but you have to do it through your own code... Something like this:



If you get the idea.

EDIT
The DBPPluginSDK is now being made specifically for MSVC++ 2008 Express Edition, all portings to other compilers are very much welcome. For those who like the official version, download MSVC++ 2008 Express Edition Beta 2.

EDIT 2
I just contacted MikeS about getting the latest internal structures from DBP, as well as preparing plugin development for DBP X10. If he agrees to give me some of those internal structures, then all your plugins are gonna benefit big time.

Cheers,

-naota

DBP, $80. DBP's plugins, $320. Watching DBP Crash, Priceless.
NG Website Aex.Uni forums
TEH_CODERER
20
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 27th Aug 2007 11:39
Thanks. I was trying something very similar but my declaration of what I am assuming is a pointer to the function within the dll (I'm still fairly new to c++!) was wrong. Yours compiles fine but when I attempt to use it within DB I get an error report message thingy.

My code looks like this:


Is it perhaps something to do with the function I am calling not having a return value?

Thanks again.

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 27th Aug 2007 23:16
Try this:



Cheers,

-naota

DBP, $80. DBP's plugins, $320. Watching DBP Crash, Priceless.
NG Website Aex.Uni forums
TEH_CODERER
20
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 28th Aug 2007 01:12
Ah. I hadn't considered that it may not have found the dll. Sadly I still get the exact same problem. Thanks again!

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 28th Aug 2007 06:16
You may want to consider the possibility of the problem lying within your code... Doesn't sparky's collision require DBProMemblocksDebug.dll, and DBProBasic3DDebug.dll?

Cheers,

-naota

DBP, $80. DBP's plugins, $320. Watching DBP Crash, Priceless.
NG Website Aex.Uni forums
TEH_CODERER
20
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 28th Aug 2007 11:46 Edited at: 31st Aug 2007 11:28
Lol! I'm sure the problem is in my code! Yes, sparky requires the memblock commands to be initialised. I didn't know whether I had to initiate them within the dll or DB though. I've tried in DB and it doesn't help but I'll try calling some memblock and 3d commands within the dll and see if that helps.

[Edit]Nope, no luck![/Edit]

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 9th Sep 2007 14:14
Calling memblock commands and such within a DLL won't do any good. Add this to the bottom of your code (In the DBA):




@Everyone
Feel free to use the DBPPluginSDK with any compiler ya like. Currently it works in Dev-C++ (Last I checked) and MSVC++ 2005/2008.


Cheers,

-naota

DBP, $80. DBP's plugins, $320. Watching DBP Crash, Priceless.
NG Website Aex.Uni forums
deme
16
Years of Service
User Offline
Joined: 8th Aug 2007
Location:
Posted: 16th Sep 2007 01:40
I have the same problem I got dev-c++ to compile the DLL file but DBP won’t recognize the command I tried version 4.9.8.0 and 4.9.9.2

deme
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 16th Sep 2007 07:43
My forums are currently the only place which I will answer questions. I have already answered the question you have asked in the thread you have posted though.


Cheers,

-naota

DBP, $80. DBP's plugins, $320. Watching DBP Crash, Priceless.
NG Website Aex.Uni forums
wh1sp3r
20
Years of Service
User Offline
Joined: 28th Sep 2003
Location: Czech republic
Posted: 16th Sep 2007 10:01
deme: I had same issue with 4.9.9.2 . but with 4.9.8.0 works fine


PS: Real programmers aren't afraid of math!.
deme
16
Years of Service
User Offline
Joined: 8th Aug 2007
Location:
Posted: 16th Sep 2007 18:09
i Tried them both with same Problem

deme
deme
16
Years of Service
User Offline
Joined: 8th Aug 2007
Location:
Posted: 16th Sep 2007 18:13
Quote: "
My forums are currently the only place which I will answer questions. I have already answered the question you have asked in the thread you have posted though.
"


I made a forum on your server to
Can’t get DBP to recognize plug-in commands

deme
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 16th Sep 2007 22:41
I've responded.

DBP, $80. DBP's plugins, $320. Watching DBP Crash, Priceless.
NG Website Aex.Uni forums
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 24th Sep 2007 03:17
The DBPPluginSDK now has it's own web page.

DBPPluginSDK's page.


Cheers,

-naota

DBP, $80. DBP's plugins, $320. Watching DBP Crash, Priceless.
NG Website Aex.Uni forums
darkdomy
21
Years of Service
User Offline
Joined: 6th Apr 2003
Location: Italy
Posted: 1st Nov 2007 17:12
Hello everyone, I would like to test the plugin (http://forum.thegamecreators.com/?m=forum_view&b=5&t=97069&p=0)

Please send me via E-Mail File plugindev3.rar

Because to me by errors in rar file, it ends up downloading
Regards

Domenico

Anxiously awaiting BlueGUI v2

it informs to me when and ended BlueGUI v2
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 1st Nov 2007 21:34
The latest version(s) should be able to be found at [href=http://www.nuclearfusion3d.com/ajm[/href]the Aex.Uni website[/href]. I'm afraid I don't understand your question.


Cheers,

-naota

DBP, $80. DBP's plugins, $320. Watching DBP Crash, Priceless.
NG Website Aex.Uni forums

Login to post a reply

Server time is: 2024-04-18 08:06:37
Your offset time is: 2024-04-18 08:06:37