Hi,
How can I get the user's DeskTop Path, My Documents Path
I believe that there are some functions to retrieve these paths.
Any help ?
Regards
Anser
Hi,
How can I get the user's DeskTop Path, My Documents Path
I believe that there are some functions to retrieve these paths.
Any help ?
Regards
Anser
#define HKEY_CURRENT_USER 2147483649
#define KEY_ALL_ACCESS 983103
FUNCTION GETDESKDIR()
LOCAL hKey := 0
LOCAL nType := 0
LOCAL cData := SPACE( 256 )
LOCAL nSize := LEN( cData )
REGOPENKEY( HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", 0, KEY_ALL_ACCESS, @hKey )
REGQUERYVALUE( hKey, "Desktop", 0, @nType, @cData, @nSize )
REGCLOSEKEY( hKey )
RETURN LEFT( cData, AT( CHR( 0 ), cData ) - 1 )
DLL FUNCTION REGOPENKEY( hKey AS LONG, cSubKey AS LPSTR, nOptions AS DWORD, nSamDesired AS DWORD, @nHandle AS PTR ) AS LONG;
PASCAL FROM "RegOpenKeyExA" LIB "advapi32.dll"
DLL FUNCTION REGQUERYVALUE( hKey AS LONG, cValueName AS LPSTR, nReserved AS LONG, @nType AS PTR, @cData AS LPSTR, @nSize AS PTR ) AS LONG;
PASCAL FROM "RegQueryValueExA" LIB "advapi32.dll"
DLL FUNCTION REGCLOSEKEY( hKey AS LONG ) AS LONG;
PASCAL FROM "RegCloseKey" LIB "advapi32.dll"Thankyou Mr.EMG,
I thought FWH had some builtin functions similiar to GetWinDir().
Thanks & Regards
Anser