The Windows Win32 File Management Programming









What do we have in this session?


This tutorial demonstrates the Windows files and streams manipulations. Information and program examples include compressed and encrypted files.

  1. Brief Intro

  2. File Attributes

  3. Files and Clusters

  4. Creating, Deleting, and Maintaining Files: File Names, Paths, and Namespaces

  5. Basic Naming Conventions

  6. Path Names and Namespaces

  7. Maximum Path Length

  8. Relative Paths

  9. Short and Long File Names and Paths

  10. Creating and Opening Files

  11. CreateFile() Scenarios

  12. File Attributes and Directories

  13. Moving and Replacing Files

  14. Closing and Deleting Files

  15. Defragmenting Files

  16. Minimizing interactions between defragmentation and shadow copies

  17. Limitations under Windows 2000

  18. Retrieving File Type Information

  19. Determining the Size of a File

  20. Searching for One or More Files

  21. Setting and Getting the Timestamp of a File

  22. File Type, Size and Timestamp Program Example

  23. Determining the Current Character Set Code Page

  24. AreFileApisANSI() Program Example

  25. Reading From and Writing to Files

  26. Positioning a File Pointer

  27. Reading From or Writing To Files Using a Scatter-Gather Scheme

  28. Flushing System-Buffered I/O Data to Disk

  29. Truncating or Extending Files

  30. File and Directory Linking

  31. File Compression and Decompression

  32. The NTFS File System File Compression

  33. Compression Attribute

  34. Compression State

  35. Obtaining the Size of a Compressed File

  36. Compressed File (Attributes) Program Example

  37. File Compression and Decompression Libraries

  38. Decompressing a Single File

  39. Decompressing Multiple Files

  40. Reading from Compressed Files

  41. Using Windows Compressed Functions Program Example

  42. Cabinets

  43. File Encryption

  44. Handling Encrypted Files and Directories




  1. Encrypted Files and User Keys

  2. Backup and Restore of Encrypted Files

  3. Adding Users to an Encrypted File Program Example

  4. The self-signed Certificate

  5. File Security and Access Rights

  6. Input and Output (I/O)

  7. I/O Concepts

  8. File Buffering

  9. Alignment and File Access Requirements

  10. File Caching

  11. Synchronous and Asynchronous I/O

  12. Synchronous and Asynchronous I/O Considerations

  13. Canceling Pending I/O Operations

  14. Cancellation Considerations

  15. Operations That Cannot Be Canceled

  16. Canceling Asynchronous I/O

  17. Canceling Synchronous I/O

  18. Alertable I/O

  19. I/O Completion Ports

  20. How I/O Completion Ports Work

  21. Threads and Concurrency

  22. Supported I/O Functions

  23. Network I/O Concepts

  24. Description of a Network I/O Operation

  25. Microsoft SMB Protocol and CIFS Protocol Overview

  26. Opportunistic Locks

  27. Sparse Files

  28. Sparse File Operations

  29. Obtaining the Size of a Sparse File

  30. Sparse Files and Disk Quotas

  31. Symbolic Links

  32. Symbolic Link Effects on File Systems Functions

  33. Programming Considerations

  34. Creating Symbolic Links

  35. Example of an Absolute Symbolic Link

  36. Example of a Relative Symbolic Links

  37. More File Management Program Examples

    1. Appending One File to Another File Program Example

    2. Creating and Using a Temporary File Program Example

    3. Locking and Unlocking Byte Ranges in Files Program Example

    4. Opening a File for Reading or Writing

    5. Open a File for Writing Program Example

    6. Open a File for Reading Program Example

    7. Retrieving and Changing File Attributes

    8. Testing for the End of a File (EOF)

    9. Using Streams Program Example

    10. Alternate File Stream

  38. File Management Reference

    1. File Management Control Codes

    2. File Management Enumerations

    3. File Management Functions

    4. File Management Structures


< Windows Directory Index | Win32 Programming | Windows Files 1 >