You are previewing UNIX Application Migration Guide.
O'Reilly logo
UNIX Application Migration Guide

Book Description

Learn how to port existing UNIX applications to the Microsoft® Windows® environment with prescriptive guidance, from-the-field insights, and best practices from Microsoft consultants and real-world corporations.

Table of Contents

  1. Microsoft® UNIX Application Migration Guide
    1. SPECIAL OFFER: Upgrade this ebook with O’Reilly
    2. Preface
      1. Introduction
      2. How This Guide Is Organized
      3. Who Should Read This Guide?
        1. Prerequisite Knowledge
      4. Document Conventions
      5. More Information
      6. Feedback and Support
      7. Acknowledgments
    3. 1. Introduction
      1. Why Migrate?
        1. Background
        2. The Changing Situation
      2. Why Move from UNIX?
        1. Reducing Costs
        2. Increasing Flexibility
        3. Improving Performance
      3. What Are the Migration Options?
        1. Moving to Linux
        2. Moving to Windows
        3. Evaluating the Long-Term Risks
          1. Understanding the Linux Revenue Model
          2. Understanding the Microsoft Revenue Model
      4. What Are the Benefits of Windows 2000?
        1. Scalability
        2. Reliability
        3. Security
        4. Manageability
      5. Migration or Coexistence?
        1. Using a Quick Port
        2. Completing a Full Port
        3. Rewriting the Application
        4. Allowing Versions to Coexist
      6. Summary
    4. 2. Windows and UNIX Compared
      1. Introduction
      2. Windows Evolution and Architecture
        1. Windows NT Architecture
      3. UNIX Evolution and Architecture
      4. Comparison of Windows and UNIX Architectures
        1. Kernels and APIs
          1. Objects and Handles
          2. Windows Subsystems
            1. The Win32 Subsystem
            2. The POSIX Subsystem and Interix
        2. Hardware Drivers
        3. Process Management
          1. Multitasking
          2. Multiple Users
          3. Multithreading
          4. Fibers
          5. Process Hierarchy
          6. Signals, Exceptions, and Events
          7. Filters and Pipes
          8. Daemons and Services
          9. Summary of Processes and Threads
        4. Virtual Memory Management
        5. File Systems and Networked File Systems
          1. File Names and Path Names
          2. UNIX File System Features
          3. Networked File Systems
            1. The Network File System
            2. Server Message Block and Common Internet File System
            3. Windows and UNIX Network File System Interoperability
          4. Summary of File System Differences
        6. Security
          1. User Authentication
          2. UNIX Security
            1. Security Permissions
            2. Effective UID and Effective GID
            3. Network Information System
          3. Windows Security
            1. Access Tokens
            2. Security Descriptors
            3. Impersonation
            4. Active Directory
        7. Networking
        8. User Interfaces
          1. The UNIX Character-Based Interface
            1. Termcap and Terminfo
            2. Curses
          2. X Windows and Motif
          3. Windows Terminal Services and Citrix
        9. System Configuration
          1. Startup Scripts and Logon/Logoff Scripts
        10. Interprocess Communication
          1. UNIX Interprocess Communication
          2. Windows Interprocess Communication
          3. Synchronization
          4. Message Queues
          5. Shared Memory
          6. Pipes
        11. DLLs and Shared Libraries
        12. Component-Based Development
          1. Component Object Model
          2. COM+
          3. .NET Components
            1. .NET Services
            2. The .NET Framework
        13. Middleware
          1. OLTP Systems
          2. Queuing Systems
          3. Enterprise Application Integration Systems
        14. Shells and Scripting
          1. Command-Line Shells
          2. Scripting Languages
            1. Windows Scripting Host
            2. Perl
            3. REXX
            4. Python
            5. Tcl/Tk
        15. Development Environments
          1. Standard Windows Development Environment
            1. Platform Software Development Kit
            2. Visual Studio
          2. The Interix Development Environment
            1. Interix Integration with Visual C++
      5. Summary
    5. 3. The Migration Process
      1. Introduction
        1. Purpose of This Chapter
        2. Audience
        3. Scope
        4. Background and Assumptions
      2. Organizational Structure and the Development Life Cycle
      3. Overview of the Migration Process
      4. Assessment and Analysis
        1. Gathering Application Information
        2. Evaluating Business and Technical Objectives
          1. Business Objectives
          2. Technical Objectives
          3. Migration Objectives
        3. Evaluating the Application
        4. Defining the Migration Strategy
          1. Quick-Port Strategy
          2. Full Port Strategy
          3. Rewrite Strategy
          4. Coexistence
          5. Strategy Combinations
      5. Planning the Migration
        1. Starting the Migration Project
        2. Developing a Catalog of Issues
        3. Producing a Project Plan
      6. Creating the Development Environment
        1. Installing the Development Environment
        2. Populating the Development Environment
        3. Configuring the Development Environment
      7. Migrating the Application
        1. The Target Environment
        2. Completing the Pre-Migration Changes
        3. Specifying the Coding Strategies
        4. Converting the Code
        5. Migrating the Scripts
      8. Testing and Quality Assurance
        1. Writing a Test Plan
        2. Writing the Tests
        3. Running the Tests
      9. Creating the Live Environment
        1. Hardware and Software Infrastructure
        2. Interoperation
          1. Windows and UNIX Interoperation
        3. Deploying the Migrated Application
        4. Support and Maintenance
        5. User Training
      10. Summary
    6. 4. Assessment and Analysis
      1. Introduction
        1. Planning
        2. Assumptions
      2. Gathering Data
        1. Application Context
          1. UNIX Platform Support
          2. UNIX Standards and Interix
          3. Infrastructure Dependencies
          4. Third-Party Libraries
          5. Interoperability with Other Applications
        2. Application Structure
          1. Application Types
          2. User Interfaces
            1. Character-Based Interfaces
            2. Graphical Interfaces
            3. Browser-Based Interfaces
          3. Application Code
          4. Low-Level Services
          5. Installation, Configuration, and Execution Scripts
        3. Development Environment
          1. Modeling Tools
          2. Build Tools
          3. Compilers
          4. Integrated Development Environments
          5. Testing, Debugging, and Code Optimization Tools
            1. Test Process
            2. Tools and/or Scripts
            3. Debuggers
          6. Packaging and Archiving Tools
          7. Source Code Management Tools
        4. Application Usage
          1. User-Facing Functionality
          2. Administrator Functionality and Operational Management
          3. Service Level Definitions
      3. Evaluating Migration Objectives
        1. Business Objectives
        2. Technical Objectives
        3. Migration Objectives
      4. Evaluating the Application
        1. User Interface
          1. X Windows/Motif
          2. OpenGL
          3. Character-Mode Interfaces
        2. File and Device I/O
        3. Interprocess Communication
          1. Process Pipes
          2. Named Pipes
          3. System V IPC
            1. Message Queues
            2. Shared Memory
            3. Semaphores
          4. Sockets
          5. Streams
          6. Stream Pipes and Named Stream Pipes
        4. Processes and Threads
          1. Process Management
        5. File and Process Security
        6. Signals
      5. Defining the Migration Strategy
        1. Application Classification
          1. ANSI-Based
          2. ANSI with Cross-Platform Libraries
          3. "Portable" UNIX
          4. "Native" UNIX
        2. Migration Approaches by Application Type
          1. Workstation Applications
          2. Mid-Tier Applications
          3. Database Applications
          4. Web Applications
        3. Migration Considerations
          1. General Considerations
          2. Quick Code Port to Interix
          3. Rewriting the Application
          4. Full Port
          5. Coexistence
          6. Strategy Combinations
        4. Scripts Migration Approach
          1. Rewriting Scripts
          2. Using ActiveState Perl (Win32) or Perl v5.6 (Interix)
          3. Porting Scripts Using Windows Services for UNIX/Interix
        5. Cost-Benefit Analysis
        6. Choosing the Migration Strategy
    7. 5. Planning the Migration
      1. Introduction
      2. Starting the Migration Project
        1. Choosing a Project
        2. Confirming the Scope
        3. Setting Expectations and Deliverables
      3. Cataloging and Managing Risks
        1. Identifying Risk
          1. Business Risks
          2. Technical Risks
          3. Application Risks
          4. Infrastructure Issues
        2. Risk Analysis and Mitigation
        3. Managing the Risks
      4. Creating a Project Plan
        1. Development Plan
        2. Test Plan
        3. Training Plan
        4. Deployment Plan
        5. Support Plan
        6. Migration Schedule
      5. Planning the Project Resources
        1. Sizing the Effort
        2. Picking the Team
        3. Subject Matter Experts
        4. Training the Team
      6. Planning Execution
        1. Milestones and Checkpoints
        2. Frequent Delivery
        3. Project Metrics
        4. Closing Down the Migration Project
    8. 6. UNIX and Windows Interoperability
      1. Introduction
      2. Windows to UNIX Connectivity
        1. Terminal Emulation and Command-Line Connectivity
          1. Windows Telnet Client
          2. Windows Telnet Server
          3. Remote Shell (rsh), Remote Copy (rcp), and Remote Execute (rexec)
          4. Secure Shell (ssh)
        2. Windows
          1. X Windows
          2. Remote Desktops
      3. User Authentication and Authorization
        1. Authentication and Authorization in UNIX
        2. Authentication and Authorization in Windows
        3. Integrating UNIX and Windows Security
          1. User Account Management and Synchronization
            1. Windows Services for UNIX Server for NIS
            2. Windows Services for UNIX Password Synchronization
            3. Samba
      4. Resource and Data Sharing
        1. UNIX Data Sharing Environment
        2. Windows Data Sharing Environment
        3. Network File System Interoperability
        4. Samba for Data Sharing
          1. Samba as a File Server
          2. Samba as an NFS to CIFS Gateway
          3. Samba User and Password Integration
        5. NFS for Data Sharing
          1. Windows Services for UNIX
            1. Authentication and Permissions
            2. Windows Services for UNIX Gateway for NFS
          2. Hummingbird NFS
          3. WRQ Reflection
      5. Choosing Interoperability Solutions
        1. Interoperability Solutions for Windows Environments
        2. Interoperability Solutions for Interix Environments
        3. Cross-Platform Support
      6. Further Reading
    9. 7. Creating the Development Environment
      1. Introduction
      2. Development Environment Overview
        1. Windows Platform SDK
          1. Application Build Tools
          2. Debugging Tools
          3. Performance Monitoring and Tuning Tools
        2. Integrated Development Environments
          1. Compiling and Linking
            1. Debugging
            2. Performance Tuning
          2. Third-Party Extensions to Visual Studio
        3. Source Code Management Tools
          1. Packaging Tools
        4. Cross-Platform Packages and Libraries
          1. Interix
          2. Interix APIs
            1. Interix Networking and Security
          3. Rogue Wave SourcePro
            1. SourcePro Core
            2. SourcePro Networking, Web, and Security
            3. SourcePro Database Support
          4. Cross-Platform GUI Tools
            1. INT Carnac
            2. Trolltech Qt
          5. UNIX Emulation Systems
      3. Configuring the Development Environment
        1. Configuring Interix
        2. Configuring Microsoft Visual Studio
          1. Creating a Project in Visual Studio
      4. Populating the Development Environment
        1. General Considerations
        2. Exporting Files from the UNIX Environment
        3. Populating an Interix Environment
        4. Populating a Windows Environment
        5. Migrating Source Under Source Control
        6. Migrating a Build Environment to the Windows SDK
        7. Migrating a Build Environment to Visual Studio
          1. Recreating the Build Structure
          2. Converting an Application Build from a Makefile-Based to a Visual Studio-Based Project
          3. Using Batch Builds with Visual Studio
          4. Creating a Custom Tool
          5. Managing Cross-Platform Builds
      5. Using the Development Environment
        1. Using the Platform SDK
        2. Using Visual Studio
          1. Debugging with Visual Studio
          2. Automation with Macros
        3. Using Interix
          1. Differences Between Interix and UNIX
          2. Building Applications with Interix
          3. Running Applications with Interix
          4. Debugging with Interix
      6. Building and Debugging with Interix
      7. Building and Debugging with Visual Studio
        1. Variables Window
        2. Registers Window
        3. Call Stack Window
      8. Automation Script for Visual Studio
        1. Project Automation Script
        2. VBScript Using Visual Studio COM Automation
    10. 8. Preparing for Migration
      1. Introduction
      2. Preparing the Code for Migration
        1. Defining the Target Environment
        2. Analyzing the Application to be Migrated
          1. ANSI C/C++ and Fortran Applications
          2. ANSI C/C++ with Cross-Platform Library Applications
          3. Native UNIX Applications Ported to Interix
          4. Native UNIX Applications Rewritten to Win32
        3. Making the Source POSIX-Compliant
          1. Strictly Conforming POSIX.1 Applications
          2. System Information
          3. Advisory File Locking
          4. Current Working Directory
          5. Error Messages
          6. The gets Function
          7. Terminal I/O
          8. Signals
          9. Time
          10. Processes and Threads
        4. Introducing and Rationalizing Abstraction Layers
        5. Using Compile-Time Macros
      3. Migrating Scripts
        1. Evaluating the Script Migration Tasks
        2. Planning for Fundamental Platform Differences
          1. File System Interaction
          2. Environment Variables
          3. Shell and Console
          4. Process and Thread Execution
          5. Device and Network Programming
          6. User Interfaces
        3. Considering the Target Environments
          1. Porting UNIX Shell Scripts to Interix
          2. CGI Script Migration
    11. 9. Win32 Code Conversion
      1. Introduction
      2. Processes
        1. Creating a New Process
          1. Creating a Process in UNIX Using fork and exec
          2. Creating a Process in Windows Using CreateProcess
          3. Creating a Process in Windows Using Spawn
        2. Replacing a Process Image (exec)
          1. Replacing a Process Image in UNIX Using exec
        3. Waiting for a Spawned Process
        4. Processes vs. Threads
          1. UNIX Code with Forking Executable
        5. Managing Process Resource Limits
          1. Windows Job Objects
          2. Limiting File I/O When Using Windows
        6. Process Accounting
      3. Signals and Signal Handling
        1. Using Native Signals in Windows
          1. Managing Signals in UNIX
          2. Managing Signals in Windows
        2. Replacing UNIX Signals Within Windows
          1. Using the SIGALRM Signal in UNIX
        3. Replacing UNIX Signals with Windows Messages
          1. Replacing SIGALRM Using Windows Messages
        4. Replacing UNIX Signals with Windows Event Objects
          1. Replacing SIGALRM Using Event Objects
        5. Porting the Sigaction Call
      4. Threads
        1. Creating a Thread
          1. Creating a Single Thread in UNIX
          2. Creating a Single Thread in Windows
        2. Canceling a Thread
          1. Canceling a Thread in UNIX
          2. Canceling a Thread in Windows
        3. Thread Synchronization
          1. Multiple Non-Synchronized Threads in UNIX
          2. Multiple Non-Synchronized Threads in Windows
          3. Interlocked Exchange
            1. Thread Synchronization Using Interlocked Exchange in Windows
          4. Synchronization with SpinLocks
          5. Synchronization with Critical Sections
          6. Synchronization Using Semaphores
            1. Terminal Server and Naming Semaphore Objects
            2. UNIX Example: Synchronization Using Semaphores
            3. Win32 Example: Synchronization Using Semaphores
          7. Synchronization Using Mutexes
            1. UNIX Example: Thread Synchronization Using Mutexes
            2. Win32 Example: Thread Synchronization Using Mutexes
        4. Thread Attributes
          1. Detachstate
          2. Inheritsched/schedparam/schedpolicy/scope
          3. Stacksize
          4. Setting Thread Attributes
            1. UNIX Example: Setting Thread Attributes
            2. Win32 Example: Setting Thread Attributes
          5. Win32 Security and Thread Objects
        5. Thread Scheduling and Priorities
          1. Managing Thread Priorities in Windows
          2. Example of Converting UNIX Thread Scheduling into Windows
            1. UNIX Example: Thread Scheduling
            2. Win32 Example: Thread Sheduling
        6. Managing Multiple Threads
          1. UNIX Example: Multiple Threads In
          2. Win32 Example: Multiple Threads In
        7. Fibers
      5. Memory Management
        1. Heap
        2. Thread Local Storage
          1. Thread Local Storage Example
        3. Memory-Mapped Files
        4. Shared Memory
        5. Synchronizing Access to Shared Resources
        6. Further Reading on Memory Management
      6. Users, Groups, and Security
        1. UNIX and Win32 User and Group Functions
          1. UNIX User and Group Functions
          2. Win32 User Functions
          3. Win32 Group Functions
            1. Local Group
            2. Global Group
        2. Adding a New Group
          1. UNIX Example: Adding a New Group
          2. Win32 Example: Adding a New Group
        3. Adding a User to a Group
          1. UNIX Example: Adding a User to a Group
          2. Win32 Example: Adding a User to a Group
        4. Listing Groups
          1. UNIX Example: Listing Groups
          2. Win32 Example: Listing Groups
        5. Adding a User Account
          1. UNIX Example: Adding a User Account
          2. Win32 Example: Adding a User Account
        6. Changing a User’s Password
          1. UNIX Example: Changing a User’s Password
          2. Win32 Example: Changing a User’s Password
        7. Removing a User Account
          1. UNIX Example: Removing a User Account
          2. Win32 Example: Removing a User Account
        8. Getting User Information About All Users
          1. UNIX Example: Getting User Information About All Users
          2. Win32 Example: Getting User Information About All Users
        9. Getting Information About a Specific User
          1. UNIX Example: Getting Information About a Specific User
          2. Win32 Example: Getting Information About a Specific User
        10. Retrieving the Current User’s User Name
          1. UNIX Example: Retrieving the Current User’s User Name
          2. Win32 Example: Retrieving the Current User’s User Name
        11. Security Functions
          1. UNIX Example: Using Security Functions
          2. Win32 Example: Using Security Functions
      7. File and Data Access
        1. Low-Level File Access
          1. UNIX Example: Writing to Standard Output
          2. Win32 Example: Writing to Standard Output
          3. UNIX Example 1: Using Standard Input and Standard Output
          4. Win32 Example 1: Using Standard Input and Standard Output
          5. UNIX Example 2: Using Standard Input and Standard Output
          6. Win32 Example 2: Using Standard Input and Standard Output
        2. Standard (Stream) File Access
          1. UNIX Example 1: Using Stream File Access
          2. Win32 Example 1: Using Stream File Access
          3. UNIX Example 2: Using Stream File Access
          4. Win32 Example 2: Using Stream File Access
        3. ioctl() Calls
          1. Windows ioctlsocket()
        4. File Control
          1. UNIX Example 1: Using fcntl()
          2. Win32 Example 1: Using fcntl()
          3. UNIX Example 2: Using fcntl()
          4. Win32 Example 2: Using fnctl()
        5. Directory Operation
          1. Directory Scanning
          2. Working Directory
            1. UNIX Example 1: Using Directory Handling Functions
            2. Win32 Example 1: Using Directory Handling Functions
            3. UNIX Example 2: Using Directory Handling Functions
            4. Win32 Example 2: Using Directory Handling Functions
            5. UNIX Example 3: Using Directory Handling Functions
            6. Win32 Example 3: Using Directory Handling Functions
      8. Interprocess Communication
        1. Process Pipes
          1. High-Level Popen Call
            1. UNIX Example 1: Process Pipes
            2. Win32 Example 1: Process Pipes
            3. UNIX Example 2: Process Pipes
            4. Win32 Example 2: Process Pipes
          2. Low-Level Pipe Call
            1. UNIX Example: Low-Level Pipe Call
            2. Win32 Example: Low-Level Pipe Call
          3. More Pipes Examples
        2. Named Pipes (FIFOs)
          1. Interprocess Communication with Named Pipes
        3. Message Queues
      9. Sockets and Networking
      10. The Process Environment
        1. Environment Variables
          1. Differences Between POSIX and Win32 Environment Variables
        2. Temporary Files
        3. Computer Information
          1. UNIX Example: Using System Information
          2. Win32 Example: Using System Information
        4. Logging System Messages
          1. UNIX Example: System Logging
          2. Win32 Example: System Logging
      11. Multiprocessor Considerations
        1. Process and Thread Solutions
        2. Winforks Example
        3. Common Variations
      12. Daemons and Services
      13. Appendixes
        1. Appendix 9.1: Shared Memory
          1. UNIX Example: Shared Memory
            1. Consumer
            2. Provider
            3. Header
          2. Win32 Example: Shared Memory
            1. Provider
            2. Consumer
            3. Header
        2. Appendix 9.2: Limiting File I/O
          1. UNIX Example: Limiting File I/O
          2. Win32 Example: Limiting File I/O
            1. Resource.h
            2. Resource.c
            3. RLimit.c
        3. Appendix 9.3: Creating a Thread in Windows
          1. stdafx.h
          2. resource.h
          3. Named Shared Memory.rc script
          4. Named Shared Memory.ico
          5. Named Shared Memory.cpp
        4. Appendix 9.4: Process Pipes
          1. UNIX Example: Process Pipes
          2. Win32 Example: Process Pipes
        5. Appendix 9.5: Pipes Across a Process
          1. UNIX Example: Pipes Across a Process
            1. Provider
            2. Consumer
          2. Win32 Example: Pipes Across a Process
            1. Provider
            2. Consumer
        6. Appendix 9.6: Pipes Used as Standard Input/Output
          1. UNIX Example: Pipes Used as Standard Input/Output
            1. Provider
            2. Consumer
          2. Win32 Example: Pipes Used as Standard Input/Output
            1. Provider
            2. Consumer
        7. Appendix 9.7: Waiting for a Spawned Process
          1. UNIX Example: Waiting for a Spawned Process
          2. Win32 Examples: Waiting for a Spawned Process
            1. CreateProcess
            2. Spawn Example: Waiting for a Spawned Process
        8. Appendix 9.8: Creating a Named Pipe
          1. UNIX Example: Creating a Named Pipe
          2. Win32 Example: Creating a Named Pipe
        9. Appendix 9.9: Opening a FIFO
          1. UNIX Example: Opening a FIFO
          2. Win32 Example: Opening a FIFO
        10. Appendix 9.10: Interprocess Communication with FIFOs
          1. UNIX Example: Interprocess Communication with FIFOs
            1. Provider
            2. Consumer
          2. Win32 Example: Interprocess Communication with FIFOs
            1. Provider
            2. Consumer
        11. Appendix 9.11: Winforks Example
    12. 10. Interix Code Conversion
      1. Introduction
      2. How to Convert the Code
      3. Processes
        1. Creating a New Process
        2. Replacing a Process Image (exec)
        3. Process Hierarchy
        4. Waiting for a Child Process
        5. Managing Process Resource Limits
        6. Process Groups
        7. Process Management
      4. Signals and Signal Handling
        1. UNIX bsd_signal Code Replacement
      5. Threads
      6. Memory Management
        1. Heap
        2. Memory-Mapped Files
        3. Shared Memory
        4. Synchronizing Access to Shared Resources
      7. Users, Groups, and Security
        1. User Names in Interix
          1. Interix User Names and Windows Domains
        2. UNIX UIDs and GIDs vs. Windows SIDs
        3. The passwd File Structure
        4. User and Group Operation Functions
          1. Interix initgroups Example
          2. Interix getgroups Conversion Example
        5. Running Programs as Other Users or Groups
          1. Changing Between Real and Effective User ID in SetUID Programs
          2. Changing User ID by Using the Interix setuser() Function
          3. The Interix exec*_asuser() Functions
        6. User Accounting Database Functions
      8. File and Data Access
        1. Differences in Interix and UNIX File I/O
        2. The Interix ioctl() Function Implementation
          1. File Control and ioctl()
          2. Socket Control and ioctl()
        3. Directory Operations
          1. Replacing scandir in Interix
            1. UNIX scandir Example
            2. Interix readdir Conversion Example
          2. Working Directory
        4. File System Operations in Interix
          1. Commonly Supported File Systems in UNIX
          2. Supported File System Types in Interix
          3. File System Mount Entry Management
          4. Library Porting
            1. Porting the GNU gdbm Database to Interix
      9. Interprocess Communication
        1. Ordinary (Anonymous) Pipes
        2. Named Pipes (FIFOs)
        3. Message Queues
        4. System V IPC Mechanisms
      10. Sockets and Networking
        1. Host Name to Address Translation
        2. Network Groups
        3. Network Socket Calls
        4. Transport Level Interface (XTI) Calls
      11. The Process Environment
        1. Environment Variables
        2. Using stdarg and varargs
        3. Temporary Files
        4. Computer Information
        5. Logging System Messages
      12. Daemons and Services
        1. Porting a UNIX Daemon to Interix
        2. Porting a UNIX Daemon to an Interix Service
          1. Converting Daemon Code into Interix Service Code
          2. Installing a Daemon as a Service
      13. Functions to Change for Interix
        1. Math Routines
        2. Regular Expressions
        3. System/C Library and Miscellaneous APIs
          1. Command-Line and Shell APIs
          2. String Manipulation Functions
          3. BSD String and Bit Functions
          4. Time Handling APIs
          5. Other System/C Library Functions
      14. Code Examples
        1. Test Client for Interix Daemon
        2. Example Interix Daemon Code
        3. Example Interix Service
    13. 11. Migrating the User Interface
      1. Introduction
      2. Comparing X Windows and Microsoft Windows
        1. User Interface Architecture
        2. Look and Feel
        3. Window Types
          1. Desktop Window
          2. Application Window
          3. Dialog Boxes
          4. Modeless Dialog Box
          5. Modal Dialog Box
          6. Message Box
        4. Reference Material
      3. User Interface Programming In X Windows and Microsoft Windows
        1. Programming Principles
        2. Libraries and Include Files
          1. Core Libraries
          2. Motif and Win32 Common Dialog Boxes
        3. Writing X Windows APIs for Win32
      4. Window Management
        1. Creating Windows
        2. Creating Controls
        3. Identifying a Control
        4. Communicating with a Control
      5. Device Management
        1. Capturing Mouse Events
        2. Nonclient-Area Mouse Messages
        3. Capturing Keyboard Events
        4. Keyboard Focus
        5. Creating Keystrokes, Mouse Motions, and Button Click
      6. Displaying Text
        1. Using Fonts
        2. Creating Fonts
        3. Device vs. Design Units
        4. Windows Character Data Types
        5. Drawing Text
        6. Calculating Text Metrics
          1. Understanding Mapping Mode
          2. Calculating Character Size and String Length
        7. More Win32 Text Functions
        8. Text Widgets and Controls
      7. Drawing
        1. Device Context
        2. Getting Win32 GDI Device Context (DC)
        3. Creating Win32 GDI Device Context (DC)
        4. Display and Color Management
        5. Drawing 2-D Lines and Shapes
          1. Drawing Lines
          2. Drawing Rectangles
      8. Timeouts and Timers
        1. X Windows Timeouts
        2. Win32 Timers
      9. Migrating Character-Based User Interfaces
        1. POSIX Terminal I/O
        2. Porting Curses and Terminal Routines to Interix
      10. Porting OpenGL Applications
      11. GDI+
      12. Mapping X Windows Terminology to Microsoft Windows
        1. Callback vs. WindowProc
        2. Client vs. Client Window
        3. Console Mode vs. Command Window
        4. DPI vs. Screen Resolution
        5. Graphics Context vs. Device Context
        6. Resources vs. Properties
        7. Resource Files vs. Registry
        8. Root Window vs. Desktop Window
        9. /bin vs. System32
        10. /usr/bin vs. Program Files
        11. /usr/lib vs. LIB Environment Variable
        12. /usr/include vs. INCLUDE Environment Variable
        13. Pixmap or Bitmap vs. Bitmap
        14. Window Manager vs. Windows 2000 and Windows XP
        15. X Library [Xlib] [X11] vs. Gdi32.lib
        16. X Toolkit [Intrinsics] [Xt] vs. User32.lib
      13. Mapping X Windows Tools to Microsoft Windows
        1. Bitmap vs. Imagedit.exe and Shed.exe
        2. Manual Pages vs. Help
        3. grep vs. Qgrep.exe
        4. xcalc vs. Calc.exe
        5. xclipboard vs. Clipbrd.exe
        6. xedit vs. Notepad.exe
        7. xev vs. Spy.exe or Spyxx.exe
        8. xfd vs. Fontview.exe
        9. xkill vs. Kill.exe
        10. xlsclients vs. Pview.exe
        11. xlsfonts vs. Fonts Control Panel Item
        12. xmag vs. Magnify.exe or Zoomin.exe
        13. xon vs. Start.exe or Remote.exe
        14. xset client vs. Control Panel Items
        15. xterm vs. Hyperterm.exe
      14. User Interface Coding Examples
        1. X Windows "Hello World" Example
          1. The xHello.mak File
        2. Win32 "Hello World" Example
        3. Win32 DialogWindow Example
    14. 12. Testing the Migration
      1. Introduction
      2. Overview of the Test Life Cycle of the Migration Project
        1. Test Life Cycle Stages
        2. Best Practices
      3. Stage 1: Plan the Migration Test
        1. Test Goals and Success Criteria
        2. Scope of the Test
        3. Test Schedule
        4. Roles and Responsibilities
        5. Dependencies
        6. Risks and Mitigation Plan
      4. Stage 2: Define the Lab Strategy and Build the Test Bed
        1. Defining a Lab Strategy
          1. Determining Network Requirements
          2. Determining Hardware Requirements
          3. Determining Software Requirements
        2. Building the Test Bed
      5. Stage 3: Design the Test Plan and Test Cases
        1. Creating the Detailed Test Plans
        2. Creating Detailed Test Cases
      6. Stage 4: Execute the Test
        1. Tracking Bugs
        2. Assigning Severity to Bugs
        3. Triage Process
        4. Generating a Test Report
      7. Stage 5: Evaluate and Analyze Results
      8. Types of Testing
      9. How to Create a DTP and a DTC
      10. Reporting and Release Processes
        1. Reporting the Results
        2. Release to Production
          1. Test Pass/Fail Criteria
          2. Test Suspension Criteria for Failed BAT and Test Execution
          3. Resumption Requirements
          4. Release Criteria
      11. Appendixes
        1. Appendix 12.1: Test Schedule Template
        2. Appendix 12.2: Risks Identified for Testing
        3. Appendix 12.3: Master Test Plan Template
        4. Appendix 12.4: Detailed Test Plan Template
        5. Appendix 12.5: Detailed Test Cases Template
      12. References
    15. 13. Creating the Live Environment
      1. Introduction
      2. Operating a Mixed Environment
        1. Windows to UNIX Connectivity
        2. User Authentication and Authorization
        3. Resource and Data Sharing
      3. Deploying the Migrated Application
        1. Tools for Deploying Win32 Applications
          1. Windows Installer Service
            1. Installation on Demand
            2. Installation Rollback
            3. Deployment Auditing Using the Windows Installer Service Database
            4. Security Rights and the Windows Installer Service
            5. Patch Files
            6. Window Installer Service Transforms
          2. Creating New Windows Installer Service Packages
          3. Repackaging Applications
          4. Deploying Applications with Group Policy Objects
          5. Deploying Applications with Systems Management Server
        2. Deploying Win32 Applications
          1. Deploying Win32 Applications by Pushing Them to the Desktop
          2. Two-Phase Deployment of Win32 Desktop Applications
          3. Side-by-Side Deployment of Win32 Applications
        3. Tools for Deploying Interix Applications
          1. Berkeley Remote Shell Commands (r Commands)
          2. Scripts
        4. Deploying Interix Applications
          1. Deploying Interix Applications by Pushing Them to the Desktop
          2. Using the r Commands for Remote Management in Interix
          3. Installing MSI Packages Remotely by Using Interix rsh
      4. Networked File Systems and Application Servers
        1. Server-Based Win32 Applications
          1. Client Side Caching and Server-Based Win32 Applications
          2. Client-Side Caching and Administrative Pinning
          3. Performance Considerations with Client-Side Caching
        2. Server-Based Interix Applications
          1. Replacing Automount with Microsoft Distributed File System
      5. Support and Maintenance Systems
        1. Remote Management and Control
          1. Using Scripts for Remote Management in Win32
            1. Enabling Windows Script Host in Win32
            2. Using Windows Script Host in Win32
          2. Remote Management and Windows Management Interface
            1. Using Perl/Tcl Scripts with WMI
        2. Using a Windows Installer Packaging Tool
        3. Deploying Interix Applications Using the Berkeley "r" Commands
          1. Script for Remote Deployment of Applications in Interix
          2. Using the Remote Deployment Script
        4. Using DFS to Automount in Interix
    16. 14. Migrating Fortran Code
      1. Introduction
      2. Data Gathering and Analysis
        1. Using Third-Party Libraries
          1. The Fortran Interface Statement
          2. C Function Declarations
          3. Compatibility Layers
          4. Fortran Modules
        2. Integrating Fortran with POSIX Applications
      3. Development Tools and Resources
      4. Design and Validation
        1. Sizing the Fortran Migration
        2. Assessing and Mitigating Risk
      5. Migration Planning
        1. Scoping the Fortran Migration
        2. Porting Fortran to Interix
      6. Porting UNIX Fortran Source to Win32
        1. Using C/C++ Libraries or Fortran Modules
        2. Porting Fortran to Windows
      7. Debugging Fortran from Visual Studio
      8. Summary
    17. 15. Roadmap for Future Migrations
      1. Migrating to XML and Web Services
        1. XML, SOAP, and Interoperability
          1. XML
          2. SOAP
          3. Web Services
        2. Using XML in the Migration from UNIX
        3. Using XML and Web Services on Multiple Platforms
        4. XML and Web Services Beyond the Firewall
          1. Security
          2. Directory Lookup
          3. Location Service
      2. Migrating to the Microsoft .NET Framework
        1. Microsoft .NET Framework
        2. Common Language Runtime
        3. Using the .NET Framework and the CLR with Migrated Applications
      3. Accessing the .NET Framework from Interix
        1. Encapsulation Using COM
        2. Chaining Commands and Scripts from Web Services
      4. Microsoft .NET Enterprise Servers and Migration
        1. EAI in a Web Services Environment
        2. XML DTD and Schemas
        3. XML-Based Data Services
      5. High-Performance Distributed Computing
        1. Compute Clusters on Windows
        2. Grid Computing
    18. SPECIAL OFFER: Upgrade this ebook with O’Reilly