From dd7e08cc7c34b492f706e250a943469dd0f5b054 Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Wed, 15 Feb 2006 13:37:18 +0100 Subject: [PATCH] shdocvw: Implemented a couple of forwards to shlwapi. --- dlls/shdocvw/Makefile.in | 2 +- dlls/shdocvw/shdocvw.spec | 9 +++--- dlls/shdocvw/shdocvw_main.c | 70 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+), 5 deletions(-) diff --git a/dlls/shdocvw/Makefile.in b/dlls/shdocvw/Makefile.in index 74a671ee898..2372d8a8843 100644 --- a/dlls/shdocvw/Makefile.in +++ b/dlls/shdocvw/Makefile.in @@ -5,7 +5,7 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = shdocvw.dll IMPORTLIB = libshdocvw.$(IMPLIBEXT) -IMPORTS = user32 advapi32 kernel32 +IMPORTS = shlwapi user32 advapi32 kernel32 DELAYIMPORTS = urlmon ole32 oleaut32 EXTRALIBS = -luuid diff --git a/dlls/shdocvw/shdocvw.spec b/dlls/shdocvw/shdocvw.spec index 9b41f587377..636461cfcd8 100644 --- a/dlls/shdocvw/shdocvw.spec +++ b/dlls/shdocvw/shdocvw.spec @@ -2,7 +2,7 @@ 101 stub -noname IEWinMain 102 stub -noname CreateShortcutInDirA 103 stub -noname CreateShortcutInDirW -104 stub -noname WhichPlatformFORWARD +104 stdcall -noname WhichPlatformFORWARD() 105 stub -noname CreateShortcutInDirEx 106 stub HlinkFindFrame 107 stub SetShellOfflineState @@ -15,9 +15,10 @@ 118 stdcall -noname ShellDDEInit(long) 119 stub -noname SHCreateDesktop 120 stub -noname SHDesktopMessageLoop -121 stub -noname StopWatchModeFORWARD -122 stub -noname StopWatchFlushFORWARD -123 stub -noname StopWatchFORWARD +121 stdcall -noname StopWatchModeFORWARD() +122 stdcall -noname StopWatchFlushFORWARD() +123 stdcall -noname StopWatchAFORWARD(long str long long long) +124 stdcall -noname StopWatchWFORWARD(long wstr long long long) 125 stdcall -noname RunInstallUninstallStubs() 130 stub -noname RunInstallUninstallStubs2 131 stub -noname SHCreateSplashScreen diff --git a/dlls/shdocvw/shdocvw_main.c b/dlls/shdocvw/shdocvw_main.c index 179d34a4bc3..83b03d0d6bb 100644 --- a/dlls/shdocvw/shdocvw_main.c +++ b/dlls/shdocvw/shdocvw_main.c @@ -586,3 +586,73 @@ void WINAPI OpenURL(HWND hWnd, HINSTANCE hInst, LPCSTR lpcstrUrl, int nShowCmd) { FIXME("%p %p %s %d\n", hWnd, hInst, debugstr_a(lpcstrUrl), nShowCmd); } + +/********************************************************************** + * Some forwards (by ordinal) to SHLWAPI + */ + +static void* fetch_shlwapi_ordinal(unsigned ord) +{ + static const WCHAR shlwapiW[] = {'s','h','l','w','a','p','i','.','d','l','l','\0'}; + static HANDLE h; + + if (!h && !(h = GetModuleHandleW(shlwapiW))) return NULL; + return (void*)GetProcAddress(h, (const char*)ord); +} + +/****************************************************************** + * WhichPlatformFORWARD (SHDOCVW.@) + */ +DWORD WINAPI WhichPlatformFORWARD(void) +{ + static DWORD (*WINAPI p)(void); + + if (p || (p = fetch_shlwapi_ordinal(276))) return p(); + return 1; /* not integrated, see shlwapi.WhichPlatform */ +} + +/****************************************************************** + * StopWatchModeFORWARD (SHDOCVW.@) + */ +void WINAPI StopWatchModeFORWARD(void) +{ + static void (*WINAPI p)(void); + + if (p || (p = fetch_shlwapi_ordinal(241))) p(); +} + +/****************************************************************** + * StopWatchFlushFORWARD (SHDOCVW.@) + */ +void WINAPI StopWatchFlushFORWARD(void) +{ + static void (*WINAPI p)(void); + + if (p || (p = fetch_shlwapi_ordinal(242))) p(); +} + +/****************************************************************** + * StopWatchWFORWARD (SHDOCVW.@) + */ +DWORD WINAPI StopWatchWFORWARD(DWORD dwClass, LPCWSTR lpszStr, DWORD dwUnknown, + DWORD dwMode, DWORD dwTimeStamp) +{ + static DWORD (*WINAPI p)(DWORD, LPCWSTR, DWORD, DWORD, DWORD); + + if (p || (p = fetch_shlwapi_ordinal(243))) + return p(dwClass, lpszStr, dwUnknown, dwMode, dwTimeStamp); + return ERROR_CALL_NOT_IMPLEMENTED; +} + +/****************************************************************** + * StopWatchAFORWARD (SHDOCVW.@) + */ +DWORD WINAPI StopWatchAFORWARD(DWORD dwClass, LPCSTR lpszStr, DWORD dwUnknown, + DWORD dwMode, DWORD dwTimeStamp) +{ + static DWORD (*WINAPI p)(DWORD, LPCSTR, DWORD, DWORD, DWORD); + + if (p || (p = fetch_shlwapi_ordinal(244))) + return p(dwClass, lpszStr, dwUnknown, dwMode, dwTimeStamp); + return ERROR_CALL_NOT_IMPLEMENTED; +} -- 2.11.4.GIT