Description
Sets the outflow state of the named queue to "STARTED". The caller must have operator privileges on the server.
Syntax
DWORD BatchStartQueue(LPCTSTR queuename);
Parameter
LPCTSTR queuename |
Specifies the name of the queue to start. |
Return Values
BATCH_ERROR_NO_SUCH_QUEUE |
The queue does not exist. |
BATCH_ERROR_BAD_QUEUE_NAME |
The syntax of the queue name was not valid. |
BATCH_ERROR_OPERATOR_ACCESS_DENIED |
The user does not have operator privileges. |
Example Program
#include <iostream.h>
#include "batchapi.h"
#define MAX_LENGTH 25
void main()
{
char * pTemp;
LPCTSTR QueName;
DWORD ReturnVal;
cout << " STARTING THE EXECUTION OF BATCHSTARTQUEUE API"<< endl;
pTemp= new char[ MAX_LENGTH];
if (pTemp == NULL){
cout << "unable to allocate the memory.\n Exiting the program"<<endl;
exit(0);
}
cout << " Enter the name of the QUEUE to start"<< endl;
cin >> pTemp;
QueName = (const char *)pTemp;
ReturnVal = BatchStartQueue(QueName);
switch(ReturnVal)
{
case BATCH_ERROR_NO_SUCH_QUEUE :
cout << "The queue does not exist. " << endl;
break;
case BATCH_ERROR_BAD_QUEUE_NAME :
cout << " The syntax of the queue name was not valid. " << endl;
break;
case BATCH_ERROR_OPERATOR_ACCESS_DENIED :
cout << " The user does not have operator privileges. " << endl;
break;
default:
cout << " SUCCESSFUL COMPLETION OF START QUEUE "<< endl;
}
cout << " COMPLETED THE EXECUTION OF BATCHSTARTQUEUE API"<< endl;
delete [] pTemp;
}