by Vladimir Grigoriev » Mon Mar 06, 2006 12:06 pm
Yes, I tried using _psp but only under pure Clipper.
The question arised when I wanted to write a Clipper function for searching files. What address to use for Disk Transfer Area (DTA) that used by DOS search functions? If to use a virtual string to store DTA structure then it real address can differ (I think so) between two sequential calls of the function if we will declare new strings or arrays.
Standard Clipper function DIRECTORY() uses for this purpose stack address. But DIRECTORY() does all stuff inside "one call". I've looked through open source code of some third part Clipper search functions that I found in internet but these functions always set DTA before calling DOS find first or find next functions. I don't like this. So I wonder why all these functions don't use standard DTA address. To get it is very simple as Clipper uses C start code i.e. there is global variable _psp that contains needed address.