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