网站首页  词典首页

请输入您要查询的函数:

 

术语 pdhconnectmachine
释义 PdhConnectMachine
语法:
C++
PDH_STATUS PdhConnectMachine(
__in LPCTSTR szMachineName
);
PdhConnectMachine功能
连接到指定的计算机。
参数
szMachineName [in]
null结尾的字符串,指定的计算机的名称连接到。如果为NULL,光端机连接到本地计算机。
返回值
如果函数成功,它返回ERROR_SUCCESS。
如果函数失败,返回值是一个系统错误代码或一种PDH错误代码。以下是可能的值。
返回codeDescription
PDH_CSTATUS_NO_MACHINEUnable连接到指定的计算机。可能是由于计算机上不,不支持的PDH,没有连接到网络,或者可以让注册表中防止用户远程连接或远程性能监视设置权限。
PDH_MEMORY_ALLOCATION_FAILUREUnable动态分配的内存块。时发生在系统中,由于过多的应用程序的系统或内存不足的分页文件运行内存严重不足。
备注
通常,应用程序不调用此函数,而是连接应用程序时作出添加到查询柜台。
但是,您可以使用此功能,如果您要包括比从电脑上浏览计数器对话框列表中选择计数器本地计算机的。有关详细信息,请参阅PDH_BROWSE_DLG_CONFIG结构。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderPdh.h
LibraryPdh.lib
DLLPdh.dll
Unicode和ANSI namesPdhConnectMachineW(Unicode)和PdhConnectMachineA(ANSI)的
参见
PdhEnumMachines
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月23日
==英文原文==PdhConnectMachine Function
Connects to the specified computer.
Syntax
C++
PDH_STATUS PdhConnectMachine(
__in LPCTSTR szMachineName
);
Parameters
szMachineName [in]
Null-terminated string that specifies the name of the computer to connect to. If NULL, PDH connects to the local computer.
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 . The following are possible values.
Return codeDescription
PDH_CSTATUS_NO_MACHINEUnable to connect to the specified computer. Could be caused by the computer not being on, not supporting PDH, not being connected to the network, or having the permissions set on the registry that prevent remote connections or remote performance monitoring by the user.
PDH_MEMORY_ALLOCATION_FAILUREUnable to allocate a dynamic memory block. Occurs when there is a serious memory shortage in the system due to too many applications running on the system or an insufficient memory paging file.

Remarks
Typically, applications do not call this function and instead the connection is made when the application adds the counter to the query.
However, you can use this function if you want to include more than the local computer in the Select counters from computer list on the Browse Counters dialog box. For details, see the PDH_BROWSE_DLG_CONFIG structure.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderPdh.h
LibraryPdh.lib
DLLPdh.dll
Unicode and ANSI namesPdhConnectMachineW (Unicode) and PdhConnectMachineA (ANSI)
See Also
PdhEnumMachines
Send comments about this topic to Microsoft
Build date: 7/23/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa372578(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 13:26:35