Source code examples

You can build these example projects by running the script filein the directory containing the sample code.

DLL

Programs to demonstrate how to createDLL's and how to use a DLL developed in Ada. This example only demonstrates the "automatic"DLL support built into the development environment.

Directory: examples\generics

Windows

GenericProgram.ADA. The program demonstratesthe basic structure and operation of a Windows API program.

Directory: examples\windows

MISC

Diff program. A program to list thedifferences between two text files.

Search program. A program that willsearch multiple files for a given text string.

Whereis program. A program to searcha given path for a file of a given name.

Replace program. A program to updateexisting file(s) in one directory to another directory.

DeleteOurself program. A program whichdemonstrates how a program can delete it's exe file from disk after terminating.Only works on Win32.

TabToSpace program. A program whichconverts tab characters in a text file and converts them to space characters.

SwitchName program. A program to switcha source file name from long file names <-> short truncated file names andback.

RwLock2 module. Uses the Sbs.Threadsmodule to implement an alternate implementation of a multiple reader, single writersynchronization object.

Directory: examples\misc

WinShell

This suite of programs and librarypackages provides an encapsulation of the Win32 API and also provides some higherlevel interfaces for GUI programming. The definition modules of these library modulesare completely independent of the Win32 API and therefore are portable to other platforms.Only a Win32 implementation currently exists. This Win32API encapsulation is nota full encapsulation. Only those features that are needed have been written. Newencapsulation features are added as needed. The GDI has not been encapsulated atall. These packages assume you understand the basics of an event driven, call back(windowprocedure) program structure.

These modules are the exact modulesthat we use to develop the environment and debugger user interfaces.

WinShell - this is the base Win32 APIencapsulation. It encapsulates the WINUSER API.

WinShell.TextWindows - this moduleis built on top of WinShell and provides a very high level interface for windowsthat will display text.

WinShell.Dialogs - this module providesan interface for dialog boxes. It has capabilities for modal, modeless and tabbed(propertysheets) dialogs. It can also simulate a dialog inside an ordinary WinShell window.

WinShell.Dialogs.Basic - common dialogs,ready to go.

GenericApp - demonstrates the basicusage of WinShell by an application. A real application essentially grows from thispoint.

Directory: examples\winshell