

  A. About PEStub

   PEStub may be used to replace the stub file of a PE executable.
  The replacement is done by typing:

   PESTUB <name of executable to modify> <name of new stub>

   Main purpose of PEStub is to replace the current stub of
  Win32 console applications by stub DPMIST32.BIN. This stub
  is part of HX runtime and will, in conjunction with PE file
  loader DPMILD32 and its Win32 emulation dlls, enable this app
  to run in plain DOS provided that all Win32 functions used by 
  the app are properly emulated.

   A backup copy of the modified executable with extension .BAK
  will be written when PEStub modifies the file.
  
  ----------------------------------------------------------------
  PLEASE NOTE: It may be more conveniant now to use tool HXLDR32
  instead of PEStub to run Win32 console applications in plain dos.
  HXLDR32 is loaded resident, does the same job as stub DPMIST32
  and does NOT require to modify existing PE executables.
  ----------------------------------------------------------------

  
  B. Verifying a PE executable can run in plain DOS

   To verify the application can be loaded in plain DOS enter:

   DPMILD32 <name of PE executable>

   This should be done in plain DOS as well, because the built-in
  windows DPMI server has some severe restrictions (this is valid
  for both win9x and winnt platforms). So it is not possible to
  load a PE executable without relocation info in this environment,
  because the loader cannot allocate memory with a specific base
  address (0x400000 in this case).

  If the console app was able to run one may enter:

   PEStub.exe <name of PE-executable>

   This will exchange the stub of the executable by default stub
  DPMIST32.BIN. The modified binary remains a valid Win32 executable,
  so nothing will change while running it in a Win32 environment.
   When running in native DOS it has to be ensured that the HX runtime
  binaries are located in a directory being included in your PATH
  environment variable.


  C. History
  
  V1.9,  2004/11/13: name of new stub is optional, default is DPMIST32.BIN
  V1.8,  2004/10/13: new command line switch -x

  
  D. Licence

  PEStub is part of HX DOS extender and is free. Use it as you wish.

  Japheth
