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 / Visual C++ to DBPro command interface library

Author
Message
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 12th May 2003 00:50 Edited at: 22nd Aug 2003 16:47
Lastest news ...

I've just finished updating the Interface library allow it to be used Update5.

That now gives you the ability to use the interface library with Patches 3.1, 4.1 and update 5.0

Just follow the link on the big 'WEB' button below
Ian T
21
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 12th May 2003 02:03
*sniff*

Never could make sense of C++...

Oh well, I'm sure this'll help people make good plugins

Impressive work Ian

--Mouse

Famous Fighting Furball
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 12th May 2003 02:53
Thanks IanM.

Could be useful if I need the power of the C++ language. Just one thing, I noticed in the GlobStruct.h file that there are 20 spare slots (g_Spare01...), does this mean that there is a limit to the number of TPC DLLs that can be used in one project? (Not that many people would come anywhere near 20)

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_101.zip
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 12th May 2003 02:54
I also find it slightly ironic that there is so much stuff about encryption in the internals of DBP when one can easily extract any media built into the exe simply by copying it out of the temp folder (neither COMPRESS MEDIA nor ENCRYPT MEDIA are secure at all)

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_101.zip
SpecTre1
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: United Kingdom
Posted: 12th May 2003 03:34
IanM

How do you make a Flood fill command from this?

New to DBPro comin from AMOS on the Amiga!
rapscaLLion
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Canada
Posted: 12th May 2003 05:36
...
ok
what does this do lol
I have no clue..

Alex Wanuch
aka rapscaLLion
Kousen Dev Progress >> Currently Working On Editors
Ian T
21
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 12th May 2003 05:37
It lets you put ninja monkeys in you game. Kosher monkeys.

--Mouse

Famous Fighting Furball
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 12th May 2003 10:37 Edited at: 12th May 2003 10:40
A kind soul has been good enough to raise a bug report with me, so I've updated the distribution - It was all my own fault too

If you want to be notified of future updates, then email me. You email address will be used *only* for this reason.


Rob K: I'm unsure whether the spares are used for TPC DLL's or whether they are for internal use only. I'll have to find out.

Intersting point about encryption - it's not something I've looked at. Maybe you should point this out to Lee.

Spectre: I suppose I could - as example code. I'll think about it.

Rap: Mouse is right. Do you know how hard it is to get Kosher monkeys?
Basically, it allows the DLL writer todo anything you can do from BASIC - like move and object, create a memblock etc. This is something that has been limiting the DLL's that have been produced so far - they weren't integrated into the system.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 12th May 2003 13:45
Major screw-up I'm afraid You will be unable to get the linker to correctly build your apps.

The library will be re-released at lunchtime - I can't update my website from work

To anyone who has already downloaded either of the files, I'm afraid you'll have to download again later today.

I apologise for any inconvenience caused.
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 12th May 2003 17:01
"Maybe you should point this out to Lee."

I think he is already aware of this, how could he not be?

Besides, if you want more secure storage, just use Guy Savoie's Unzip TPC, that can extract data from password protected zip files straight into memblocks. So they are never on the disc. On the other hand, since it is a DLL call, and the password is passed as a function argument, one could BPX the call and get the password. Sigh.

Anyhow, about the mistake, we all screw up occassionally, I'll test the lib out later

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_101.zip
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 12th May 2003 20:37
Lesser mortals, maybe...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 12th May 2003 21:19
"Lesser mortals, maybe..."

The word "mortal" contradicts your assertion that you are flawless

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_101.zip
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 12th May 2003 21:29
A mortal can be flawless...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 12th May 2003 22:28
... some of them are even modest.

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_101.zip
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 13th May 2003 00:04
he never said he was a mere mortal
i think the spares in the global are actually for additons they'll make to DBpro's code (suchas DBO) without changing the Global Struct (and effectively making it useless to those TPC DLL already which have use it because they'll no doubt have the wrong instance sizing.
(meaning for DBpro's that use the new structure you'd have to also recompile the DLL for that one)

that aside gonna download a lil later, see what to make of this

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
Kentaree
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 13th May 2003 13:42
MrTAToad, your name must be Nobody?
"Nobody is perfect"

Whatever I did I didn't do it!
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 13th May 2003 14:24
Oh yes, very witty...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 13th May 2003 16:35
Heh, stop your bickering or I'll bang your heads together

Raven: I think you are right about the spares, but I don't know for certain - it should be easy to find out with a little code though.

Rob: It's fairly easy to intercept data from a C++ DLL - I've proven that before by interposing a DLL I'd written between a DBPro program and one of the library DLL's. For non-C++ DLL's it can be done, but it's a little harder.


Anyway ...
I used the library for that DLL I did for Freddix last night.

It means that he can just specify a memblock number instead of passing the address to the command.

MEMBLOCK PASTE IMAGE source memblock, target memblock, xpos, ypos

After I get the address myself within the DLL, I then do all the lower level copying he specified in his code.

I'll upload the project later to my website as an example of simple use of the library.
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 13th May 2003 18:17
Yes, Mummy...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Ian T
21
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 14th May 2003 18:06
Glurk... I wish it knew C++, this seems incredibly useful ...

--Mouse

Famous Fighting Furball
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 15th May 2003 05:44
mouse from what i can tell (not used it a great deal) basically this function library allows you to code in a more DBpro style in C++

so for people creating DLLs they want in thier DBpro programs, but don't know much about C++ they can use the library and just really code more how they would in Pro ... and on its own basically just makes use of Pro's libraries as a standard engine would be made use of.

though i could be wrong (unlike toady i'm not perfect )
however for those who know C++ certainly is a cool short term solution to the extra features we wanted but are waiting for p5 & p6 to introduce.
if nothing else does show for a new way of thinking about howto program pro applications

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 15th May 2003 15:46
" mouse from what i can tell (not used it a great deal) basically this function library allows you to code in a more DBpro style in C++"

From what I can make out, this isn't quite the real point.

The point of the commandset is so that your DLLs can access DBP's internals and commands. Currently, if you want your DLL to perform a DBP command, you have to get the user to do in in their DBA code. With this DLL you could for example, use DBPs memblock manipulation commands and pointer functions to make life easier for the user.

Say you were making a maths DLL to do with collision of objects for example, in the past, the user would have to pass loads of parameters over to the DLL in order to get it to work, such as position, orientation etc. Now, the DLL can do all this work via DBP's commands, thus making the DBA code a lot neater.

It also obviously, allows you to have the power of DBP's 3D engine, along with the flexibility and featureset of the C++ language.

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_101.zip
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 15th May 2003 16:43
You're both right ... did the world just shake?

You can use it for anything from a full application in C++ (small example included in the download), down to simply recoding DBPro code for small speed increases (like I did for freddix a few days back - I still haven't posted that code ).

I plan on doing a few more examples soon ... then that'll be followed by a P4.1 release
sicjoshsic
20
Years of Service
User Offline
Joined: 8th May 2003
Location: United Kingdom
Posted: 15th May 2003 20:01
does this only work with dbpro or does it work with db enhanced aswell?

Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 15th May 2003 20:32
DBPro only.

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 15th May 2003 23:56
What if a load dll/call dll combo was used ?

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 16th May 2003 00:32
The library will not work under DB Classic at all.

Some of the libraries *may* work in DBPro using load dll, but I have not tried it.

Technically, the system I have *could* be expanded to be usable in the old 'load dll' method, but I'm not sure what the point would be - you still couldn't use it in classic.
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 16th May 2003 00:41
Just wondering - no doubt someone would have asked...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 16th May 2003 00:49
The internals for DBPro are obviously completely different to DB Enhanced, the least of the problems being that DB Enhanced doesn't have separate DLLs, all the functions are built into the executable.

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 16th May 2003 00:58
It was a silly question - but someone had to do it...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 16th May 2003 08:57
well i've still not got C++ installed on this system yet, i get home for 3hrs of kip in a good few hours ... probably set the installation running then and check it out later.

but the use of certain functions would certainly help me to create a C speed collision and physics system - so i'm going to eternally thank you know for that Ian because thats gonna save me a bugger load of headaches in a weeks time

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 16th May 2003 15:43
C'mon and speed it up - I need people to use it to make sure I've got everything right!
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 17th May 2003 04:54
lmao.. oki-oki keep ya panties on
i've got C++ installed now... gonna play in a tad see what i can make

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 20th May 2003 20:56
I've just updated the library to use patch 4.1 - help yourselves
Eponick
21
Years of Service
User Offline
Joined: 18th Mar 2003
Location:
Posted: 20th May 2003 21:07
Seems fine, only i get this error in MSVC++ 6

DBProInterface.lib(DBProInterface.obj) : fatal error LNK1103: debugging information corrupt; recompile module

hmm, wonder whats wrong?

Oh well, if i can fix whatevers wrong i can finaly develop some nice DBPro stuff in a language that im used to =)

Eponick
21
Years of Service
User Offline
Joined: 18th Mar 2003
Location:
Posted: 20th May 2003 21:28
Hmm, when i tried to start my own dll project with this code:



I get theese errors:


IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 20th May 2003 21:48
If you can send me the project files, I'll get it sorted out for you

The ones I need in particular have the following extensions:
.dsp .dsw .cpp .h .rc

The first two are the really important ones.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 20th May 2003 22:39
Don't worry - I've mananged to reproduce it. The quick fix for now is to compile in release mode instead of debug.

I produce my libraries with VC.NET. It appears that VC.NET uses a slightly different set of function calls in debug mode to VC6.
Eponick
21
Years of Service
User Offline
Joined: 18th Mar 2003
Location:
Posted: 20th May 2003 23:29
Yess, i compiled in release and it works fine now =)

Thanks

Also, im new to making DLL's for DBP, so could you tell me how to generate a strings table for it?

Eponick
21
Years of Service
User Offline
Joined: 18th Mar 2003
Location:
Posted: 20th May 2003 23:38 Edited at: 20th May 2003 23:56
Gah, a tutorial on DLLs would be nice

I cant find out how to include the DLL in the exe

Edit:
Wow, sorry for making multiple posts, didnt notice the edit button before ^_^.


Anyway, when i try:



The screen just flashes for a second then goes away, same if i put a wait key before the end.

Here is dll code:


Even when i run your DBP Examples it says something like:

Could not understand command:
SET TILE SIZE 64, 64

Even if I copy the Matrix DLL into the folder it gives that error.

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 21st May 2003 00:03
You have to use the string table method for the library to work.

In VC++6, you do it like this:
Select Insert->Resource.
Select String Table, and OK.

I have your code in a DLL already - I was trying to find the Debug solution . If you email me, I'll return the email with the working project.

For the examples I've provided, are you putting the dll's into the user-plugins folder?
Eponick
21
Years of Service
User Offline
Joined: 18th Mar 2003
Location:
Posted: 21st May 2003 00:08
Theres a user plugins folder?
Eh, that would explain alot.

If i cant get it to work after this, ill email it to you =)

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 21st May 2003 00:17
If you installed DBPro to the default place, you should drop the DLL's here :

C:\Program Files\Dark Basic Software\Dark Basic Professional\Compiler\plugins-user
Eponick
21
Years of Service
User Offline
Joined: 18th Mar 2003
Location:
Posted: 21st May 2003 01:00 Edited at: 21st May 2003 01:12
I got everything working =)

How do I get the hWnd on DBPro, is there a var in your lib for it?

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 21st May 2003 01:34 Edited at: 21st May 2003 01:49
[edit - take out the crap!]

The HWND is fairly easy to get:

HWND Window=DBPro::GetCore()->hWnd;

Everything within the GlobStruct is available in the same way. Just access the GlobStruct pointer via the GetCore function.
Eponick
21
Years of Service
User Offline
Joined: 18th Mar 2003
Location:
Posted: 21st May 2003 02:04 Edited at: 21st May 2003 02:06
Thanks, i didnt notice the GetCore pointer, i was trying:

GlobStruct->hWnd;
and
GlobStruct.hWnd;


lol, neither worked.


Now I can make some windows functions for DBPro =)

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 21st May 2003 02:10
Have a quick look at the tile example.

That uses the GetCore function to access the current bitmap surface - just perfect for your windows code to blit straight onto

Signing off for tonight
Mattman
20
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 18th Jun 2003 01:05
Where are the monkeys?WAH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
jk
lol

---Mattman
"Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done." Andy Rooney
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 18th Jun 2003 01:53
I ate them - very tasty too...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 18th Jun 2003 09:28
eponik you've gotta attach them to something

g_pGlob->hWnd; doesn't work cause you're just putting it into nothing
HWND hWnd = g_pGlob->hWnd; will because your passing the value.

I pride myself that i don't kill...
well not without a good reason

Login to post a reply

Server time is: 2024-03-29 09:59:12
Your offset time is: 2024-03-29 09:59:12