Owen Rudge : shlwapi: Implement stubs for SHFormatDateTimeA/W.
Alexandre Julliard
julliard at winehq.org
Tue Sep 8 08:55:57 CDT 2009
Module: wine
Branch: master
Commit: 79d671b7ec58943e76df42472789f9f24424daf1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=79d671b7ec58943e76df42472789f9f24424daf1
Author: Owen Rudge <orudge at codeweavers.com>
Date: Wed Sep 2 16:38:02 2009 +0100
shlwapi: Implement stubs for SHFormatDateTimeA/W.
---
dlls/shlwapi/ordinal.c | 50 +++++++++++++++++++++++++++++++++++++++++++++
dlls/shlwapi/shlwapi.spec | 4 +-
2 files changed, 52 insertions(+), 2 deletions(-)
diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c
index 5b00500..43b46a8 100644
--- a/dlls/shlwapi/ordinal.c
+++ b/dlls/shlwapi/ordinal.c
@@ -4622,3 +4622,53 @@ HRESULT WINAPI SHGetViewStatePropertyBag(LPCITEMIDLIST pidl, LPWSTR bag_name,
return E_NOTIMPL;
}
+
+/***********************************************************************
+ * SHFormatDateTimeW [SHLWAPI.354]
+ *
+ * Produces a string representation of a time.
+ *
+ * PARAMS
+ * fileTime [I] Pointer to FILETIME structure specifying the time
+ * flags [I] Flags specifying the desired output
+ * buf [O] Pointer to buffer for output
+ * bufSize [I] Number of characters that can be contained in buffer
+ *
+ * RETURNS
+ * success: number of characters written to the buffer
+ * failure: 0
+ *
+ */
+INT WINAPI SHFormatDateTimeW(const FILETIME UNALIGNED *fileTime, DWORD *flags,
+ LPWSTR buf, UINT bufSize)
+{
+ FIXME("%p %p %s %d STUB\n", fileTime, flags, debugstr_w(buf), bufSize);
+ return 0;
+}
+
+/***********************************************************************
+ * SHFormatDateTimeA [SHLWAPI.353]
+ *
+ * See SHFormatDateTimeW.
+ *
+ */
+INT WINAPI SHFormatDateTimeA(const FILETIME UNALIGNED *fileTime, DWORD *flags,
+ LPCSTR buf, UINT bufSize)
+{
+ WCHAR *bufW;
+ DWORD buflenW, convlen;
+ INT retval;
+
+ if (!buf || !bufSize)
+ return 0;
+
+ buflenW = bufSize;
+ bufW = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * buflenW);
+ retval = SHFormatDateTimeW(fileTime, flags, bufW, buflenW);
+
+ if (retval != 0)
+ convlen = WideCharToMultiByte(CP_ACP, 0, bufW, -1, (LPSTR) buf, bufSize, NULL, NULL);
+
+ HeapFree(GetProcessHeap(), 0, bufW);
+ return retval;
+}
diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec
index 87fba40..7f37e73 100644
--- a/dlls/shlwapi/shlwapi.spec
+++ b/dlls/shlwapi/shlwapi.spec
@@ -350,8 +350,8 @@
350 stdcall -noname GetFileVersionInfoSizeWrapW(wstr ptr)
351 stdcall -noname GetFileVersionInfoWrapW(wstr long long ptr)
352 stdcall -noname VerQueryValueWrapW(ptr wstr ptr ptr)
-353 stub -noname SHFormatDateTimeA
-354 stub -noname SHFormatDateTimeW
+353 stdcall -noname SHFormatDateTimeA(ptr ptr str long)
+354 stdcall -noname SHFormatDateTimeW(ptr ptr wstr long)
355 stdcall -noname IUnknown_EnableModeless(ptr long)
356 stdcall -noname CreateAllAccessSecurityAttributes(ptr ptr long)
357 stdcall -noname SHGetNewLinkInfoWrapW(wstr wstr wstr long long)
More information about the wine-cvs
mailing list