mirror of
https://github.com/Xevion/easy7zip.git
synced 2026-01-31 10:24:13 -06:00
4.44 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
804edc5756
commit
d9666cf046
Executable
+37
@@ -0,0 +1,37 @@
|
||||
// Windows/NationalTime.cpp
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "Windows/NationalTime.h"
|
||||
|
||||
namespace NWindows {
|
||||
namespace NNational {
|
||||
namespace NTime {
|
||||
|
||||
bool MyGetTimeFormat(LCID locale, DWORD flags, CONST SYSTEMTIME *time,
|
||||
LPCTSTR format, CSysString &resultString)
|
||||
{
|
||||
resultString.Empty();
|
||||
int numChars = ::GetTimeFormat(locale, flags, time, format, NULL, 0);
|
||||
if(numChars == 0)
|
||||
return false;
|
||||
numChars = ::GetTimeFormat(locale, flags, time, format,
|
||||
resultString.GetBuffer(numChars), numChars + 1);
|
||||
resultString.ReleaseBuffer();
|
||||
return (numChars != 0);
|
||||
}
|
||||
|
||||
bool MyGetDateFormat(LCID locale, DWORD flags, CONST SYSTEMTIME *time,
|
||||
LPCTSTR format, CSysString &resultString)
|
||||
{
|
||||
resultString.Empty();
|
||||
int numChars = ::GetDateFormat(locale, flags, time, format, NULL, 0);
|
||||
if(numChars == 0)
|
||||
return false;
|
||||
numChars = ::GetDateFormat(locale, flags, time, format,
|
||||
resultString.GetBuffer(numChars), numChars + 1);
|
||||
resultString.ReleaseBuffer();
|
||||
return (numChars != 0);
|
||||
}
|
||||
|
||||
}}}
|
||||
Reference in New Issue
Block a user