サーバーにプリントプロセッサを追加する
Declare Function AddPrintProcessor Lib "winspool.drv" Alias "AddPrintProcessorA" _
(ByVal pName As String, ByVal pEnvironment As String, ByVal pPathName As String, _
ByVal pPrintProcessorName As String) As Long
Declare Function AddPrintProcessor Lib "winspool.drv" Alias "AddPrintProcessorA" _
(ByVal pName As String, ByVal pEnvironment As String, ByVal pPathName As String, _
ByVal pPrintProcessorName As String) As Integer
BOOL AddPrintProcessor(
LPTSTR pName,
LPTSTR pEnvironment,
LPTSTR pPathName,
LPTSTR pPrintProcessorName
);
引数
pName
サーバー名(ローカルプリンタのときVbNullString)pEnvironment
環境文字列(現在の設定を使うときはvbNullString)pPathName
以下は文字列の例である
"Windows NTx86" "Windows NT R4000" "Windows NT Aplha_AXP" "Windows 4.0"
プリンタプロセッサのファイル名pPrintProcessorName
(システムプリントプロセッサディレクトリになければならない)
プリントプロセッサ名戻り値
正常終了のとき 0以外備考
中止のとき 0
システムプリントプロセッサディレクトリはGetPrintProcessorDirectory()関数を使って取得できる。
現在のプリンタプロセッサはEnumPrintProcessors()関数を使って得ることができる。