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:
Displaying system dialog that selects a folder
SHParseDisplayName
..msdn    Add comment     W32 Constants      Translate this page
Translates a Shell namespace object"s display name into an item identifier list and returns the attributes of the object. This function is the preferred method to convert a string to a pointer to an item identifier list (PIDL).
Code examples:
Displaying system dialog that selects a folder
Declaration:
HRESULT SHParseDisplayName(
    LPCWSTR pszName,
    IBindCtx *pbc,
    LPITEMIDLIST *ppidl,
    SFGAOF sfgaoIn,
    SFGAOF *psfgaoOut
);
FoxPro declaration:
DECLARE INTEGER SHParseDisplayName IN shell32;
    STRING    pszName,;
    INTEGER   pbc,;
    STRING  @ ppidl,;
    INTEGER   sfgaoIn,;
    INTEGER @ psfgaoOut

Parameters:
pszName
[in] Pointer to a zero-terminated wide string that contains the display name to parse.

pbc
[in] A bind context that controls the parsing operation. This parameter is normally set to NULL.

ppidl
[out] Address of a pointer to a variable of type ITEMIDLIST that receives the item identifier list for the object.

sfgaoIn
[in] A ULONG value that specifies the attributes to query.

psfgaoOut
[out] Pointer to a ULONG. On return, those attributes that are true for the object and were requested in sfgaoIn are set.
Return value:
Returns S_OK (0) if successful, or an error value otherwise.
Usage:
FUNCTION PIDLFromPath( cPath As String ) As Number
* returns PIDL for a given path

    LOCAL cBuffer, nResult
    cPath = STRCONV(m.cPath+CHR(0), 5)
    cBuffer = REPLICATE(CHR(0), 4)

    nResult = SHParseDisplayName(m.cPath,;
        0, @cBuffer, 0,0)

RETURN IIF( nResult=0, buf2dword(m.cBuffer), 0) 
My comment:
The calling application is responsible for freeing the returned PIDL.

ITEMIDLIST structure contains a list of item identifiers.
typedef struct _ITEMIDLIST {
        SHITEMID mkid;
}

A pointer to this structure, called a PIDL, is used to identify objects in the Shell namespace.

See also: SHSimpleIDListFromPath, SHGetPathFromIDList
Word Index links for the SHParseDisplayName :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2004-08-03 12:38:27
Modified: 2011-01-15 14:21:09
Visited in last 7 days: 16
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.166.232.243)
13 sec.Function: 'CeGetSpecialFolderPath'
25 sec.Function: 'GetSystemDefaultLocaleName'
38 sec.Function: 'GetProp'
52 sec.Function: 'GetNumberOfInterfaces'
1.08 min.Function: 'if_nametoindex'
1.3 min.Function: 'GdipCreateMatrix2'
1.52 min.Function: 'PathToRegion'
1.72 min.Function: 'SetKeyboardState'
1.92 min.Function: 'FindFirstVolumeMountPoint'
2.1 min.
Function group: 'Window'
Google
Advertise here!