Skip to content

Commit ba041aa

Browse files
Fix usage of load library (#91483)
* Use LoadLibraryExW on Windows.
1 parent c418a28 commit ba041aa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/coreclr/debug/di/process.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,11 @@ STDAPI DLLEXPORT OpenVirtualProcessImpl2(
180180
IUnknown ** ppInstance,
181181
CLR_DEBUGGING_PROCESS_FLAGS* pFlagsOut)
182182
{
183+
#ifdef TARGET_WINDOWS
184+
HMODULE hDac = LoadLibraryExW(pDacModulePath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
185+
#else
183186
HMODULE hDac = LoadLibraryW(pDacModulePath);
187+
#endif // !TARGET_WINDOWS
184188
if (hDac == NULL)
185189
{
186190
return HRESULT_FROM_WIN32(GetLastError());

0 commit comments

Comments
 (0)