Index: CMakeLists.txt =================================================================== --- CMakeLists.txt (revision 70974) +++ CMakeLists.txt (working copy) @@ -53,6 +53,7 @@ shlfolder.cpp CFileSysBindData.cpp CDefView.cpp + shhelp.cpp stubs.cpp systray.cpp CDefaultContextMenu.cpp Index: shell32.spec =================================================================== --- shell32.spec (revision 70974) +++ shell32.spec (working copy) @@ -317,9 +317,9 @@ 318 stdcall SHGetSpecialFolderPathA(long ptr long long) 319 stdcall SHGetSpecialFolderPathW(long ptr long long) 320 stdcall SHGetUnreadMailCountW (long wstr long ptr wstr long) -321 stdcall SHHelpShortcuts_RunDLL(long long long long) SHHelpShortcuts_RunDLLA -322 stdcall SHHelpShortcuts_RunDLLA(long long long long) -323 stdcall SHHelpShortcuts_RunDLLW(long long long long) +321 stdcall SHHelpShortcuts_RunDLL(ptr ptr str long) SHHelpShortcuts_RunDLLA +322 stdcall SHHelpShortcuts_RunDLLA(ptr ptr str long) +323 stdcall SHHelpShortcuts_RunDLLW(ptr ptr wstr long) 324 stdcall SHInvokePrinterCommandA(ptr long str str long) 325 stdcall SHInvokePrinterCommandW(ptr long wstr wstr long) 326 stdcall SHIsFileAvailableOffline(wstr ptr) Index: shhelp.cpp =================================================================== --- shhelp.cpp (revision 0) +++ shhelp.cpp (working copy) @@ -0,0 +1,83 @@ +/* + * SHHelpShortcuts_RunDLL Implementation + * + * Copyright 2016 Jared Smudde + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "precomp.h" + +WINE_DEFAULT_DEBUG_CHANNEL (shhelp); + +static +VOID +Shortcuts_RunDLLCommon(HWND hWnd, HINSTANCE hInst, int sOptions, DWORD dwShowWindow) +{ + WCHAR szPath[MAX_PATH]; + + switch(sOptions) + { + case 0: //AddPrinter + FIXME("Add printer is unimplemented\n") + break; + case 1: //Connect + WNetConnectionDialog(hWnd, RESOURCETYPE_DISK); + break; + case 2: //Disconnect + WNetDisconnectDialog(hWnd, RESOURCETYPE_DISK); + break; + case 3: //FontsFolder + if(SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_FONTS, NULL, 0, szPath))) + { + ShellExecuteW(NULL, L"explore", szPath, NULL, NULL, SW_SHOWNORMAL); + } + break; + case 4: //PrintersFolder + if(SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_PRINTERS, NULL, 0, szPath))) + { + ShellExecuteW(NULL, L"explore", szPath, NULL, NULL, SW_SHOWNORMAL); + } + break; + default: + FIXME("unrecognized options id %d\n", sOptions); + } +} + +/************************************************************************* + * SHHelpShortcuts_RunDLL (SHELL32.@) + */ +EXTERN_C VOID WINAPI SHHelpShortcuts_RunDLL(HWND hWnd, HINSTANCE hInst, LPCSTR szCommand, DWORD dwShowWindow) +{ + Shortcuts_RunDLLCommon(hWnd, hInst, StrToIntA(szCommand), dwShowWindow); +} + +/************************************************************************* + * SHHelpShortcuts_RunDLLA [SHELL32.@] + * + */ +EXTERN_C VOID WINAPI SHHelpShortcuts_RunDLLA(HWND hWnd, HINSTANCE hInst, LPCSTR szCommand, DWORD dwShowWindow) +{ + Shortcuts_RunDLLCommon(hWnd, hInst, StrToIntA(szCommand), dwShowWindow); +} + +/************************************************************************* + * SHHelpShortcuts_RunDLLW [SHELL32.@] +* + */ +EXTERN_C VOID WINAPI SHHelpShortcuts_RunDLLW(HWND hWnd, HINSTANCE hInst, LPCWSTR szCommand, DWORD dwShowWindow) +{ + Shortcuts_RunDLLCommon(hWnd, hInst, StrToIntW(szCommand), dwShowWindow); +} \ No newline at end of file Index: wine/shell32_main.c =================================================================== --- wine/shell32_main.c (revision 70974) +++ wine/shell32_main.c (working copy) @@ -1002,26 +1002,6 @@ } /************************************************************************* - * SHHelpShortcuts_RunDLLA [SHELL32.@] - * - */ -DWORD WINAPI SHHelpShortcuts_RunDLLA(DWORD dwArg1, DWORD dwArg2, DWORD dwArg3, DWORD dwArg4) -{ - FIXME("(%x, %x, %x, %x) stub!\n", dwArg1, dwArg2, dwArg3, dwArg4); - return 0; -} - -/************************************************************************* - * SHHelpShortcuts_RunDLLA [SHELL32.@] - * - */ -DWORD WINAPI SHHelpShortcuts_RunDLLW(DWORD dwArg1, DWORD dwArg2, DWORD dwArg3, DWORD dwArg4) -{ - FIXME("(%x, %x, %x, %x) stub!\n", dwArg1, dwArg2, dwArg3, dwArg4); - return 0; -} - -/************************************************************************* * SHLoadInProc [SHELL32.@] * Create an instance of specified object class from within * the shell process and release it immediately