Warning
Windows 10 以降では、サード パーティの印刷プロバイダーをサポートする API は非推奨になりました。 Microsoft は、サード パーティの印刷プロバイダーへの投資を推奨していません。 さらに、v4 印刷ドライバー モデルを使用できる Windows 8 以降の製品では、サード パーティの印刷プロバイダーが v4 印刷ドライバーを使用するキューを作成または管理できない場合があります。
このトピックでは、印刷プロバイダーが提供できるすべての関数の一覧を示します。 これらの関数のほとんどは、Microsoft Windows SDK のドキュメントで説明されています。 関数が Windows Driver Kit (WDK) で説明されている場合、関数名は、関連付けられている参照ページへのリンクを提供します。
すべての印刷プロバイダーは、リストされているすべての関数のポインターを指定する必要があります。 ただし、ベンダーが提供するほとんどの印刷プロバイダーは、関数によって定義された操作の多くをサポートする必要のない "部分プロバイダー" です。 Therefore, many of the function pointers can be NULL. 部分印刷プロバイダーの詳細については、「 ネットワーク印刷プロバイダーの作成」を参照してください。
次の関数の一覧では、サポートする必要がある関数に "必須" というラベルが付けられます。
All print providers must export the initialization function, InitializePrintProvidor. Pointers to all the other functions must be supplied in a PRINTPROVIDOR structure. (これら 2 つの名前のスペルは間違っていますが、ヘッダー ファイル Winsplp.h に表示される名前と一致している点に注意してください)。
関数はグループに分けられ、次のセクションで説明します。
Initialization function
印刷キュー管理機能
プリンター ドライバー管理機能
印刷ジョブ作成関数
印刷ジョブのスケジューリング機能
フォーム管理機能
印刷プロセッサー管理機能
印刷モニター管理機能
ポート管理機能
レジストリ管理機能
Other functions
Initialization function
| Function | Description |
|---|---|
| InitializePrintProvidor (Required) | 印刷プロバイダーを初期化し、指定された関数へのポインターを返します。 |
印刷キュー管理機能
| Function | Description |
|---|---|
| AddPrinter | 印刷プロバイダーによって管理されている印刷キューの一覧に印刷キューを追加し、印刷プロセッサを印刷キューに関連付けます。 |
| AddPrinterConnection | 指定した印刷キューへの接続を作成します。 |
| ClosePrinter (Required) | 指定した印刷キューへの呼び出し元アクセスを無効にします。 |
| DeletePrinter | 印刷プロバイダーによって管理されている印刷キューの一覧から印刷キューを削除します。 |
| DeletePrinterConnection | 指定した印刷キューへの接続を削除します。 |
| EnumPrinters (Required) | 現在印刷プロバイダーによって管理されている印刷キューの一覧を列挙します。 |
| FindClosePrinterChangeNotification | Disables printer change notifications that were enabled by FindFirstPrinterChangeNotification. |
| FindFirstPrinterChangeNotification | 指定したプリンター イベントを待機するために呼び出し元が使用できる待機オブジェクトへのハンドルを返します。 |
| GetPrinter (Required) | 指定した印刷キューの現在のパラメーター値を返します。 |
| OpenPrinter (Required) | 指定した印刷キューへの呼び出し元アクセスを有効にします。 |
| RefreshPrinterChangeNotification | Called by router if client calls FindNextPrinterChangeNotification with the PRINTER_NOTIFY_OPTIONS_REFRESH flag set. |
| ResetPrinter | Modifies a print queue's data type or DEVMODEW structure. |
| SetPrinter (Required) | 指定した印刷キューのパラメーターを設定します。 |
| WaitForPrinterChange | Obsolete. |
プリンター ドライバー管理機能
| Function | Description |
|---|---|
| AddPrinterDriver | 指定したプリンターのドライバー ファイルを指定したサーバーに追加します。 |
| AddPrinterDriverEx | Same as AddPrinterDriver, with additional parameters. |
| DeletePrinterDriver | 指定したサーバー上の、指定したプリンターのドライバー ファイルへのアクセスを削除します。 |
| DeletePrinterDriverEx | Same as DeletePrinterDriver, with additional parameters. |
| EnumPrinterDrivers | Returns a list of printer drivers that have been added to a specified server by calling AddPrinterDriver or AddPrinterDriverEx. |
| GetPrinterDriver | Returns information about a printer driver, which the caller can then pass to AddPrinterDriver. (通常、返される情報は INF ファイルから取得されます)。 |
| [GetPrinterDriverEx | Same as GetPrinterDriver, with additional parameters. |
| GetPrinterDriverDirectory | サーバーのプリンター ドライバー ディレクトリの名前を返します。 |
印刷ジョブ作成関数
| Function | Description |
|---|---|
| AbortPrinter (Required) | 指定した印刷キューから現在のジョブの削除を試みます。 |
| AddJob (Required) | ジョブ識別子とスプール ファイル パスを返します。 The caller uses CreateFile and WriteFile to send data to the spool file. |
| EndDocPrinter (Required) | ジョブ完了操作を実行します。 |
| EndPagePrinter | ページ補完操作を実行します。 |
| ReadPrinter | 双方向プリンターから状態情報を取得します。 |
| ScheduleJob (Required) | 指定したジョブをスケジュールできることをプロバイダーに通知します。 The job is specified by a job identifier previously returned by AddJob. |
| StartDocPrinter (Required) | 印刷ジョブのスプールを開始するように印刷プロバイダーを準備します。 |
| StartPagePrinter | 印刷ジョブ ページを受け取る印刷プロバイダーを準備します。 |
| WritePrinter (Required) | 印刷ジョブのデータ ストリームの一部を受信します。 |
Note
The AddJob...ScheduleJob sequence is an alternative to the StartDocPrinter...EndDocPrinter sequence.
印刷ジョブのスケジューリング機能
| Function | Description |
|---|---|
| EnumJobs (Required) | スケジュールされた印刷ジョブの一覧を返します。 |
| GetJob (Required) | ジョブ パラメーターを返します。 |
| SetJob (Required) | 印刷ジョブをキャンセル、一時停止、再開、または再起動するか、ジョブ パラメーターを設定します。 |
フォーム管理機能
| Function | Description |
|---|---|
| AddForm | 指定したプリンターで使用できるフォームの一覧に、指定したフォームを追加します。 |
| DeleteForm | 指定したプリンターで使用できるフォームの一覧から、指定したフォームを削除します。 |
| EnumForms | 指定したプリンターで使用できるフォームの一覧を返します。 |
| GetForm | 指定したフォームの特性を返します。 |
| SetForm | 指定したフォームの特性を変更します。 |
印刷プロセッサー管理機能
| Function | Description |
|---|---|
| AddPrintProcessor | 指定したサーバーに印刷プロセッサをインストールし、印刷プロバイダーが呼び出すことができるプリント プロセッサの一覧に追加します。 |
| DeletePrintProcessor | 印刷プロバイダーが呼び出すことができる印刷プロセッサの一覧から印刷プロセッサを削除します。 |
| EnumPrintProcessorDataTypes | 印刷プロバイダーによって呼び出し可能な印刷プロセッサでサポートされているデータ型の一覧を返します。 |
| EnumPrintProcessors | 印刷プロバイダーが呼び出すことができる印刷プロセッサの一覧を返します。 |
| GetPrintProcessorDirectory | 印刷プロセッサ ファイルを格納する必要があるディレクトリ パスを返します。 |
印刷モニター管理機能
| Function | Description |
|---|---|
| AddMonitor | 印刷プロバイダーが呼び出すことができる印刷モニターの一覧に印刷モニターを追加します。 |
| DeleteMonitor | 印刷プロバイダーが呼び出すことができる印刷モニターの一覧から印刷モニターを削除します。 |
| EnumMonitors | 印刷プロバイダーが呼び出すことができる印刷モニターの一覧を返します。 |
ポート管理機能
| Function | Description |
|---|---|
| AddPort | Adds a printer port to the list of those available, typically by calling the specified port monitor's AddPortUI function. |
| AddPortEx(/previous-versions/ff545025(v%3dvs.85)) | Same as AddPort, with additional parameters. |
| ConfigurePort (Required) | Configures a printer port, typically by calling the specified port monitor's ConfigurePortUI function. |
| DeletePort (Required) | Deletes a printer port from the list of those available, typically by calling the specified port monitor's DeletePortUI function. |
| EnumPorts (Required) | 使用可能なプリンター ポートの一覧を返します。 |
| SetPort | 指定したプリンター ポートのパラメーターを設定します。 |
レジストリ管理機能
| Function | Description |
|---|---|
| DeletePrinterData | Deletes the value currently assigned to a specified value name, under the specified printer's PrinterDriverData key. |
| DeletePrinterDataEx | Same as DeletePrinterData, with additional parameters. |
| DeletePrinterKey | Deletes a specified key and its subkeys, if they are currently stored in the registry under the specified printer's PrinterDriverData key. |
| EnumPrinterData | Returns each of the value names and currently assigned values that are stored in the registry under the specified printer's PrinterDriverData key. |
| EnumPrinterDataEx | Same as EnumPrinterData, with additional parameters. |
| EnumPrinterKey | 指定したキー名の下のレジストリに現在含まれているサブキーの一覧を返します。 |
| GetPrinterData | Returns the value currently assigned to a specified value name, which is stored in the registry under the specified printer's PrinterDriverData key. |
| GetPrinterDataEx | Same as GetPrinterData, with additional parameters. |
| SetPrinterData | Stores a specified value name and value in the registry, under the specified printer's PrinterDriverData key. |
| SetPrinterDataEx | Same as SetPrinterData, with additional parameters. |
Other functions
| Function | Description |
|---|---|
| XcvData | ポート モニター UI DLL とポート モニター サーバー DLL の間の通信パスを提供します。 |