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.

DLL Talk / Question: Is it possible to use another app's dll in DBP

Author
Message
TinTin
18
Years of Service
User Offline
Joined: 16th May 2006
Location: BORG Drone Ship - Being Assimilated near Roda Beta (28)
Posted: 25th Jul 2007 11:45
I have several applications that have functions stored in dll's
some of these have user defined types as input/output parameters.

Instead of rewriting these dll's to include the extern to DBP is there a way of just including them with the app and calling the required function from DBP.

Cyberspace was becoming overcrowded and slummy so I decided to move. These nice chaps gave me a lift.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 25th Jul 2007 13:04
There's no way to tell without trying it. If it works, great. If it doesn't, then you wasted a little time.

BTW, you need to think of the legality of doing it too. Distributing those DLLs when they don't belong to you may be copyright infringement.

TinTin
18
Years of Service
User Offline
Joined: 16th May 2006
Location: BORG Drone Ship - Being Assimilated near Roda Beta (28)
Posted: 25th Jul 2007 13:56
Nah, the copyright isn't a problem, thats been taken care of. (sent the boys round to persuade the author. hehe)

As far as I can see, there are two types of dll. the first gets packaged along with the application (handy for updates) the seccond gets incorporated in tha application by the compiler (handy for library functions).

It's the second type I'd like to be using, and since this has already been compiled and works within C++ as an included set of functions that don't require the dll to be distributed with the app. I'm wondering if DBP can use the same dll. (I personaly don't think it will without creating a wrapper type dll)

Cyberspace was becoming overcrowded and slummy so I decided to move. These nice chaps gave me a lift.
Xolatron
18
Years of Service
User Offline
Joined: 12th Mar 2006
Location: The Star Forge Language: DBpro
Posted: 25th Jul 2007 17:52
You're correct - not without creating a wrapper. The easiest way to use the first type of dll is to include it as an 'attached media' with your exe and extract it before loading it with 'load dll'. Then, you can make DBp functions to make the dll calls easier to remember, if you want.

-Xol

TinTin
18
Years of Service
User Offline
Joined: 16th May 2006
Location: BORG Drone Ship - Being Assimilated near Roda Beta (28)
Posted: 2nd Aug 2007 18:44
Yeah, as I thought but some of these dll functions use and pass user defined types (I know DBP don't support this), so say my function in the dll is something like...

to convert it to DBP I'd need to call it...

but that won't let me pass the vector...

Cyberspace was becoming overcrowded and slummy so I decided to move. These nice chaps gave me a lift.

Login to post a reply

Server time is: 2024-11-22 22:16:14
Your offset time is: 2024-11-22 22:16:14