- Implement AddCommasW
authorDmitry Chapyshev <dmitry@reactos.org>
Fri, 13 Jun 2008 07:58:34 +0000 (07:58 +0000)
committerDmitry Chapyshev <dmitry@reactos.org>
Fri, 13 Jun 2008 07:58:34 +0000 (07:58 +0000)
- Implement SHLocalAlloc
- Implement SHLocalFree
- Implement SHLocalReAlloc
explorer-new starts in reactos now!

svn path=/trunk/; revision=33953

reactos/dll/win32/shell32/shell32.spec
reactos/dll/win32/shell32/shell32_main.c

index 553bc79..81189c8 100644 (file)
  197 stub -noname SHGlobalDefect
  198 stdcall -noname SHAbortInvokeCommand()
  199 stub SHGetFileIcon
- 200 stub SHLocalAlloc
- 201 stub SHLocalFree
- 202 stub SHLocalReAlloc
- 203 stub AddCommasW
+ 200 stdcall SHLocalAlloc(long long)
+ 201 stdcall SHLocalFree(ptr)
+ 202 stdcall SHLocalReAlloc(ptr long long)
+ 203 stdcall AddCommasW(long str)
  204 stub ShortSizeFormatW
  205 stdcall Printer_LoadIconsW(wstr ptr ptr)
  206 stub Link_AddExtraDataSection
index fa2f3a0..03e8b8b 100644 (file)
@@ -843,6 +843,73 @@ VOID WINAPI Printers_UnregisterWindow(HANDLE hClassPidl, HWND hwnd)
 
 /*************************************************************************/
 
+/*************************************************************************
+ * AddCommasW      [SHELL32.203]
+ */
+LPWSTR WINAPI AddCommasW(DWORD lValue, LPWSTR szRet)
+{
+    WCHAR szValue[MAX_PATH], szSeparator[8 + 1];
+    NUMBERFMTW numFormat;
+    LCID lcid = GetUserDefaultLCID();
+
+    GetLocaleInfoW(lcid,
+                   LOCALE_STHOUSAND,
+                   szSeparator,
+                   8 + 1);
+
+    numFormat.NumDigits     = 0;
+    numFormat.LeadingZero   = 0;
+    numFormat.Grouping      = 0;
+    numFormat.lpDecimalSep  = szSeparator;
+    numFormat.lpThousandSep = szSeparator;
+    numFormat.NegativeOrder = 0;
+
+    swprintf(szValue, L"%llu", lValue);
+    //_ultow(lValue, szValue, 16);
+
+    if (GetNumberFormatW(lcid,
+                         0,
+                         szValue,
+                         &numFormat,
+                         szRet,
+                         wcslen(szRet)) != 0)
+    {
+        return szRet;
+    }
+
+    wcscpy(szRet, szValue);
+    return szRet;
+}
+
+
+/*************************************************************************
+ * SHLocalAlloc      [SHELL32.200]
+ */
+HLOCAL WINAPI SHLocalAlloc(UINT uFlags, SIZE_T uBytes)
+{
+    return LocalAlloc(uFlags, uBytes);
+}
+
+/*************************************************************************
+ * SHLocalFree      [SHELL32.201]
+ */
+HLOCAL WINAPI SHLocalFree(HLOCAL hMem)
+{
+    return LocalFree(hMem);
+}
+
+/*************************************************************************
+ * SHLocalAlloc      [SHELL32.202]
+ */
+HLOCAL WINAPI SHLocalReAlloc(HLOCAL hMem, SIZE_T uBytes, UINT uFlags)
+{
+    return LocalReAlloc(hMem, uBytes, uFlags);
+}
+
+
+/*************************************************************************/
+
+
 typedef struct
 {
     LPCWSTR  szApp;