JOB_INFO_2 構造体

宣言文
Type JOB_INFO_2
        JobId As Long                                          'ジョブID
        pPrinterName As String                                 'プリンタ名
        pMachineName As String                                 'マシン名
        pUserName As String                                    'ユーザー名
        pDocument As String                                    '印刷ジョブ名
        pNotifyName As String                                  'ジョブの終了、またはエラー発生時に通知すべきユーザー名
        pDatatype As String                                    'データーのタイプ
        pPrintProcessor As String                              'プリンタプロセッサ名
        pParameters As String                                  'プリントプロセッサのパラメータ
        pDriverName As String                                  'プリンタドライバ名
        pDevMode As DEVMODE                                    'プリンタドライバに関するDEVMODE構造体
        pStatus As String                                      '印刷ジョブのステータス
        pSecurityDescriptor As SECURITY_DESCRIPTOR             'SECURITY_DESCRIPTOR構造体
                                                               '(不要の場合は As Longとして0)
        Status As Long                                         'ジョブのステータスを示す定数
        Priority As Long                                       'ジョブのプライオリティを示す定数
                                                               'あるいは、1〜99の範囲の数値
        Position As Long                                       '印刷キュー内のジョブの位置
        StartTime As Long                                      '印刷可能な最も早い時間
        UntilTime As Long                                      '同、もっとも遅い時間
        TotalPages As Long                                     'ページ数
        Size As Long                                           'ジョブのバイト数
        Submitted As SYSTEMTIME                                'ドキュメントガスプールされた日時
                                                               '(UTCなので、FileTimeToLocalFileTime()関数を使って変換する)
        time As Long                                           '印刷開始からの経過時間(単位:秒)
        PagesPrinted As Long                                   '印刷済みのページ数
End Type
備考
Structure JOB_INFO_2
        JobId As Integer
        pPrinterName As String
        pMachineName As String
        pUserName As String
        pDocument As String
        pNotifyName As String
        pDataStructure As String
        pPrintProcessor As String
        pParameters As String
        pDriverName As String
        pDevMode As DEVMODE
        pStatus As String
        pSecurityDescriptor As SECURITY_DESCRIPTOR
        Status As Integer
        Priority As Integer
        Position As Integer
        StartTime As Integer
        UntilTime As Integer
        TotalPages As Integer
        Size As Integer
        Submitted As SYSTEMTIME
        time As Integer
        PagesPrinted As Integer
End Structure

Statusの定数
const JOB_STATUS_DELETING = &H4                            '削除中
const JOB_STATUS_ERROR = &H2                               'エラー
const JOB_STATUS_OFFLINE = &H20                            'オフライン
const JOB_STATUS_PAPER_OUT = &H40                          '用紙切れ
const JOB_STATUS_PAUSED = &H1                              '中断
const JOB_STATUS_PRINTED = &H80                            '印刷済み
const JOB_STATUS_PRINTING = &H10                           '印刷中
const JOB_STATUS_SPOOLING = &H8                            'スプール中
Priorityの定数
const MIN_PRIORITY = 1                                     '最低
const MAX_PRIORITY = 99                                    '最大
const DEF_PRIORITY = 1                                     'デフォルト