API Guide
2-432 API Functions 601355 Rev A
15 VST_BOOLEAN vst_table_handle()
16 #endif
17 {
18 VST_BOOLEAN rc =
VSE_TRUE;
19 VST_TABLE_HANDLE tableh;
20 int numdrives;
21 int i;
22 VST_DRIVE_ID testdriveid
= 9999;
23 int numentries;
24 VST_DRIVE_ID * ip;
25
26 printf(“*** Table Handle test
***\n”);
27 printf(“How many drives? “);
28 numdrives = atoi(gets(input));
29
30 /* create the table handle */
31 tableh =
VS_Table_Create(VSE_INTEGER_PTR,
numdrives);
32
33 /* generate drive ids */
34 for (i = 0; i < numdrives; i++)
35 {
36 VS_Table_CreateAddEntry(tableh,
&i, sizeof(VST_DRIVE_ID));
37 }
38 /* get the number of entries in the
table */
39 VS_Table_GetFields(tableh,
40 VSID_NUMBER_ENTRIES,
&numentries,
41 VSID_ENDFIELD);
42 /* loop through the table and print
the entries */
43 for (i = 0; i < numentries; i++)
44 {
45 VS_Table_GetFields(tableh,
46 VSID_TABLE_ENTRY, i, &ip,