Скачать LFN v1.0 - Long File Name Unit

Скачать файл (14,42 Кб)

  This unit provides Pascal routines that access most of the
  functions of the Win32 API for long file names. It can be used from
  real mode and protected mode DOS applications in a Win95 DOS box, or
  from 16-bit Windows applications running within Win95. Requires
  Borland Pascal 7.0 or Delphi to compile.

  Error codes are returned as the function result of each routine. You
  must ensure that the result is zero before proceeding in your
  application. If you're writing an application that runs under
  previous versions of DOS or Windows, you need to fall back to the
  older DOS services when the Win32 services fail. "Unsupported
  function" is indicated by an error code whose value is greater than

  LFN supports complete filenames up to 254 characters max (not
  counting length byte or null terminator, but counting drive letter
  and path). Win95 actually allows names up to 259 characters.

  LFNParamCount and LFNParamStr work like the standard runtime library
  functions ParamCount and ParamStr, except that they honor quotes (")
  to delimit parameters that contain spaces. They search only the 128
  bytes of command line data in the prefix segment, not the additional
  overflow information stored in the environment.

  The comment after each routine in the interface section below
  provides information about what it does. Many of the functions
  parallel those from the Turbo Pascal runtime library and work as
  much as possible like the short filename RTL versions.

  The example programs EXLFN.PAS, EXLFNP.PAS, and SDIR.PAS show how to
  use many of the functions.

  See a Win32 API manual for additional details about each function.

  Routines that look like they could be "assembler" cannot be because
  they need the compiler to make a copy of the strings passed to them,
  to ensure space for null-terminating the string.

  The "stc" before each int $21 is needed to ensure the operating
  system returns with carry set when an unsupported function call is