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 / Reading the Parse tables...

Author
Message
Eddie Gordo
23
Years of Service
User Offline
Joined: 14th Jan 2003
Location: Ohio - USA
Posted: 3rd Aug 2003 07:43 Edited at: 3rd Aug 2003 07:45
I was reading the DLL dependencies for the DBPro compiler and i believ that i have found the Parse tables for access to the windows APIs. Is this somthing that was being worked on but wasn't completed, or did i just uncover a secret set of commands for the future DBPro updates...oops ...i may just be reading stupid stuff that was accidently added by some other compiler. Can i please find out what these are. Dont tell me i cant see the Functions cause all DLLs that are similar to the SDK i can read and i notice some of the Functions in the compiler DLL share the same name as common DBPro commands.

Visual Programming Studio ORANGE
Replacement IDE for Dark Basic Professional...
(Will Be Availeable When This is Removed)
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Aug 2003 14:33
No. It's standard. All DLL's and executables have them if they connect to other external DLLs.

They basically allow windows to link your executable with other parts of the system at load-time, allowing you to call those routines.

Where you see DBPro commands, is where there is an interdependancy between different parts of the DBPro library code.

There's nothing mysterious about all this, but it may allow you to take advantage of the DBPro commands from another language ... oh, yes. I forgot that I've already done that
Eddie Gordo
23
Years of Service
User Offline
Joined: 14th Jan 2003
Location: Ohio - USA
Posted: 3rd Aug 2003 22:33
OIC, thanks, so we don't have access to the WinAPIs yet...oh well at least RobK has done that...and BTW did you ever get that using the DLLs for the C++ working for BloodShed dev?

Visual Programming Studio ORANGE
Replacement IDE for Dark Basic Professional...
(Will Be Availeable When This is Removed)
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Aug 2003 00:08
Yes ... and no

The problem I have is that DBPro requires a specific function name mangling system, so I can't get the Globstruct pointer ... at least not easily.

Once I have that solved, it's all plain sailing
Eddie Gordo
23
Years of Service
User Offline
Joined: 14th Jan 2003
Location: Ohio - USA
Posted: 4th Aug 2003 16:57
O_o...yeah, the globaldestruct-o-pointy thinger, yeah, i have problems with that thing to...i am not a real programmer, only DB and DBPro...i adapt the language to suit my needs not adapt other languages to make my language better...hell, i am even trying to turn DBPro into a VB-like program...but i was writing the documents on its basic principals of how the different .*cc files work and i decided i dont understand my own scripter for DBPro well enough...i even tried to make a compiler for my own language(Artifact i believe) i gave up cause i saw the word parse and got lost, then my name for the language was stolen...so i have a new question...

I wrote this post as "Parse" tables, i meant function tables, so whats a parse table, i assume its the way the compiler maps the functions to the EXE, and a global pointy destruct-o-matic thing...

i know nothing about C++ except i have VC++ and Bloodshed Dev on my hard drive and nothing else...i need to learn more than DBPro instead of making DBPro work for everything...or maybe not...

Visual Programming Studio ORANGE
Replacement IDE for Dark Basic Professional...
(Will Be Availeable When This is Removed)
Eddie Gordo
23
Years of Service
User Offline
Joined: 14th Jan 2003
Location: Ohio - USA
Posted: 4th Aug 2003 17:13
never mind the parser question i found it...i am not as small a programming mind as i seem, i understand classes and variables of C++ i am just curious about the destructo pointer...never heard of it...does it have sumthing to do with complex levels of C++, like hour 5 of my learn C++ in 24 hours book ) lol...

Visual Programming Studio ORANGE
Replacement IDE for Dark Basic Professional...
(Will Be Availeable When This is Removed)
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Aug 2003 20:53
Destructors are cleanup functions. They get executed automatically when a local object goes out of scope, or when you delete a heap-based object (allocated by 'new').

You can use them to return memory back to the system for example (although not just limited to that).
iaretony
23
Years of Service
User Offline
Joined: 6th Jun 2003
Location:
Posted: 4th Aug 2003 22:14
Well, I'm not sure about windows, but I have solved a problem that sounds very simmilar under Linux.

C++ compilers mangle names, so when you're trying to get at parts of DLL's that were compiled by C++, you need to create a 'C' handle for you're DLL. By handle, I mean regular C functions that act as an interface for the rest of the C++ code.

C function will not be mangled if you wrap them in:

extern "C"
{
void foo() {}
}

Does this help?

Tony

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Aug 2003 23:07
Nope It's not a case of C or C++ naming and linkage, it's a case of different name-mangling conventions.

When you create a TPC DLL in Visual studio and include a function with the signature 'void ReceiveCoreDataPtr ( LPVOID Core )' the name gets mangled to '?ReceiveCoreDataPtr@@YAXPAX@Z'. When DBPro loads the DLL, it is this name it looks for to pass the core Globstruct pointer.

Unfortunately, MINGW mangles the same function to '_Z18ReceiveCoreDataPtrPv' which DBPro doesn't look for ...

I have two possible solutions ... but neither of them are the way I really wanted to go

One passes the problem to the users of my library, and the other may give me future problems, neither of which I want.
Eddie Gordo
23
Years of Service
User Offline
Joined: 14th Jan 2003
Location: Ohio - USA
Posted: 4th Aug 2003 23:09
Whoa...to much C++ to compensate for...

Visual Programming Studio ORANGE
Replacement IDE for Dark Basic Professional...
(Will Be Availeable When This is Removed)
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Aug 2003 23:18

Login to post a reply

Server time is: 2026-07-23 02:10:36
Your offset time is: 2026-07-23 02:10:36