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 / TPC that make use of CHECKLIST

Author
Message
Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 3rd Sep 2003 11:37
Hi, does anyone know how can I write a TPC DLL that make use of the DBpro built-in checklist commands, i.e. PERFORM CHECKLIST FOR xxxx, CHECKLIST QUANTITY, CHECKLIST STRING$, CHECKLIST VALUE A, CHECKLIST VALUE B, CHECKLIST VALUE C, CHECKLIST VALUE D.

Is there any built-in data structure in the TPC SDK that I can use to make use of those checklist commands? I wanted to create an XML parser TPC DLL that looks "native" to DBpro language.

Any TPC expert out there? IanM? Rob K?

Thanks!

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Sep 2003 15:35
The structure in the GlobStruct seems simple enough, but I've never had a need to try using it.

Also, I wouldn't know how to create a new entry, because the memory has to be allocated by the correct DBPro DLL. If you do it yourself, you risk a crash when the memory is freed.

I could try and find out sometime.
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 4th Sep 2003 06:24
Bulleye this should help ... its simple enough

first thing to call is this

GlobExpandChecklist( dwCurrentIndex, dwRequiredSize )

should be set to the total in your checklist string.
next thing to call is to create an internal structure to the global checklists to your array for your data

GlobalChecklist* ptrChecklist[dwIndex];

next thing to do is to then fill the data within your checklist.
so

ptrChecklist[0]
{ SizeOf(lpString), lpString, iValA, iValB, iValC, iValD, };

final step is to let the Global Structure know where the pointer is...
g_pGlob.checklisthasvalues=TRUE; //boolean, let it know the data types for any of the checklists are this
g_pGlob.checklisthasstrings=TRUE; //same as above
g_pGlob.checklistqty=dwEntries; //number of valid entries
g_pGlob.dwChecklistArraySize=SizeOf(&ptrChecklist); //current array size
g_pGlob.checklist = *ptrChecklist; // call the current allocation
g_pGlob.checklistexists=TRUE; //boolean, call once created to let DBP know

and really thats all there is to it

Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 4th Sep 2003 07:36
Thanks Raven! That's what I am looking for. I am gonna test it out tonite.

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Sep 2003 10:42
Yes, I see the idea, but the 'GlobExpandChecklist' function is only declared. There is no definition anywhere to link to so you just get linker errors
Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 4th Sep 2003 13:02
Any LIB file that I need to compile together with my TPC DLL?

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Sep 2003 15:06
Not that I'm aware of, and I can't even put one together because there's no export available for that function.
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 4th Sep 2003 18:26
you should have the prototype at the end of your GlobStruct.h
i can't remember if you absolutely have to set it prior ... try it without don't have C++ on this machine yet as its new.

you can see what i mean by wanting a proper SDK for dbpro though can't you

Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 4th Sep 2003 19:39
Erm, I think what IanM meant is, although the function GlobExpandChecklist() do have its prototype declared in the header file, thus it doesn't give any compilation error. However, since it doesn't have the function body (or implementation), you will get an "Unresolved Symbol" error upon linking to produce the final DLL.

Am I right, IanM?

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Sep 2003 22:12 Edited at: 4th Sep 2003 22:13
Yep. I haven't been able to track down any routine with this name in any of the DBPro library files.
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 5th Sep 2003 06:10
ahh... i kinda figured it was part of the core dll, not used it in a while - might be a reason to give Lee a bell and ask him what its actually attached to

swdave
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United States
Posted: 5th Sep 2003 08:31
How bout if you made an XML -> DBPArrayFile converter.

Then use Load Array.

And you would need some function like DBPArrayFile -> XML Template.
Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 5th Sep 2003 10:10
Did you mean load an XML files and convert it into Array? Hmm... I don't really get how it works. Mind tell me more about it...

Thanks!

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/

Login to post a reply

Server time is: 2026-07-23 07:42:33
Your offset time is: 2026-07-23 07:42:33