API Guide
601355 Rev A API Functions 2-111
Functions
12 #ifdef ANSI_C
13 VST_BOOLEAN vst_connect_handle(void)
14 #else
15 VST_BOOLEAN vst_connect_handle()
16 #endif
17 {
18 VST_CONNECT_HANDLE h;
19 VST_BOOLEAN rc = VSE_FALSE;
20 VST_ENTERPRISE_ID EnterpriseID;
21 VST_SOCKADDR_IN SocketAddress;
22 VST_PROGRAM_NUMBER ProgramNumber;
23 VST_VERSION_NUMBER VersionNumber;
24 VST_PROCEDURE_NUMBER
ProcedureNumber;
25 VST_PROTOCOL Protocol;
26
27 /* create the handle */
28 h = VS_Connect_Create();
29 if (h != (VST_CONNECT_HANDLE) NULL)
30 {
31 /* get values from user */
32 printf(“*** connect handle
***\n”);
33 printf(“Enter enterprise ID ==>
“);
34 EnterpriseID = atol(gets(input));
35 printf(“Enter Internet sin_port
value ==> “);
36 SocketAddress.sin_port = (short)
atoi(gets(input));;
37 printf(“Enter Internet sin_family
value ==> “);
38 SocketAddress.sin_family =
(short)
atoi(gets(input));
39 printf(“Enter Internet sin_addr
value ==> “);
40 SocketAddress.sin_addr =
atol(gets(input));
41 printf(“Enter program number ==>
“);