Moved stub of StopWatch from ascii to unicode.

This commit is contained in:
Stefan Leichter 2004-05-25 00:23:41 +00:00 committed by Alexandre Julliard
parent d5a31871cd
commit 307edcca15
1 changed files with 15 additions and 12 deletions

View File

@ -38,6 +38,7 @@
#include "wingdi.h" #include "wingdi.h"
#include "winuser.h" #include "winuser.h"
#include "winreg.h" #include "winreg.h"
#include "winternl.h"
#define NO_SHLWAPI_STREAM #define NO_SHLWAPI_STREAM
#include "shlwapi.h" #include "shlwapi.h"
#include "wine/debug.h" #include "wine/debug.h"
@ -81,9 +82,8 @@ void WINAPI StopWatchFlush()
FIXME("() stub!\n"); FIXME("() stub!\n");
} }
/************************************************************************* /*************************************************************************
* @ [SHLWAPI.243] * @ [SHLWAPI.244]
* *
* Write a performance event to a log file * Write a performance event to a log file
* *
@ -98,28 +98,31 @@ void WINAPI StopWatchFlush()
* Success: ERROR_SUCCESS. * Success: ERROR_SUCCESS.
* Failure: A standard Win32 error code indicating the failure. * 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) 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); dwUnknown, dwMode, dwTimeStamp);
return ERROR_SUCCESS; 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) DWORD dwMode, DWORD dwTimeStamp)
{ { DWORD retval;
char szBuff[MAX_PATH]; UNICODE_STRING szStrW;
if(!WideCharToMultiByte(0, 0, lpszStr, -1, szBuff, MAX_PATH, 0, 0)) if(lpszStr) RtlCreateUnicodeStringFromAsciiz(&szStrW, lpszStr);
return ERROR_NOT_ENOUGH_MEMORY; else szStrW.Buffer = NULL;
return StopWatchA(dwClass, szBuff, dwUnknown, dwMode, dwTimeStamp); retval = StopWatchW(dwClass, szStrW.Buffer, dwUnknown, dwMode, dwTimeStamp);
RtlFreeUnicodeString(&szStrW);
return retval;
} }
/************************************************************************* /*************************************************************************