勇芳软件工作室.汉化:  Printing > Print Spooler API > Printer Driver Installation >

DeleteMonitor

Previous pageReturn to chapter overviewNext page

描述

 

DeleteMonitor功能删除由AddMonitor功能添加的端口监视器。

 

C++ 语法

 

BOOL DeleteMonitor(

__in LPTSTR pName,

__in LPTSTR pEnvironment,

__in LPTSTR pMonitorName

);

 

PowerBASIC 语法

 

FUNCTION DeleteMonitorA ( _

BYREF pName AS ASCIIZ, _

BYREF pEnvironment AS ASCIIZ, _

BYREF pMonitorName AS ASCIIZ _

) AS LONG

 

Unicode版本:

 

FUNCTION DeleteMonitorW ( _

BYREF pName AS WSTRINGZ, _

BYREF pEnvironment AS WSTRINGZ, _

BYREF pMonitorName AS WSTRINGZ _

) AS LONG

 

参数

 

pName

 

[in]指向以空字符结尾的字符串的指针,指定要从中删除监视器的服务器的名称。如果此参数为NULL,则端口监视器将在本地删除。

 

pEnvironment

 

[in]指向要终止监视器的环境的空终止字符串的指针(例如,Windows NT x86,Windows IA64,Windows x64,Windows NT R4000,Windows NT Alpha_AXP,Windows 4.0或Windows NT PowerPC的)。如果此参数为NULL,则监视器将从调用应用程序和客户机(而不是目标应用程序和打印服务器)的当前环境中删除。

 

注意Windows IA64在Windows XP,Windows XP 64位版,Windows Server 2003和更高版本中可用。Windows XP Service Pack 2(SP2),Windows XP Professional x64 Edition,Windows Server 2003 Service Pack 1(SP1)和更高版本中提供Windows x64。

 

pMonitorName

 

[in]指向指定要删除的监视器的名称的以空值终止的字符串的指针。

 

返回值

 

如果函数成功,则返回值为非零值。

 

如果函数失败,返回值为零。

 

备注

 

来电者必须有SeLoadDriverPrivilege.

 

Windows 95/98 / Me:Microsoft Layer for Unicode支持DeleteMonitorW.

 

引用文件 #INCLUDE Once

 

WinSpool.inc(包括Windows.inc)