libwine: Remove __wine_main_arg* from the public header.
[wine/zf.git] / dlls / ntoskrnl.exe / ntoskrnl_private.h
blob256e945e6f35fc4d1501dd9e1c206b86d728373c
1 /*
2 * ntoskrnl.exe implementation
4 * Copyright (C) 2007 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_NTOSKRNL_PRIVATE_H
22 #define __WINE_NTOSKRNL_PRIVATE_H
24 #include "wine/asm.h"
26 static inline LPCSTR debugstr_us( const UNICODE_STRING *us )
28 if (!us) return "<null>";
29 return debugstr_wn( us->Buffer, us->Length / sizeof(WCHAR) );
32 struct _OBJECT_TYPE
34 const WCHAR *name; /* object type name used for type validation */
35 void *(*constructor)(HANDLE); /* used for creating an object from server handle */
36 void (*release)(void*); /* called when the last reference is released */
39 struct _EPROCESS
41 DISPATCHER_HEADER header;
42 PROCESS_BASIC_INFORMATION info;
45 struct _KTHREAD
47 DISPATCHER_HEADER header;
48 PEPROCESS process;
49 CLIENT_ID id;
50 unsigned int critical_region;
53 struct _ETHREAD
55 struct _KTHREAD kthread;
58 void *alloc_kernel_object( POBJECT_TYPE type, HANDLE handle, SIZE_T size, LONG ref ) DECLSPEC_HIDDEN;
59 NTSTATUS kernel_object_from_handle( HANDLE handle, POBJECT_TYPE type, void **ret ) DECLSPEC_HIDDEN;
61 extern POBJECT_TYPE ExEventObjectType;
62 extern POBJECT_TYPE ExSemaphoreObjectType;
63 extern POBJECT_TYPE IoDeviceObjectType;
64 extern POBJECT_TYPE IoDriverObjectType;
65 extern POBJECT_TYPE IoFileObjectType;
66 extern POBJECT_TYPE PsProcessType;
67 extern POBJECT_TYPE PsThreadType;
68 extern POBJECT_TYPE SeTokenObjectType;
70 #define DECLARE_CRITICAL_SECTION(cs) \
71 static CRITICAL_SECTION cs; \
72 static CRITICAL_SECTION_DEBUG cs##_debug = \
73 { 0, 0, &cs, { &cs##_debug.ProcessLocksList, &cs##_debug.ProcessLocksList }, \
74 0, 0, { (DWORD_PTR)(__FILE__ ": " # cs) }}; \
75 static CRITICAL_SECTION cs = { &cs##_debug, -1, 0, 0, 0, 0 };
77 void ObReferenceObject( void *obj ) DECLSPEC_HIDDEN;
79 void pnp_manager_enumerate_root_devices( const WCHAR *driver_name ) DECLSPEC_HIDDEN;
80 void pnp_manager_start(void) DECLSPEC_HIDDEN;
81 void pnp_manager_stop(void) DECLSPEC_HIDDEN;
83 static const WCHAR servicesW[] = {'\\','R','e','g','i','s','t','r','y',
84 '\\','M','a','c','h','i','n','e',
85 '\\','S','y','s','t','e','m',
86 '\\','C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t',
87 '\\','S','e','r','v','i','c','e','s',
88 '\\',0};
90 struct wine_device
92 DEVICE_OBJECT device_obj;
93 DEVICE_RELATIONS *children;
95 #endif