API Guide
2-94 API Functions 601355 Rev A
11 ****************************************
*********/
12 #ifdef ANSI_C
13 VST_BOOLEAN
vst_component_handle(void)
14 #else
15 VST_BOOLEAN vst_component_handle()
16 #endif
17 {
18 VST_BOOLEAN rc =
VSE_TRUE;
19 VST_COMPONENT_HANDLE comph;
20 VST_COMP_TYPE comptype;
21 VST_COMPONENT_ID id;
22
23 comph = VS_Component_Create();
24 if (comph != (VST_COMPONENT_HANDLE)
NULL)
25 {
26 printf(“enter component type
==>”);
27 comptype = atoi(gets(input));
28 printf(“enter 4 values for the
component id (e.g. 3 2 4 1) ==>”);
29 scanf(“%hd %hd %hd %hd”, &id[0],
&id[1], &id[2], &id[3]);
30 gets(input);
31 VS_Component_SetFields(comph,
32 VSID_COMP_TYPE,
comptype,
33 VSID_COMP_ID,
id,
34 VSID_ENDFIELD);
35 vst_print_component(comph);
36 VS_Component_Destroy(comph);
37 }
38 else
39 {
40 rc = VSE_FALSE;
41 }
42 return(rc);
43 }