Sync to Wine-20040615:

Hans Leidekker <[email protected]>
- Link to ntdll.
Raphael Junqueira <[email protected]>
- Stub for SHFlushSFCacheWrap.
Eric Pouech <[email protected]>
- GetModuleFileName[AW] doesn't terminate the string if the buffer is
  too small.
Stefan Leichter <[email protected]>
- Moved stub of StopWatch from ascii to unicode.

svn path=/trunk/; revision=9684
This commit is contained in:
Gé van Geldorp
2004-06-16 18:27:33 +00:00
parent 2b3293eb3a
commit fd397eeccd
5 changed files with 36 additions and 17 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = shlwapi.dll
IMPORTS = ole32 user32 gdi32 advapi32 kernel32
IMPORTS = ole32 user32 gdi32 advapi32 kernel32 ntdll
DELAYIMPORTS = oleaut32
EXTRALIBS = -luuid $(LIBUNICODE)
+16 -2
View File
@@ -3265,9 +3265,12 @@ HMODULE WINAPI MLLoadLibraryA(LPCSTR new_mod, HMODULE inst_hwnd, DWORD dwFlags)
*/
CHAR mod_path[2*MAX_PATH];
LPSTR ptr;
DWORD len;
FIXME("(%s,%p,0x%08lx) semi-stub!\n", debugstr_a(new_mod), inst_hwnd, dwFlags);
GetModuleFileNameA(inst_hwnd, mod_path, 2*MAX_PATH);
len = GetModuleFileNameA(inst_hwnd, mod_path, sizeof(mod_path));
if (!len || len >= sizeof(mod_path)) return NULL;
ptr = strrchr(mod_path, '\\');
if (ptr) {
strcpy(ptr+1, new_mod);
@@ -3286,9 +3289,12 @@ HMODULE WINAPI MLLoadLibraryW(LPCWSTR new_mod, HMODULE inst_hwnd, DWORD dwFlags)
{
WCHAR mod_path[2*MAX_PATH];
LPWSTR ptr;
DWORD len;
FIXME("(%s,%p,0x%08lx) semi-stub!\n", debugstr_w(new_mod), inst_hwnd, dwFlags);
GetModuleFileNameW(inst_hwnd, mod_path, 2*MAX_PATH);
len = GetModuleFileNameW(inst_hwnd, mod_path, sizeof(mod_path) / sizeof(WCHAR));
if (!len || len >= sizeof(mod_path) / sizeof(WCHAR)) return NULL;
ptr = strrchrW(mod_path, '\\');
if (ptr) {
strcpyW(ptr+1, new_mod);
@@ -3506,6 +3512,14 @@ BOOL WINAPI MLFreeLibrary(HMODULE hModule)
return FreeLibrary(hModule);
}
/*************************************************************************
* @ [SHLWAPI.419]
*/
BOOL WINAPI SHFlushSFCacheWrap(void) {
FIXME(": stub\n");
return TRUE;
}
/*************************************************************************
* @ [SHLWAPI.429]
* FIXME I have no idea what this function does or what its arguments are.
+1 -1
View File
@@ -416,7 +416,7 @@
416 stub -noname SHWinHelpOnDemandW
417 stub -noname SHWinHelpOnDemandA
418 stdcall -noname MLFreeLibrary(long)
419 stub -noname SHFlushSFCacheWrap
419 stdcall -noname SHFlushSFCacheWrap()
420 stub @ # CMemStream::Commit
421 stub -noname SHLoadPersistedDataObject
422 stdcall -noname _SHGlobalCounterCreateNamedA(str long)
+15 -12
View File
@@ -38,6 +38,7 @@
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "winternl.h"
#define NO_SHLWAPI_STREAM
#include "shlwapi.h"
#include "wine/debug.h"
@@ -81,9 +82,8 @@ void WINAPI StopWatchFlush()
FIXME("() stub!\n");
}
/*************************************************************************
* @ [SHLWAPI.243]
* @ [SHLWAPI.244]
*
* Write a performance event to a log file
*
@@ -98,28 +98,31 @@ void WINAPI StopWatchFlush()
* Success: ERROR_SUCCESS.
* Failure: A standard Win32 error code indicating the failure.
*/
DWORD WINAPI StopWatchA(DWORD dwClass, LPCSTR lpszStr, DWORD dwUnknown,
DWORD WINAPI StopWatchW(DWORD dwClass, LPCWSTR lpszStr, DWORD dwUnknown,
DWORD dwMode, DWORD dwTimeStamp)
{
FIXME("(%ld,%s,%ld,%ld,%ld) stub!\n", dwClass, debugstr_a(lpszStr),
FIXME("(%ld,%s,%ld,%ld,%ld) stub!\n", dwClass, debugstr_w(lpszStr),
dwUnknown, dwMode, dwTimeStamp);
return ERROR_SUCCESS;
}
/*************************************************************************
* @ [SHLWAPI.244]
* @ [SHLWAPI.243]
*
* See StopWatchA.
* See StopWatchW.
*/
DWORD WINAPI StopWatchW(DWORD dwClass, LPCWSTR lpszStr, DWORD dwUnknown,
DWORD WINAPI StopWatchA(DWORD dwClass, LPCSTR lpszStr, DWORD dwUnknown,
DWORD dwMode, DWORD dwTimeStamp)
{
char szBuff[MAX_PATH];
{ DWORD retval;
UNICODE_STRING szStrW;
if(!WideCharToMultiByte(0, 0, lpszStr, -1, szBuff, MAX_PATH, 0, 0))
return ERROR_NOT_ENOUGH_MEMORY;
if(lpszStr) RtlCreateUnicodeStringFromAsciiz(&szStrW, lpszStr);
else szStrW.Buffer = NULL;
return StopWatchA(dwClass, szBuff, dwUnknown, dwMode, dwTimeStamp);
retval = StopWatchW(dwClass, szStrW.Buffer, dwUnknown, dwMode, dwTimeStamp);
RtlFreeUnicodeString(&szStrW);
return retval;
}
/*************************************************************************
+3 -1
View File
@@ -2428,8 +2428,10 @@ HRESULT WINAPI MLBuildResURLW(LPCWSTR lpszLibName, HMODULE hMod, DWORD dwFlags,
if (hMod)
{
WCHAR szBuff[MAX_PATH];
DWORD len;
if (GetModuleFileNameW(hMod, szBuff, sizeof(szBuff)/sizeof(WCHAR)))
len = GetModuleFileNameW(hMod, szBuff, sizeof(szBuff)/sizeof(WCHAR));
if (len && len < sizeof(szBuff)/sizeof(WCHAR))
{
DWORD dwPathLen = strlenW(szBuff) + 1;