>Does DmWrite and other Dm functions take care of reallocation and sizing of
>memory?

No. Basically, you need to use a sequence like this:

recH = DmGetRecord ( database, index )
oldrecsize = MemHandleSize ( recH );
if ( oldrecsize != newrecsize ) {
  err = MemHandleResize ( recH, newrecsize );
  recH = ResizeRecord ( recH, index, newrecsize);
}
recP = MemHandleLock ( recH );
error = DmWrite ( recP, 0, bufferPointer, newrecsize );
MemHandleUnlock ( recH );
error = DmReleaseRecord ( database,  index, true );

Note: this is abbreviated and contains no error checking.

Regards,
Steve Mann

-------------------------------------------
Creative Digital Publishing Inc.
1317 Palm Street, San Luis Obispo, CA 93401-3117
-------------------------------------------
805.788.0138            805.593.3811 (fax)
[EMAIL PROTECTED]       http://www.cdpubs.com


Reply via email to