Download User Manual - EAGLE Technology
Transcript
EDR Software Development Kit Memory functions (XMS) 13. Memory functions (XMS) These functions work with blocks of memory. In the DOS versions of EDR they work with XMS memory blocks. In the Windows version of EDR the functions just call the normal Windows API global memory functions. They are still useful for languages like Visual Basic that do not have built in dynamic memory allocation functions. The memory blocks are accessed using memory block handles (long integers) that identify the block to EDR. The sampling functions EDR_ADInBinMem (9.5) and EDR_ADInBinMemBackground (9.6) recognise these handles and will capture data into these buffers transparently. All of these functions accept all parameters in samples and not bytes. A sample is 2 bytes long. This does not mean that you cannot store other forms of data in these memory blocks. Under Windows 3.1x and 16 bit Windows 95 apps these handles are just far pointers to the data block. Under 32 bit Windows 95 apps and Windows NT they are 32 bit flat pointers (near) to the data block. You can freely cast them to pointers to access the data. 13.1 EDR_AllocMem Parameter num Type long Comment Number of samples Returns: long memory block handle or 0 if not enough memory Allocates a block of memory and returns its handle. The size of the block will be at least num*2 bytes. 157