home *** CD-ROM | disk | FTP | other *** search
- /*
- GETCLIP.C -- get text from Windows clipboard
- */
-
- #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
- #include "winclip.h"
-
- void fail(char *s) { puts(s); exit(1); }
-
- int main(void)
- {
- char *s;
- int maj, min;
-
- if (! WinOldApVersion(&maj, &min))
- fail("This program requires Windows Enhanced mode");
-
- if ((s = GetClipString()) != NULL)
- {
- puts(s);
- FreeClipString(s);
- }
-
- return 0;
- }
-