Skip to content

Commit faab99c

Browse files
author
Colin Robertson
authored
Merge pull request MicrosoftDocs#164 from stwish-msft/master
Mention restriction for accessing pgmptr
2 parents 69e9ca5 + aeb97ae commit faab99c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/c-runtime-library/reference/get-pgmptr.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ errno_t _get_pgmptr( 
3939
Returns zero if successful; an error code on failure. If `pValue` is `NULL`, the invalid parameter handler is invoked as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets `errno` to `EINVAL` and returns `EINVAL`.
4040

4141
## Remarks
42-
The `_pgmptr` global variable contains the full path to the executable associated with the process. For more information, see [_pgmptr, _wpgmptr](../../c-runtime-library/pgmptr-wpgmptr.md).
42+
Only call `_get_pgmptr` if your program has a narrow entry point, like `main()` or `WinMain()`. The `_pgmptr` global variable contains the full path to the executable associated with the process. For more information, see [_pgmptr, _wpgmptr](../../c-runtime-library/pgmptr-wpgmptr.md).
4343

4444
## Requirements
4545

@@ -50,4 +50,4 @@ errno_t _get_pgmptr( 
5050
For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md) in the Introduction.
5151

5252
## See Also
53-
[_get_wpgmptr](../../c-runtime-library/reference/get-wpgmptr.md)
53+
[_get_wpgmptr](../../c-runtime-library/reference/get-wpgmptr.md)

docs/c-runtime-library/reference/get-wpgmptr.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ errno_t _get_wpgmptr( 
3939
Returns zero if successful; an error code on failure. If `pValue` is `NULL`, the invalid parameter handler is invoked as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets `errno` to `EINVAL` and returns `EINVAL`.
4040

4141
## Remarks
42-
The `_wpgmptr` global variable contains the full path to the executable associated with the process as a wide-character string. For more information, see [_pgmptr, _wpgmptr](../../c-runtime-library/pgmptr-wpgmptr.md).
42+
Only call `_get_wpgmptr` if your program has a wide entry point, like `wmain()` or `wWinMain()`. The `_wpgmptr` global variable contains the full path to the executable associated with the process as a wide-character string. For more information, see [_pgmptr, _wpgmptr](../../c-runtime-library/pgmptr-wpgmptr.md).
4343

4444
## Requirements
4545

@@ -50,4 +50,4 @@ errno_t _get_wpgmptr( 
5050
For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md) in the Introduction.
5151

5252
## See Also
53-
[_get_pgmptr](../../c-runtime-library/reference/get-pgmptr.md)
53+
[_get_pgmptr](../../c-runtime-library/reference/get-pgmptr.md)

0 commit comments

Comments
 (0)