PrintDocumentA

レンダリングと印刷

説明

末尾の A は ANSI(char)DLL エントリポイントを示します。ActiveX/COM インターフェースでは Unicode 形式のみを公開します。動作は PrintDocument と同じで、文字列引数は現在の SetAnsiMode コードページを使用して解釈されます

選択されたドキュメントの指定ページを指定プリンターにレンダリングする

構文

Delphi

Function DLPrintDocumentA(InstanceID: Integer; PrinterName: PAnsiChar; StartPage, EndPage, Options: Integer): Integer;

DLL

int DLPrintDocumentA(int InstanceID, const char * PrinterName, int StartPage, int EndPage, int Options);

パラメータ

PrinterName印刷に使用するプリンター名。これは Windows Print Manager に表示される名前です。システム上の有効なプリンター一覧を取得するには GetPrinterNames 関数を使用します。NewCustomPrinter 関数が返す値もここで使用できます。印刷する最初のページ
StartPage
EndPage印刷する最終ページ
Optionsこのパラメーターの値を取得するには PrintOptions 関数を使用します

戻り値

0ページを印刷できなかった。通常は StartPage および EndPage パラメーターが範囲外であることが原因
1ページは正常に印刷されました