About This Volume

On This Page

Introduction to Volume 3 Introduction to Volume 3
Layout of the Guide: Volume 3 Layout of the Guide: Volume 3
Organization of Content Organization of Content
Resources Resources

Introduction to Volume 3

Volume 1 of the UNIX Custom Application Migration Guide discussed how to apply the Envisioning and Planning Phases of the Microsoft® Solutions Framework (MSF) Process Model when conducting a UNIX to Microsoft Windows® migration project. This volume, Volume 3: Migrate Using Win32/Win64, applies the next phases in the Process Model, the Developing Phase and the Stabilizing Phase, and directs it specifically for using the Microsoft Win32® and Win64 APIs. This volume describes the architectural and potential coding differences between the UNIX and Windows environments and discusses various ways to implement these differences in the Windows environment using the Win32/Win64 API. This volume addresses these potential coding differences by looking at the solution from various categories.

These categories are:

  • Process management.

  • Thread management.

  • Memory management.

  • File management.

  • Infrastructure services.

  • User interface migration.

  • Fortran code migration.

  • Deployment considerations and testing activities.

  • Stabilizing Phase activities.

For each of these categories, this volume:

  • Describes the coding differences between UNIX and Windows.

  • Outlines options for converting the code using Win32/Win64 API.

  • Illustrates the options with source code examples.

This information will help you choose the solution that is appropriate to your application. Sufficient code examples and references are provided in this volume to aid you in the migration process. You can also refer to the Platform SDK documentation to obtain more details on the Win32/Win64 API.

Additional information on activities in the Developing Phase as they relate to a migration project is available in Chapter 2, “Developing Phase: Process Milestones and Technology Considerations” and Chapter 8, “Developing Phase: Deployment Considerations and Testing Activities” of this volume.

Intended Audience

The technical information in this volume is provided to support the activities undertaken during the Developing Phase of a migration project. It  is intended for developers and testers who are involved in migrating UNIX code to Windows using the Windows API. Using the guidance provided in this volume, a UNIX programmer will learn how to modify code so that it can be recompiled to run in a Windows environment using the Windows API, and a Windows programmer will learn how to port UNIX functions to Windows.

The specific advantages that this volume provides developers and testers are as follows:

  • Developers. Developers can learn about the various alternative methods for migrating from UNIX to Windows using the Win32/Win64 API and how to choose the best strategy to fit their environment and the application types.

  • Testers. Testers can gain more insight on the testing methodology that is best suited for their migration scenario. With the help of this guide, they can test the application for various aspects, such as functionality, management, performance, and stability.

Knowledge Prerequisites

The readers of this volume should possess the following knowledge prerequisites:

  • Basic knowledge of UNIX and Windows internals such as process and thread management, file and memory management, and various infrastructure services features.

  • Hands-on experience on Windows environments.

  • Familiarity with UNIX administration skills.

  • Familiarity with development involving Win32/Win64 API in a Windows environment.

It is also recommended that you read the “About This Guide” section in Volume 1: Plan as well as the rest of the Plan volume before reading this volume.

Layout of the Guide: Volume 3

The following diagram depicts the layout of the guide and how the volumes of the guide correlate with the components of the MSF Process Model. The white-shaded portion indicates the position of the current volume in the layout of the entire guide.

Figure 0.1. UCAMG organization

Figure 0.1. UCAMG organization

Organization of Content

The content of this volume is organized into the following chapters:

  • About This Volume. This chapter provides information on the organization of the guide and about its intended audience. It also lists the knowledge prerequisites required for this volume and provides resources, such as document conventions, used in this guide.

  • Chapter 1: Introduction to Win32/Win64. This chapter describes how you can modify the source code of your UNIX applications so that the code compiles on the Microsoft Windows operating system using the Microsoft Win32 and Win64 application programming interfaces (APIs). This chapter also describes the improvements that Win64 offers over Win32.

  • Chapter 2: Developing Phase: Process Milestones and Technology Considerations. This chapter introduces the Developing Phase and discusses using Microsoft Visual Studio® .NET 2003 and the Platform Software Development Kit (SDK) for the Developing Phase. The chapter includes a section about how to make your code compliant with both 32-bit and 64-bit architectures.

  • Chapter 3: Developing Phase: Process and Thread Management. This chapter discusses the similarities and differences in the implementation of process and thread management in UNIX and Microsoft Windows operating systems. The chapter first discusses the UNIX and Windows process management mechanism and the Windows APIs related to processes. It then discusses threads and their implementation in Windows.

  • Chapter 4: Developing Phase: Memory and File Management. This chapter discusses the similarities and differences in memory and file management between the Microsoft Windows API and UNIX. It also provides various memory and file management-related functions and APIs that are available in both environments.

  • Chapter 5: Developing Phase: Infrastructure Services. This chapter discusses the potential coding differences between UNIX and Microsoft Windows operating systems with respect to infrastructure services. The infrastructure services discussed in this chapter include security, handles, error and exception handling, signals versus events, interprocess communication, and networking.

  • Chapter 6: Developing Phase: Migrating the User Interface. This chapter describes how to migrate from a UNIX-based user interface to a Microsoft Windows-based user interface. Because the majority of UNIX graphical interfaces are built on X Windows and Motif, the chapter focuses on porting code from X Windows to the Windows operating system.

  • Chapter 7: Developing Phase: Migrating Fortran Code. This chapter examines the process of migrating a Fortran code to the Microsoft Windows operating system from the UNIX environment. This migration may be to either the Windows subsystem or the Interix subsystem.

  • Chapter 8: Developing Phase: Deployment Considerations and Testing Activities. This chapter discusses the key aspects of deploying and testing a migrated application on Microsoft Windows operating systems. You will also be able to identify the deployment requirements, such as packaging and deploying of tools and administering the deployed Microsoft Win32 applications. This chapter also discusses various testing activities that you need to carry out in the Developing Phase.

  • Chapter 9: Stabilizing Phase. This chapter discusses the different levels of testing and tuning that must be administered to the applications that are migrated to Windows using Windows Services for UNIX 3.5.



See the Acronyms list accompanying this guide for a list of the acronyms and their meanings used in this volume.

Document Conventions

The document conventions used in this volume are primarily designed to help you quickly identify the operating system and the interface (command line or graphical) being discussed—Windows or UNIX. In general, Windows operating-system commands are executed by clicking user interface (UI) elements, and these elements are visually distinguishable by the use of bold text. In contrast, the UNIX operating system typically uses a command-line interface, and these instructions are visually distinguished by the use of a Monospace font.

These interface and execution differences are not absolute; and in case visual cues do not unambiguously distinguish between the two operating systems, the text will clearly make this distinction. Table 0.1 lists the document conventions used in this volume.

Table 0.1. Document Conventions

Text element


Bold text

Used in the context of paragraphs for commands; literal arguments to commands (including paths when they form part of the command); switches; and programming elements, such as methods, functions, data types, and data structures.

Also used to identify the UI elements.

Italic text

Used in the context of paragraphs for variables to be replaced by the user.

Also used to emphasize important information.

Monospace font

Used for excerpts from configuration files, code examples, and terminal sessions.

Monospace bold font

Used to represent commands or other text that the user types.

Monospace italic font

Used to represent variables the reader supplies in command-line examples and terminal sessions.

Shell prompts

The MS-DOS® prompt is used in Windows.


Represents a note.


Represents code.

Code Samples and Source Files

This volume contains several code samples to illustrate certain programming concepts. These code samples are available as source files in a folder labeled "src" in the download version of this guide available at http://go.microsoft.com/fwlink/?LinkId=30864.

Chapter 1: Introduction to Win32/Win64

Chapter 2: Developing Phase: Process Milestones and Technology Considerations

Chapter 3 Developing Phase: Process and Thread Management

Chapter 4: Developing Phase: Memory and File Management

Chapter 5: Developing Phase: Infrastructure Services

Chapter 6: Developing Phase: Migrating the User Interface

Chapter 7: Migrating Fortran Code

Chapter 8: Developing Phase: Deployment Considerations and Testing Activities

Chapter 9: Stabilizing Phase


Get the UNIX Custom Application Migration Guide

Update Notifications

Sign up to learn about updates and new releases


Send us your comments or suggestions