Unit Win95File

Classes

Functions

GetLongName - Return a complete path name, using the long file name for all directories and the file name, if possible.
GetShortName - Get the short file name for a long name.
Int21Dispatch - To call an Int 21H DOS call from Windows 95, set up the registers and then call Int21Dispatch.
VxDCall0 - The GetLongName routine uses the Windows 95 VxD implementation of Int 21H.
VxDCall1 -
VxDCall2 -
VxDCall3 -
VxDCall4 -
VxDCall5 -
VxDCall6 -
VxDCall7 -
VxDCall8 -

Types

Constants

Variables


Functions


function GetLongName(FileName: string): string;

Return a complete path name, using the long file name for all directories and the file name, if possible. If the SrcPath is not a complete path, then use the current directory. Interpret all '.' and '..' directories. Return the resulting path, or an empty string for an error. If an empty string is returned, GetLastError returns the DOS error code.

Return a complete path name, using the long file name for all directories and the file name, if possible. Return the resulting path, or an empty string for an error. If there is an error, set the DOS error code as the GetLastError code.


function GetShortName(FileName: string): string;

Get the short file name for a long name. Do not expand the path. Return an empty string for an error.

Get the short name for a long name. Fortunately, Microsoft already has a function to do this. Return an empty string for an error.


function Int21Dispatch: Integer;

To call an Int 21H DOS call from Windows 95, set up the registers and then call Int21Dispatch.

Use the Windows 95 Int 21H interface by calling to the VWIN32 VxD. The caller must have set up all the registers before calling Int21Dispatch. The carry bit is not preserved by calling VxDCall, so you need to interpret the returned register values to detect an error.


function VxDCall0(ID: Integer): Integer;

The GetLongName routine uses the Windows 95 VxD implementation of Int 21H. All the VxD calls go through a single routine, but with a variable number of arguments on the stack. Call the appropriate VxDCall routine, according to the number of arguments you have.

Actually, all the VxDCall routines point to the same entry point in Kernel32.dll. Different names allow the caller to pass a variable number of arguments.


function VxDCall1(ID, arg1: Integer): Integer;


function VxDCall2(ID, arg1, arg2: Integer): Integer;


function VxDCall3(ID, arg1, arg2, arg3: Integer): Integer;


function VxDCall4(ID, arg1, arg2, arg3, arg4: Integer): Integer;


function VxDCall5(ID, arg1, arg2, arg3, arg4, arg5: Integer): Integer;


function VxDCall6(ID, arg1, arg2, arg3, arg4, arg5, arg6: Integer): Integer;


function VxDCall7(ID, arg1, arg2, arg3, arg4, arg5, arg6, arg7: Integer): Integer;


function VxDCall8(ID, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8: Integer): Integer;


Types


Constants


Variables