diff --git a/dll/win32/shell32/CMakeLists.txt b/dll/win32/shell32/CMakeLists.txt index 5f972807c8b..5d039de91d1 100644 --- a/dll/win32/shell32/CMakeLists.txt +++ b/dll/win32/shell32/CMakeLists.txt @@ -117,9 +117,10 @@ add_typelib(shell32_shldisp.idl) set_source_files_properties(shell32.rc PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/shell32_shldisp.tlb) set_module_type(shell32 win32dll UNICODE) -target_link_libraries(shell32 shellmenu shelldesktop wine uuid recyclebin cpprt atl_classes) +target_link_libraries(shell32 shellmenu pathcch shelldesktop wine uuid recyclebin cpprt atl_classes) add_delay_importlibs(shell32 powrprof shdocvw devmgr winspool.drv winmm mpr uxtheme ole32 oleaut32 userenv browseui version fmifs) add_importlibs(shell32 advapi32 gdi32 user32 comctl32 comdlg32 shlwapi msvcrt kernel32 ntdll) add_dependencies(shell32 stdole2) # shell32_shldisp.tlb needs stdole2.tlb add_pch(shell32 precomp.h "${PCH_SKIP_SOURCE}") add_cd_file(TARGET shell32 DESTINATION reactos/system32 FOR all) +target_include_directories(shell32 SYSTEM BEFORE PRIVATE ${REACTOS_SOURCE_DIR}/sdk/lib/pathcch) diff --git a/dll/win32/shell32/utils.cpp b/dll/win32/shell32/utils.cpp index 697a4f59cea..2156aeca1c5 100644 --- a/dll/win32/shell32/utils.cpp +++ b/dll/win32/shell32/utils.cpp @@ -6,6 +6,8 @@ */ #include "precomp.h" +#define STATIC_PATHCCH +#include WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -619,6 +621,8 @@ SHStartNetConnectionDialogA( { LPCWSTR pszRemoteNameW = NULL; CStringW strRemoteNameW; + WCHAR szPath[MAX_PATH]; + LPWSTR psz = NULL; TRACE("(%p, %s, %lu)\n", hwnd, debugstr_a(pszRemoteName), dwType); @@ -628,5 +632,7 @@ SHStartNetConnectionDialogA( pszRemoteNameW = strRemoteNameW; } + PathCchFindExtension(szPath, _countof(szPath), &psz); + return SHStartNetConnectionDialogW(hwnd, pszRemoteNameW, dwType); }