Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • G GLib
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 875
    • Issues 875
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 41
    • Merge requests 41
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOME
  • GLib
  • Merge requests
  • !2793

win32: Add Input/OutputStream support for regular files

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Ole André Vadla Ravnås requested to merge oleavr/glib:win32-input-output-stream-plain-files into main Jun 30, 2022
  • Overview 14
  • Commits 1
  • Pipelines 3
  • Changes 2

Or, "disk files" as they're called in Microsoft parlance.

We already supported HANDLEs representing sockets, named pipes, etc. However, when reading/writing a regular file the same asynchronous way, i.e. through the OVERLAPPED API, the file position to read/write at must be specified through the OVERLAPPED being passed in.

This is a subtle difference between ReadFile()/WriteFile() used in their synchronous mode vs asynchronous mode (OVERLAPPED). The former uses the HANDLE's current position and updates it after a succesful call, whereas the latter requires it to be passed in and managed externally. The latter is how we are using them, which means before this change we would keep reading/writing at the start of the file over and over, not making any progress.

Edited Jun 30, 2022 by Ole André Vadla Ravnås
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: win32-input-output-stream-plain-files