Files | |
file | clipboard.c |
Windows clipboard handling. | |
Enumerations | |
enum | t_cliperrcode { CLIP_OK = 0, CLIP_PARAM, CLIP_FILENAME, CLIP_FILESIZE, CLIP_OPEN, CLIP_NO_MEMORY, CLIP_LOCK, CLIP_READ, CLIP_OPER, CLIP_OPENCLIP, CLIP_SETCLIP, CLIP_GETCLIP, CLIP_WRNGFMT, CLIP_WRITE, CLIP_BITMAP, CLIP_UNKNOWN } |
Error types. More... | |
Functions | |
int WINAPI | WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) |
The main entry point for the clipboard program. |
enum t_cliperrcode |
Error types.
int WINAPI WinMain | ( | HINSTANCE | hInstance, | |
HINSTANCE | hPrevInstance, | |||
PSTR | szCmdLine, | |||
int | iCmdShow | |||
) |
The main entry point for the clipboard program.
Usage of the program: clipboard.exe [copy|paste] filename.
copy copies the contents of the file filename into the clipboard as text. The file filename is assumed to contain valid text in the correct windows encoding, either UCS-2LE if the program has been compiled with the windows unicode support or the current ansi page, if compiled without the unicode support. The contentes of the file are transparently copied into the the clipboard as text.
paste retrieves the contents of the clipboard into the file filename. The file is created, if it doesn't already exists or the contents of an existing file are overwritten.
The program has no GUI and it works as a command line utility.
hInstance | ignored. | |
hPrevInstance | ignored | |
szCmdLine | is assumed to contain a with white spaces separated string. Up to the first white space the command line parameter is assumed to contain strings copy or paste. After the first whitespace the name of the file is assumed, including evtl. furher whitespaces. | |
iCmdShow | ignored, if command line given, else used for the creation of the main window. |