{"action":"created","comment":{"url":"https://api.github.com/repos/AArnott/pinvoke/pulls/comments/44032724","id":44032724,"diff_hunk":"@@ -0,0 +1,74 @@\n+﻿// Copyright (c) to owners found in https://github.com/AArnott/pinvoke/blob/master/COPYRIGHT.md. All rights reserved.\n+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.\n+\n+namespace PInvoke\n+{\n+    using System;\n+    using System.Diagnostics.CodeAnalysis;\n+    using System.Runtime.InteropServices;\n+\n+    /// <content>\n+    /// Contains the <see cref=\"OVERLAPPED\"/> nested class.\n+    /// </content>\n+    public partial class Kernel32\n+    {\n+        /// <summary>Contains information used in asynchronous (or overlapped) input and output (I/O).</summary>\n+        /// <remarks>\n+        /// Any unused members of this structure should always be initialized to zero before the structure is used in a function\n+        /// call. Otherwise, the function may fail and return <see cref=\"Win32ErrorCode.ERROR_INVALID_PARAMETER\"/>.\n+        /// <para>\n+        /// The Offset and OffsetHigh members together represent a 64-bit file position.It is a byte offset from the start of\n+        /// the file or file-like device, and it is specified by the user; the system will not modify these values.The calling\n+        /// process must set this member before passing the OVERLAPPED structure to functions that use an offset, such as the\n+        /// ReadFile or WriteFile (and related) functions.\n+        /// </para>\n+        /// <para>\n+        /// You can use the HasOverlappedIoCompleted macro to check whether an asynchronous I/O operation has completed if\n+        /// GetOverlappedResult is too cumbersome for your application.\n+        /// </para>\n+        /// <para>You can use the CancelIo function to cancel an asynchronous I/O operation.</para>\n+        /// <para>\n+        /// A common mistake is to reuse an OVERLAPPED structure before the previous asynchronous operation has been\n+        /// completed. You should use a separate structure for each request. You should also create an event object for each thread\n+        /// that processes data. If you store the event handles in an array, you could easily wait for all events to be signaled\n+        /// using the WaitForMultipleObjects function.\n+        /// </para>\n+        /// </remarks>\n+        [StructLayout(LayoutKind.Sequential)]\n+        public struct OVERLAPPED\n+        {\n+            /// <summary>\n+            /// The status code for the I/O request. When the request is issued, the system sets this member to STATUS_PENDING to indicate that the operation has not yet started. When the request is completed, the system sets this member to the status code for the completed request.\n+            /// <para>The Internal member was originally reserved for system use and its behavior may change.</para>\n+            /// </summary>\n+            public IntPtr Internal;\n+\n+            /// <summary>\n+            /// The number of bytes transferred for the I/O request. The system sets this member if the request is completed without errors.\n+            /// <para>The InternalHigh member was originally reserved for system use and its behavior may change.</para>\n+            /// </summary>\n+            public IntPtr InternalHigh;","path":"src/Kernel32.Shared/Kernel32+OVERLAPPED.cs","position":50,"original_position":50,"commit_id":"3e9a5f3cb3dd61b1c2e31d0708d254f0b973197f","original_commit_id":"3e9a5f3cb3dd61b1c2e31d0708d254f0b973197f","user":{"login":"AArnott","id":3548,"avatar_url":"https://avatars.githubusercontent.com/u/3548?v=3","gravatar_id":"","url":"https://api.github.com/users/AArnott","html_url":"https://github.com/AArnott","followers_url":"https://api.github.com/users/AArnott/followers","following_url":"https://api.github.com/users/AArnott/following{/other_user}","gists_url":"https://api.github.com/users/AArnott/gists{/gist_id}","starred_url":"https://api.github.com/users/AArnott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AArnott/subscriptions","organizations_url":"https://api.github.com/users/AArnott/orgs","repos_url":"https://api.github.com/users/AArnott/repos","events_url":"https://api.github.com/users/AArnott/events{/privacy}","received_events_url":"https://api.github.com/users/AArnott/received_events","type":"User","site_admin":false},"body":"Is this the most natural type for these fields? This is the number of bytes transferred, yet it's an IntPtr? Should it be a uint instead?","created_at":"2015-11-05T16:28:45Z","updated_at":"2015-11-05T16:28:45Z","html_url":"https://github.com/AArnott/pinvoke/pull/40#discussion_r44032724","pull_request_url":"https://api.github.com/repos/AArnott/pinvoke/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/AArnott/pinvoke/pulls/comments/44032724"},"html":{"href":"https://github.com/AArnott/pinvoke/pull/40#discussion_r44032724"},"pull_request":{"href":"https://api.github.com/repos/AArnott/pinvoke/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/AArnott/pinvoke/pulls/40","id":49813573,"html_url":"https://github.com/AArnott/pinvoke/pull/40","diff_url":"https://github.com/AArnott/pinvoke/pull/40.diff","patch_url":"https://github.com/AArnott/pinvoke/pull/40.patch","issue_url":"https://api.github.com/repos/AArnott/pinvoke/issues/40","number":40,"state":"open","locked":false,"title":"ReadFile / WriteFile","user":{"login":"vbfox","id":131878,"avatar_url":"https://avatars.githubusercontent.com/u/131878?v=3","gravatar_id":"","url":"https://api.github.com/users/vbfox","html_url":"https://github.com/vbfox","followers_url":"https://api.github.com/users/vbfox/followers","following_url":"https://api.github.com/users/vbfox/following{/other_user}","gists_url":"https://api.github.com/users/vbfox/gists{/gist_id}","starred_url":"https://api.github.com/users/vbfox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vbfox/subscriptions","organizations_url":"https://api.github.com/users/vbfox/orgs","repos_url":"https://api.github.com/users/vbfox/repos","events_url":"https://api.github.com/users/vbfox/events{/privacy}","received_events_url":"https://api.github.com/users/vbfox/received_events","type":"User","site_admin":false},"body":"Add `ReadFile` and `WriteFile`.\r\n\r\nThere are also some helpers to simplify synchronous use, I plan to add Task helpers later, they are a little bit more involved in quantity of code.\r\n\r\nAlso I didn't add `CreateFile2` Or `GetOverlappedResultEx` so store apps can only use the synchronous read/write.","created_at":"2015-11-05T11:44:01Z","updated_at":"2015-11-05T16:28:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c6045bf3b6133616a393fefa864acace7f81526c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AArnott/pinvoke/pulls/40/commits","review_comments_url":"https://api.github.com/repos/AArnott/pinvoke/pulls/40/comments","review_comment_url":"https://api.github.com/repos/AArnott/pinvoke/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AArnott/pinvoke/issues/40/comments","statuses_url":"https://api.github.com/repos/AArnott/pinvoke/statuses/3e9a5f3cb3dd61b1c2e31d0708d254f0b973197f","head":{"label":"vbfox:ReadFile_WriteFile","ref":"ReadFile_WriteFile","sha":"3e9a5f3cb3dd61b1c2e31d0708d254f0b973197f","user":{"login":"vbfox","id":131878,"avatar_url":"https://avatars.githubusercontent.com/u/131878?v=3","gravatar_id":"","url":"https://api.github.com/users/vbfox","html_url":"https://github.com/vbfox","followers_url":"https://api.github.com/users/vbfox/followers","following_url":"https://api.github.com/users/vbfox/following{/other_user}","gists_url":"https://api.github.com/users/vbfox/gists{/gist_id}","starred_url":"https://api.github.com/users/vbfox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vbfox/subscriptions","organizations_url":"https://api.github.com/users/vbfox/orgs","repos_url":"https://api.github.com/users/vbfox/repos","events_url":"https://api.github.com/users/vbfox/events{/privacy}","received_events_url":"https://api.github.com/users/vbfox/received_events","type":"User","site_admin":false},"repo":{"id":44984410,"name":"pinvoke","full_name":"vbfox/pinvoke","owner":{"login":"vbfox","id":131878,"avatar_url":"https://avatars.githubusercontent.com/u/131878?v=3","gravatar_id":"","url":"https://api.github.com/users/vbfox","html_url":"https://github.com/vbfox","followers_url":"https://api.github.com/users/vbfox/followers","following_url":"https://api.github.com/users/vbfox/following{/other_user}","gists_url":"https://api.github.com/users/vbfox/gists{/gist_id}","starred_url":"https://api.github.com/users/vbfox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vbfox/subscriptions","organizations_url":"https://api.github.com/users/vbfox/orgs","repos_url":"https://api.github.com/users/vbfox/repos","events_url":"https://api.github.com/users/vbfox/events{/privacy}","received_events_url":"https://api.github.com/users/vbfox/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vbfox/pinvoke","description":"A library containing all PInvoke code so you don't have to import it every time. Maintained and updated to support the latest Windows OS.","fork":true,"url":"https://api.github.com/repos/vbfox/pinvoke","forks_url":"https://api.github.com/repos/vbfox/pinvoke/forks","keys_url":"https://api.github.com/repos/vbfox/pinvoke/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vbfox/pinvoke/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vbfox/pinvoke/teams","hooks_url":"https://api.github.com/repos/vbfox/pinvoke/hooks","issue_events_url":"https://api.github.com/repos/vbfox/pinvoke/issues/events{/number}","events_url":"https://api.github.com/repos/vbfox/pinvoke/events","assignees_url":"https://api.github.com/repos/vbfox/pinvoke/assignees{/user}","branches_url":"https://api.github.com/repos/vbfox/pinvoke/branches{/branch}","tags_url":"https://api.github.com/repos/vbfox/pinvoke/tags","blobs_url":"https://api.github.com/repos/vbfox/pinvoke/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vbfox/pinvoke/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vbfox/pinvoke/git/refs{/sha}","trees_url":"https://api.github.com/repos/vbfox/pinvoke/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vbfox/pinvoke/statuses/{sha}","languages_url":"https://api.github.com/repos/vbfox/pinvoke/languages","stargazers_url":"https://api.github.com/repos/vbfox/pinvoke/stargazers","contributors_url":"https://api.github.com/repos/vbfox/pinvoke/contributors","subscribers_url":"https://api.github.com/repos/vbfox/pinvoke/subscribers","subscription_url":"https://api.github.com/repos/vbfox/pinvoke/subscription","commits_url":"https://api.github.com/repos/vbfox/pinvoke/commits{/sha}","git_commits_url":"https://api.github.com/repos/vbfox/pinvoke/git/commits{/sha}","comments_url":"https://api.github.com/repos/vbfox/pinvoke/comments{/number}","issue_comment_url":"https://api.github.com/repos/vbfox/pinvoke/issues/comments{/number}","contents_url":"https://api.github.com/repos/vbfox/pinvoke/contents/{+path}","compare_url":"https://api.github.com/repos/vbfox/pinvoke/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vbfox/pinvoke/merges","archive_url":"https://api.github.com/repos/vbfox/pinvoke/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vbfox/pinvoke/downloads","issues_url":"https://api.github.com/repos/vbfox/pinvoke/issues{/number}","pulls_url":"https://api.github.com/repos/vbfox/pinvoke/pulls{/number}","milestones_url":"https://api.github.com/repos/vbfox/pinvoke/milestones{/number}","notifications_url":"https://api.github.com/repos/vbfox/pinvoke/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vbfox/pinvoke/labels{/name}","releases_url":"https://api.github.com/repos/vbfox/pinvoke/releases{/id}","created_at":"2015-10-26T17:09:31Z","updated_at":"2015-11-01T21:11:46Z","pushed_at":"2015-11-05T14:19:04Z","git_url":"git://github.com/vbfox/pinvoke.git","ssh_url":"git@github.com:vbfox/pinvoke.git","clone_url":"https://github.com/vbfox/pinvoke.git","svn_url":"https://github.com/vbfox/pinvoke","homepage":null,"size":832,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"AArnott:master","ref":"master","sha":"1532605ef0526d8f1047231f771f3628fb47f0c3","user":{"login":"AArnott","id":3548,"avatar_url":"https://avatars.githubusercontent.com/u/3548?v=3","gravatar_id":"","url":"https://api.github.com/users/AArnott","html_url":"https://github.com/AArnott","followers_url":"https://api.github.com/users/AArnott/followers","following_url":"https://api.github.com/users/AArnott/following{/other_user}","gists_url":"https://api.github.com/users/AArnott/gists{/gist_id}","starred_url":"https://api.github.com/users/AArnott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AArnott/subscriptions","organizations_url":"https://api.github.com/users/AArnott/orgs","repos_url":"https://api.github.com/users/AArnott/repos","events_url":"https://api.github.com/users/AArnott/events{/privacy}","received_events_url":"https://api.github.com/users/AArnott/received_events","type":"User","site_admin":false},"repo":{"id":44758360,"name":"pinvoke","full_name":"AArnott/pinvoke","owner":{"login":"AArnott","id":3548,"avatar_url":"https://avatars.githubusercontent.com/u/3548?v=3","gravatar_id":"","url":"https://api.github.com/users/AArnott","html_url":"https://github.com/AArnott","followers_url":"https://api.github.com/users/AArnott/followers","following_url":"https://api.github.com/users/AArnott/following{/other_user}","gists_url":"https://api.github.com/users/AArnott/gists{/gist_id}","starred_url":"https://api.github.com/users/AArnott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AArnott/subscriptions","organizations_url":"https://api.github.com/users/AArnott/orgs","repos_url":"https://api.github.com/users/AArnott/repos","events_url":"https://api.github.com/users/AArnott/events{/privacy}","received_events_url":"https://api.github.com/users/AArnott/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AArnott/pinvoke","description":"A library containing all PInvoke code so you don't have to import it every time. Maintained and updated to support the latest Windows OS.","fork":false,"url":"https://api.github.com/repos/AArnott/pinvoke","forks_url":"https://api.github.com/repos/AArnott/pinvoke/forks","keys_url":"https://api.github.com/repos/AArnott/pinvoke/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AArnott/pinvoke/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AArnott/pinvoke/teams","hooks_url":"https://api.github.com/repos/AArnott/pinvoke/hooks","issue_events_url":"https://api.github.com/repos/AArnott/pinvoke/issues/events{/number}","events_url":"https://api.github.com/repos/AArnott/pinvoke/events","assignees_url":"https://api.github.com/repos/AArnott/pinvoke/assignees{/user}","branches_url":"https://api.github.com/repos/AArnott/pinvoke/branches{/branch}","tags_url":"https://api.github.com/repos/AArnott/pinvoke/tags","blobs_url":"https://api.github.com/repos/AArnott/pinvoke/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AArnott/pinvoke/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AArnott/pinvoke/git/refs{/sha}","trees_url":"https://api.github.com/repos/AArnott/pinvoke/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AArnott/pinvoke/statuses/{sha}","languages_url":"https://api.github.com/repos/AArnott/pinvoke/languages","stargazers_url":"https://api.github.com/repos/AArnott/pinvoke/stargazers","contributors_url":"https://api.github.com/repos/AArnott/pinvoke/contributors","subscribers_url":"https://api.github.com/repos/AArnott/pinvoke/subscribers","subscription_url":"https://api.github.com/repos/AArnott/pinvoke/subscription","commits_url":"https://api.github.com/repos/AArnott/pinvoke/commits{/sha}","git_commits_url":"https://api.github.com/repos/AArnott/pinvoke/git/commits{/sha}","comments_url":"https://api.github.com/repos/AArnott/pinvoke/comments{/number}","issue_comment_url":"https://api.github.com/repos/AArnott/pinvoke/issues/comments{/number}","contents_url":"https://api.github.com/repos/AArnott/pinvoke/contents/{+path}","compare_url":"https://api.github.com/repos/AArnott/pinvoke/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AArnott/pinvoke/merges","archive_url":"https://api.github.com/repos/AArnott/pinvoke/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AArnott/pinvoke/downloads","issues_url":"https://api.github.com/repos/AArnott/pinvoke/issues{/number}","pulls_url":"https://api.github.com/repos/AArnott/pinvoke/pulls{/number}","milestones_url":"https://api.github.com/repos/AArnott/pinvoke/milestones{/number}","notifications_url":"https://api.github.com/repos/AArnott/pinvoke/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AArnott/pinvoke/labels{/name}","releases_url":"https://api.github.com/repos/AArnott/pinvoke/releases{/id}","created_at":"2015-10-22T16:28:01Z","updated_at":"2015-11-03T16:58:07Z","pushed_at":"2015-11-05T14:50:38Z","git_url":"git://github.com/AArnott/pinvoke.git","ssh_url":"git@github.com:AArnott/pinvoke.git","clone_url":"https://github.com/AArnott/pinvoke.git","svn_url":"https://github.com/AArnott/pinvoke","homepage":null,"size":1264,"stargazers_count":12,"watchers_count":12,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":5,"forks":4,"open_issues":5,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AArnott/pinvoke/pulls/40"},"html":{"href":"https://github.com/AArnott/pinvoke/pull/40"},"issue":{"href":"https://api.github.com/repos/AArnott/pinvoke/issues/40"},"comments":{"href":"https://api.github.com/repos/AArnott/pinvoke/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/AArnott/pinvoke/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/AArnott/pinvoke/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AArnott/pinvoke/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/AArnott/pinvoke/statuses/3e9a5f3cb3dd61b1c2e31d0708d254f0b973197f"}}}}