2003-06-21 04:07:10 +02:00
|
|
|
/*
|
|
|
|
* Kernel32 undocumented and private functions definition
|
|
|
|
*
|
|
|
|
* Copyright 2003 Eric Pouech
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2003-06-21 04:07:10 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WINE_KERNEL_PRIVATE_H
|
|
|
|
#define __WINE_KERNEL_PRIVATE_H
|
|
|
|
|
2008-12-08 16:05:17 +01:00
|
|
|
#include "wine/server.h"
|
|
|
|
|
2004-03-11 23:46:27 +01:00
|
|
|
HANDLE WINAPI OpenConsoleW(LPCWSTR, DWORD, BOOL, DWORD);
|
2003-06-21 04:07:10 +02:00
|
|
|
BOOL WINAPI VerifyConsoleIoHandle(HANDLE);
|
|
|
|
HANDLE WINAPI DuplicateConsoleHandle(HANDLE, DWORD, BOOL, DWORD);
|
|
|
|
BOOL WINAPI CloseConsoleHandle(HANDLE handle);
|
|
|
|
HANDLE WINAPI GetConsoleInputWaitHandle(void);
|
2011-04-21 10:23:57 +02:00
|
|
|
BOOL CONSOLE_Init(RTL_USER_PROCESS_PARAMETERS *params) DECLSPEC_HIDDEN;
|
|
|
|
BOOL CONSOLE_Exit(void) DECLSPEC_HIDDEN;
|
2003-06-21 04:07:10 +02:00
|
|
|
|
|
|
|
static inline BOOL is_console_handle(HANDLE h)
|
|
|
|
{
|
2005-09-12 17:14:06 +02:00
|
|
|
return h != INVALID_HANDLE_VALUE && ((UINT_PTR)h & 3) == 3;
|
2003-06-21 04:07:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* map a real wineserver handle onto a kernel32 console handle */
|
|
|
|
static inline HANDLE console_handle_map(HANDLE h)
|
|
|
|
{
|
2005-09-12 17:14:06 +02:00
|
|
|
return h != INVALID_HANDLE_VALUE ? (HANDLE)((UINT_PTR)h ^ 3) : INVALID_HANDLE_VALUE;
|
2003-06-21 04:07:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* map a kernel32 console handle onto a real wineserver handle */
|
2008-12-08 16:05:17 +01:00
|
|
|
static inline obj_handle_t console_handle_unmap(HANDLE h)
|
2003-06-21 04:07:10 +02:00
|
|
|
{
|
2008-12-08 16:05:17 +01:00
|
|
|
return wine_server_obj_handle( h != INVALID_HANDLE_VALUE ? (HANDLE)((UINT_PTR)h ^ 3) : INVALID_HANDLE_VALUE );
|
2003-06-21 04:07:10 +02:00
|
|
|
}
|
|
|
|
|
2010-08-30 22:19:18 +02:00
|
|
|
/* Some Wine specific values for Console inheritance (params->ConsoleHandle) */
|
|
|
|
#define KERNEL32_CONSOLE_ALLOC ((HANDLE)1)
|
|
|
|
#define KERNEL32_CONSOLE_SHELL ((HANDLE)2)
|
|
|
|
|
2011-04-21 10:23:57 +02:00
|
|
|
extern HMODULE kernel32_handle DECLSPEC_HIDDEN;
|
2013-01-08 22:02:21 +01:00
|
|
|
extern SYSTEM_BASIC_INFORMATION system_info DECLSPEC_HIDDEN;
|
2004-02-12 01:00:55 +01:00
|
|
|
|
2018-02-19 19:45:58 +01:00
|
|
|
extern const WCHAR DIR_Windows[] DECLSPEC_HIDDEN;
|
|
|
|
extern const WCHAR DIR_System[] DECLSPEC_HIDDEN;
|
2011-04-21 10:23:57 +02:00
|
|
|
extern const WCHAR *DIR_SysWow64 DECLSPEC_HIDDEN;
|
2004-05-13 22:21:25 +02:00
|
|
|
|
2011-04-21 10:23:57 +02:00
|
|
|
extern void FILE_SetDosError(void) DECLSPEC_HIDDEN;
|
|
|
|
extern WCHAR *FILE_name_AtoW( LPCSTR name, BOOL alloc ) DECLSPEC_HIDDEN;
|
|
|
|
extern DWORD FILE_name_WtoA( LPCWSTR src, INT srclen, LPSTR dest, INT destlen ) DECLSPEC_HIDDEN;
|
2004-05-01 07:25:07 +02:00
|
|
|
|
2005-05-16 21:44:54 +02:00
|
|
|
/* return values for MODULE_GetBinaryType */
|
2009-10-27 19:30:30 +01:00
|
|
|
enum binary_type
|
|
|
|
{
|
|
|
|
BINARY_UNKNOWN = 0,
|
|
|
|
BINARY_PE,
|
|
|
|
BINARY_WIN16,
|
|
|
|
BINARY_OS216,
|
|
|
|
BINARY_DOS,
|
|
|
|
BINARY_UNIX_EXE,
|
|
|
|
BINARY_UNIX_LIB
|
|
|
|
};
|
|
|
|
|
2014-08-22 12:44:24 +02:00
|
|
|
#define BINARY_FLAG_DLL 0x01
|
|
|
|
#define BINARY_FLAG_64BIT 0x02
|
|
|
|
#define BINARY_FLAG_FAKEDLL 0x04
|
2009-10-27 19:30:30 +01:00
|
|
|
|
|
|
|
struct binary_info
|
|
|
|
{
|
|
|
|
enum binary_type type;
|
2013-11-22 12:18:31 +01:00
|
|
|
DWORD arch;
|
2009-10-27 19:30:30 +01:00
|
|
|
DWORD flags;
|
2017-10-23 11:35:24 +02:00
|
|
|
ULONGLONG res_start;
|
|
|
|
ULONGLONG res_end;
|
2009-10-27 19:30:30 +01:00
|
|
|
};
|
2005-05-16 21:44:54 +02:00
|
|
|
|
|
|
|
/* module.c */
|
2017-08-29 15:46:50 +02:00
|
|
|
extern WCHAR *MODULE_get_dll_load_path( LPCWSTR module, int safe_mode ) DECLSPEC_HIDDEN;
|
2011-04-21 10:23:57 +02:00
|
|
|
extern void MODULE_get_binary_info( HANDLE hfile, struct binary_info *info ) DECLSPEC_HIDDEN;
|
2004-03-26 00:41:04 +01:00
|
|
|
|
2011-04-21 10:23:57 +02:00
|
|
|
extern BOOL NLS_IsUnicodeOnlyLcid(LCID) DECLSPEC_HIDDEN;
|
2003-12-01 23:47:28 +01:00
|
|
|
|
2005-06-14 13:42:34 +02:00
|
|
|
/* environ.c */
|
2011-04-21 10:23:57 +02:00
|
|
|
extern void ENV_CopyStartupInformation(void) DECLSPEC_HIDDEN;
|
2005-06-14 13:42:34 +02:00
|
|
|
|
|
|
|
/* computername.c */
|
2011-04-21 10:23:57 +02:00
|
|
|
extern void COMPUTERNAME_Init(void) DECLSPEC_HIDDEN;
|
2005-06-14 13:42:34 +02:00
|
|
|
|
|
|
|
/* locale.c */
|
2011-04-21 10:23:57 +02:00
|
|
|
extern void LOCALE_Init(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void LOCALE_InitRegistry(void) DECLSPEC_HIDDEN;
|
2005-06-14 13:42:34 +02:00
|
|
|
|
|
|
|
/* oldconfig.c */
|
2011-04-21 10:23:57 +02:00
|
|
|
extern void convert_old_config(void) DECLSPEC_HIDDEN;
|
2005-06-14 13:42:34 +02:00
|
|
|
|
2003-06-21 04:07:10 +02:00
|
|
|
#endif
|