Posted on 2005-04-07
Last Modified: 2010-04-04

I using NWlib and need fast help with this.

This example only deletes one job (first) I need help to make it delete ALL job in queue.

 tempList : TStringList ;
 queueJobInfo : TNWQueueJobInfo ;
 serverConn : TNWConnHandle ;
 queueName : string ;
 serverConn := getPrimaryServerID ;
 queueName := 'laser1' ;
 templist := TStringList.create ;
  if getQueueJobList(serverConn,queueName,tempList) then
         queueJobInfo.nServer := serverConn ;
         queueJobInfo.cQueue := queueName ;
         queueJobInfo.jobID := TNWQueueJobID(tempList.objects[0]) ;
         if deleteQueueJob(queueJobInfo) then
          //okBox('Queue Job Deleted!') ;
          MessageDlg('Queue Job Deleted!', mtConfirmation, [mbOk], 0)          
     end; ;
Question by:Dark_King
    1 Comment
    LVL 11

    Accepted Solution

    just put a for loop around

    queueJobInfo.jobID := TNWQueueJobID(tempList.objects[0]) ;

    i.e. for li:=0 to pred(templist.objects.count) do
             queueJobInfo.jobID := TNWQueueJobID(tempList.objects[li]) ;


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
    Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now