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 / dll headers

Author
Message
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 6th Aug 2008 15:53
This isn't really specific to GDK, more C++ in general, but I know you guys
I have a dll (EZ Rotate free edition, old but serves my purpose) which said when I downloaded it that it would only work for DBPro. But can't I create my own header for the dll file, so that I can use it with GDK? How would I go about this? I've seen lots of tutorials but they seem to be about creating the dll yourself, not using someone elses. I have a list of all the internal names the DLL uses for functions, like ?EZrotate_GetMatXY@@YANXZ and also their addresses, if that helps.
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 7th Aug 2008 13:50
lilith? anyone?
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 7th Aug 2008 17:26 Edited at: 7th Aug 2008 17:28
Sorry. I don't have EZ Rotate so I'm not qualified to answer the question. And I haven't worked with DLLs directly much. In broad terms I think you have to register the DLL within your program in order to have it loaded and available then link a function pointer to the entry point of the function you wish to call.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Aug 2008 19:42
If you own EZ_Rotate for DBPro, you also own it for the GDK - just download it from your order page.

Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 7th Aug 2008 19:49
I've never used Dark Basic, at least not beyond the test phase. I've used C++ for so long that any feel I have for programming in Basic is completely gone. That's not to trash Basic, although I tease my roommate about it. I do, however, feel in a minority in these forums. I wish there were more DGDK postings in the code snippets forum.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Aug 2008 23:35 Edited at: 7th Aug 2008 23:35
So post some

Actually, I mis-read the original post - he has EZ Rotate free edition.

Firstly, there are no guarantees that you can get the DLL to work with the GDK - if that DLL uses any of the DBPro functionality (globstruct, external DLL function calls) then there's no chance of it working unless you write another DLL to map those calls to the GDK (which is actually harder than it sounds).

If you can get past that then there are two possible methods - the first (and harder one) is to create a .lib file for the DLL (linky to an article that explains how). The second method is to use the LoadLibrary/GetProcAddress functions to load the DLL and get pointers to the functions you want.

Now unless you are fairly comfortable with dealing with DLLs yourself (not just linking to them), I'd advise you to buy EZ Rotate instead - it'll be a more efficient use of your time, and produce more efficient code.

Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 7th Aug 2008 23:45
Quote: "So post some"


Actually I did, my Mouse class. My other classes are actually a bit too massive to be considered snippets.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 8th Aug 2008 00:13
Perhaps that was a little flippant of me ... What I was implying was that the only way that code snippets appear in forum is for people to write them and post them - there are currently 4 posted.

The other parts of the community do this - I wonder why the GDK part doesn't tend to.

Login to post a reply

Server time is: 2024-09-30 03:20:19
Your offset time is: 2024-09-30 03:20:19