BatchEnableQueue - Intergraph Batch Services - Help

Intergraph Batch Services Help

Language
English
Product
Intergraph Batch Services
Search by Category
Help

Description

Sets the inflow state of the named queue to "ENABLED". The caller must have operator privileges on the server.

Syntax

DWORD BatchEnableQueue(LPCTSTR queuename);

Parameters

LPCTSTR queuename

Specifies the name of the queue to enable.

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=NULL;

DWORD ReturnVal=0;

cout << "STARTED EXECUTION OF THE BATCHENABLEQUEUE API " << endl;

pTemp = new char [MAX_LENGTH];

if(pTemp == NULL){

cout << "unable to allocate the memory." << endl;

exit(0);

}

cout << "Enter the QUEUE TO ENABLE "<< endl;

cin >> pTemp;

QueName = (const char *) pTemp;

ReturnVal= BatchEnableQueue(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 ENABLEQUEUE " << endl;

}

cout << "COMPLETED EXECUTION OF THE BATCHENABLEQUEUE API " << endl;

delete [] pTemp;

}