kernel32: Implement Get{Time,Date}FormatEx

Seán de Búrca leftmostcat at gmail.com
Sun Jan 4 01:11:46 CST 2015


Hi Nikolay,

On 12/29/2014 20:12, Nikolay Sivov wrote:

>On 30.12.2014 2:06, Sean Burke wrote:
>>/  Provides an implementation of time and date format functions added in
/>>/  Vista sufficient to allow some basic applications requiring them to run.
/>>/  Includes necessary tests and header defs.
/>>/
/>>/
/>>/  Sean Burke
/>>/
/>>/
/>>/
/
>Hi, Sean.

>As you can see tests are failing on win2000 and winxp because these
>calls are not available on these platforms. You should use
>GetProcAddress() to fix that.

>>/  +@ stdcall GetDateFormatEx(ptr long ptr wstr ptr long ptr)
/
>First argument should be 'wstr' as well.

>>/  +@ stdcall GetTimeFormatEx(ptr long ptr wstr ptr long)
/
>Same.

>>/  +INT WINAPI GetDateFormatEx(LPCWSTR lpLocaleName, DWORD dwFlags,
/>>/  +                           const SYSTEMTIME* lpDate, LPCWSTR lpFormat,
/>>/  +                           LPWSTR lpDateStr, INT cchDate, LPCWSTR lpCalendar)
/
>Please use cleaner argument names, like 'localename', 'flags', 'date',
>'format', etc. So lowercase, no prefix.

The rest of the file uses argument names directly from the MSDN documentation. I'm inclined to follow this convention as I think it provides a clear and direct connection to the API as documented. However, I am unfamiliar with current wine conventions, so if you still feel this is a worthwhile change, let me know.

>>/  +  lcid = LocaleNameToLCID(lpLocaleName, 0);
/>>/  +
/>>/  +  return NLS_GetDateTimeFormatW(lcid, dwFlags | DATE_DATEVARSONLY, lpDate,
/>>/  +                                lpFormat, lpDateStr, cchDate);
/
>No real need for temporary 'lcid' variable.


Sean Burke

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20150104/050a2028/attachment.html>


More information about the wine-devel mailing list