Copyright: ®1996 NuMega Technologies, Inc.


Contents
NuMega FailSafe Professional Edition Help Contents

Please choose the component you would like help on from the list below.

•	Windows API Monitor, APIMON

•	The Code Librarian, CODELIB

•	Resource watcher, RWATCH

•	System Spy, SYSSPY

•	Symbol table and global name space analyzer, VBSPACE

•	Windows ActiveX/OCX/VBX/DLL/EXE load monitor, WINMON

•	Program Dependency Checker, EXECHECK

•	GPF Monitor, GPFMON

•	Version Spy, VERSPY

Please choose the control you would like help on from the list below.

•	DBGMON16.OCX, the 16-bit Visual Basic 4.0 debugging monitor control

•	DBGMON32.OCX, the 32-bit Visual Basic 4.0 debugging monitor control

•	APIMONTR.VBX, the Visual Basic 3.0 API monitor control

•	WINMONTR.VBX, the Visual Basic 3.0 process load monitor control

•	GPFMONTR.VBX, the Visual Basic 3.0 general protection fault monitor control

Note

Some of these components operate using a 16-bit architecture, and will not work with some or all 32-bit applications or 32-bit operating systems like Windows NT or Windows 95. Conversely, 32-bit components will not work with 16-bit Windows. Those components with exceptions or special system requirements are documented in the notes for each utility.


VBSPACE.EXE

Description

VBSPACE will scan a project and show statistics about the project. A common big problem for large Visual Basic applications is the symbol table, VBSPACE shows a meter indicating global symbol space used/left and total string space used/left. This is very handy for detecting hard to identify program faults.

VBSPACE graphs shows three colors: green, yellow and red.

•	Green means less than 50% of total in use.

•	Yellow means more than 50% and less than 75% of total in use.

•	Red means more than 75% of total in use.

 If your program is in the red area, consider breaking it down into OLE server components.

Usage

If your app unexpectedly crashes, and its a big project, use VBSPACE to see if you are exhausting the symbol table. Open project file, it will be scanned automatically.

Note

VBSPACE supports Visual Basic 3.0, 4.0 - 16-bit and 32-bit as well as long filenames.


RWATCH.EXE
RWATCH16|32.EXE

Description

RWACTH is a program that will display system memory and resources, in real time. Leave it running and then run your application to see if you have any memory or resource leaks. RWATCH16.EXE shows 16-bit resources; RWATCH.EXE shows 32-bit resources.

Usage

Start RWATCHxx.EXE, and leave it minimized. Note the amount of free memory and resources available before you start your application. Run your application, exercising all features. When you end your application, note the RWATCH display of memory and resources. If there are less resources than before you started your application, you might be leaking resources.

Note

Due to changes in the Windows API from Windows 3.x to Windows95 and Windows NT, RWATCH16.EXE may not seem to work properly under 32-bit operating systems. Under 32-bit Windows, resources are not the same as under 16-bit windows. The application memory pool is not all available memory. Memory is allocated as needed. At some points, before requested memory is allocated, you can even see a negative number for memory. This is normal - Welcome to 32-bit Windows!

More information is available using the Windows 95 or Windows NT Performance Monitor system feature. See Windows 95 or Windows NT help for information on this system level monitor.


SYSSPY.EXE
SYSSPY16|32.EXE

Description

SYSSPY shows you windows data about the window with focus. You can see class information, handle and other internal-windows structure data. Nice for snooping or looking for class conflicts. Also handy to determine the hWnd of a window. Use SPSSPY16.EXE for 16-bit applications running under Windows 3.1, 3.11, 95 and NT 3.51; use SYSSPY32.EXE for 32-bit applications running under Windows 95 and NT 3.51.

Usage

Start SYSSPYxx, as windows get focus you will see information about that window in SYSSPYs window. Move the mouse over items to see information about the item the mouse is currently over as well.


CODELIB.EXE

Description

CODELIB will scan a directory for all .Bas, .Cls or .Frm modules and present a list of all routines they contain. By double-clicking on the routine name, you can view the routine itself. You can copy the entire routine to the clipboard and paste it into your Visual Basic program. Use it to find pesky lost routines in other projects without having to use Visual Basic.

Usage

Start CODELIB, choose which type of files you want to view (.Bas, .Cls or .Frm) by choosing the appropriately tagged option button. Then choose drive and directory from the drive and directory navigation controls. Finally, choose `File...Scan' from the menu. A list of all files in the directory selected is shown, along with an indented listing of all procedures in each file.

To view the contents of a procedure, double click on the procedure name in the list. To return to the list of procedure names after viewing routine contents, choose the `Routines' button. To copy the contents of a procedure to the clipboard choose the `Copy' button.

Note

VBSPACE supports Visual Basic 3.0, 4.0 - 16-bit and 32-bit as well as long filenames.


WINMON.EXE
WINMON16|32.EXE

Description

WINMONxx shows you OCX/VBX/DLL and EXE files as they load. Use WINMON to see the exact sequence OCXs/VBXs/DLLs are loaded by an application. This is handy to identify projects that wont load into Visual Basic or applications that crash on running. Note that the path shown is the actual path of the OCXs/VBXs/DLLs file. You can find many problems this way, like wrong paths of files, incorrect version numbers, etc. WINMON16.EXE shows 16-bit loads/unloads; WINMON32.EXE shows 32-bit loads/unloads.

You can copy the display to the clipboard using the Edit...Copy menu dialog (Ctrl+C shortcut).

Usage

To use start WINMON, then choose the Visual Basic program you want to monitor. OCXs/VBXs/DLLs name and path are shown in the WINMON windows as KERNEL.EXE (Windows) loads them.

Display

Shown in the display are sequence number, incident time, qualified file name, version, file date/time and size.

Note

WINMON16.EXE does not support 32-bit Windows programs, but it does support 16-bit programs running under 32-bit operating systems. WINMON16.EXE can spawn 32-bit programs; however it cannot monitor 32-bit file loads.

Warning

Do not try to execute another copy of WINMON16.EXE or WINMON32.EXE as the program to monitor. It will lock-up your system.


APIMON.EXE

Description

APIMON shows you Windows API parameter-validation errors from 16-bit programs. These are errors that Windows finds with API calls. For example, bad handles to bitmaps or invalid hDC references. If you do not use Windows API calls, then you can safely ignore APIMON. Otherwise, it is a good idea to test your application for API errors.

Usage

To use start APIMON, choose the task to monitor from the Choose Task menu. The default is to monitor on all tasks. Choose the Start menu or press F5 to enable monitoring. Run the application or step trace the application using Visual Basic. If any API call returns an error, it will be shown in the window.

Display

Shown in the display are sequence number, incident time, windows error code, text description, task number and task name (qualified path name is possible).

Notes

APIMON is for 16-bit applications. It supports Win3.x, Win95 and Windows NT. Note that Windows NT does not always report invalid calls the way Windows95 and Windows 3.x does! APIMON does not work with 32-bit applications (Microsoft changed how KERNEL.EXE works for Win32, not our fault!).


Technical Support

This section provides instructions on support services available from NuMega Technologies, Inc.

In order to save your time and provide you with the best possible support, we would like you to do a few things before you contact us. These simple steps will get you the fastest answer to your questions.

•	Have you read the manual? Did you look under the table of contents and the index? Did you re-check the manual?

•	Have you used the search feature of the help system?

•	Have your serial number ready. It was on the registration card stuck on the inside cover of the manual.

•	Have your version number ready. Use the Help...About dialog to see the version number.

 By Phone

Technical support is available from 9:00am to 5:00pm, Monday through Friday, EST. The technical support phone number is 603-889-2386. Have version number, customer number and product serial number ready.

 By Fax

You can fax your questions to 603-889-1135 24 hours a day. Don't forget to include version and registration numbers. Provide as much detail as possible in your fax.

 By E-Mail We also provide tech support via electronic mail. Send e-mail to internet info@numega.com. Don't forget to include version and registration numbers. Include any code examples as a file attachment to the email. You can also visit our web site at http://www.numega.com.


EXECHECK.EXE

Description

EXECHECK scans a program to show the explicit connections to other support files it contains. You can see VBX, OCX, DLL, DRV, EXE, FON and HLP files that are statically linked into a program.

Usage

Start EXECHECK, choose an executable program to scan. Dependencies will be shown in the list. You can copy the dependency list to the clipboard using Edit…Copy (Ctrl+C hotkey) dialog.

Display

Shown in the display statically linked program names in each file. You can choose to automatically show all dependencies by choosing the Edit…Preferences dialog and selecting the `Auto re-curse all files' option.

Notes

EXECHECK supports Win3.x, Win95 and Windows NT and long filenames.


Print
Print Dialog

This dialog lets you print. Also see the Print Setup dialog.You can choose:

•	Setup to set the page orientation (landscape or portrait) and choose the printer to use.

•	Cancel to exit without saving any changes to the print setup.

•	Module View to print the module view of the currently selected module.

•	Global View to print the global view of all modules.

•	All Modules to print the module view of each module listed.


Print Setup
Print Setup Dialog

This dialog lets you set or view printing options, and choose a printer to use.

You can choose:

•	OK to accept the printer as defined.

•	Cancel to exit without saving any changes to the print setup.

•	Font to set the font to use when printing.


GPFMON
GPFMON16|32.EXE

Description

GPFMON is a program that traps and displays unhandled Windows General Protection Faults (GPFs). GPFMON16.EXE shows 16-bit GPFs; GPFMON32.EXE shows 32-bit GPFs. GPFMONxx intercepts GPFs and eliminates the default Windows handling of GPFs.

Usage

Start GPFMONxx.EXE, any unhandled GPFs will get trapped and show up in the window.


Choose Print
Choose What To Print

Before you can print something, you need to choose what to print from the "Print What" section of the print dialog.

Choose Print

11085


verspy
VERSPY.EXE

Description

VERSPY shows file version number information about any 16-bit or 32-bit exe, ocx, vbx, dll, drv, fon or any other file with Windows version number information in it. Also shown is file date, time and size.

Usage

Start VERSPY, navigate to a file, information is shown in the window.


APIMONTR.VBX

The APIMONTR.VBX custom control provides a message whenever a Windows API call fails. The APIMONTR.VBX has one event, ApiFailure, and one argument, nCode. The ApiFailure event occurs whenever KERNEL.EXE (aka Windows) has a Windows API failure. The nCode paramater is set to the error code of the failure. See DEMOPRO.MAK for an example of the values returned; and how to use them in a program. You can interface this control into the trace message stream by using the fsFireEvent method contained in FAILSAFE.BAS. This is also demonstrated in DEMOPRO.MAK.


GPFMONTR.VBX

The GPFMONTR.VBX custom control provides a message whenever a Windows application terminates unexpectedly. This control has one event, Notify, and three arguments: Fault As Integer, faultmodule As String, ExePath As String. This event occurs whenever a 16-bit Windows program "crashes" The Fault paramater is set to the error code of the failure. FaultModule is set the modulename (internal name of the DLL, OCX, VBX or EXE) reporting the fault; ExePath is set to the name of the executable program which generated the fault. See DEMOPRO.MAK for an example of the values returned; and how to use them in a program. You can interface this control into the trace message stream by using the fsFireEvent method contained in FAILSAFE.BAS. This is also demonstrated in DEMOPRO.MAK.


WINMONTR.VBX

The WINMONTR.VBX custom control provides a message whenever a Windows or an application application loads or unloads a module. A module is an executable program like a DLL, OCX or VBX. This control has one event, LoadModule, and two arguments: dwID As Integer, hModule As Integer. This event occurs whenever Windows loads a 16-bit executable program. The dwID paramater is set to a code indicating what event has happened (NFY_STARTDLL) ; hModule is the handle to the module just loaded. See DEMOPRO.MAK for an example of the values returned; and how to use them in a program. You can interface this control into the trace message stream by using the fsFireEvent method contained in FAILSAFE.BAS. This is also demonstrated in DEMOPRO.MAK.DBGMON16|32.OCX


DBGMON16|32.OCX

The DBGMON16|32.OCX custom control provides a messages when certain events happen. For 16-bit Windows:

•	API failure

•	Module Load

•	Module Unload

•	Process Start

•	Process Stop

•	GPF

For 32-bit Windows

•	Thread Start

•	Thread Stop

•	GPF

NOTE

When using the 32bit version of DBGMON (DBGMON32.OCX) there are restrictions imposed by the 32 bit operating system. You cannot simply run the monitor (WINMON32.EXE) and see events like you can with WINMON16.EXE. You must tell the OCX which application to monitor as follows:

        #If Win32 Then

            DbgMon1.ExePath = file$   'set exe name to watch, also watches all children of this exe

            DbgMon1.Go	'tell OCX to monitor

        #Else

            r = Shell(file$)	'the 16 bit version can spy on all Windows

        #End If

Events

APIFailure(ByVal ErrorCode As Integer, ByVal hTask As Integer, ByVal strName As String)

This event occurs when a Windows API call fails. ErrorCode is the failure code; hTask is the task handle of the application reporting the error; and strName is the executable program name of the application failing.

ModuleLoad(ByVal hTask As Integer, ByVal hModule As Integer, ByVal strName As String)

This event occurs when Windows loads a module. hTask is the task handle of the owner application; hModule is the module handle of the module loading; and strName is the executable program name of the application.

ModuleUnload(ByVal hTask As Integer, ByVal hModule As Integer, ByVal strName As String)

This event occurs when Windows unloads a module. hTask is the task handle of the owner application; hModule is the module handle of the module unloading; and strName is the executable program name of the application.

 ProcessEnd(ByVal hTask As Integer, ByVal strName As String)

This event occurs when a program terminates. hTask is the task handle of the owner application and strName is the executable program name of the application.

ProcessStart(ByVal hTask As Integer, ByVal strName As String)

This event occurs when a program starts. hTask is the task handle of the owner application and strName is the executable program name of the application.

UnhandledException(ByVal hTask As Integer, ByVal strName As String)

This event occurs when a crashes (GPF or UAE). hTask is the task handle of the owner application and strName is the executable program name of the application.

ThreadEnd(ByVal dwThreadID As Long, ByVal strName As String) 32-BIT ONLY!

This event occurs when a tread terminates. dwThreadID is the thread handle handle of the owner application and strName is the executable program name of the application.

ThreadStart(ByVal dwThreadID As Long, ByVal strName As String) 32-BIT ONLY!

This event occurs when a tread starts. dwThreadID is the thread handle handle of the owner application and strName is the executable program name of the application.

UnhandledException(ByVal dwProcessID As Long, ByVal dwExceptionCode As Long, ByVal strName As String) 32-BIT ONLY!

This event occurs when a crashes (GPF or UAE). hTask is the task handle of the owner application and strName is the executable program name of the application.

Note

You can interface this control into the trace message stream by using the fsFireEvent method contained in FAILSAFE.BAS. This is also demonstrated in DEMOPRO.VBP.

DBGMON.OCX

11089