Put an ampersand (&) before the zero and your code should work. This
demonstrates what the function is looking for in terms of arguments.  It
wants a pointer to the index number for the new record, not the index number
itself.  Using &0 will insert the new record at the beginning of the
database.

        NewRecord = DmNewRecord(VitalSignsDB,&0,RecSize);


> -----Original Message-----
> From: Murray Dowling [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, March 22, 1999 5:05 AM
> To:   [EMAIL PROTECTED]
> Subject:      Re: DmNewRecord writes to Low mem?
> 
> > The following snippet always generates a write to low memory error
> > on the DmNewRecord statement 
> 
> <snippet snipped>
> 
> >  // Get a new record of the proper size
> >  NewRecord = DmNewRecord(VitalSignsDB,0,RecSize);
> 
> 
> The second parameter to DmNewRecord is a UIntPtr which should be 
> pointing to the index of the position you wish to insert the record 
> at. The actual index assigned is returned via this pointer. You are 
> passing a null pointer. I think we see where the write to low memory 
> is coming from.
> 
> Hope this helps,
> Murray Dowling
> Deskfree Computing
> http://www.deskfree.com/

Reply via email to