描述
IWbemPath.SetScope方法根据索引在路径中设置范围。索引始终为0(零),范围是路径的类或键部分。此方法也设置类名。
Windows 2000,Windows NT 4.0和Windows Me / 98/95: 索引可能有其他值,范围包括除了路径的关键部分之外的其他属性。
C++ 语法
HRESULT SetScope( [in] ULONG uIndex, [in] LPWSTR pszClass );  | 
PowerBASIC 语法
METHOD SetScope ( _ BYVAL uIndex AS DWORD, _ BYREF pszClass AS WSTRINGZ _ ) AS LONG  | 
参数
uIndex
范围索引。对于Windows XP,此值必须为0(零)。
pszClass
范围的类名。
返回值
此方法返回一个HRESULT,指示方法调用的状态。
退货代码  | 
描述  | 
S_OK  | 
方法成功执行  | 
WBEM_E_INVALID_PARAMETER  | 
索引超出范围。  | 
WBEM_E_OUT_OF_MEMORY  | 
内存不足。  | 
备注
Windows 2000 / NT:需要WMI SDK Update或Microsoft .NET Framework SDK。
Windows NT:需要Microsoft .NET Framework SDK。
要求
客户  | 
需要Windows Vista或Windows XP。  | 
服务器  | 
需要Windows Server 2008或Windows Server 2003。  | 
可再发行  | 
需要Windows 2000和Windows NT上的WMI可重新分发组件版本1.0。在Windows NT上,它也需要Microsoft .NET Framework。  | 
头  | 
在Wmiutils.inc中声明。  | 
DLL  | 
需要Wmiutils.dll。  | 


