Questing to Antonio Linares and other FW gurus.
When a Clipper program starts it saves the adrres of PSP in global variable __psp (Microsoft C startup code). I can use it, for example, to know command tail address. This addres I can futher use to set DTA for DOS find file functions. O'k. But can I use the PSP command tail address in FiveWin program?
Maybe this question is general for all Win16 programs not only Clipper programs.
Vladimir Grigoriev
Using __psp
-
- Posts: 54
- Joined: Fri Oct 21, 2005 10:45 am
- Location: Russia, Moscow
- Contact:
- Antonio Linares
- Site Admin
- Posts: 42409
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 12 times
- Been thanked: 48 times
- Contact:
-
- Posts: 54
- Joined: Fri Oct 21, 2005 10:45 am
- Location: Russia, Moscow
- Contact:
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.
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.