Table of Contents Index NMS Glossary Previous Page Next Page (Page 14 of 23 in this chapter) Version


cnfGetResourceList

Description

Returns the list of resources defined in the system.

Prototype

DWORD cnfGetResourceList ( CTAHD ctahd,
unsigned maxresources,
unsigned *resourcelist,
unsigned *numresources)

ctahd CT Access handle returned by
ctaCreateContext.

maxresources Maximum number of entries in resourcelist
array.

resourcelist Pointer to an array of unsigned to receive the
list of resource numbers. If NULL, this
function returns the number of resources in
numresources.

numresources Returned number of resources defined in the
system.

Return Values

Details

This function returns the actual list of resources defined in the system. To check for availability of a resource, open the resource. To determine the current number of resources without the actual number, set maxresources to 0 and resourcelist to NULL.

For more information, refer to Section 4.5, Creating Conferences.

See Also

cnfCloseResource, cnfOpenResource

Example

unsigned printResourceList (CTAHD ctahd)
{
 DWORD error;
 unsigned resindex;
 unsigned numresources = 0;
 unsigned *resourcelist = NULL;

 // First call just retrieves the number of conferencing resource
 error= cnfGetResourceList(ctahd, 0, NULL, &numresources);
 if (error != SUCCESS)
 {
 printf("Error when retrieving resource list :%d", error);
 }

if (numresources)
{
 if (resourcelist = malloc(numresources * sizeof(unsigned)))
 {
  // This call retrieves the whole list of conferencing resource
  error= cnfGetResourceList(ctahd, numresources, resourcelist,
&numresources); if (error != SUCCESS) { printf("Error when retrieving resource list :%d", error); } for (resindex = 0; resindex < numresources; resindex++) printf("Conferencing resource %d exists",
resourcelist[resindex]);
free(resourcelist); } } else printf("No Conferencing resource detected using ctahd %x",
ctahd);
return (numresources); }


Table of Contents Index NMS Glossary Previous Page Next Page (Page 14 of 23 in this chapter) Version


Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2000, Natural MicroSystems, Inc. All rights reserved.