Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a way in VFP to determine the windows profile..
Message
From
23/02/2004 16:07:38
Lamar Glover
Southeastern Apparel, Inc.
Dothan, Alabama, United States
 
 
To
23/02/2004 15:14:22
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00880042
Message ID:
00880078
Views:
16
Chuck,

Thanks for your help. Based on those links I was able to come up with the following solution:

* Get the current Windows, System and Program Files directories
DECLARE INTEGER SHGetFolderPath IN SHFOLDER.DLL ;
INTEGER hwndOwner, ;
INTEGER nFolder, ;
INTEGER hToken, ;
INTEGER dwFlags, ;
STRING @ pszPath
DECLARE INTEGER GetActiveWindow IN WIN32API
#DEFINE CSIDL_PROFILE 40
lcPath = REPL(CHR(0),261)
=SHGetFolderPath(GetActiveWindow(),CSIDL_PROFILE,0,0,@lcPath)

Of course, Dragan had a one line solution to the problem.

Thanks to all of you for your assistance.

Lamar

? 'Windows folder:',LEFT(lcPath,AT(CHR(0),lcPath)-1)
>>for the current logged in user. We are using VFP7 SP1 on boxes running WinXP Pro. Is there a VFP function or API call that returns folder location?
>>
>>TIA
>
>Look at FAQ 16115
>http://www.levelextreme.com/wconnect/wc.dll?FournierTransformation~2,84,14,16115
>
>Or if you want to use Shell Api you can look at FAQ 16022
>http://www.levelextreme.com/wconnect/wc.dll?FournierTransformation~2,84,14,16022
Lamar Glover
DP Manager, Southeastern Apparel, Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform