Aracılığıyla paylaş


PrintSystemJobInfo.JobIdentifier Özellik

Tanım

Yazdırma işinin kimlik numarasını alır.

public:
 property int JobIdentifier { int get(); };
public int JobIdentifier { get; }
member this.JobIdentifier : int
Public ReadOnly Property JobIdentifier As Integer

Özellik Değeri

Int32 Yazdırma işini tanımlayan.

Örnekler

Aşağıdaki örnekte, yazdırma işiyle ilgili bir sorunu tanılarken bu özelliğin nasıl kullanılacağı gösterilmektedir.

for each (PrintQueue^ pq in myPrintQueues)
{
   pq->Refresh();
   PrintJobInfoCollection^ jobs = pq->GetPrintJobInfoCollection();
   for each (PrintSystemJobInfo^ job in jobs)
   {
      // Since the user may not be able to articulate which job is problematic,
      // present information about each job the user has submitted.
      if (job->Submitter == userName)
      {
         atLeastOne = true;
         jobList = jobList + "\nServer:" + line;
         jobList = jobList + "\n\tQueue:" + pq->Name;
         jobList = jobList + "\n\tLocation:" + pq->Location;
         jobList = jobList + "\n\t\tJob: " + job->JobName + " ID: " + job->JobIdentifier;
      }
   }
}
foreach (PrintQueue pq in myPrintQueues)
{
    pq.Refresh();
    PrintJobInfoCollection jobs = pq.GetPrintJobInfoCollection();
    foreach (PrintSystemJobInfo job in jobs)
    {
        // Since the user may not be able to articulate which job is problematic,
        // present information about each job the user has submitted.
        if (job.Submitter == userName)
        {
            atLeastOne = true;
            jobList = jobList + "\nServer:" + line;
            jobList = jobList + "\n\tQueue:" + pq.Name;
            jobList = jobList + "\n\tLocation:" + pq.Location;
            jobList = jobList + "\n\t\tJob: " + job.JobName + " ID: " + job.JobIdentifier;
        }
    }// end for each print job    
}// end for each print queue
For Each pq As PrintQueue In myPrintQueues
    pq.Refresh()
    Dim jobs As PrintJobInfoCollection = pq.GetPrintJobInfoCollection()
    For Each job As PrintSystemJobInfo In jobs
        ' Since the user may not be able to articulate which job is problematic,
        ' present information about each job the user has submitted.
        If job.Submitter = userName Then
            atLeastOne = True
            jobList = jobList & vbLf & "Server:" & line
            jobList = jobList & vbLf & vbTab & "Queue:" & pq.Name
            jobList = jobList & vbLf & vbTab & "Location:" & pq.Location
            jobList = jobList & vbLf & vbTab & vbTab & "Job: " & job.JobName & " ID: " & job.JobIdentifier
        End If
    Next job ' end for each print job

Next pq ' end for each print queue

Açıklamalar

Kullanılan numaralandırma sistemi, yazdırma sunucusunun işletim sistemi ve yazdırma sunucusunun bir bilgisayar mı yoksa yazdırma sunucusu gereci mi olduğu tarafından belirlenir. Örneğin, Microsoft Windows XP işletim sistemi numaralandırmayı şu şekilde belirler: bir yazdırma sunucusu açıldığında, tüm yazdırma kuyrukları boşsa, herhangi bir kullanıcı ve herhangi bir kuyruğa gönderilen ilk yazdırma işi 2 numaralı kimlikle atanır. Sunucudaki izleyen her işe, o sunucudaki önceki yazdırma işinden bir büyük olan bir sayı atanır.

Yazdırma işinin yazdırma kuyruğunun numarası üzerinde hiçbir etkisi yoktur: İşler QueueA, QueueB ve QueueA'ya bu sırayla gönderiliyorsa, QueueA'nın işleri 2 ve 4'e, QueueB'nin ise iş 3'e sahip olması gerekir.

Bir işe bir numara atandıktan sonra, diğer işler yazdırmayı bitirse veya iptal edilse ya da sunucu yeniden başlatılmış olsa bile sayı hiçbir zaman değişmez. Sunucu yeniden başlatıldığında bir veya daha fazla kuyrukta zaten işler varsa, ilk yeni işe, sunucu başlatıldığında kuyruktaki en yüksek numaralı işten daha büyük bir sayı atanır. Ancak, yeniden başlatılana kadar yazdırma sunucusu bir sayıyı yeniden kullanmaz. Yazdırılmadan önce en yüksek numaralı iş iptal edilse bile, bir sonraki iş bir daha yüksek bir sayı alır.

Şunlara uygulanır