summaryrefslogtreecommitdiff
path: root/src/vm/peimage.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/peimage.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/peimage.cpp')
-rw-r--r--src/vm/peimage.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/vm/peimage.cpp b/src/vm/peimage.cpp
index 27904ff476..cb1dd50c9d 100644
--- a/src/vm/peimage.cpp
+++ b/src/vm/peimage.cpp
@@ -422,15 +422,8 @@ void PEImage::GetPathFromDll(HINSTANCE hMod, SString &result)
}
CONTRACTL_END;
- DWORD ret;
- DWORD length = MAX_LONGPATH;
- do
- {
- WCHAR *buffer = result.OpenUnicodeBuffer(length);
- ret = WszGetModuleFileName(hMod, buffer, length);
- result.CloseBuffer(ret);
- length *= 2;
- } while (ret == 0);
+ WszGetModuleFileName(hMod, result);
+
}
#endif // !FEATURE_PAL