Skip to content

Commit dc79097

Browse files
author
Colin Robertson
authored
Merge pull request #799 from MicrosoftDocs/master636857661174391044
Fix git push error for protected CLA branch
2 parents 8d68d18 + 302e95b commit dc79097

19 files changed

+503
-677
lines changed

.openpublishing.redirection.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8015,6 +8015,51 @@
80158015
"redirect_url": "/cpp/windows/accelerator-editor",
80168016
"redirect_document_id": false
80178017
},
8018+
{
8019+
"source_path": "docs/windows/showing-or-hiding-the-dialog-editor-toolbar.md",
8020+
"redirect_url": "/cpp/windows/dialog-editor",
8021+
"redirect_document_id": false
8022+
},
8023+
{
8024+
"source_path": "docs/windows/switching-between-dialog-box-controls-and-code.md",
8025+
"redirect_url": "/cpp/windows/dialog-editor",
8026+
"redirect_document_id": false
8027+
},
8028+
{
8029+
"source_path": "docs/windows/accelerator-keys-for-the-dialog-editor.md",
8030+
"redirect_url": "/cpp/windows/dialog-editor",
8031+
"redirect_document_id": false
8032+
},
8033+
{
8034+
"source_path": "docs/windows/testing-a-dialog-box.md",
8035+
"redirect_url": "/cpp/windows/creating-a-new-dialog-box",
8036+
"redirect_document_id": false
8037+
},
8038+
{
8039+
"source_path": "docs/windows/custom-controls-in-the-dialog-editor.md",
8040+
"redirect_url": "/cpp/windows/controls-in-dialog-boxes",
8041+
"redirect_document_id": false
8042+
},
8043+
{
8044+
"source_path": "docs/windows/troubleshooting-the-dialog-editor.md",
8045+
"redirect_url": "/cpp/windows/adding-editing-or-deleting-controls",
8046+
"redirect_document_id": false
8047+
},
8048+
{
8049+
"source_path": "docs/windows/adding-values-to-a-combo-box-control.md",
8050+
"redirect_url": "/cpp/windows/defining-mnemonics-access-keys",
8051+
"redirect_document_id": false
8052+
},
8053+
{
8054+
"source_path": "docs/windows/selecting-controls.md",
8055+
"redirect_url": "/cpp/windows/arrangement-of-controls-on-dialog-boxes",
8056+
"redirect_document_id": false
8057+
},
8058+
{
8059+
"source_path": "docs/windows/sizing-individual-controls.md",
8060+
"redirect_url": "/cpp/windows/arrangement-of-controls-on-dialog-boxes",
8061+
"redirect_document_id": false
8062+
},
80188063
{
80198064
"source_path": "docs/windows/activationfactory-activationfactory-constructor.md",
80208065
"redirect_url": "/cpp/windows/activationfactory-class#activationfactory",

docs/build/reference/calling-conventions-parameters-and-return-type.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Calling Conventions, Parameters, and Return Type"
3-
ms.date: "11/04/2016"
3+
ms.date: "02/13/2019"
44
helpviewer_keywords: ["calling conventions, helper functions", "helper functions, calling conventions", "helper functions, return types"]
55
ms.assetid: 0ffa4558-6005-4803-be95-7a8ec8837660
66
---
@@ -18,12 +18,12 @@ FARPROC WINAPI __delayLoadHelper2(
1818
### Parameters
1919

2020
*pidd*<br/>
21-
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*.
2222

2323
For the definition of the `PCImgDelayDescr` structure, see [Structure and Constant Definitions](../../build/reference/structure-and-constant-definitions.md).
2424

2525
*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.
2727

2828
## Expected Return Values
2929

@@ -37,11 +37,11 @@ If the function fails, it raises an exception and returns 0. Three types of exce
3737

3838
- Failure of `GetProcAddress`.
3939

40-
It is your responsibility to handle these exceptions.
40+
It's your responsibility to handle these exceptions.
4141

4242
## Remarks
4343

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.
4545

4646
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.
4747

@@ -122,10 +122,10 @@ FARPROC WINAPI delayHook(unsigned dliNotify, PDelayLoadInfo pdli)
122122

123123
/*
124124
and then at global scope somewhere
125-
PfnDliHook __pfnDliNotifyHook2 = delayHook;
125+
const PfnDliHook __pfnDliNotifyHook2 = delayHook;
126126
*/
127127
```
128128
129-
## See Also
129+
## See also
130130
131131
[Understanding the Helper Function](../../build/reference/understanding-the-helper-function.md)

docs/c-runtime-library/reference/read.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "_read"
3-
ms.date: "11/04/2016"
3+
ms.date: "02/13/2019"
44
apiname: ["_read"]
55
apilocation: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
66
apitype: "DLLExport"
@@ -16,9 +16,9 @@ Reads data from a file.
1616

1717
```C
1818
int _read(
19-
int fd,
20-
void *buffer,
21-
unsigned int count
19+
int const fd,
20+
void * const buffer,
21+
unsigned const buffer_size
2222
);
2323
```
2424

@@ -30,22 +30,22 @@ File descriptor referring to the open file.
3030
*buffer*<br/>
3131
Storage location for data.
3232

33-
*count*<br/>
34-
Maximum number of bytes.
33+
*buffer_size*<br/>
34+
Maximum number of bytes to read.
3535

3636
## Return Value
3737

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.
3939

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**.
4141

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**.
4343

4444
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).
4545

4646
## Remarks
4747

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.
4949

5050
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.
5151

@@ -81,18 +81,18 @@ char buffer[60000];
8181

8282
int main( void )
8383
{
84-
int fh;
85-
unsigned int nbytes = 60000, bytesread;
84+
int fh, bytesread;
85+
unsigned int nbytes = 60000;
8686

8787
/* Open file for input: */
88-
if( _sopen_s( &fh, "crt_read.txt", _O_RDONLY, _SH_DENYNO, 0 ) )
88+
if ( _sopen_s( &fh, "crt_read.txt", _O_RDONLY, _SH_DENYNO, 0 ))
8989
{
9090
perror( "open failed on input file" );
9191
exit( 1 );
9292
}
9393

9494
/* Read in input: */
95-
if( ( bytesread = _read( fh, buffer, nbytes ) ) <= 0 )
95+
if (( bytesread = _read( fh, buffer, nbytes )) <= 0 )
9696
perror( "Problem reading file" );
9797
else
9898
printf( "Read %u bytes from file\n", bytesread );

docs/windows/TOC.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,10 @@
2626
#### [Binary Editor](binary-editor.md)
2727
#### [Dialog Editor](dialog-editor.md)
2828
##### [Creating a Dialog Box](creating-a-new-dialog-box.md)
29-
##### [Showing or Hiding the Dialog Editor Toolbar](showing-or-hiding-the-dialog-editor-toolbar.md)
30-
##### [Switching Between Dialog Box Controls and Code](switching-between-dialog-box-controls-and-code.md)
3129
##### [Controls in Dialog Boxes](controls-in-dialog-boxes.md)
3230
###### [Adding, Editing, or Deleting Controls](adding-editing-or-deleting-controls.md)
33-
###### [Selecting Controls](selecting-controls.md)
34-
###### [Sizing Controls](sizing-individual-controls.md)
35-
###### [Adding Values to a Combo Box Control](adding-values-to-a-combo-box-control.md)
3631
###### [Arrangement of Controls on Dialog Boxes](arrangement-of-controls-on-dialog-boxes.md)
37-
###### [Custom Controls in the Dialog Editor](custom-controls-in-the-dialog-editor.md)
38-
###### [Defining Mnemonics (Access Keys)](defining-mnemonics-access-keys.md)
39-
###### [Designing a Dialog Box](testing-a-dialog-box.md)
40-
##### [Accelerator Keys for the Dialog Editor](accelerator-keys-for-the-dialog-editor.md)
41-
##### [Troubleshooting the Dialog Editor](troubleshooting-the-dialog-editor.md)
42-
##### [Defining Member Variables for Dialog Controls](defining-member-variables-for-dialog-controls.md)
32+
###### [Defining Control Access and Values](defining-mnemonics-access-keys.md)
4333
#### [Image Editor for Icons](image-editor-for-icons.md)
4434
##### [Editing Graphical Resources (Image Editor for Icons)](editing-graphical-resources-image-editor-for-icons.md)
4535
###### [Creating an Icon or Other Image (Image Editor for Icons)](creating-an-icon-or-other-image-image-editor-for-icons.md)

docs/windows/accelerator-keys-for-the-dialog-editor.md

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)