diff options
author | Ian C <ianc@noddybox.co.uk> | 2004-03-07 02:48:59 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2004-03-07 02:48:59 +0000 |
commit | face9be5bea3bc3026621fee87a7a7c495ea69e5 (patch) | |
tree | 70ef8fc5fc21d8c6ec79c594968e3b1b9e17c2af /main.c | |
parent | 85ddc980e0b55191a91d129f4c0bedd2057387e2 (diff) |
This commit was generated by cvs2svn to compensate for changes in r2,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 36 |
1 files changed, 36 insertions, 0 deletions
@@ -0,0 +1,36 @@ +#include <stdio.h>
+#include <stdlib.h>
+#include <windows.h>
+
+/*--------------------------------------------------- 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");
+}
|