EnumPrinterDrivers

此頁沒有內(nèi)容條目
內(nèi)容

EnumPrinterDrivers

VB聲明

Declare Function EnumPrinterDrivers Lib "winspool.drv" Alias "EnumPrinterDriversA" (ByVal pName As String, ByVal pEnvironment As String, ByVal Level As Long, pDriverInfo As Byte, ByVal cdBuf As Long, pcbNeeded As Long, pcRetruned As Long) As Long

說明

枚舉指定系統(tǒng)中已安裝的打印機驅(qū)動程序

返回值

Long,非零表示成功,零表示失敗。會設(shè)置GetLastError

參數(shù)表

參數(shù)

類型及說明

pName

String,指定服務(wù)器的名字。用vbNullString指定本地系統(tǒng)

pEnvironment

String,欲在其中對驅(qū)動程序進行枚舉的環(huán)境(如:Windows NT x86)。如設(shè)為vbNullString,表示使用當前(本地)系統(tǒng)環(huán)境

Level

Long,1,2或3(3僅適用于Windows 95和NT 4.0)

pDriverInfo

Byte,包含DRIVER_INFO_1, DRIVER_INFO_2 或 DRIVER_INFO_3結(jié)構(gòu)的緩沖區(qū)

cbBuf

Long,pDriverInfo緩沖區(qū)中的字符數(shù)量

pcbNeeded

Long,指向一個Long型變量的指針,該變量用于保存請求的緩沖區(qū)長度,或者實際讀入的字節(jié)數(shù)量

pcReturned

Long,載入緩沖區(qū)的結(jié)構(gòu)數(shù)量(用于那些能返回多個結(jié)構(gòu)的函數(shù))

Top