src/14-SysInfo/SysInfo.cpp
// This function accepts a number and converts it to a
// string, inserting commas where appropriate.

This function accepts a number and converts it to a
string, inserting commas where appropriate.
This function accepts a number and converts it to a string inserting commas where appropriate .
PTSTR BigNumToString(LONG lNum, PTSTR szBuf, DWORD chBufSize) {
   TCHAR szNum[100];
   StringCchPrintf(szNum, _countof(szNum), TEXT("%d"), lNum);
   NUMBERFMT nf;
   nf.NumDigits = 0;
   nf.LeadingZero = FALSE;
   nf.Grouping = 3;
   nf.lpDecimalSep = TEXT(".");
   nf.lpThousandSep = TEXT(",");
   nf.NegativeOrder = 0;
   GetNumberFormat(LOCALE_USER_DEFAULT, 0, szNum, &nf, szBuf, chBufSize);
   return(szBuf);
}
PTSTR BigNumToString ( LONG lNum , PTSTR szBuf , DWORD chBufSize ) { TCHAR szNum [ 100 ] ; StringCchPrintf ( szNum , _countof ( szNum ) , TEXT ( " " ) , lNum ) ; NUMBERFMT nf ; nf . NumDigits = 0 ; nf . LeadingZero = FALSE ; nf . Grouping = 3 ; nf . lpDecimalSep = TEXT ( " " ) ; nf . lpThousandSep = TEXT ( " " ) ; nf . NegativeOrder = 0 ; GetNumberFormat ( LOCALE_USER_DEFAULT , 0 , szNum , & nf , szBuf , chBufSize ) ; return ( szBuf ) ; }
This function accepts a number and converts it to a
string, inserting commas where appropriate.
This function accepts a number and converts it to a string inserting commas where appropriate .