网站首页  词典首页

请输入您要查询的函数:

 

术语 deleteprinterdriverex
释义 DeletePrinterDriverEx
语法:
BOOL DeletePrinterDriverEx(
__in LPTSTR pName,
__in LPTSTR pEnvironment,
__in LPTSTR pDriverName,
__in DWORD dwDeleteFlag,
__in DWORD dwVersionFlag
);
DeletePrinterDriverEx功能
该DeletePrinterDriverEx函数删除从支持的驱动程序名称的服务器列表指定的打印机驱动程序的名称,并删除与驱动程序有关的文件。此功能还可以删除该驱动程序的特定版本。
参数
pName [in]
一个指向 null 结尾的字符串指针指定的服务器从该驱动程序被删除的名称。如果该参数为NULL,则函数删除从本地计算机的打印机驱动程序。
pEnvironment [in]
一个指向 null 结尾的字符串指针指定的环境,从该驱动程序被删除(例如,Windows NT的X86的视窗IA64的,或Windows x64)的。如果该参数为NULL,则删除驱动程序的名称从目前的环境中调用应用程序和客户端计算机(不是目标应用程序和打印服务器)。
pDriverName [in]
一个指向 null 结尾的字符串指针指定的驱动程序的名称删除。
dwDeleteFlag [in]
在删除文件和驱动程序版本的选项。此参数可以是一个或多个下列值。
ValueMeaning
DPD_DELETE_SPECIFIC_VERSIONDeletes在dwVersionFlag指定的版本。这并不保证该驱动程序会从该服务器支持的车手名单中删除。
DPD_DELETE_UNUSED_FILESRemoves任何未使用的驱动程序文件。
DPD_DELETE_ALL_FILESDeletes的,只有所有与之相关的文件可以被删除的驱动程序。删除操作失败如果驱动程序的任何文件正在被一些其他已安装的驱动程序。
如果DPD_DELETE_SPECIFIC_VERSION没有指定,该函数将删除所有版本的驱动程序,如果他们没有在使用。如果没有DPD_DELETE_UNUSED_FILES也不DPD_DELETE_ALL_FILES指定,该函数不删除驱动程序文件。
dwVersionFlag [in]
该版本的驱动程序被删除。此参数可以是0,1,2或3。使用此参数只有dwDeleteFlag包括DPD_DELETE_SPECIFIC_VERSION标志。
返回值
如果函数成功,返回值是一个非零值。
如果函数失败,返回值是零。
备注
前函数删除驱动程序文件,它调用驱动程序的DrvDriverEvent功能,使驾驶者删除任何未使用的私人文件。欲了解更多有关DrvDriverEvent信息,请参阅Microsoft Windows驱动程序开发工具包(DDK)。
如果驱动程序文件当前加载的功能移动到一个临时目录,标志着重新启动时,删除它们。
在调用DeletePrinterDriverEx,您必须删除所有打印机对象使用的打印机驱动程序。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinspool.h(头文件:winuser.h)
LibraryWinspool.lib
DLLSpoolss.dll
Unicode和ANSI namesDeletePrinterDriverExW(Unicode)和DeletePrinterDriverExA(ANSI)的
参见
Printing and Print Spooler Overview
Printing and Print Spooler 函数
AddPrinterDriverEx
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==DeletePrinterDriverEx Function
The DeletePrinterDriverEx function removes the specified printer-driver name from the list of names of supported drivers for a server and deletes the files associated with the driver. This function can also delete specific versions of the driver.
Syntax
BOOL DeletePrinterDriverEx(
__in LPTSTR pName,
__in LPTSTR pEnvironment,
__in LPTSTR pDriverName,
__in DWORD dwDeleteFlag,
__in DWORD dwVersionFlag
);
Parameters
pName [in]
A pointer to a null-terminated string that specifies the name of the server from which the driver is to be deleted. If this parameter is NULL, the function deletes the printer-driver from the local computer.
pEnvironment [in]
A pointer to a null-terminated string that specifies the environment from which the driver is to be deleted (for example, Windows NT x86, Windows IA64, or Windows x64). If this parameter is NULL, the driver name is deleted from the current environment of the calling application and client computer (not of the destination application and print server).
pDriverName [in]
A pointer to a null-terminated string specifying the name of the driver to delete.
dwDeleteFlag [in]
The options for deleting files and versions of the driver. This parameter can be one or more of the following values.
ValueMeaning
DPD_DELETE_SPECIFIC_VERSIONDeletes the version specified in dwVersionFlag. This does not ensure that the driver will be removed from the list of supported drivers for the server.
DPD_DELETE_UNUSED_FILESRemoves any unused driver files.
DPD_DELETE_ALL_FILESDeletes the driver only if all its associated files can be removed. The delete operation fails if any of the driver's files are being used by some other installed driver.

If DPD_DELETE_SPECIFIC_VERSION is not specified, the function deletes all versions of the driver if none of them is in use. If neither DPD_DELETE_UNUSED_FILES nor DPD_DELETE_ALL_FILES is specified, the function does not delete driver files.
dwVersionFlag [in]
The version of the driver to be deleted. This parameter can be 0, 1, 2 or 3. This parameter is used only if dwDeleteFlag includes the DPD_DELETE_SPECIFIC_VERSION flag.
Return Value
If the function succeeds, the return value is a nonzero value.
If the function fails, the return value is zero.
Remarks
Before the function deletes the driver files, it calls the driver's DrvDriverEvent function, allowing the driver to remove any private files that are not used. For more information about DrvDriverEvent, see the Microsoft Windows Driver Development Kit (DDK).
If the driver files are currently loaded, the function moves them to a temp directory and marks them for deletion on restart.
Before calling DeletePrinterDriverEx, you must delete all printer objects that use the printer driver.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinspool.h (include Windows.h)
LibraryWinspool.lib
DLLSpoolss.dll
Unicode and ANSI namesDeletePrinterDriverExW (Unicode) and DeletePrinterDriverExA (ANSI)
See Also
Printing and Print Spooler Overview
Printing and Print Spooler Functions
AddPrinterDriverEx
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd183546(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:15:43