Export (0) Print
Expand All
div
eof
Expand Minimize
This topic has not yet been rated - Rate this topic

_ungetc_nolock, _ungetwc_nolock 

Pushes a character back onto the stream.


int _ungetc_nolock(
   int c,
      FILE *stream 
);
wint_t _ungetwc_nolock(
   wint_t c,
   FILE *stream 
);

Parameters

c

Character to be pushed.

stream

Pointer to FILE structure.

If successful, each of these functions returns the character argument c. If c cannot be pushed back or if no character has been read, the input stream is unchanged and _ungetc_nolock returns EOF; _ungetwc_nolock returns WEOF. If stream is NULL, EOF or WEOF is returned and errno is set to EINVAL.

For information on these and other error codes, see _doserrno, errno, _sys_errlist, and _sys_nerr.

These functions are non-locking versions of ungetc and ungetwc. The versions with the _nolock suffix are identical except that they are not protected from interference by other threads. They may be faster since they do not incur the overhead of locking out other threads. Use these functions only in thread-safe contexts such as single-threaded applications or where the calling scope already handles thread isolation.

Generic-Text Routine Mappings
TCHAR.H routine _UNICODE & _MBCS not defined _MBCS defined _UNICODE defined

_ungettc_nolock

_ungetc_nolock

_ungetc_nolock

_ungetwc_nolock

Routine Required header Compatibility

_ungetc_nolock

<stdio.h>

Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003

_ungetwc_nolock

<stdio.h> or <wchar.h>

Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003

For additional compatibility information, see Compatibility in the Introduction.

Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.