C/Front Header file for Delphi

AdministratorAdministrator Member, Moderator, Administrator Posts: 2,500
edited 2003-08-24 in Download section
C/Front Header file for Delphi
This is my first attempt to create a C/Front 3.60 header file for use with Borland Delphi.

http://www.mibuso.com/dlinfo.asp?FileID=196

Discuss this download here.

Comments

  • AnonymousAnonymous Guest Posts: 137
    if not DBL_FindRec(hTable, hRec, PDBL_U8(PChar('-'))) then;
    
    But it's causing some sort of exception which prevents you from deallocating properly.

    Will keep looking.
  • AnonymousAnonymous Guest Posts: 137
    You are right; the allocation and deallocation of these handles should be encapsulated in a try/finally block! I suppose I forgot about this because I wanted to duplicate the structure of the sample application in c (which ships with C/Front) as closely as possible.
  • AnonymousAnonymous Guest Posts: 137
    var
      FieldValue: array[0..250] of char;
      First: string = '-';
    
    [...]
    DBL_Allow(DBL_Err_RecordNotFound);
    if not DBL_FindRec(hTable, hRec, PDBL_U8(First)) then;
    DBL_Field_2_Str(@FieldValue, 250, hTable, hRec, 5);
    WriteLn(FieldValue);
    [...]
    

    Delphi or C/Front clearly did not like the fact that I was passing a const as a parameter to DBL_FindRec. This only shows that I don't know an awful lot about memory allocation etc. in Delphi... :( With the parameter replaced, the code run beautifully and shows the value of field #5 of the first record.
Sign In or Register to comment.