Advanced Windows

Advanced Windows

by Jeffrey M. Richter
     
 
The new edition of this popular title covers recent enhancements to Win32, including support for Windows NT 4.0. Here is a solid revision to a core programming title in a still-expanding area.

Experience Level: Intermediate/ Advanced

Overview

The new edition of this popular title covers recent enhancements to Win32, including support for Windows NT 4.0. Here is a solid revision to a core programming title in a still-expanding area.

Experience Level: Intermediate/ Advanced

Editorial Reviews


Fatbrain Review

Programming in the Windows 95 32-bit environment is where it's at, and this is the book written for experienced 16-bit Windows programmers who want to make the switch and exploit the powerful capabilities of the 32-bit API. You may remember author Richter from his classic Windows 3.1: A Developer's Guide, but even if you don't, this tour of the NT and 95 operating system will give you an inside view on how Windows NT and 95 work and how to use their features. Topics covered include processes, threads, and virtual memory. Also covered are DLLs, file I/O, and message crackers. Find out how the move to 32-bit affects threads and preemptive multitasking, virtual memory management, and memory-mapped files. One prolific programmer called this book "The definitive guide to low-level Win32 programming." Let's put it this way, if you're doing systems level programming, you simply can't do without Advanced Windows.

Product Details

ISBN-13:
9781572315488
Publisher:
Microsoft Press
Publication date:
12/28/1996
Series:
Microsoft Programming Titles
Edition description:
3RD BK&CDR
Pages:
1048
Product dimensions:
7.42(w) x 9.14(h) x 1.86(d)

Read an Excerpt


Chapter 14: Filesystems

One important aspect of any operating system is the way in which it manages files. In good old MS-DOS, managing files is about all the operating system did, especially when 16-bit Windows was running on top of it. 16-bit Windows pretty much took care of everything except the manipulation of files on hard disks and floppy disks, which it left up to MS-DOS. (As time went on, though, 16-bit Windows took on more of even this responsibility by adding direct 32-bit access support and going right to the disk controller to manipulate the system's paging file.)

Now both Microsoft Windows 95 and Microsoft Windows NT have greatly enhanced 32-bit file support for managing the user's files and drives. In fact, both of these operating systems sport an installable file system that is capable of supporting multiple file systems-all of them simultaneously.

The main file system of Windows 95 is the File Allocation Table (FAT) file system. Windows NT also supports the FAT file system. The FAT file system supports file and directory names up to 255 characters long. These names are stored on the disk using Unicode. Using Unicode to store filenames means among other things that files will retain their names when they are copied to systems that use different languages. The FAT file system also associates three time stamps with each file: when the file was created, when the file was last accessed, and when the file was last modified.

In addition to the FAT file system, Windows NT supports the NT file system (NTFS). The NTFS file system offers all of the features of the FAT file system plus some additional ones. The most important feature of NTFS is a file system recovery scheme that allows for quick restoration of disk-based data after a system failure. Other features of NTFS allow you to manipulate extremely large storage media. Several security features, such as execute-only files (which make it far more difficult for a virus to attach itself to an application), have been added. For POSIX compatibility, NTFS supports file system features such as hard links, casesensitive filenames, and the ability to retain information regarding when a file was last opened.

NTFS was designed to be extended. Features that will be supported include transaction-based operations to support fault tolerant applications, user-controlled version numbers for files, multiple data streams per file, flexible options for file naming and file attributes, and support for the popular file servers. For security-minded installations, NTFS will certainly become the standard, and it should eventually replace the FAT file system standard.

The CD-ROM File System (CDFS) is used specifically for a CD-ROM drive, once considered a high-ticket peripheral for a personal computer. Today a CD-ROM drive is becoming more a necessity than a luxury. More and more software is available on CD-ROM-even Windows 95 and Windows NT are available on CD-ROM. In the future, more software programs will use CD-ROMs as their distribution medium because CDROMs offer several advantages:

Microsoft's having built CD-ROM support directly into Windows 95 and Windows NT will certainly help to promote the use and wide acceptance of CD-ROMs in the marketplace.

The best aspect of all these file systems is that they provide simultaneous operating system support. If you are using Windows NT, you can easily have one partition on your hard disk formatted for FAT and another formatted for NTFS. Then you can easily copy files from either of these partitions to a floppy disk formatted for the FAT file system.

Win32's Filename Conventions

So that Win32 can support several different file systems, all the file systems must observe some ground rules. The most important rule is that each file system must organize files into a hierarchical directory tree just as the FAT file system does. Directory names and filenames in the pathname must be separated by the backslash (\) character. In addition to the rules for constructing pathnames, there are rules for constructing directory names and filenames.

  • All pathnames must be zero-terminated.
  • Directory names and filenames must not contain the backslash separator character (\), a character whose ASCII value is in the range 0 through 31, or any character explicitly disallowed by any of the file systems.
  • Directory names and filenames can be created in mixed case, but users must anticipate that searches for directories and files will always be performed by means of case-insensitive comparisons. If a file called ReadMe.Txt already exists and you try to name another file README.TXT, the naming of the second file will fail.
  • When used to specify a directory name, the period (.) identifies the current directory. For example, the pathname \READ ME.TXT indicates that the file is in the current directory
  • When used to specify a directory name, two periods (..) identify the parent directory of the current directory. For example, the pathname ..\README.TXT indicates that the file is in the current directory's parent directory....

Meet the Author


Jeffrey Richter was born in Philadelphia, Pennsylvania, and graduated in 1987 from Drexel University with a bachelor's degree in computer science.In 1990, Jeff wrote Windowsr 3.0: A Developer's Guide (M&T Books); and in1992 he wrote the revised edition, Windows 3.1: A Developer's Guide.A third edition, Windows 95: A Developer's Guide, was published in fall 1995.Jeff is also a contributing editor at Microsoftr Systems Journal, for which he authorsthe Win32r Q & A column, and he has written a number of articles.

Jeff speaks regularly at industry conferences, including Software Development and COMDEX. In addition, he frequently conducts Windows NTr and Windows 95 training seminars at many companies, including AT&T, DEC, Intel, Microsoft, and Pitney Bowes.

Jeff now lives in Bellevue, Washington, where he is a frequent consultant to Microsoft. His code appears in Visual C++r and other applications produced by Microsoft's Personal Operating Systems group. He likes to eat teriyaki chicken bowls from Costco and top them off with Ben and Jerry's ice cream while watchingThe Simpsons. He has a passion for classic rock and jazz fusion bands.

Send e-mail to v-jeffrr@microsoft.com

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >