Results 1 to 10 of 19

Thread: Pointer to ARRAY in Delphi

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6

    Pointer to ARRAY in Delphi

    ry to declare TLISTptr as a pointer to array of TLIST items.

    For example: (not tested)

    Code:
     
    PROGRAM example;
    TYPE
    TLIST = RECORD
    Field: INTEGER;
    Other: INTEGER;
    END;
    TLISTARRAY = array[0..$FFFF] of TLIST;
    TLISTptr = ^TLISTARRAY;
    
    FUNCTION get_list: TLISTptr; CDECL; EXTERNAL 'lib.dll';
    
    VAR
    TheList: TLISTptr;
    BEGIN
    { Somewhere }
    TheList := get_list;
    WriteLn (TheList[0]);
    END.
    Last edited by Jimmy Valavanis; 30-03-2012 at 03:50 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •