术语 | addprinterdriver |
释义 | AddPrinterDriver 语法: BOOL AddPrinterDriver( __in LPTSTR pName, __in DWORD Level, __in LPBYTE pDriverInfo ); AddPrinterDriver功能 该AddPrinterDriver函数安装一个本地或远程打印机驱动程序和链接配置,数据和驱动程序文件。 如需在安装或升级打印机驱动程序的灵活性,使用AddPrinterDriverEx功能,因为它允许严格的升级,严格的降级,在较新的文件复制只,和所有文件复制(无论文件的时间邮票)。 参数 pName [in] 一个指向 null 结尾的字符串指针,指定使用该驱动程序应安装服务器的名称。 如果pName为NULL,则驱动程序将安装在本地。 Level [in] 结构的版本的pDriverInfo点。 该值可以是2,3,4,6,或8。 pDriverInfo [in] 一个结构包含的打印机驱动程序信息的指针。这取决于Level值。 ValuePrinter传动结构 2DRIVER_INFO_2 3DRIVER_INFO_3 4DRIVER_INFO_4 6DRIVER_INFO_6 8DRIVER_INFO_8 如果结构pEnvironment成员指向pDriverInfo为NULL,则调用方目前的环境/客户端(不是目的地/服务器)的使用。 返回值 如果函数成功,返回值是一个非零值。 如果函数失败,返回值是零。 备注 调用者必须有相关权限。 前一个应用程序调用AddPrinterDriver功能,所有文件的驱动程序要求必须复制到系统的打印机驱动程序的目录。应用程序可以通过调用函数的GetPrinterDriverDirectory此目录的名称。 应用程序可以判断哪些打印机驱动程序,目前通过调用EnumPrinterDrivers功能安装。 要求: 最低支持:client-Windows 2000专业版 最低支持server-Windows 2000服务器 HeaderWinspool.h(头文件:winuser.h) LibraryWinspool.lib DLLSpoolss.dll Unicode和ANSI namesAddPrinterDriverW(Unicode)和AddPrinterDriverA(ANSI)的 参见 Printing and Print Spooler Overview Printing and Print Spooler 函数 AddPrinterDriverEx DRIVER_INFO_2 DRIVER_INFO_3 DRIVER_INFO_4 DRIVER_INFO_6 EnumPrinterDrivers GetPrinterDriverDirectory 如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com) 生成日期:2009年7月11日 ==英文原文==AddPrinterDriver Function The AddPrinterDriver function installs a local or remote printer driver and links the configuration, data, and driver files. For more flexibility in installing or upgrading printer drivers, use the AddPrinterDriverEx function because it allows strict upgrade, strict downgrade, copying of newer files only, and copying of all files (regardless of the file time stamps). Syntax BOOL AddPrinterDriver( __in LPTSTR pName, __in DWORD Level, __in LPBYTE pDriverInfo ); Parameters pName [in] A pointer to a null-terminated string that specifies the name of the server on which the driver should be installed. If pName is NULL, the driver will be installed locally. Level [in] The version of the structure to which pDriverInfo points. This value can be 2, 3, 4, 6, or 8. pDriverInfo [in] A pointer to a structure containing printer driver information. This depends on the value of Level. ValuePrinter Drive Structure 2DRIVER_INFO_2 3DRIVER_INFO_3 4DRIVER_INFO_4 6DRIVER_INFO_6 8DRIVER_INFO_8 If the pEnvironment member of the structure pointed to by pDriverInfo is NULL, the current environment of the caller/client (not of the destination/server) is used. 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 must have the SeLoadDriverPrivilege . Before an application calls the AddPrinterDriver function, all files required by the driver must be copied to the system's printer-driver directory. An application can retrieve the name of this directory by calling the GetPrinterDriverDirectory function. An application can determine which printer drivers are currently installed by calling the EnumPrinterDrivers function. Requirements Minimum supported clientWindows 2000 Professional Minimum supported serverWindows 2000 Server HeaderWinspool.h (include Windows.h) LibraryWinspool.lib DLLSpoolss.dll Unicode and ANSI namesAddPrinterDriverW (Unicode) and AddPrinterDriverA (ANSI) See Also Printing and Print Spooler Overview Printing and Print Spooler Functions AddPrinterDriverEx DRIVER_INFO_2 DRIVER_INFO_3 DRIVER_INFO_4 DRIVER_INFO_6 EnumPrinterDrivers GetPrinterDriverDirectory Send comments about this topic to Microsoft Build date: 7/11/2009 ==原始网址==http://msdn.microsoft.com/en-us/library/dd183346(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。