网站首页  词典首页

请输入您要查询的函数:

 

术语 setport
释义 SetPort
语法:
BOOL SetPort(
__in LPTSTR pName,
__in LPTSTR pPortName,
__in DWORD dwLevel,
__in LPBYTE pPortInfo
);
SetPort功能
该SetPort函数设置的打印机端口关联的地位。
参数
pName [in]
指向一个以零结尾的字符串指定的打印机服务器的端口连接的名称。设置此参数为NULL,如果端口本地计算机上。
pPortName [in]
指向一个以零结尾的字符串指定打印机的端口的名称。
dwLevel [in]
指定的结构类型指向的pPortInfo参数。
此值必须是3,对应于PORT_INFO_3数据结构。
pPortInfo [in]
指针PORT_INFO_3结构,它包含端口的状态信息来设置。
返回值
如果函数成功,返回值是一个非零值。
如果函数失败,返回值是零。
备注
该SetPort函数的调用必须以管理员身份执行。此外,如果调用方是一个端口监视器或语言监视器,它必须调用RevertToSelf之前停止模拟它调用SetPort。
所有程序调用SetPort必须SERVER_ACCESS_ADMINISTER进入到该端口是连接的服务器。
当您设置一个打印机端口与严重程度的价值PORT_STATUS_TYPE_ERROR状态值,后台打印程序停止发送工作,到端口。打印后台处理程序恢复工作时发出的端口状态是由另一SetPort调用清除了端口。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinspool.h(头文件:winuser.h)
LibraryWinspool.lib
DLLSpoolss.dll
Unicode和ANSI namesSetPortW(Unicode)和SetPortA(ANSI)的
参见
Printing and Print Spooler Overview
Printing and Print Spooler 函数
PORT_INFO_3
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==SetPort Function
The SetPort function sets the status associated with a printer port.
Syntax
BOOL SetPort(
__in LPTSTR pName,
__in LPTSTR pPortName,
__in DWORD dwLevel,
__in LPBYTE pPortInfo
);
Parameters
pName [in]
Pointer to a zero-terminated string that specifies the name of the printer server to which the port is connected. Set this parameter to NULL if the port is on the local machine.
pPortName [in]
Pointer to a zero-terminated string that specifies the name of the printer port.
dwLevel [in]
Specifies the type of structure pointed to by the pPortInfo parameter.
This value must be 3, which corresponds to a PORT_INFO_3 data structure.
pPortInfo [in]
Pointer to a PORT_INFO_3 structure that contains the port status information to set.
Return Value
If the function succeeds, the return value is a nonzero value.
If the function fails, the return value is zero.
Remarks
The caller of the SetPort function must be executing as an Administrator. Additionally, if the caller is a Port Monitor or Language Monitor, it must call RevertToSelf to cease impersonation before it calls SetPort.
All programs that call SetPort must have SERVER_ACCESS_ADMINISTER access to the server to which the port is connected.
When you set a printer port status value with the severity value PORT_STATUS_TYPE_ERROR, the print spooler stops sending jobs to the port. The print spooler resumes sending jobs to the port when the port status is cleared by another call to SetPort.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinspool.h (include Windows.h)
LibraryWinspool.lib
DLLSpoolss.dll
Unicode and ANSI namesSetPortW (Unicode) and SetPortA (ANSI)
See Also
Printing and Print Spooler Overview
Printing and Print Spooler Functions
PORT_INFO_3
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd145081(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:23:50