Directory Aliases

From CometWiki

Revision as of 12:01, 15 June 2009 by Badge (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Directory Aliases Overview

When writing programs that must deal with remote CometAnywhere sessions, it is sometimes necessary to reference files that exist on the remote machine. Typically, you might have files that contain bitmaps or client data that are passed via CATRANS or some other custom program. It is not always possible to know exactly how a remote machine is set up or what directories are to be used for storing/retrieving these files.

Directory aliases provide a mechanism that allows the user of the remote machine to control where files are located on his machine. Comet provides this feature by having COSW (the CometAnywhere client program) examine each filename for a special prefix that indicated the presence of a directory alias. Once the name of the alias has been determined, it is looked up in a table located in the COSW.INI file on the remote machine where a substitute path is retrieved.

The form of an alias in a filename is as follows:

$(AliasName)\filename.ext

Example: $(CATOOLS)\DLGDEMO.DLL

Aliases are only valid at the very beginning of a file name and are NOT case sensitive.

Aliases are maintained from the Directory Aliases dialog off of the COSW “Edit” menu. Here, aliases can be added, removed and modified to suit the system requirements.

The form of an alias entry in COSW.INI is:

[Directories]
AliasName=Path

Example: CATOOLS=C:\COMET\MYTOOLS

Given the above examples, COSW will look up the alias “CATOOLS” in COSW.INI. The contents of the alias entry “C:\COMET\MYTOOLS” is then substituted into the filename to yield the correct path for the target machine “C:\COMET\MYTOOLS\DLGDEMO.DLL”.

The following functions support directory aliases:

Loading Dynamic Link Libraries (DLL’s) 
Bitmaps for printing or display on screen 
Bitmaps used in static controls and on pushbuttons 
Wallpaper functions 
Metafiles functions 
VerifyFile mnemonic 
PlaySound mnemonic 
File transfer functions (CATRANS, File Delivery) 

Although this document describes the use of aliases at a CometAnywhere remote site, Directory Aliases can also be used on CometAnywhere host installations to aid in the specification of non-Comet files for file transfer operations (CATRANS, VerifyFile, etc).

Date of publication: September 11, 2000

Personal tools