GetPrinterDriver
VB声明
Declare Function GetPrinterDriver Lib "winspool.drv" Alias "GetPrinterDriverA" (ByVal hPrinter As Long, ByVal pEnvironment As String, ByVal Level As Long, pDriverInfo As Byte, ByVal cdBuf As Long, pcbNeeded As Long) As Long
说明
针对指定的打印机,获取与打印机驱动程序有关的信息
返回值
Long,非零表示成功,零表示失败。会设置GetLastError
参数表
参数 类型及说明
hPrinter Long,一个已打开的打印机的句柄(用OpenPrinter获得)
pEnvironment String,欲获取的驱动程序环境(如:Windows NT x86)。如设为vbNullString,表示使用当前(本地)系统环境
Level Long,1,2或3(仅适用于Windows 95 和 NT 4.0)
pDriverInfo Byte,载入一个 DRIVER_INFO_x结构的缓冲区。其中的x代表级别(Level)设置
cbBuf Long,pDriverInfo缓冲区中的字符数量
pcbNeeded Long,指向一个Long型变量的指针,该变量用于保存请求的缓冲区长度,或者实际读入的字节数量

Top