1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #ifndef INCLUDED_SAL_OSL_W32_FILETIME_HXX
11 #define INCLUDED_SAL_OSL_W32_FILETIME_HXX
13 #include <sal/config.h>
15 #define WIN32_LEAN_AND_MEAN
20 BOOL
TimeValueToFileTime(TimeValue
const * cpTimeVal
, FILETIME
* pFTime
);
22 BOOL
FileTimeToTimeValue(FILETIME
const * cpFTime
, TimeValue
* pTimeVal
);
24 namespace osl
{ namespace detail
{
26 inline __int64
getFiletime(FILETIME
const & ft
) {
27 return (DWORD64(ft
.dwHighDateTime
) << 32) | ft
.dwLowDateTime
;
30 inline void setFiletime(FILETIME
& ft
, __int64 value
) {
31 ft
.dwHighDateTime
= value
>> 32;
32 ft
.dwLowDateTime
= value
& 0xFFFFFFFF;
39 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */