{\r
HICON hiconItem; /* icon for list-view items */\r
HIMAGELIST hSmall; /* image list for other views */\r
- TCHAR buf[256];\r
+ TCHAR buf[300];\r
\r
/* Create the icon image lists */\r
hSmall = ImageList_Create(GetSystemMetrics(SM_CXSMICON),\r
\r
/* set the number of services in the status bar */\r
LoadString(hInstance, IDS_SERVICES_NUM_SERVICES, szNumServices, 32);\r
- _stprintf(buf, szNumServices, NumServices);\r
+ _sntprintf(buf, 300, szNumServices, NumServices);\r
SendMessage(hStatus, SB_SETTEXT, 0, (LPARAM)buf);\r
\r
\r
DWORD dwValueSize;\r
\r
/* open the registry key for the service */\r
- _stprintf(buf, _T("System\\CurrentControlSet\\Services\\%s"),\r
+ _sntprintf(buf, 300, _T("System\\CurrentControlSet\\Services\\%s"),\r
pServiceStatus[Index].lpServiceName);\r
\r
if( RegOpenKeyEx(HKEY_LOCAL_MACHINE,\r