Changed PATH_LEN constant to internal MAX_PATH.
This commit is contained in:
@@ -4,7 +4,6 @@
|
|||||||
#include "framework.h"
|
#include "framework.h"
|
||||||
|
|
||||||
#define TS_LEN 30
|
#define TS_LEN 30
|
||||||
#define PATH_LEN 1024
|
|
||||||
|
|
||||||
std::ofstream logfile;
|
std::ofstream logfile;
|
||||||
extern WCHAR szTitle[];
|
extern WCHAR szTitle[];
|
||||||
@@ -21,8 +20,8 @@ std::string GetTimeStamp()
|
|||||||
|
|
||||||
void OpenLogFile()
|
void OpenLogFile()
|
||||||
{
|
{
|
||||||
WCHAR lpszPath[PATH_LEN] = { 0 };
|
WCHAR lpszPath[MAX_PATH + 1] = { 0 };
|
||||||
DWORD dwPathLength = GetModuleFileNameW(NULL, lpszPath, PATH_LEN);
|
DWORD dwPathLength = GetModuleFileNameW(NULL, lpszPath, MAX_PATH);
|
||||||
DWORD dwError = GetLastError();
|
DWORD dwError = GetLastError();
|
||||||
if (ERROR_INSUFFICIENT_BUFFER == dwError)
|
if (ERROR_INSUFFICIENT_BUFFER == dwError)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user