Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

Scrap Library
[AES Function Reference]

interprocess cut & paste operations More...

Functions

short mt_scrp_clear (short *global_aes)
short mt_scrp_read (char *Scrappath, short *global_aes)
short mt_scrp_write (const char *Scrappath, short *global_aes)

Detailed Description

interprocess cut & paste operations

The Scrap Library is used to maintain the location of the clipboard directory used for interprocess data exchange.


Function Documentation

short mt_scrp_clear short global_aes  ) 
 

clear the content of the clipboard directory

Parameters:
global_aes global AES array
Returns:
0 if an error occurred or non-zero otherwise.
Since:
All AES versions.
See also:
mt_scrp_read(), mt_scrp_write()
This function deletes all the files in the clipboard directory, (not only files named 'SCRAP.*').

short mt_scrp_read char *  Scrappath,
short global_aes
 

returns the location of the current clipboard directory.

Parameters:
Scrappath is a pointer to a character buffer of at least 128 bytes into which the clipboard path will be placed.
global_aes global AES array
Returns:
0 if the clipboard path had not been set or non-zero if Scrappath was properly updated.
since PC-GEM 2.0, this function returns -1 if the clipboard path had not been set, or a value >= 0 which is a bitmap value with one bit per type of file found in the clipboard, defined as follow:
Since:
All AES versions.
See also:
mt_scrp_write()
The system scrap directory is a global resource. Some programs incorrectly call mt_scrp_write() with a path and filename when only a pathname should be used. The following is an example of a correctly formatted Scrappath argument:
C:\CLIPBRD\
Unfortunately, not all programs adhere exactly to this standard. For this reason, programs reading this information from mt_scrp_read() should be especially careful that the information returned is parsed correctly. In addition, don't count on a trailing backslash or the existence of a drive specification.

If a value of 0 is returned and the application wishes to write a scrap to the clipboard you should follow these steps:

  • Create a folder '\CLIPBRD\' on the root directory of the user's boot drive ('C:' or 'A:').
  • Write your scrap to the directory as 'SCRAP.???' where '???' signifies the type of information contained in the file.
  • Allow other applications to access this information by calling mt_scrp_write() with the new clipboard path. For example "C:\\CLIPBRD\\".

short mt_scrp_write const char *  Scrappath,
short global_aes
 

sets the location of the clipboard directory.

Parameters:
Scrappath points to a NULL-terminated path string containing a valid drive and path specification with a closing backslash. The following is an example of a correctly formatted Scrappath argument: C:\CLIPBRD\
global_aes global AES array
Returns:
0 if an error occurred or non-zero otherwise.
Since:
All AES versions.
See also:
mt_scrp_read()
The scrap directory is a global resource. This call should only be used in two circumstances as follows: when used to set the default location of the scrap directory using a CPX or accessory at bootup or by the user's request.


Generated on Wed Nov 3 22:42:20 2004 for GEMLIB by  doxygen 1.3.9.1