<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 2/25/2012 17:49, <a class="moz-txt-link-abbreviated" href="mailto:carlo.bramix@libero.it">carlo.bramix@libero.it</a> wrote:
<blockquote
cite="mid:30524361.2739051330181364165.JavaMail.defaultUser@defaultHost"
type="cite">
<pre wrap="">I tried to implement StrToInt64ExA/W as a reply to bug #27633
I also corrected the comment in functions FormatInt() and FormatDouble()
because, according to MSDN, GetNumberFormat() returns the number of characters
written (or required) and not the number of bytes emitted:
<a class="moz-txt-link-freetext" href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd318110%28v=vs.85%29">http://msdn.microsoft.com/en-us/library/windows/desktop/dd318110%28v=vs.85%29</a>.
aspx
I hope my first patch to WINE is correct and it could be useful.
Sincerely,
Carlo Bramini.
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">
</pre>
</blockquote>
<blockquote type="cite">
<pre wrap=""> BOOL WINAPI StrToIntExA(LPCSTR lpszStr, DWORD dwFlags, LPINT lpiRet)
{
+ LARGE_INTEGER li;
+ BOOL bRes;
+
+ TRACE("(%s,%08X,%p)\n", debugstr_a(lpszStr), dwFlags, lpiRet);
+
+ // Test on lpszStr is done into StrToInt64ExA</pre>
</blockquote>
No cpp comments please. Also this comment is a bit redundant for a
function that small.<br>
<blockquote type="cite">
<pre wrap="">
+ if (!lpiRet)
+ {
+ WARN("Invalid lpiRet would crash under Win32!\n");
+ return FALSE;
+ }</pre>
</blockquote>
You don't need to WARN on that, especially with such message.<br>
<blockquote type="cite">
<pre wrap="">
+
+ bRes = StrToInt64ExA(lpszStr, dwFlags, &li.QuadPart);
+ if (bRes)
+ *lpiRet = li.u.LowPart;
+
+ return bRes;
+}</pre>
</blockquote>
This needs tests, take a look at shlwapi/tests for some examples.<br>
</body>
</html>