Windows NT Systems
Programming
[ Home
| Syllabus |Course Notes]
Lecture 1
Systems Programming in WindowsNT/95
- Process/Thread Management
- File I/O
- Network Communications
- Graphical User Interface
Programming (GUI)
- Object Oriented
Design/Implementation (OOD)
- Document/View Architecture
- Distributed Component Object
Model (DCOM)
From the
programming point of view (ours in this course) Windows 95 ==
Windows NT Lite
What this Course is NOT!
- Not NT administration (see
Ajay Gupta)
- Not C++ or Object Oriented
Programming course (see Steve Zeil)
(although it will be used exclusively)
- Not Visual C++ tutorial (see
Bill Gates)
(although I will use this compiler)
- 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/95
Text
Function |
UNIX |
Windows NT/95 |
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 |
Network Object Architecture |
none (use CORBA) |
DCOM (activeX) |
Teaching Project
This course will be presented in
the context of an increasingly elaborate "teaching
project" which we will call the
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) - time permitting
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
(time permitting) |
- Distributes COM solution
aka Active-X
|
|
Student Projects
I want you to help me and the class
explore Windows NT environment.
A Brief History of Windows NT.
- UNIX
- CPM
- DOS
- XEROX PARC
- Lisa (MAC)
- Windows
- VMS
- NT
- Windows 95
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;
Lots and Lots of Garbage
LeftOvers from DOS, Win16 and other
upward compatibility junk.
- FAR pointers
- PASCAL calling convention
FAR PASCAL == WINAPI
- LP == LONG POINTER
- Too many ways to do the same
thing
We will try to use the state of current practice
Windows NT Architecture
Copyright chris wild 1997.
For problems or questions regarding this web contact [Dr. Wild].
Last updated: July 29, 1997.