home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_300
/
376_01
/
os2tool.000
/
ALERT.C
< prev
next >
Wrap
C/C++ Source or Header
|
1992-08-25
|
1KB
|
51 lines
/* =========================================================
*
* ALERT.C - General alert mechanism.
*
* Version 1.0
*
* COPYRIGHT(c) : Dis Kit Project
* CREATED : 11.8.1992
* PROGRAMMER : Martti Ylikoski
* NOTES :
* LAST UPDATE :
*
*
* ==========================================================*/
#define INCL_DOS
#include <os2.h>
#include <stdio.h>
#include <string.h>
#include <netcons.h>
#include <message.h>
#include "alert.h"
/*
int main(int argc, char *argv[])
{
if (argc < 3)
{
printf("%s: at least 2 arguments are needed!\Exiting...\n", argv[0]) ;
printf("Usage: %s user message\n", argv[0] ) ;
return( 1 ) ;
}
alert(argv[1], argv[2]) ;
return( 0 ) ;
}
*/
int alert (char *machine, char *user, char *message)
{
unsigned short ret ;
ret = NetMessageBufferSend(machine, user, message,
(unsigned short) strlen(message)) ;
if (ret != 0)
return( ERROR ) ;
else
return( OK ) ;
}