Don't use constructors for ntdll and kernel32 initialization.
[wine/multimedia.git] / dlls / kernel / kernel_private.h
blob21985b6856dad0b66751e07d5f664931285c3aab
1 /*
2 * Kernel32 undocumented and private functions definition
4 * Copyright 2003 Eric Pouech
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __WINE_KERNEL_PRIVATE_H
22 #define __WINE_KERNEL_PRIVATE_H
24 HANDLE WINAPI OpenConsoleW(LPCWSTR, DWORD, LPSECURITY_ATTRIBUTES, DWORD);
25 BOOL WINAPI VerifyConsoleIoHandle(HANDLE);
26 HANDLE WINAPI DuplicateConsoleHandle(HANDLE, DWORD, BOOL, DWORD);
27 BOOL WINAPI CloseConsoleHandle(HANDLE handle);
28 HANDLE WINAPI GetConsoleInputWaitHandle(void);
30 static inline BOOL is_console_handle(HANDLE h)
32 return h != INVALID_HANDLE_VALUE && ((DWORD)h & 3) == 3;
35 /* map a real wineserver handle onto a kernel32 console handle */
36 static inline HANDLE console_handle_map(HANDLE h)
38 return h != INVALID_HANDLE_VALUE ? (HANDLE)((DWORD)h ^ 3) : INVALID_HANDLE_VALUE;
41 /* map a kernel32 console handle onto a real wineserver handle */
42 static inline HANDLE console_handle_unmap(HANDLE h)
44 return h != INVALID_HANDLE_VALUE ? (HANDLE)((DWORD)h ^ 3) : INVALID_HANDLE_VALUE;
47 /* Size of per-process table of DOS handles */
48 #define DOS_TABLE_SIZE 256
49 extern HANDLE dos_handles[DOS_TABLE_SIZE];
50 void FILE_ConvertOFMode( INT mode, DWORD *access, DWORD *sharing );
52 extern void PTHREAD_Init(void);
53 extern BOOL WOWTHUNK_Init(void);
55 extern VOID SYSLEVEL_CheckNotLevel( INT level );
57 extern DWORD INSTR_EmulateInstruction( EXCEPTION_RECORD *rec, CONTEXT86 *context );
58 extern void INSTR_CallBuiltinHandler( CONTEXT86 *context, BYTE intnum );
60 extern BOOL NLS_IsUnicodeOnlyLcid(LCID);
62 extern WORD SELECTOR_AllocBlock( const void *base, DWORD size, unsigned char flags );
63 extern WORD SELECTOR_ReallocBlock( WORD sel, const void *base, DWORD size );
64 extern void SELECTOR_FreeBlock( WORD sel );
65 #define IS_SELECTOR_32BIT(sel) \
66 (wine_ldt_is_system(sel) || (wine_ldt_copy.flags[LOWORD(sel) >> 3] & WINE_LDT_FLAGS_32BIT))
68 extern HGLOBAL16 GLOBAL_CreateBlock( UINT16 flags, const void *ptr, DWORD size,
69 HGLOBAL16 hOwner, unsigned char selflags );
70 extern BOOL16 GLOBAL_FreeBlock( HGLOBAL16 handle );
71 extern BOOL16 GLOBAL_MoveBlock( HGLOBAL16 handle, const void *ptr, DWORD size );
72 extern HGLOBAL16 GLOBAL_Alloc( WORD flags, DWORD size, HGLOBAL16 hOwner, unsigned char selflags );
74 /* this structure is always located at offset 0 of the DGROUP segment */
75 #include "pshpack1.h"
76 typedef struct
78 WORD null; /* Always 0 */
79 DWORD old_ss_sp; /* Stack pointer; used by SwitchTaskTo() */
80 WORD heap; /* Pointer to the local heap information (if any) */
81 WORD atomtable; /* Pointer to the local atom table (if any) */
82 WORD stacktop; /* Top of the stack */
83 WORD stackmin; /* Lowest stack address used so far */
84 WORD stackbottom; /* Bottom of the stack */
85 } INSTANCEDATA;
86 #include "poppack.h"
88 #endif