//calculate the number of bytes of the max size
#define BUF_SIZE_BYTES(buf) (sizeof(buf)-sizeof(buf[0]))
//calculate the number of characters of the max size
#define BUF_SIZE_CHARS(buf) (sizeof(buf)/sizeof(buf[0]) -sizeof(buf[0]))
int _tmain(int argc, _TCHAR* argv[])
{
TCHAR aa[12] = TEXT("");
printf("BUF_SIZE_BYTES(aa)=%d\n",BUF_SIZE_BYTES(aa));
printf("BUF_SIZE_CHARS(aa)=%d\n",BUF_SIZE_CHARS(aa));
getchar();
return 0;
}