You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A `const` pointer to a `ImgDelayDescr`(see delayimp.h) that contains the offsets of various import-related data, a timestamp for binding information, and a set of attributes that provide further information about the descriptor content. Currently there is only one attribute, `dlattrRva`, which indicates that the addresses in the descriptor are relative virtual addresses (as opposed to virtual addresses).
21
+
A `const` pointer to a `ImgDelayDescr` that contains the offsets of various import-related data, a timestamp for binding information, and a set of attributes that provide further information about the descriptor content. Currently there's only one attribute, `dlattrRva`, which indicates that the addresses in the descriptor are relative virtual addresses. For more information, see the declarations in *delayimp.h*.
22
22
23
23
For the definition of the `PCImgDelayDescr` structure, see [Structure and Constant Definitions](../../build/reference/structure-and-constant-definitions.md).
24
24
25
25
*ppfnIATEntry*<br/>
26
-
A pointer to the slot in the delay load import address table (IAT) to be updated with the address of the imported function. The helper routine needs to store the same value that it will be returning into this location.
26
+
A pointer to the slot in the delay load import address table (IAT) that's updated with the address of the imported function. The helper routine needs to store the same value that it returns into this location.
27
27
28
28
## Expected Return Values
29
29
@@ -37,11 +37,11 @@ If the function fails, it raises an exception and returns 0. Three types of exce
37
37
38
38
- Failure of `GetProcAddress`.
39
39
40
-
It is your responsibility to handle these exceptions.
40
+
It's your responsibility to handle these exceptions.
41
41
42
42
## Remarks
43
43
44
-
The calling convention for the helper function is `__stdcall`. The type of the return value is not relevant, so FARPROC is used. This function has C linkage.
44
+
The calling convention for the helper function is `__stdcall`. The type of the return value isn't relevant, so FARPROC is used. This function has C linkage.
45
45
46
46
The return value of the delay load helper needs to be stored in the passed-in function pointer location, unless you want your helper routine to be used as a notification hook. In that case, your code is responsible for finding the appropriate function pointer to return. The thunk code the linker generates then takes that return value as the real target of the import and jumps directly to it.
@@ -30,22 +30,22 @@ File descriptor referring to the open file.
30
30
*buffer*<br/>
31
31
Storage location for data.
32
32
33
-
*count*<br/>
34
-
Maximum number of bytes.
33
+
*buffer_size*<br/>
34
+
Maximum number of bytes to read.
35
35
36
36
## Return Value
37
37
38
-
**_read** returns the number of bytes read, which might be less than *count* if there are fewer than *count* bytes left in the file or if the file was opened in text mode, in which case each carriage return-line feed pair '\r\n' is replaced with a single linefeed character '\n'. Only the single linefeed character is counted in the return value. The replacement does not affect the file pointer.
38
+
**_read** returns the number of bytes read, which might be less than *buffer_size* if there are fewer than *buffer_size* bytes left in the file, or if the file was opened in text mode. In text mode, each carriage return-line feed pair `\r\n` is replaced with a single linefeed character `\n`. Only the single linefeed character is counted in the return value. The replacement does not affect the file pointer.
39
39
40
-
If the function tries to read at end of file, it returns 0. If *fd* is not valid, the file is not open for reading, or the file is locked, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns -1 and sets **errno** to **EBADF**.
40
+
If the function tries to read at end of file, it returns 0. If *fd* is not valid, the file isn't open for reading, or the file is locked, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns -1 and sets **errno** to **EBADF**.
41
41
42
-
If *buffer* is **NULL**, the invalid parameter handler is invoked. If execution is allowed to continue, the function returns -1 and **errno** is set to **EINVAL**.
42
+
If *buffer* is **NULL**, or if *buffer_size* > **INT_MAX**, the invalid parameter handler is invoked. If execution is allowed to continue, the function returns -1 and **errno** is set to **EINVAL**.
43
43
44
44
For more information about this and other return codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md).
45
45
46
46
## Remarks
47
47
48
-
The **_read** function reads a maximum of *count* bytes into *buffer* from the file associated with *fd*. The read operation begins at the current position of the file pointer associated with the given file. After the read operation, the file pointer points to the next unread character.
48
+
The **_read** function reads a maximum of *buffer_size* bytes into *buffer* from the file associated with *fd*. The read operation begins at the current position of the file pointer associated with the given file. After the read operation, the file pointer points to the next unread character.
49
49
50
50
If the file was opened in text mode, the read terminates when **_read** encounters a CTRL+Z character, which is treated as an end-of-file indicator. Use [_lseek](lseek-lseeki64.md) to clear the end-of-file indicator.
0 commit comments