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:
Finding the application, icon and friendly names associated with a file name
AssocQueryString
..msdn    Add comment     W32 Constants      Translate this page
Searches for and retrieves a file or protocol association-related string from the registry.
Code examples:
Finding the application, icon and friendly names associated with a file name
Declaration:
HRESULT AssocQueryString(
  _In_       ASSOCF flags,
  _In_       ASSOCSTR str,
  _In_       LPCTSTR pszAssoc,
  _In_opt_   LPCTSTR pszExtra,
  _Out_opt_  LPTSTR pszOut,
  _Inout_    DWORD *pcchOut
);
FoxPro declaration:
DECLARE INTEGER AssocQueryString IN Shlwapi;
    INTEGER queryFlags,;
    INTEGER queryString,;
    STRING pszAssoc,;
    STRING pszExtra,;
    STRING @pszOut,;
    INTEGER @pcchOut
Parameters:
flags [in]
A combination of ASSOCF values that can be used to control the search.

str [in]
The ASSOCSTR value that specifies the type of string that is to be returned.

pszAssoc [in]
A pointer to a null-terminated string that is used to determine the root key.

pszExtra [in, optional]
An optional null-terminated string with additional information about the location of the string. It is typically set to a Shell verb such as open.

pszOut [out, optional]
Pointer to a null-terminated string that, when this function returns successfully, receives the requested string.

pcchOut [in, out]
A pointer to a value that, when calling the function, is set to the number of characters in the pszOut buffer.
Return value:
On success retuns S_OK (0), otherwise returns a standard COM error value.
Usage:
nBufSize = MAX_PATH
cBuffer = REPLICATE(CHR(0), nBufSize)

nResult = AssocQueryString(;
    0,;
    m.nAssociationType,;
    m.cFileType,;
    "open",;
    @cBuffer,;
    @nBufSize)
My comment:
This function is a wrapper for the IQueryAssociations interface in Shell namespace.

See also:
  • FindExecutable
  • ShellExecute
  • Displaying associated icons and descriptions for files and folders
  • Word Index links for the AssocQueryString :
    Translate this page:
      Spanish    Portuguese    German    French    Italian  
    FreeTranslation.com offers instant, free translations of text or web pages.
    Created: 2012-10-12 13:16:25
    Modified: 2012-10-13 14:40:19
    Visited in last 7 days: 25
    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.196.47.128)
    3 sec.Function: 'SQLGetPrivateProfileString'
    Function group: 'ODBC API'
    7 sec.Function: 'SetPriorityClass'
    Function group: 'Process and Thread'
    11 sec.Function: 'NetMessageBufferSend'
    Function group: 'Network Management'
    16 sec.Function: 'FtpFindFirstFile'
    20 sec.Function: 'GetCurrentDirectory'
    Function group: 'File Management'
    24 sec.
    Function group: 'Setup API functions'
    28 sec.Function: 'recvfrom'
    Function group: 'Windows Sockets 2 (Winsock)'
    37 sec.
    45 sec.Function: 'NetUserAdd'
    Function group: 'Network Management'
    49 sec.Function: 'GdipDeleteFont'
    Function group: 'GDI+ Font'
    Google
    Advertise here!