

  Quick tour guide for NEWVIEW



_______________________________________________________________________________
STEP 1. Run the program. You can run it from anywhere.

         The program does expect CTL3D.DLL to be locatable although it
       is not required.  As long as it finds CTL3D.DLL, it will use it
       (not CTL3DV2.DLL).  If it doesn't find it, no notification will
       be given, and although the main window may look 3d anyway, dialog
       boxes will have no 3d stuff by default.


         NewView will accept a file on the command line, but we don't
       need to use that right now.

_______________________________________________________________________________
STEP2 2. A TASK LIST should display.

         You can select any NE-based task in the list, and view that
       file.

        NOTE:  Because you have no "Recent Files" information stored in
       NEWVIEW.INI, the program will show the next best thing, which is
       the active task list.  Once you have viewed a file, NewView will
       create a "Recent Files" list and it will automatically appear
       when launching the app


         Select PROGRAM MANAGER from the list.  Since there is no
       NEWVIEW.INI file in your Windows directory yet, NewView will
       create one after opening a view on this Win16 NE file.

_______________________________________________________________________________
STEP 3.  Click on the [Old Header] button.

         The "Old Header" report of the MZ (MS-DOS) stup program should
       be displayed. After the MZ header information is listed, a hex
       dump of the first 2K (or so) of the file is provided.  This is
       usually enough to show you the average MZ stub's contents.

         If your program provides a customized stub, a larger dump can
       be requested.  The left dblclick mouse button will pop up a hex
       dump window, which will stop at either the end of the NE file
       header data, or 25K, whichever comes first.

         The right mouse dblclick can be used to launch a file dump
       utility (or whatever program has been configured in NEWVIEW.INI)
       If NEWVIEW.INI doesn't specify a program, the HDUMP.EXE (BC++
       sample) program is used as the default.  It should be in the
       WINDOWS directory, or in the same directory as NEWVIEW.EXE.
       (See the documentation on the INI file for more details)

_______________________________________________________________________________
STEP 4. Click on the [New Header] button.

         The New Header is similar to EXEHDR's output.  Click a second
       time to change the report to the summary information.  This is a
       toggle, and clicking the button flips back and forth between
       these two formats.


         The right dblckick mouse button launches the app, but only when
       the "NE Header Summary" report is displayed.  Alternatively, you
       can use the RUN command from the FILE menu to launch the
       currently loaded EXE.  (PROGMAN doesn't like to run more than
       once, so don't bother trying)


_______________________________________________________________________________
STEP 5. Click on the [Entry Table] button.

         This is a list of entry points (and their names, when possible)
       unsorted, and in the order of the actual entry tables.  (sorted
       by ordinal, if you will).  Notice that the button you clicked on
       has changed to say [Entry Names].  Click on it, and you see the
       list sorted by proceedure name.  The button changes to [Entry
       Sort].  Clicking on it displays the entry point information
       sorted by segment/offset.  These 3 reports rotate as the button
       is clicked.


         The left dblclick shows a hex dump of the data at the entry
       point's address, and will dump the number of bytes ESTIMATED in
       the " ~Size " column.  There is another method of calculating the
       size, and even though it is more accurate, it is much slower.  I
       postponed using it until I can speed it up.


_______________________________________________________________________________
STEP 6. Click on the [Segment Table] button.

       This list shows segments and relocation counts.

       - The left dblclick opens up the relocation table report on a
         given segment

       - The right dblclick opens a dump of the data in the segment

       - The right dblclick while holding the CTL-SHIFT keys down
         shows a dump of the relocation table


_______________________________________________________________________________
STEP 7.  Double-click the left mouse button on SEGMENT 1.

         A relocation report appears.  Note the calls listed are from
       any of the import libs we saw in the NE header summary, and all
       external references to imported dll libraries have been
       identified by name whenever possible.

         Pull open the System Menu.  Select the menu item for "Show
       Internal" so that it does not have a check.  Make sure that "Show
       External" still does.

         (Note:  The other flags are not applicable to this particular
       segment, so ignore them for now.  But, they should have been on
       by default.  Toggling them won't alter the currently displayed
       list, because those items don't exist in this particular list of
       relocations)

         At this point, you should be seeing a list that only has
       imported DLL functions in it.  Take a look at the routines being
       called.  This is apparently the main event loop of the MDI
       program.


         Now, move the cursor in the dialog box's list and highlight the
       DEFHOOKPROC reference.

_______________________________________________________________________________
STEP 8.  Double-click the left mouse button over DEFHOOKPROC in the
         SEGMENT 1 report.


         Click the mouse to display the fixup target data in the
       segment.  Note that the first two bytes shown are FF FF,
       indicating that this record does not chain.  Close the dialog.


         DblClick the RIGHT mouse button on the DEFHOOKPROC record in
       SEGMENT 1.  This is a hex dump of the relocation table entry for
       this record.  Close the dump dialog.


         Close the relocation information for segment 1, and take a look
       at each of the code segments.  You will be able to get a feel for
       what each of the segments is supposed to do, and within a couple
       of minutes, I speculated the following:


        SEG1: Main event loop
        SEG2: MDI Child maintenance and support code
        SEG3: App instance initialization stuff
        SEG4: Window position and icon bitmap for GRP files
        SEG5: Program Launch
        SEG6: Properties command, RUN command, Copy grp, etc
        SEG7: GRP file loading and BITMAP building for display into an MDI
              child window
        SEG8: -- no relocations --

_______________________________________________________________________________
STEP 9: Data Segment Dump

         Position the highlight on the DATA segment, dblclick with the
       right mouse button to see the data segment, compiler copyrights,
       etc. There are various display options available on the system
       menu for the dump dialog box.

_______________________________________________________________________________
STEP 10: Press the [Resident Names] button.

         There are none, so the list is empty (and the button should
       probably have been disabled... Version 2! <g>)


_______________________________________________________________________________
STEP 11: Press [NonResident Names] button.

         The non-resident names are displayed.  Double-click on one.
       (See, if I had a disassembler, wouldn't that be a nice place to
       call it and have it hand be back the routine in asm?  I will
       probably do something with xref or with line numbers here in the
       future, if nothing else better is suggested as a new idea.


_______________________________________________________________________________
STEP 12:  Press [Size Analysis].

         Matt Pietrek's EXESIZE program has been incorporated, and
       slightly modified by splitting one of his values into 2,
       depending on the EXE's header support for REAL MODE 3.0.  (If the
       exe DOES allow real mode, I don't report the real-mode exports as
       unneeded, but I do present the value he calculated and state that
       it's space consumed just for supporting 3.0 REAL MODE.)

         In addition to Matt's information, the Size Analysis report
       also includes a calculation of the duplicate and unnecessary
       relocation records.  If no duplicates are found, it reports that
       the relocation chains are optimized and the bytes already saved
       by the chaining.

_______________________________________________________________________________
STEP 13:  Click on [Resources].

         DblClick on one of the group icon entries.  Use the TAB key to
       move back and forth through the list of group icons.  (Notice
       names are given whenever possible)


_______________________________________________________________________________
STEP 14  Scroll down the resources until you get to the MENU.

         DblClick on the menu.  Before anything else, size the new popup
       window to about twice it's original height, so that you will be
       able to see the bottom of the window in a moment (when we show
       the menu).


     - Pull down the menu, and notice the command information change as
       you move through the menu. (You may need to resize the window if
       the menus are large)

     - Close the menu and pull down the SYSTEM menu.  Select the
       FLATTEN MENU option.  Notice that the menu bar changes.  Open the
       new menu item.  ALL of the menus are displayed at once, letting
       you get an idea of the available commands in the entire program
       all together.


         Close the menu, close the popup box.  (The ESC key will close
       any popup)

_______________________________________________________________________________
STEP 15:  Move down to the ACCELERATOR entry

         Dblclick on it to display the accelerator table.  Observe the
       rightmost column of text.  (Not shabby!!!  It works in almost
       every program.  Most of the cases that do not can be seen in
       NEWVIEW's own resources, previously used as debugging tests)

       Close the window.

       (NOTE:  By dblclicking the RIGHT mouse button on any entry in
       the resource list, you'll get a HEX dump of that resource.)

_______________________________________________________________________________
STEP 16:  Move down to the GROUP ICONS entry.

         Dblclick on the GOUP ICONS title line (not the individual
       entries, they just show text).  Mark Gamber's sample for
       horizontal owner-drawn listboxes is incorporated (with his
       permission, of course). It' been slightly modified/enhanced to
       support multiple rows of icons (with a trivial change to his
       code).

         I added a bit more code that is designed to size the box
       according to the number of icons to be displayed without allowing
       a row to be partially clipped.  That code works pretty well, but
       still needs polish.  (I didn't want you to think that part was
       Mark's because it's not quite as perfect as Mark's code always
       is!!  You'll probably never even notice, but I wanted to use this
       as an oppertunity to thank Mark for his samples)


_______________________________________________________________________________
STEP 17:  Click on the [IMPORTS] button.

         Dblclick the left mouse on one of the entries.  Not shabby,
       either, eh?  The data really looks different this way.  Click on
       SHELL and observe the ShellAbout reference is easily found in
       SEGMENT 5.


_______________________________________________________________________________
STEP 17:  WHILE HOLDING THE SHIFT-CTL keys down, dblckick on KERNEL.

         Kernel has just been loaded and PROGMAN is now stored in the
       RECENT files list.

_______________________________________________________________________________


         You may also want to check out items in the REPORT menu, once
       you have a file loaded.  And, there's also a lot of power in the
       tool menu.  Please be aware that the items on the tool menu are
       not totally complete, but they should at least do something
       useful most of the time!


_______________________________________________________________________________

    GOOD LUCK, and don't forget to REGISTER - SWREG #4146


    Thanks!!

    Frank E. Haggar
    21118 Madria Circle
    Boca Raton, Fla  33433

    CIS: (75672,1206)

