SHGetPathFromIDList

SHGetPathFromIDList:功能是把項目標誌符列錶轉換為文檔系統路徑,包含兩個參數:

pidl--- 一張相對於namespace的根(桌面)的項目標識符表地址,用於指定一個文檔或目錄地點;

pszPath---接收文檔系統路徑的緩衝地址,大小至少是MAX_PATH的字元長度

基本介紹

  • 外文名:SHGetPathFromIDList
  • 類別:計算機函式
  • 原型:BOOL SHGetPathFromIDList
  • 功能:標誌符列錶轉換為文檔系統路徑
簡介,函式在VB6中使用時,VC聲明,Parameters,Return value,Remarks,

簡介

SHGetPathFromIDList
功能是把項目標誌符列錶轉換為文檔系統路徑:
BOOL SHGetPathFromIDList(
LPCITEMIDLIST pidl,
LPSTR pszPath
);
參數:
pidl--- 一張相對於namespace的根(桌面)的項目標識符表地址,用於指定一個文檔或目錄地點;
pszPath---接收文檔系統路徑的緩衝地址,大小至少是MAX_PATH的字元長度

函式在VB6中使用時

聲明(declare):
Declare Function SHGetPathFromIDList Lib "shell32" (ByVal pidList As Long, ByRef lpBuffer As String) As Long

VC聲明

BOOL SHGetPathFromIDList(    _In_   PCIDLIST_ABSOLUTE pidl,    _Out_  LPTSTR pszPath);

Parameters

pidl [in]
Type: PCIDLIST_ABSOLUTE
The address of an item identifier list that specifies a file or directory location relative to the root of the namespace (the desktop).
pszPath [out]
Type: LPTSTR
The address of a buffer to receive the file system path. This buffer must be at least MAX_PATH characters in size.

Return value

Type: BOOL
Returns TRUE if successful; otherwise, FALSE.

Remarks

If the location specified by the pidl parameter is not part of the file system, this function will fail.
If the pidl parameter specifies a shortcut, the pszPath will contain the path to the shortcut, not to the shortcut's target.

相關詞條

熱門詞條

聯絡我們