From face9be5bea3bc3026621fee87a7a7c495ea69e5 Mon Sep 17 00:00:00 2001 From: Ian C Date: Sun, 7 Mar 2004 02:48:59 +0000 Subject: This commit was generated by cvs2svn to compensate for changes in r2, which included commits to RCS files with non-trunk default branches. --- main.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 main.c (limited to 'main.c') diff --git a/main.c b/main.c new file mode 100644 index 0000000..c5ce270 --- /dev/null +++ b/main.c @@ -0,0 +1,36 @@ +#include +#include +#include + +/*--------------------------------------------------- PROTOS +*/ + +/*--------------------------------------------------- MAIN +*/ +int main(int argc, char *argv[]) +{ + HANDLE port; + + if (argc<2) + { + fprintf(stderr,"usage: %s port\n",argv[0]); + return EXIT_FAILURE; + } + + port=CreateFile(argv[1],GENERIC_READ|GENERIC_WRITE,0,NULL, + OPEN_EXISTING,0,NULL); + + if (port==INVALID_HANDLE_VALUE) + { + fprintf(stderr,"%s: error %ld opening %s\n", + argv[0],GetLastError(),argv[1]); + + return EXIT_FAILURE; + } + + CloseHandle(port); + + printf("Done\n"); + + system("pause"); +} -- cgit v1.2.3