Windows NT Systems Programming: Spring 2000
[ Home | Syllabus | Course Notes | Assignments | Search]
Introduction
Systems Programming in WindowsNT/9X (Win32)
- WIN 32 API
- Process/Thread Management
- File I/O
- Network Communications
- Graphical User Interface Programming (GUI)
- Object Oriented Design/Implementation (OOD) through MFC
- Document/View Architecture
- Distributed Component Object Model (DCOM)
- Windows Scripting Host
- JScript
- VBScript
- XML
- Sys Admin
From the programming point of view (ours in
this course) Windows 9x == Windows NT Lite
What this Course is NOT!
- Not NT administration (see Ajay Gupta)
- Not C++ or Object Oriented Programming course (see Dr. Zeil)
(although it will be used exclusively)
- Not Visual C++ tutorial (see Bill Gates)
(although I will use this compiler)
- Not Java (see Dr. Zubair or Dr. Wahab)
- Not Networking (see Dr. Wahab)
- Not Operating Systems (see Dr. Wild and others)
- Not Consistent in Usage/Design/Whatever
(I will show competing solutions)
- Not Complete
(We don't have the time to cover everything)
- Not Correct
(who doesn't make mistakes)
- Not necessarily the best "Bill-Gates" Approved way
(I'm still learning too).
Comparison Unix and Windows NT/9x
Text
Function |
UNIX |
Windows NT/9x |
Basic OS Stuff (files/processes) |
Section 2 of Unix Programming Guides (UNIX Systems Calls) |
WIN32 |
Network Primitives |
UDP TCP/IP Sockets |
UDP TCP/IP Sockets
Named Pipes, Mailslots |
GUI primitives |
none (use X windows) |
WIN32/MFC |
Network Object Architecture |
none (use CORBA) |
DCOM (activeX) |
Scripting |
Shell/Perl |
WSH |
Teaching Project
NOMS (Network Object-Message
Server)
Network: Because the world
is becoming increasingly networked
Object: object-oriented
implementation
Message: messages can be
anything
Server: well - client server
is OK
This project is to implement a message handling system with the
following operations.
- Open message folder
- Add a message to folder
- Show a message in the folder
- Edit a message
- Delete a message
- Close the message folder
Dimensions of Complexity
User Interface:
- Command line text oriented
- Simple GUI
- More and more sophisticated GUIs
Messages:
- Character strings
- Document/View solution
- Multimedia Objects
Network:
- No network
- Single Connection
- Multiple connection servers
- DCOM (ACTIVE-X)
NOMS Versions
Version Number |
Properties |
Teaching Objectives |
Version 0 |
- No objects
- No network
- No editing
- One file solution
- Command line interface
|
|
Version 1 |
- Message/folder objects
- Object persistence
- Multiple file solution
|
- OO design/programming
- Self-archiving objects
|
Version 2 |
- Single Client/Server solution
|
|
Version 3 |
|
- Threads
- Synchronization
- File Locking
|
Version 4 |
|
- MFC programming
- edit objects
|
Version 5* |
|
- Explain the usual set of
GUI design primitives
|
Version 6 |
|
- Document/View Architecture
|
Version 7
(time permitting) |
|
|
Version 8
|
- Distributed COM solution
aka Active-X
|
|
NOTE: In this course, the NOMS project will not central to the lectures but is
available mostly as a set of study examples to reinforce the concepts covered.
Student Projects
I want you to help me and the class explore Windows NT/9x
environment.
A Brief History of Windows NT.
- UNIX
- CPM
- DOS
- XEROX PARC
- Lisa (MAC)
- Windows
- VMS
- NT
- Windows 9x
Windows NT Architecture
User Mode
- Systems processes: logon, session manager
- Server Processes: Event Log, Schedule, SQL server, Exchange Server
- Environment subsytems: Win32, POSIX, OS/2
- User Applications: Win32, Windows 3.1,
MS-DOS, POSIX, OS/2
- DLLs (Dynamic Link Libraries): translate documented function calls to
Windows NT system service calls (perhaps through the environment subsystem)
Kernel Mode
- Executive: base services like memory, process, thread management,
security. I/O. communications
- Windowing and Graphics: Win32 User and GDI functions
- HAL: Allows Windows NT to run on different hardware platforms
SMP = Symmetric MultiProcessing. NT can run on a single workstation
with multi-processors, any thread any processor, shared memory and fine grained
synchonization.
Operating Systems Essentials
- Memory Management
- File System
- Resource Creation and Management
- Multitasking
- Communications
- Synchronization
- Security
Some Programming Conventions
- const modifiers
int max(const int x, const int y);
bool compare(const char* x, const char* y);
int topOfStack() const;
- assert
assert(head != NULL);
- value returning functions
not
void max(int &answer, const int x, const int y);
- Boolean type
- bool/BOOL/boolean/BOOLEAN
- exceptions
- functions returns bool for error
- function returns 0 or NULL (special value) and
test "GetLastError"
- throw/catch for handling exceptions
- ALL CAPS for constants
const int MESSAGE_SIZE = 100;
- Capitalize Classes (use initialize "C"
for class)
class CMessage
- Ordinary variables start with lower case but use
Caps for word starts
CMessage firstMsg;
Copyright chris wild 1999/2000.
For problems or questions regarding this web contact [Dr.
Wild].
Last updated: January 10, 2000.