BatchDisableQueue - 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 "DISABLED". The caller must have operator privileges on the server.

Syntax

DWORD BatchDisableQueue(LPCTSTR queuename);

Parameter

LPCTSTR queuename

Specifies the name of the queue to disable.

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()

{

LPCTSTR QueName=NULL;

DWORD ReturnVal=0;

char * pTempName;

cout << " STARTING THE EXECUTION OF BATCHDISABLEQUEUE API " << endl;

pTempName = new char [MAX_LENGTH];

if (pTempName == NULL){

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

exit(0);

}

cout << " Enter the Queue Name to be Deleted ";

cin >> pTempName;

QueName = (const char *)pTempName;

ReturnVal = BatchDisableQueue(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 DISABLING THE QUEUE "<< endl;

}

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

delete [] pTempName;

}