Al. 

You need to allocate the pointer some memory using "new" and free is
with "Dispose".
i.e.

        New(RState)
        Rstate^.key:='';
        //or it might be
        Rstate.key^:='';
        //when all done 
        Dispose(Rstate)

Remembering that when you dispose it, its gone forever.
Oh, because it's a pointer you need the ^ with the structure.
I am doing this from memory, so I might be slightly wrong with the
position of the ^ but it will help you anyway.

Jeremy

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Alistair George
Sent: Monday, 28 June 2004 15:57
To: [EMAIL PROTECTED]
Subject: [DUG] Records: Access Violation error


  TPRegState = ^TRegState;
  TRegState = record
    TrialDays: Integer;
    Key, License: string;
    Registered: Boolean;
  end;

//Global var:
  Rstate: TPRegstate;


//In formshow:

    Rstate.Key := '';  //AVErr here
    RegStatus(Rstate);


_______________________________________________
Delphi mailing list
[EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi

_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to