网站首页  词典首页

请输入您要查询的函数:

 

术语 pdhexpandwildcardpathh
释义 PdhExpandWildCardPathH
语法:
C++
PDH_STATUS PdhExpandWildCardPathH(
__in PDH_HLOG hDataSource,
__in LPCTSTR szWildCardPath,
__out LPTSTR mszExpandedPathList,
__inout LPDWORD pcchPathListLength,
__in DWORD dwFlags
);
PdhExpandWildCardPathH功能
检查指定的计算机或日志文件,并返回那些反路径匹配给定的计数器路径包含通配符。
此功能是相同的PdhExpandWildCardPath功能,除了它支持使用句柄数据源。
参数
hDataSource [in]
处理到数据源的PdhBindInputDataSource函数返回。
szWildCardPath [in]
null结尾的字符串,指定计数器路径扩大。计数器的路径的最大长度为PDH_MAX_COUNTER_PATH。
如果hDataSource是一个实时的数据源,函数搜查,火柴路径中指定的计算机。如果路径没有指定的计算机,功能搜索本地计算机。
mszExpandedPathList [out]
来电分配的缓冲区,它接收的空列表,终止反路径匹配在szWildCardPath通配符规范。这份名单是由两个终止NULL字符。设置为NULL,如果pcchPathListLength是零。
pcchPathListLength [ in , out ]
的大小mszExpandedPathList缓冲区,在TCHARs。如果零输入,该函数返回PDH_MORE_DATA,并设置此参数所需的缓冲区大小。如果缓冲区比所需的大小,功能设置此参数的时候,往往有人使用的缓冲区的实际大小。如果在输入指定的大小是大于零,但比所需的大小少,您不应该依靠返回的大小重新分配缓冲区。
注意您必须添加一个到Windows XP需要的大小。
dwFlags [in]
标志,指示该通配符不扩大。您可以指定一个或多个标志。
ValueMeaning
PDH_NOEXPANDCOUNTERSDo不会扩大计数器名称,如果路径中包含一个计数器名称通配符。
PDH_NOEXPANDINSTANCESDo不会扩大实例名称,如果路径中包含一个父实例通配符,例如姓名,或实例索引。
返回值
如果函数成功,它返回ERROR_SUCCESS。
如果函数失败,返回值是一个系统错误代码或一种PDH错误代码。
返回codeDescription
PDH_MORE_DATAThe mszExpandedPathList缓冲区不够大,无法控制的路径列表。这个返回值,预计如果pcchPathListLength是在输入为零。如果在输入指定的大小是大于零,但比所需的大小少,您不应该依靠返回的大小重新分配缓冲区。
PDH_INVALID_ARGUMENTA参数无效。例如,在某些版本中您可以收到此错误如果在输入指定的大小是大于零但小于所需的大小。
PDH_MEMORY_ALLOCATION_FAILUREUnable分配内存支持这一功能。
备注
您应该调用这个函数两次,第一次获得所需的缓冲区大小(设置mszExpandedPathList为NULL和pcchPathListLength为0),和第二次获取数据。
PdhExpandWildCardPathH不同于在以下方面PdhExpandCounterPath:
让您可以控制的通配符扩展。
一个日志文件的内容可以用来作为计数器名称的来源。
\\\\computer\\object(parent/instance#index)\\counter
The parent, instance, index, and counter components of the counter path may contain either a valid name or a wildcard character. The computer, parent, instance, and index components are not necessary for all counters.
The following is a list of the possible formats:
\\\\computer\\object(parent/instance#index)\\counter
\\\\computer\\object(parent/instance)\\counter
\\\\computer\\object(instance#index)\\counter
\\\\computer\\object(instance)\\counter
\\\\computer\\object\\counter
\\object(parent/instance#index)\\counter
\\object(parent/instance)\\counter
\\object(instance#index)\\counter
\\object(instance)\\counter
\\object\\counter
Use an asterisk (*) as the wildcard character, for example, \\object(*)\\counter.
如果通配符在指定的实例名称,指定对象和父对象的所有实例将返回如果所有实例名称相对应的指定索引匹配通配符。例如,\\对象(父母/ *)\\计数器。
如果通配符在指定的计数器名称,指定对象的所有计数器被返回。
部分计数器路径字符串匹配,“亲*”)的支持(例如。
在此之前的Windows Vista:部分通配符匹配不supprted。
要求:
最低支持client-Windows XP
最低支持serverWindows服务器2003
HeaderPdh.h
LibraryPdh.lib
DLLPdh.dll
Unicode和ANSI namesPdhExpandWildCardPathHW(Unicode)和PdhExpandWildCardPathHA(ANSI)的
参见
PdhBindInputDataSource
PdhEnumObjectItemsH
PdhEnumObjectsH
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月23日
==英文原文==PdhExpandWildCardPathH Function
Examines the specified computer or log file and returns those counter paths that match the given counter path which contains wildcard characters.
This function is identical to the PdhExpandWildCardPath function, except that it supports the use of handles to data sources.
Syntax
C++
PDH_STATUS PdhExpandWildCardPathH(
__in PDH_HLOG hDataSource,
__in LPCTSTR szWildCardPath,
__out LPTSTR mszExpandedPathList,
__inout LPDWORD pcchPathListLength,
__in DWORD dwFlags
);
Parameters
hDataSource [in]
Handle to a data source returned by the PdhBindInputDataSource function.
szWildCardPath [in]
Null-terminated string that specifies the counter path to expand. The maximum length of a counter path is PDH_MAX_COUNTER_PATH.
If hDataSource is a real time data source, the function searches the computer specified in the path for matches. If the path does not specify a computer, the function searches the local computer.
mszExpandedPathList [out]
Caller-allocated buffer that receives a list of null-terminated counter paths that match the wildcard specification in the szWildCardPath. The list is terminated by two NULL characters. Set to NULL if pcchPathListLength is zero.
pcchPathListLength [in, out]
Size of the mszExpandedPathList buffer, in TCHARs. If zero on input, the function returns PDH_MORE_DATA and sets this parameter to the required buffer size. If the buffer is larger than the required size, the function sets this parameter to the actual size of the buffer that was used. If the specified size on input is greater than zero but less than the required size, you should not rely on the returned size to reallocate the buffer.
Note You must add one to the required size on Windows XP.
dwFlags [in]
Flags that indicate which wildcard characters not to expand. You can specify one or more flags.
ValueMeaning
PDH_NOEXPANDCOUNTERSDo not expand the counter name if the path contains a wildcard character for counter name.
PDH_NOEXPANDINSTANCESDo not expand the instance name if the path contains a wildcard character for parent instance, instance name, or instance index.

Return Value
If the function succeeds, it returns ERROR_SUCCESS.
If the function fails, the return value is a system error code or a PDH error code .
Return codeDescription
PDH_MORE_DATAThe mszExpandedPathList buffer is not large enough to contain the list of paths. This return value is expected if pcchPathListLength is zero on input. If the specified size on input is greater than zero but less than the required size, you should not rely on the returned size to reallocate the buffer.
PDH_INVALID_ARGUMENTA parameter is not valid. For example, on some releases you could receive this error if the specified size on input is greater than zero but less than the required size.
PDH_MEMORY_ALLOCATION_FAILUREUnable to allocate memory to support this function.

Remarks
You should call this function twice, the first time to get the required buffer size (set mszExpandedPathList to NULL and pcchPathListLength to 0), and the second time to get the data.
PdhExpandWildCardPathH differs from PdhExpandCounterPath in the following ways:
Lets you control which wildcard characters are expanded.
The contents of a log file can be used as the source of counter names.
The general counter path format is as follows:
\\\\computer\\object(parent/instance#index)\\counter
The parent, instance, index, and counter components of the counter path may contain either a valid name or a wildcard character. The computer, parent, instance, and index components are not necessary for all counters.
The following is a list of the possible formats:
\\\\computer\\object(parent/instance#index)\\counter
\\\\computer\\object(parent/instance)\\counter
\\\\computer\\object(instance#index)\\counter
\\\\computer\\object(instance)\\counter
\\\\computer\\object\\counter
\\object(parent/instance#index)\\counter
\\object(parent/instance)\\counter
\\object(instance#index)\\counter
\\object(instance)\\counter
\\object\\counter
Use an asterisk (*) as the wildcard character, for example, \\object(*)\\counter.
If a wildcard character is specified in the parent name, all instances of the specified object that match the specified instance and counter fields will be returned. For example, \\object(*/instance)\\counter.
If a wildcard character is specified in the instance name, all instances of the specified object and parent object will be returned if all instance names corresponding to the specified index match the wildcard character. For example, \\object(parent/*)\\counter.
If a wildcard character is specified in the counter name, all counters of the specified object are returned.
Partial counter path string matches (for example, "pro*") are supported.
Prior to Windows Vista: Partial wildcard matches are not supprted.
Requirements
Minimum supported clientWindows XP
Minimum supported serverWindows Server 2003
HeaderPdh.h
LibraryPdh.lib
DLLPdh.dll
Unicode and ANSI namesPdhExpandWildCardPathHW (Unicode) and PdhExpandWildCardPathHA (ANSI)
See Also
PdhBindInputDataSource
PdhEnumObjectItemsH
PdhEnumObjectsH
Send comments about this topic to Microsoft
Build date: 7/23/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa372610(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:31:14