共用方式為


SHCLSIDFromString 函式 (shlobj_core.h)

[此函式可透過 Windows XP Service Pack 2 (SP2) 和 Windows Server 2003 取得。 後續版本的 Windows 可能會變更或無法使用。 請改用 CLSIDFromString 。]

採用類別識別碼的字串形式, (CLSID) ,並建立對應的 CLSID。

語法

SHSTDAPI SHCLSIDFromString(
  [in]  PCWSTR psz,
  [out] CLSID  *pclsid
);

參數

[in] psz

類型: PCWSTR

Unicode 字串,包含格式 {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} 為 的 CLSID。

[out] pclsid

類型: CLSID*

CLSID 值的指標,當此函式成功傳回時,會以 CLSID 的形式接收已轉換的字串。

傳回值

類型: HRESULT

如果此函式成功,則會傳回 S_OK。 否則,它會傳回 HRESULT 錯誤碼。

規格需求

   
最低支援的用戶端 Windows 2000 Professional [僅限傳統型應用程式]
最低支援的伺服器 Windows 2000 Server [僅限桌面應用程式]
目標平台 Windows
標頭 shlobj_core.h (包含 Shlobj.h)
程式庫 Shell32.lib
Dll Shell32.dll (5.0 版或更新版本)