* Functions for dealing with the heap DECLARE INTEGER HeapCreate IN Win32API; INTEGER flOptions, INTEGER dwInitialSize,; INTEGER DWMaximumSize DECLARE INTEGER HeapAlloc IN Win32API; INTEGER hHeap, INTEGER dwFlags, INTEGER dwBytes DECLARE INTEGER HeapDestroy IN Win32API; INTEGER nHeap DECLARE INTEGER HeapFree IN Win32API; INTEGER nHeap, INTEGER dwFlags, INTEGER lpMem * Create Heap lnHeap = HeapCreate(0, 4096, 0) * Allocate Memory lnMemory = HeapAlloc(lnHeap, 0, 255) * To write a string to the lnMemory address * lcstring is the string to write * Compare this declaration to the one that follows DECLARE INTEGER lstrcpy IN Win32API; INTEGER lpszString1, STRING @lpszString2 * lnpointer is the pointer returned lnpointer = lstrcpy(lnMemory, @pcstring) * Get a string's value from a pointer * pcstring is the buffer to copy to * and should be large enough to hold the entire * string (including terminating NULL) DECLARE INTEGER lstrcpy IN Win32API; STRING @lpszString1, INTEGER lpszString2 lnpointer = lstrcpy(@lcstring, lnpointer) * Free up the resources = HeapFree(lnHeap, 0, lnMemory) = HeapDestroy(lnHeap)As I mentioned, I picked this up from an article by Gary DeWitt in FoxPro Advisor. It was Nov. 1997, I think.