API Guide
2-234 API Functions 601355 Rev A
42
43 /* populate the criteria group with
criteria */
44 /* (upto 5) */
45 printf ( “Enter number of Criteria in
group ==> “ );
46 numcrit = atoi(gets(input));
47
48 for ( i = 0 ; i < numcrit ; i++ )
49 {
50 /* create the criteria for a media
stat field */
51 criteriah = VS_Criteria_Create();
52
53 if ( criteriah ==
(VST_CRITERIA_HANDLE) NULL )
54 {
55 /* could not allocate handle */
56 rc = VSE_FALSE;
57 break;
58 }
59
60 printf ( “Enter the media’s field
number ==> “ );
61 field = atoi(gets(input));
62
63 printf ( “Enter the sort order
(Ascending - 1, Descending - 2)
==> “ );
64 sort = atoi(gets(input));
65
66 /* set the criteria parameters */
67 /VS_Criteria_SetFields (
criteriah,
68 VSID_FIELD,
field,
69
VSID_MOUNT_CRITERIA_ORDER, sort,
70 VSID_ENDFIELD );
71
72 /* populate the critera with
expressions */