comctl32/tests: Use CRT allocation functions.
[wine.git] / dlls / kernelbase / kernelbase.h
blob2209939a8a22c78bb003566cab4990f8e561e75c
1 /*
2 * Kernelbase internal definitions
4 * Copyright 2019 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_KERNELBASE_H
22 #define __WINE_KERNELBASE_H
24 #include "windef.h"
25 #include "winbase.h"
27 struct pseudo_console
29 HANDLE signal;
30 HANDLE reference;
31 HANDLE process;
34 extern WCHAR *file_name_AtoW( LPCSTR name, BOOL alloc );
35 extern DWORD file_name_WtoA( LPCWSTR src, INT srclen, LPSTR dest, INT destlen );
36 extern void init_global_data(void);
37 extern void init_startup_info( RTL_USER_PROCESS_PARAMETERS *params );
38 extern void init_locale( HMODULE module );
39 extern void init_console(void);
41 extern const WCHAR windows_dir[];
42 extern const WCHAR system_dir[];
44 static const BOOL is_win64 = (sizeof(void *) > sizeof(int));
45 extern BOOL is_wow64;
47 static inline BOOL set_ntstatus( NTSTATUS status )
49 if (status) SetLastError( RtlNtStatusToDosError( status ));
50 return !status;
53 /* make the kernel32 names available */
54 #define HeapAlloc(heap, flags, size) RtlAllocateHeap(heap, flags, size)
55 #define HeapReAlloc(heap, flags, ptr, size) RtlReAllocateHeap(heap, flags, ptr, size)
56 #define HeapFree(heap, flags, ptr) RtlFreeHeap(heap, flags, ptr)
58 #endif /* __WINE_KERNELBASE_H */