From 4c814798c7bc7f6a0f92c21b027b26290622aa2f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 19 Jun 2015 19:35:42 +0000 Subject: SIZEOF replaced with more secure analog - _countof git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/ShellExt/src/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/ShellExt/src/main.cpp') diff --git a/plugins/ShellExt/src/main.cpp b/plugins/ShellExt/src/main.cpp index 12a09506a4..10e018ae3e 100644 --- a/plugins/ShellExt/src/main.cpp +++ b/plugins/ShellExt/src/main.cpp @@ -26,8 +26,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) if (fdwReason == DLL_PROCESS_ATTACH) { bIsVistaPlus = GetProcAddress( GetModuleHandleA("kernel32.dll"), "GetProductInfo") != NULL; - GetTempPath(SIZEOF(tszLogPath), tszLogPath); - _tcscat_s(tszLogPath, SIZEOF(tszLogPath), _T("shlext.log")); + GetTempPath(_countof(tszLogPath), tszLogPath); + _tcscat_s(tszLogPath, _countof(tszLogPath), _T("shlext.log")); hInst = hinstDLL; DisableThreadLibraryCalls(hinstDLL); @@ -127,7 +127,7 @@ STDAPI DllRegisterServer() return E_FAIL; TCHAR tszFileName[MAX_PATH]; - GetModuleFileName(hInst, tszFileName, SIZEOF(tszFileName)); + GetModuleFileName(hInst, tszFileName, _countof(tszFileName)); if ( RegSetValueEx(kInprocServer, NULL, 0, REG_SZ, (LPBYTE)tszFileName, sizeof(TCHAR)*(lstrlen(tszFileName)+1))) return E_FAIL; if ( RegSetValueExA(kInprocServer, "ThreadingModel", 0, REG_SZ, (PBYTE)str4, sizeof(str4))) -- cgit v1.2.3