Microsoft KB Archive/93027

From BetaArchive Wiki
Knowledge Base


Using LINKER Switches From Within VBDOS.EXE Environment

PSS ID Number: 93027

Article Last Modified on 1/8/2003



The information in this article applies to:

  • Microsoft Visual Basic for MS-DOS 1.0



This article was previously published under Q93027

SUMMARY

It is usually possible to set LINK options by using the LINK environment variable. However, this technique cannot be used within the VBDOS.EXE programming environment.

To work around this limitation, create a new .EXE file called LINK.EXE which SHELLs to the old LINK.EXE file, and invokes the old LINK.EXE file (which has been renamed) with whatever options you would like to use.

The following steps show how to perform this type of functionality. In the following example, the "/r" LINK option is used, and the old LINK.EXE file is renamed to LINKER.EXE.

  1. Start VBDOS.EXE.
  2. From the File menu select New Form... (FORM1.FRM).
  3. Add the following code:

         PRINT "Running link in real mode."
         SHELL "linker /r "+command$
         END
                            
  4. From the File menu select Save File.
  5. Type LINKR.BAS as your file name, and choose OK.
  6. From the File menu select exit, to exit out of the environment.
  7. From the MS-DOS prompt, type the following commands:

    BC /o linkr;
    LINK /r linkr;
    RENAME link.exe linker.exe
    RENAME linkr.exe link.exe

You should now be able to LINK from within the VBDOS.EXE programming environment with whatever LINK options you have specified.


Additional query words: VBmsdos 1.00

Keywords: KB93027
Technology: kbAudDeveloper kbVB100DOS kbVBSearch kbZNotKeyword3