GetPrinterDriverDirectory

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

GetPrinterDriverDirectory

VB聲明

Declare Function GetPrinterDriverDirectory Lib "winspool.drv" Alias "GetPrinterDriverDirectoryA" (ByVal pName As String, ByVal pEnvironment As String, ByVal Level As Long, pDriverDirectory As Byte, ByVal cdBuf As Long, pcbNeeded As Long) As Long

說明

判斷指定系統(tǒng)中包含了打印機驅(qū)動程序的目錄是什么

返回值

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

參數(shù)表

參數(shù)

類型及說明

pName

String,服務(wù)器的名字。如設(shè)為vbNullString,表示使用本地系統(tǒng)

pEnvironment

String,欲在其中獲取目錄的一個環(huán)境(如:Windows NT x86)。vbNullString表示使用當(dāng)前(本地)系統(tǒng)環(huán)境

Level

Long,設(shè)為1

pDriverDirectory

Byte,指定一個緩沖區(qū),其中會載入打印機驅(qū)動程序目錄的完整路徑名??啥x成ByVal As String,以便將字節(jié)數(shù)組分配給一個字串,從而避免執(zhí)行ANSI到Unicode格式的轉(zhuǎn)換

cbBuf

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

pcbNeeded

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

Top