CW+CWFile.H+Delphi = WOW? 
Author Message
 CW+CWFile.H+Delphi = WOW?

I am using delphi with a CLarion database at the moment.
I have written a CW Dll that I link into my Delphi program.

My Clarion Dll have the following prototypes

This works fantastic. No need for BDE.

Currently the file declarations is fixed in the clarion dll, and the
Delphi program passes a pointer to a block that is the record
structure of one of the clarion files. Thus the Delphi program load
and fetch data from the file's record structure, and all file
handling is done by my clarion dll.

I would however like to give more control to my Delphi application.

To do this, I would need to use cwfile.h
But there seem to be a couple of errors in this file. I've tried
to find a more up to date version of this file, but with no success.

Some of the articles on Deja News led me to believe that all is not
well with cwfile.h. Below is some of the comments I dug up.

I've posted MY version of cwfile.h to my webpage with the hope that some
gurus out there would check it with current/updated versions of their
cwfile.h, and send me alterations that they made.

The people listed below all referenced cwfile.h at some stage.
Oren Goldshcmidt,Alexey Solovjev,Sean Wilson,Andrew V. Myalin
Phillip Carroll,Vitaly Titov,Arnor Baldvinsson,Edward Mindlin
Jon B Bushey,Ernst Mikkelsen,David Harrison,Geoff Robinson

If Topspeed would make this information more availible to programmers
I am sure Clarion will get even more powerfull! Delphi's BDE sucks badly
,and if we can get into that niche before they fix it, we(the clarion
community) will get more than just a foot in the door like we have
at the moment.

I can understand that these things could change overnight, but I do not
think this is a good excuse to hide it from us.




Subject:      Re: C header files in CW 2.003

> Actually there are a couple of caveats with thest files:
> 1. The information in cwfile.h about the internal structures Clarion uses to
> declare file strcutures is not compatible with CW2
> 2. There is a mistake in the definition of GET when used as
> GET(<Key>,<Key>) - it takes a poitner to a file and ONE poitner to a key
> (GET(<Key>,<Key>) is always called with the same key twice), not one file
> and two keys as declared in cwfile.h.

Somebody else posted a similar statement a little while ago, but when I
checked against the driver kit, I could find no significant
differences.  What are the incompatabilities?  My copy of cwfile.h only
has one fcb, and one kcb in the GET(key,key) declaration, but it's
possible I fixed it.

I've been using cwfile.h to dynamically fiddle with file declariations
and to use CW's file functions from non-cw code.

Recently I've had two problems:

        (1) SET(<key>,<key>) and SET(<file>,<key>,<key>) GPF every time.
        All the other file functions work fine, and yes, I do use the
        same key for each parameter. Any ideas?

        (2) I am stuck with version 1.5 because version 2 has a
        different structure for its FCBBLK. Version 2 _should_ come
        with it's own CWFILE.H but instead it comes with the version
        1.5 CWFILE.H! Is there an updated version 2.0 CWFILE.H?



> >         1. size of the group
> >         2. address of group
> >         3. address of a groupdescriptor

> > Does anybody know the structur of the groupdescriptor?

> There is some documentation in the CWFILE.H file in LIBSRC that
> describes RECORDs which are essentially the same thing.  However...

Information in CWFILE.H describes CW 1.x compliant format of type

> > If TS see this: Why should information regarding the groupdescritor
> > be secret?

> ... you cannot rely on this structure, TS may need to change it in
> future implementations.

and in CW 2.0 it has been changed significantly.

Sat, 01 Jul 2000 03:00:00 GMT  
 CW+CWFile.H+Delphi = WOW?

I have managed to hack the format of the CW2 fcbblk but -- I have a working
application that uses this information. Unfortunately it is not documented
in a form I can publish! (This margin is too narrow to contain it &c.) If
there is demand I will write it up. E-mail me if you're interested.

PS. It is really not hard to do -- get a big DCT and dig arround in hex
dumps of the FCBBLK till you get an idea of the new format!

Sat, 01 Jul 2000 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. CW+CWFile.H+Delphi = WOW!

2. Converting Clarion DOS 2.1 *.DAT to CW - Choosing between CW VB Delphi

3. Catching Delphi Exceptions in CW

4. A CW DLL called from Delphi

5. Delphi Function Call (to CW DLL)

6. Function call from Delphi to CW dll

7. VB or Delphi help : Accessing a DLL using CW 2001.001

8. What OOP is (was: CW vs. Delphi)

9. What OOP is (was: CW vs. Delphi)

10. CW vs. Delphi

11. Delphi Dll in CW 2003



Powered by phpBB® Forum Software