













My-T-Soft Technical Support
My-T-Soft Startup / WinMain
The following details are documented here to assist programmers / integrators that may run into problems during startup. These details were asked for by a customer doing some custom integration work. For almost all users, these details are not of interest, but we have included them here for reference.
- Opening Check - should MTSOPEN.EXE be run (see OpenFirst settings in INI)
- Verify MYTLIB.DLL (Existence, LoadLibrary)
- Register Window Class (RegisterClassEx)
- Create Window(s) (CreateWindowEx)
- Verify System Timer Available
- Initialize variables, global memory, files, etc.
- Interface Libraries (LoadLibrary)
- INI File (See help / manual for details)
- * Keyboard Config File (Note 1)
- * Show / Update Window (splash, (Note 2) - Response to WM_PAINT message)
- Journal Record Hook
- * Message Loop (Note 3)
- Note 1: If you rename or remove KEYBOARD.KBF an error will occur. This can be tested to verify that the startup code is getting to this point. The return is False from WinMain as this is a critical error, so the process will be stopped.
- Note 2: The NoSplash setting in INI or command line -NoSplash can be used for removing splash - this is an added sequence prior to normal painting, and system Yield() calls are used for delays - no splash should definitely be tried if it has not already been tried.
- Note 3: Setting ClassWatch & WindowWatch in INI file will identify if message loop is reached, and that the process is acting normally (outside of window display). You may wish to try this setting separately to see results (top lines on screen display debug info).
My-T-Soft Debug Build
In the Debug Build, during startup, there is a direct to display Reached Code Marker ID code indication. As the code progress and reaches key points in the startup sequence, a code marker (e.g. 1003) is reached, and using a direct to display debugging feature, the code marker is directly displayed on the left side of the system display. If there is an error or other problem starting, the last code marker display will help indicate where the code stopped, and what it was doing.
- Code Notes
- 1001 In WinMain code, no system calls made yet
- 1002 After check for Window already existing (Previous Instance)
- 1003 After Class Registered with system (Register Class) Pre Window Creation
- 1004 After Window created
- 1005 Free System Timer verified, internal variables initialized
- 1006 DLL's attached
- 1007 Macro file verified / loaded, Read from INI
- 1008 If Win Logon, IMGSERV.EXE launched (95/98/Me) - post launch (Code after OpenFirst=1 drop-out)
- 1009 Several system calls completed
- 1010 After Keyboard Layout read in / prepare for paint
- 1011 System Timer set - last spot before paint
- 1012 After paint, pre System hooks (95/98/M3/NT)
- 1013 After System hooks set (95/98/M3/NT)
- 1014 Final call to DLL's, last spot before message loop