Introduction | Language Structure | IB Statements | File System | Comet 32 Runtime | Index |
| Mnemonic: | (GetDirAlias=alias,flags) | ||||||||||||||||||||||||||||||||||||||||||||||
| Discussion: |
This mnemonic returns the path name of a directory alias. Be aware that some versions of Comet include a null terminator at the end of the pathname followed by blanks for Comet Anywhere clients.
The coding example below includes code to accommodate this inconsistency.
This mnemonic may be used by foreground programs only. The alias is the "alias identifier" as specified in COSW (e.g., CATEMP). Flags is decimal value from the following chart:
If the program is connected to CometAnywhere client, there may be two sets of directory aliases of interest. The first set is relative to the CometAnywhere HOST and the second to the CometAnywhere CLIENT. The flag values specify which set of DirAliases to access. After this mnemonic is issued, your program can issue an INPUT on LUN (0) to retrieve the path name and error information. For example: Length 2 & Local ax$,dx$ Length 254 & Local result$,alias$ Length 5.0 & Local Flags,FuncError,FileError ResultFmt: Format ax$;dx$;result$ . . Print (GetDirAlias=alias$,Flags) Input (0,ResultFmt)The first field, AX$, contains the function error code, and the second field, DX$, contains the suberror code (aka the Windows file error code). Both of these fields are in Intel 2's complement format, and should be processed as follows: FuncError = IHexDec(ax$) ! Function error code (decimal) FileError = IHexDec(dx$) ! File error code (decimal) ! For unexpected values, convert to 2's complement signed integer If (FuncError > 32767) FuncError = FuncError-65536 If (FileError > 32767) FileError = FileError-65536 result$ = strip(result$) If RSub(result$,1,1) = "@00@" result$ = RSub(result$,2,254) ! Strip null terminator if there (before Build 392 only)Here is a list of the function error codes in decimal form:
Here is a list of the suberror codes (common Windows file errors) in decimal form:
| ||||||||||||||||||||||||||||||||||||||||||||||
History:
|
This mnemonic was added in Comet Build 299 and REL Version 01.07.
| Trailing @00@ was removed in build 392. |