IItemNameLimits::GetMaxLength 方法 (shobjidl_core.h)

返回调用特定名称的命名空间中允许的最大字符数。

语法

HRESULT GetMaxLength(
  [in]  LPCWSTR pszName,
  [out] int     *piMaxNameLen
);

参数

[in] pszName

类型: LPCWSTR

指向包含名称的字符串的指针。

[out] piMaxNameLen

类型: int*

指向名称中可以使用的最大字符数的指针。

返回值

类型: HRESULT

如果该方法成功,则返回 S_OK。 否则,将返回 HRESULT 错误代码。

要求

要求
最低受支持的客户端 Windows XP [仅限桌面应用]
最低受支持的服务器 Windows Server 2003 [仅限桌面应用]
目标平台 Windows
标头 shobjidl_core.h (包括 Shobjidl.h)
DLL Shell32.dll