IBM Books

Image, Audio, and Video Extenders Administration and Programming

QbListFeatures


Image Audio Video
X    

Returns a list of the active features currently included in a catalog. The list is returned to a buffer you allocate.

Authorization

Select

Library file
OS/2 and Windows AIX, HP-UX, and Solaris
dmbqbapi.lib libdmbqbapi.a (AIX)

libdmbqbapi.sl (HP-UX)

libdmbqbapi.so (Solaris)

Include file

dmbqbapi.h

Syntax

SQLRETURN QbListFeatures(
      QbCatalogHandle cHdl,
      SQLINTEGER bufSize,
      SQLINTEGER *count,
      char *featureNames
      );

Parameters

cHdl (in)
A pointer to the handle of the catalog.

bufSize (in)
The size of your buffer. To estimate the needed buffer size, you can use the feature count returned by the QbGetCatalogInfo API, and multiply the count by the length of the longest feature name. Feature names stored in the buffer are separated by a blank character.

count (out)
The number of returned feature names.

featureNames (out)
An array of feature names in your buffer.

Error codes

qbicECIvalidHandle
The catalog handle is not valid.

qbicECTruncateData
The returned data was truncated because the return buffer was too small.

Examples

Get a list of the active features in the catalog identified by the handle CatHdl. Store the information in the featureNames array.

First, calculate bufSize, which is the buffer size you need for the list. Use the QbGetCatalogInfo API to return the number of features in the catInfo structure. Then multiply that number by the constant qbiMaxFeatureName, which is the size of the longest feature name:

#include <dmbqbapi.h>
 
rc = QbGetCatalogInfo(CatHdl, &catInfo);
 
bufSize =
   catInfo.featureCount*qbiMaxFeatureName;
 
rc = QbListFeatures(CatHdl, bufSize,
       count, featureNames);


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]