Category : Network Files
Archive   : SAP.ZIP
Filename : SAMPLE.C
Output of file : SAMPLE.C contained in archive : SAP.ZIP
*
* Program Name: SAMPLE
*
* Filename: sample.c
*
* Date Created: March 22, 1988
*
* Programmers: Bryan Sparks
*
* Files used: sap.c, comm.h, sapa.asm
*
* Comments: This program demonstrates how to ADVERTISE using
* the Service Advertising Protocol. The functions
* SAP.OBJ and SAPA.OBJ can be "plugged-in" to your
* program to do Service Advertising.
*
****************************************************************************/
main(argc,argv)
int argc;
char *argv[];
{
int ccode;
unsigned int ServerType;
char ServerName[48];
unsigned int ServerSocket=0x1111; /* This would be your socket number. */
switch (argc) {
case 3:
strcpy( ServerName, argv[1] );
ConvertToUpper( ServerName, ServerName );
ServerType = atoi( argv[2] );
break;
default:
printf("\nusage: sap
exit (-1);
break;
}
StartSAPOscillationRoutines( ServerName,
ServerType,
ServerSocket );
printf("This machine is now ADVERTISING.\n\nPress any key to quit...");
while (!kbhit())
;
printf("\nCanceling SAP...");
ccode = StopSAPOscillationRoutines( ServerName,
ServerType,
ServerSocket );
if (ccode)
printf("\rHad problems stopping SAP routines.\n");
else
printf("\rSAP routines canceled.\n");
}
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/