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.

DarkBASIC Professional Discussion / Question on own DLL - CDECL

Author
Message
Dreamora
23
Years of Service
User Offline
Joined: 20th Sep 2002
Location: Switzerland
Posted: 29th Oct 2003 16:17
Hi everyone

I've been trying now for several hours to get DBP using my own written DLL which is exporting it's functions in CDECL format but it seems impossible. I have no possibilities to create stringtables, but this isn't needed as the function isn't decorated within the language I'm using (PureBasic v3.8).

any idea what to do to get DBP doing what it should do?

Dell Inspiron 8200,P4-M 1,7ghz, GF4 440go (45.23 - DX9b), 1GB RAM
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 29th Oct 2003 16:30
The string table is always needed for DLL's that will be treated as plug-ins. Its so the compiler knows what command is where.

If you cant create string tables, you might find it easier to treat the DLL as a standard one and using it by calling the DLL commands.


Avatar & Logo by Indi. Insert witty comment here...
Dreamora
23
Years of Service
User Offline
Joined: 20th Sep 2002
Location: Switzerland
Posted: 29th Oct 2003 16:35 Edited at: 29th Oct 2003 16:37
erm don't know, writting plugins for many other apps, no problem, only DBP is making such a problem because it seems to be unable to check for exported commands like any other programm.

but ok I will have to use it on other ways if there is no possibility

as I said, stringtable wouldn't work anyway, there is no decorated function call in the DLL like in VC++ created DLLs

Dell Inspiron 8200,P4-M 1,7ghz, GF4 440go (45.23 - DX9b), 1GB RAM
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 29th Oct 2003 16:37
Yes, DBPro is somewhat different, but there you go... It cant use the standard exporting system as it would have no reference for doing so, hence the string table.


Avatar & Logo by Indi. Insert witty comment here...
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 29th Oct 2003 17:14
Hi Dreamflower,

All DLL plugins MUST have a stringtable - that is where DarkBASIC checks for the command names. The stringtable also specifies the parameter format of the command - which DarkBASIC needs in order to work, if, as in the case of my plugins written in Delphi for example, the DLL name is not decorated:

1,COMMAND NAME%0%DLLName

eg:

46, "MESSAGE%SS%MessageD%"

empty
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 29th Oct 2003 17:14
A silly question, but why can't you create string tables?

I awoke in a fever. The bedclothes were all soaked in sweat.
She said "You've been having a nightmare and it's not over yet"
Dreamora
23
Years of Service
User Offline
Joined: 20th Sep 2002
Location: Switzerland
Posted: 29th Oct 2003 17:41
PureBasic doesn't use/have any stringtables.

Dell Inspiron 8200,P4-M 1,7ghz, GF4 440go (45.23 - DX9b), 1GB RAM
empty
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 29th Oct 2003 17:42
But you could use a resource editor (like Reshacker) to link them in.

I awoke in a fever. The bedclothes were all soaked in sweat.
She said "You've been having a nightmare and it's not over yet"
Dreamora
23
Years of Service
User Offline
Joined: 20th Sep 2002
Location: Switzerland
Posted: 29th Oct 2003 18:30 Edited at: 29th Oct 2003 18:52
yeah I know, but I have to find a ressource creator before.
thx for the help

Dell Inspiron 8200,P4-M 1,7ghz, GF4 440go (45.23 - DX9b), 1GB RAM
empty
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 29th Oct 2003 19:03 Edited at: 30th Oct 2003 00:44
A resource compiler, yeah that's true. There are many out there, eg
GoRC.exe http://www.godevtool.com/, the LCC-compiler includes one, as well as the free version of the Borland CBuilder and the final version of PlayBasic will probably have one, too.

I awoke in a fever. The bedclothes were all soaked in sweat.
She said "You've been having a nightmare and it's not over yet"
EddieRay
23
Years of Service
User Offline
Joined: 28th Feb 2003
Location: USA
Posted: 30th Oct 2003 00:15
Here's one link to ResHack - it's pretty good, and free:

http://www.programmersheaven.com/zone16/cat1054/16956.htm

Desktop: AMD900/256MB/Radeon 8500 64MB/Win98SE/DX9.0b/Catalyst 3.7
Laptop: P3-850/384MB/GeForce2 Go 16MB/WinXP Pro/DX9.0b/Detonator 45.23
Dreamora
23
Years of Service
User Offline
Joined: 20th Sep 2002
Location: Switzerland
Posted: 30th Oct 2003 23:07
oh reshack is no problem, it's deliveried with PureBasic special editor JaPBE

Dell Inspiron 8200,P4-M 1,7ghz, GF4 440go (45.23 - DX9b), 1GB RAM
swdave
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United States
Posted: 31st Oct 2003 03:51
Hi,

I got a word doc, TPC-Toturial for PB, its around here somewhere.

The entry should look like
STRINGTABLE
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
{
1, "make msgbox%0%ptext%no parameter"
}

The push the „Compile script“ button and then save your file.

Login to post a reply

Server time is: 2026-07-26 08:30:46
Your offset time is: 2026-07-26 08:30:46