サポートされたポートのリストにポート名を追加する
Declare Function AddPort Lib "winspool.drv" Alias "AddPortA" _
(ByVal pName As String, ByVal hWnd As Long, ByVal pMonitorName As String) As Long
Declare Function AddPort Lib "winspool.drv" Alias "AddPortA" _
(ByVal pName As String, ByVal hWnd As Integer, ByVal pMonitorName As String) As Integer
BOOL AddPort(
LPTSTR pName,
HWND hWnd,
LPTSTR pMonitorName
);
引数
pName
プリントサーバー名(ローカルプリンタのときVbNullString)hWnd
ダイアログボックスの親ウィンドウpMonitorName
モニタ名戻り値
正常終了のとき 0以外備考
中止のとき 0
ポート名を追加する場合は、あらかじめEnumPorts()関数を使用して既存のポート名を調べる。