Clipboard functions


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.

Enumeration Type Documentation

Error types.

Enumerator:
CLIP_OK  Everything went OK.
CLIP_PARAM  Wrong parameter format.
CLIP_FILENAME  Wrong name of the file.
CLIP_FILESIZE  File size error.
CLIP_OPEN  Unable to open file.
CLIP_NO_MEMORY  No memory.
CLIP_LOCK  Unable to lock memory.
CLIP_READ  Error reading file.
CLIP_OPER  Wrong operation name.
CLIP_OPENCLIP  Unable to open clipboard.
CLIP_SETCLIP  Unable to set clipboard data.
CLIP_GETCLIP  Unable to get clipboard data.
CLIP_WRNGFMT  Unsupported clipboard format.
CLIP_WRITE  File write error.
CLIP_BITMAP  Bitmap conversion error.
CLIP_UNKNOWN  Unknown error.


Function Documentation

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.

Parameters:
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.
Returns:
CLIP_OK if everything went OK, error code else


Generated on Mon Jul 12 14:51:51 2010 for cetoys by  doxygen 1.5.6