>Can someone explain how and when to use DECLARE DLLs?
>
>I see the following code in the sample Tastrade app and don't
>understand it.
>*-- DECLARE DLL statements for reading/writing to private INI files
>DECLARE INTEGER GetPrivateProfileString IN Win32API AS GetPrivStr ;
> String cSection, String cKey, String cDefault, String @cBuffer, ;
> Integer nBufferSize, String cINIFile
>
Hi Tom,
The above declare references a Win API function that is used to retrieve information from an INI file other than WIN.INI. I'm about to post an FAQ that will list sources for further information on the API, and I'll post when it's uploaded.
The API can be very useful in extending the functionality provided by VFP. You might want to check the Files/Download section under Win 32 and other APIs for some samples of what you can do with it. I've got a file (under Classes) that enables and disables the screen saver at will. You might want to look at that also.
hth,
George
Ubi caritas et amor, deus ibi est