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.

Author
Message
adr
23
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 15th Aug 2003 20:02
Has anyone sucessfully made a DBPro DLL in dev-c++? I found IanM's framework quite handy (well, I imagine I will find it handy when I get home from work), but it seems geared towards MSVC++. I'm from a linux programming background so all this windows terminology in the source phazed me a little ....

If there isn't a "freeloading-idiots guide to DLL coding", then it looks like I've found a way to spend my weekend
I opened the case to my PC today and thought, my exhaust fan sucks.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 15th Aug 2003 20:33
Yes, you can use Dev-C++ DLL's in DBPro, as long as you can create a resource file, but I've not posted anything on my site yet.

I'm not actually using the Dev-C++ package, but I'm using the same compiler. In the little 'testers' I've done, I've manually edited the resource files to provide commands.

I'm currently working on getting the Interface library ported across, so that these DLL's can get access to the globstruct.
adr
23
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 15th Aug 2003 21:00
Sorry to have messed you around, but I've been doing some thinking (on the way home).

I think it'd make a bit more sense for me to do the DLLs in Delphi, since I have a little more experience in that area when in comes to win32 apps.

So, I think I'll toy around with Delphi for a while. If it's a pain in the arse (I last did some delphi coding 7 years ago) then I may move to C++, which is a bit fresher in my mind.

I opened the case to my PC today and thought, my exhaust fan sucks.
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 15th Aug 2003 22:13
Have a word with RobK - he uses Delphi, I believe.


Logo design by Indi
Its better than a poke in the eye...
Kentaree
23
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 19th Aug 2003 20:55
@IanM (or anyone else who can help): Could you post some more info about doing the resource files in Dev?
My current .rc file looks like this:



When I try and compile, it gives me a parse error at line 3 of the resource file . Now I release that probably the syntax of the strings themselves are wrong, any help on that would be appreciated too

Cheers,
Kentaree

Whatever I did I didn't do it!
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 19th Aug 2003 21:04
That's the syntax used by Visual Studio which uses a preprocessor to translate the file to something like this:



And don't forget that your functions won't be named like that unless you wrap them with 'extern "C" { }'.
Kentaree
23
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 19th Aug 2003 21:16
Cheers Ian, it worked My eternal gratitude to you!

Cheers,
Kentaree

Whatever I did I didn't do it!
adr
23
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 20th Aug 2003 12:08
Thought I'd stick a c++ question in here.

I'm pretty sure that this should work in regular C/C++:

sprintf(aCharStar, "%d", anInt);

however, if I do it in a DBPro DLL, then as that gets called the DBPro app shutsdown without an error. I've tried using a DWORD instead of an int (IanM seemed to use DWORDS instead of ints in his code) but to no avail. This is by no means a showstopper for me personally, it just pisses me off.

I've also tried excplicit char casting using char(anInt) as well as itoa(str, integer, 10). As soon as I try to piss about with the integer, DBPro quits.

Anyone know what I'm talking about?

A wise man once said: "I know that I need codes but I dont know the codes"

Login to post a reply

Server time is: 2026-07-25 08:29:32
Your offset time is: 2026-07-25 08:29:32