Guest User

Untitled

a guest
Feb 18th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. dll\win32\shell32\fprop.cpp: In function 'void FormatBytes(_LARGE_INTEGER*, wcha
  2. r_t*)':
  3. dll\win32\shell32\fprop.cpp:78: error: invalid conversion from 'wchar_t' to 'WCH
  4. AR*'
  5. dll\win32\shell32\fprop.cpp:78: warning: deprecated conversion from string const
  6. ant to 'WCHAR*'
  7. dll\win32\shell32\fprop.cpp:80: error: invalid conversion from 'int' to 'const w
  8. char_t*'
  9. dll\win32\shell32\fprop.cpp:80: error: initializing argument 2 of 'int swprint
  10. f(wchar_t*, const wchar_t*, ...)'
  11. dll\win32\shell32\fprop.cpp: In function 'BOOL SH_FileGeneralSetFileSizeTime(HWN
  12. D__*, WCHAR*, _ULARGE_INTEGER*)':
  13. dll\win32\shell32\fprop.cpp:448: error: invalid conversion from 'LONGLONG' to '_
  14. LARGE_INTEGER*'
  15. dll\win32\shell32\fprop.cpp:448: error: initializing argument 1 of 'void Forma
  16. tBytes(_LARGE_INTEGER*, wchar_t*)'
  17. make.exe: *** [obj-i386\dll\win32\shell32\fprop_shell32.o] Error 1
  18.  
  19.  
  20. void FormatBytes(PLARGE_INTEGER numBytes, wchar_t *wstr)
  21. {
  22. wchar_t strfrmt[MAX_NUMSTR_LENGTH] = {L'\0'};
  23. wchar_t strfrmt2[MAX_NUMSTR_LENGTH] = {L'\0'};
  24. WCHAR FormatBuffer[MAX_NUMSTR_LENGTH];
  25.  
  26. NUMBERFMT numFormat = {0, 0, 3, L' ', L",", 0};
  27.  
  28. swprintf(strfrmt, MAX_NUMSTR_LENGTH, L"%I64u", numBytes); //%I64u
  29. if (GetNumberFormatW(LOCALE_USER_DEFAULT, 0, strfrmt, &numFormat, strfrmt2, MAX_NUMSTR_LENGTH))
  30. {
  31. if (!LoadStringW(shell32_hInstance, IDS_PROP_BYTES, FormatBuffer, sizeof(FormatBuffer) / sizeof(WCHAR)))
  32. {
  33. /* use default english format string */
  34. wcscpy(FormatBuffer, L"bytes");
  35. }
  36. swprintf(strfrmt, L" (%s %s)", strfrmt2, FormatBuffer);
  37. wcscat(wstr, strfrmt);
  38. }
  39. }
Add Comment
Please, Sign In to add comment