Using Win32 functions in Visual FoxPro Image Gallery
Shell Functions
..msdn
AssocQueryString
DllGetVersion
DragAcceptFiles
DragFinish
DragQueryFile
DragQueryPoint
FileIconInit
FindExecutable
GetFileNameFromBrowse
GetMenuContextHelpId
GetWindowContextHelpId
InetIsOffline
IsUserAnAdmin
LoadUserProfile
PathMakeUniqueName
PathYetAnotherMakeUniqueName
RealDriveType
RestartDialog
SHAddToRecentDocs
SHBrowseForFolder
SHCreateDirectory
ShellAbout
ShellExecute
ShellExecuteEx
Shell_GetImageLists
Shell_NotifyIcon
SHEmptyRecycleBin
SHFileOperation
SHFormatDrive
SHGetFileInfo
SHGetFolderPath
SHGetPathFromIDList
SHGetSpecialFolderLocation
SHGetStockIconInfo
SHParseDisplayName
SHQueryRecycleBin
SHSimpleIDListFromPath
UnloadUserProfile
WinHelp
Code examples:
How to get the path to a Special Folder
SHGetFolderPath
..msdn    Add comment     W32 Constants      Translate this page
Takes the CSIDL of a folder and returns the pathname.
Code examples:
How to get the path to a Special Folder
Declaration:
HRESULT SHGetFolderPath(
    HWND hwndOwner,
    int nFolder,
    HANDLE hToken,
    DWORD dwFlags,
    LPTSTR pszPath
);
FoxPro declaration:
DECLARE SHORT SHGetFolderPath IN shell32;
    INTEGER hwndOwner,;
    INTEGER nFolder,;
    INTEGER hToken,;
    INTEGER dwFlags,;
    STRING @pszPath
Parameters:
hwndOwner
[in] Handle to an owner window. This parameter is typically set to NULL.

nFolder
[in] A CSIDL value that identifies the folder whose path is to be retrieved.

hToken
[in]
An access token that can be used to represent a particular user.

dwFlags
[in] Flags to specify which path is to be returned.

pszPath
[out] Pointer to a null-terminated string of length MAX_PATH which will receive the path.
Return value:
Returns standard HRESULT codes, including the following: S_FALSE, E_FAIL, E_INVALIDARG, SUCCESS (0).
Usage:
cBuffer = Repli(Chr(0), MAX_PATH)

IF SHGetFolderPath(0, nFlag, nToken,;
    SHGFP_TYPE_CURRENT, @cBuffer) = 0

    cPath = STRTRAN(cBuffer, Chr(0), "")

ENDIF
My comment:
CSIDL values provide a unique system-independent way to identify special folders used frequently by applications, but which may not have the same name or location on any given system. For example, the system folder may be "C:\Windows" on one system and "C:\Winnt" on another.

CSIDL list.

For Windows versions 98, NT4 the SHGetFolderPath is obtained through SHFolder.dll, not through Shell32.dll.

SHFolder.dll continues to be included for backward compatibility, though the function is now implemented in Shell32.dll.

See also: SHGetSpecialFolderLocation, SHGetKnownFolderPath, SHGetPathFromIDList
Word Index links for the SHGetFolderPath :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2003-07-16 17:37:43
Modified: 2011-01-20 08:31:27
Visited in last 7 days: 19
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.224.164.166)
15 sec.Function: 'ZeroMemory'
48 sec.Function: 'UrlEscape'
1.05 min.Function: 'waveInGetPosition'
1.27 min.Function: 'WNetGetUser'
1.57 min.Function: 'SetWindowText'
1.82 min.Function: 'SQLSetEnvAttr'
2.73 min.Function: 'SQLGetEnvAttr'
4.17 min.Function: 'SetSuspendState'
4.45 min.Function: 'SQLDisconnect'
5.93 min.Function: 'SystemTimeToFileTime'
Google
Advertise here!