Ted Roche wrote on 2014-03-03: 
>  On Mon, Mar 3, 2014 at 8:28 AM, Allen <[email protected]> wrote:
>  
>> Out of interest, as I do not have an XP machine now. Does
>> getenv("programdata") exist and what does it return if so.
>> Al
>> 
>> 
>> IIRC, there's a WinAPI call exactly for this, as depending on
environmental
>> variables is not a good idea.
>

Ted is right:

      DECLARE integer SHGetFolderPath IN SHFolder.dll integer, integer,
integer, integer, string@

      #DEFINE CSIDL_APPDATA 0x001a
      #DEFINE CSIDL_COMMON_APPDATA 0x0023
      #DEFINE CSIDL_LOCAL_APPDATA 0x001c

      STORE 0 TO nreturn, nhwnd, ntoken, nflags
      cPath = REPLICATE(CHR(0),254)
      nreturn = SHGetFolderPath(nhwnd, CSIDL_COMMON_APPDATA, ntoken, nflags,
@cPath)
      cPath = ALLTRIM(cPath, CHR(0))


Tracy Pearson
PowerChurch Software


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to