1 /* win32_util.h 2 * 3 * This file is part of vchanger by Josh Fisher. 4 * 5 * vchanger copyright (C) 2008-2013 Josh Fisher 6 * 7 * vchanger is free software. 8 * You may redistribute it and/or modify it under the terms of the 9 * GNU General Public License version 2, as published by the Free 10 * Software Foundation. 11 * 12 * vchanger is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 * See the GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with vchanger. See the file "COPYING". If not, 19 * write to: The Free Software Foundation, Inc., 20 * 59 Temple Place - Suite 330, 21 * Boston, MA 02111-1307, USA. 22 */ 23 24 #ifndef COMPAT_UTIL_H_ 25 #define COMPAT_UTIL_H_ 26 27 #ifdef HAVE_WINDOWS_H 28 29 /* Some utility functions needed for Windows version */ 30 31 /* number of 100 ns intervals between FILETIME epoch and Unix epoch */ 32 #define EPOCH_FILETIME (116444736000000000LL) 33 34 #ifdef __cplusplus 35 extern "C" { 36 #endif 37 38 time_t ftime2utime(const FILETIME *time); 39 wchar_t* AnsiToUTF16(const char *str, wchar_t **u16str, size_t *u16size); 40 char *UTF16ToAnsi(const wchar_t *u16str, char **str, size_t *str_size); 41 int w32errno(DWORD werr); 42 43 #ifdef __cplusplus 44 } 45 #endif 46 47 #endif 48 49 50 #endif /* _COMPAT_UTIL_H */ 51