Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

difference betweenn _stat and _wstat

183 views
Skip to first unread message

Thomas Wegener

unread,
Oct 18, 2005, 7:00:47 AM10/18/05
to
Hi,
anybody know the difference between _stat and _wstat.
Thomas


Alex Blekhman

unread,
Oct 18, 2005, 7:18:56 AM10/18/05
to
Thomas Wegener wrote:
> Hi,
> anybody know the difference between _stat and _wstat.

_wstat is a wide-character version of _stat; the path
argument to _wstat is a wide-character string. _wstat and
_stat behave identically except that _wstat does not handle
multibyte-character strings.


Tom Serface

unread,
Oct 18, 2005, 10:24:02 AM10/18/05
to
I don't know that this is universally true, but most of the time when you
see a "w" on the beginning or end of a function it means that it is the wide
character (Unicode) version. If you use _T() and TCHAR() macros in your
code and _t calls to functions they will compiled based on the _UNICODE or
_MBCS macro settings in your compile specifications. In this case _tstat()
would give you _stat if _MBCS defined and _wstat if _UNICODE is defined.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt__stat.2c_._wstat.2c_._stati64.2c_._wstati64.aspI also think this might be an interesting article for you:http://www.i18nguy.com/unicode/c-unicode.htmlTom"Thomas Wegener" <t.we...@mum.de> wrote in messagenews:uX$ESN90F...@TK2MSFTNGP14.phx.gbl...> Hi,> anybody know the difference between _stat and _wstat.> Thomas>>

Thomas Wegener

unread,
Oct 18, 2005, 4:30:54 PM10/18/05
to
Sorry and thanks I confused

struct _stat;

with

int _wstat(
const wchar_t *path,
struct _stat *buffer
);

Thomas

"Tom Serface" <tser...@msn.com> schrieb im Newsbeitrag
news:e385Z%23%230FH...@TK2MSFTNGP09.phx.gbl...

0 new messages