Microsoft KB Archive/107495

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 15:04, 18 July 2020 by 3155ffGd (talk | contribs) (importing KB archive)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base


PRB: Phar Lap Error 58 Running Visual C++ on Read-Only Drive

Article ID: 107495

Article Last Modified on 12/1/2003



APPLIES TO

  • Microsoft Visual C++ 1.5 Professional Edition
  • Microsoft Visual C++ 1.0 Professional Edition
  • Microsoft Macro Assembler 6.1 Standard Edition
  • Microsoft Macro Assembler 6.1a
  • Microsoft Macro Assembler 6.11 Standard Edition



This article was previously published under Q107495

SYMPTOMS

An attempt to execute NMAKE.EXE, CL.EXE, LINK.EXE, or MASM.EXE in MS-DOS when Windows is not running fails and generates the following message:

Phar Lap err 58: Can't create VM swap file of size 0 in directory <root directory name>:\

H2INC.EXE and CREF.EXE that ship with MASM version 6.11 generate the same error. This error does not occur when running in an MS-DOS window under Microsoft Windows or Microsoft Windows NT.

With Visual C++ for Windows and MASM version 6.1a, the error can also occur when the TMP environment variable is invalid or points to a read-only drive. For additional information about the TMP problem, please search in the Microsoft Knowledge Base on the following words:

Phar Lap RW1016


CAUSE

Visual C++ is installed on a read-only drive, possibly a network drive. The error occurs because the DOSXNT MS-DOS extender attempts to create a virtual memory swap file on the drive DOSXNT runs from when the operating system does not support virtual memory.

RESOLUTION

To work around this problem, you can run DOSXNT on a read/write drive listed in your PATH MS-DOS environment variable. Or you can specify one of the following environment variable settings to prevent DOSXNT from attempting to create a swap file on the read-only network drive:

  • Set the DOSX environment variable to prevent DOSXNT from using any virtual memory. Edit your AUTOEXEC.BAT file to include the following:

    set dosx=-novm

    With this option, you may run out of memory due to virtual memory not being used. If this is the case, use the second solution to set up a swap directory for the virtual memory. -or-

  • Set the DOSX environment variable to specify where DOSXNT creates the virtual memory swap file. Edit your AUTOEXEC.BAT file to include the following

    set dosx=-swapdir <path>

    where <path> specifies the drive and directory on which to create the temporary swap file.
  • Set a TMP environment variable that points to a read/write drive with enough free space for temporary files. If the TMP environment variable already exists, check to see that it is valid and pointing to a read/write drive. The TMP environment variable works only for the version of DOSXNT that comes with Microsoft Visual C++ for Windows version 1.0 and Microsoft MASM 6.1a.

NOTE: This is not a problem in Visual C++ 2.0, because DOSXNT is not used.


Additional query words: PharLap DOSXNT 1.00 1.50 6.10 6.10a utilities masm noupdate

Keywords: kbprb KB107495