summaryrefslogtreecommitdiff
path: root/src/vm/eventreporter.cpp
diff options
context:
space:
mode:
authorRama Krishnan Raghupathy <ramarag@microsoft.com>2016-02-18 18:21:18 -0800
committerRama Krishnan Raghupathy <ramarag@microsoft.com>2016-02-19 18:09:11 -0800
commitf98fb85e72d0f24c58d9e54b8b3bff2c67f985fb (patch)
treea532e7803fbbe420807eb7d9390108554b02c46d /src/vm/eventreporter.cpp
parent01ffa08a2e4748e9826956ea961eacb227b6ee87 (diff)
downloadcoreclr-f98fb85e72d0f24c58d9e54b8b3bff2c67f985fb.tar.gz
coreclr-f98fb85e72d0f24c58d9e54b8b3bff2c67f985fb.tar.bz2
coreclr-f98fb85e72d0f24c58d9e54b8b3bff2c67f985fb.zip
This Change Adds initial Support for LongFiles in the VM,
They are: 1. Wrappers for OS APIs which take or return PATHS 2. Fixing the usage of following Api's: GetEnvironmentVariableW SearchPathW GetShortPathNameW GetLongPathNameW GetModuleFileName Work remaining: Remove fixed size buffers in the VM
Diffstat (limited to 'src/vm/eventreporter.cpp')
-rw-r--r--src/vm/eventreporter.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vm/eventreporter.cpp b/src/vm/eventreporter.cpp
index e07a6401cd..567f4f5d51 100644
--- a/src/vm/eventreporter.cpp
+++ b/src/vm/eventreporter.cpp
@@ -47,8 +47,8 @@ EventReporter::EventReporter(EventReporterType type)
m_eventType = type;
HMODULE hModule = WszGetModuleHandle(NULL);
- WCHAR appPath[MAX_LONGPATH];
- DWORD ret = WszGetModuleFileName(hModule, appPath, NumItems(appPath));
+ PathString appPath;
+ DWORD ret = WszGetModuleFileName(hModule, appPath);
fBufferFull = FALSE;
@@ -65,7 +65,7 @@ EventReporter::EventReporter(EventReporterType type)
if (ret != 0)
{
// If app name has a '\', consider the part after that; otherwise consider whole name.
- WCHAR* appName = wcsrchr(appPath, W('\\'));
+ LPCWSTR appName = wcsrchr(appPath, W('\\'));
appName = appName ? appName+1 : appPath;
m_Description.Append(appName);
m_Description.Append(W("\n"));
@@ -808,8 +808,8 @@ void EventReporter::GetCoreCLRInstanceProductVersion(DWORD * pdwMajor, DWORD * p
_ASSERTE(hModRuntime != NULL);
// Get the path to the runtime
- WCHAR runtimePath[MAX_LONGPATH];
- DWORD ret = WszGetModuleFileName(hModRuntime, runtimePath, NumItems(runtimePath));
+ PathString runtimePath;
+ DWORD ret = WszGetModuleFileName(hModRuntime, runtimePath);
if (ret != 0)
{
// Got the path - get the file version from the path