Article ID: 193509
Article Last Modified on 8/7/2007
// Compile /MT or /MD
#include <process.h>
#include <time.h>
#include <locale.h>
void work( void* pArg ) // This uses the locale info pointer.
{
char str256[256];
time_t t;
struct tm* ptm;
t = time(0);
ptm = localtime( &t );
for (;;) strftime( str256, 256, "%a%b%c%d%x%y", ptm );
}
void main()
{
_beginthread( work, 0, 0 );
for(;;) // This changes the locale info pointer.
{
setlocale(LC_ALL,"english");
setlocale(LC_ALL,"german");
setlocale(LC_ALL,"french");
setlocale(LC_ALL,"spannis");
setlocale(LC_ALL,"russian");
}
}
Keywords: kbbug kbcrt kbfix kbvs600sp1fix kbvs600sp2fix KB193509