[5219] | 1 | /* $Id: win32k.h,v 1.10 2001-02-21 07:41:24 bird Exp $
|
---|
[4165] | 2 | *
|
---|
| 3 | * Top level make file for the Win32k library.
|
---|
| 4 | * Contains library and 32-bit IOCtl definition.
|
---|
| 5 | *
|
---|
| 6 | * Copyright (c) 2000 knut st. osmundsen (knut.stange.osmundsen@pmsc.no)
|
---|
| 7 | *
|
---|
| 8 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
| 9 | *
|
---|
| 10 | */
|
---|
[5219] | 11 | /* NOINC */
|
---|
[4165] | 12 | #ifndef _WIN32K_H_
|
---|
| 13 | #define _WIN32K_H_
|
---|
[5219] | 14 | /* INC */
|
---|
[4165] | 15 |
|
---|
| 16 | /*******************************************************************************
|
---|
| 17 | * Defined Constants And Macros *
|
---|
| 18 | *******************************************************************************/
|
---|
| 19 | /*
|
---|
| 20 | * IOCtls categories.
|
---|
| 21 | */
|
---|
| 22 | #define IOCTL_W32K_K32 0xC1
|
---|
| 23 | #define IOCTL_W32K_ELF 0xC2
|
---|
| 24 |
|
---|
| 25 | /*
|
---|
| 26 | * K32 category - these are the functions found in the k32 directory.
|
---|
| 27 | */
|
---|
| 28 | #define K32_ALLOCMEMEX 0x01
|
---|
| 29 | #define K32_QUERYOTES 0x02
|
---|
| 30 | #define K32_QUERYOPTIONSSTATUS 0x03
|
---|
| 31 | #define K32_SETOPTIONS 0x04
|
---|
[4348] | 32 | #define K32_PROCESSREADWRITE 0x05
|
---|
[5052] | 33 | #define K32_HANDLESYSTEMEVENT 0x06
|
---|
[5112] | 34 | #define K32_QUERYSYSTEMMEMINFO 0x07
|
---|
[5219] | 35 | #define K32_QUERYCALLGATE 0x08
|
---|
| 36 | #define K32_LASTIOCTLFUNCTION K32_QUERYCALLGATE
|
---|
[4165] | 37 |
|
---|
[5200] | 38 |
|
---|
[4165] | 39 | /*
|
---|
| 40 | * Elf category
|
---|
| 41 | */
|
---|
| 42 | #define ELF_DUMMY 0x01
|
---|
| 43 |
|
---|
| 44 |
|
---|
[5052] | 45 | /*
|
---|
[5178] | 46 | * DosAllocMemEx - Extra (bsememf.h) flag definitions.
|
---|
| 47 | */
|
---|
| 48 | #define OBJ_ALIGNDEFAULT 0x00000000UL
|
---|
| 49 | #define OBJ_ALIGN64K 0x10000000UL
|
---|
| 50 | #define OBJ_ALIGNPAGE 0x20000000UL
|
---|
| 51 | #define OBJ_ALIGNMASK 0x30000000UL
|
---|
| 52 | #define OBJ_LOCATION 0x80000000UL
|
---|
| 53 | #ifndef OBJ_SELMAPALL
|
---|
| 54 | #define OBJ_SELMAPALL 0x00000800UL /* This isn't ours. It just a dropout form bsememf.h */
|
---|
| 55 | #endif
|
---|
| 56 |
|
---|
| 57 |
|
---|
| 58 | /*
|
---|
[5052] | 59 | * System event Identifiers.
|
---|
| 60 | */
|
---|
| 61 | #define K32_SYSEVENT_SM_MOUSE 0x00 /* dh SendEvent - Session Manager (mouse) */
|
---|
| 62 | #define K32_SYSEVENT_CTRL_BREAK 0x01 /* dh SendEvent - Ctrl-Break */
|
---|
| 63 | #define K32_SYSEVENT_CTRL_C 0x02 /* dh SendEvent - Ctrl-C */
|
---|
| 64 | #define K32_SYSEVENT_CTRL_SCREEN_LOCK 0x03 /* dh SendEvent - Ctrl-ScrollLock */
|
---|
| 65 | #define K32_SYSEVENT_CTRL_PRINT_SCREEN 0x04 /* dh SendEvent - Ctrl-PrtSc */
|
---|
| 66 | #define K32_SYSEVENT_SHIFT_PRINT_SCREEN 0x05 /* dh SendEvent - Shift-PrtSc */
|
---|
| 67 | #define K32_SYSEVENT_SM_KEYBOARD 0x06 /* dh SendEvent - Session Manager (keyboard) */
|
---|
| 68 | #define K32_SYSEVENT_SM_CTRL_ALT_DELETE 0x07 /* dh SendEvent - Ctrl-Alt-Del */
|
---|
| 69 | #define K32_SYSEVENT_HOT_PLUG 0x08 /* dh SendEvent - Keyboard Hot Plug/Reset */
|
---|
| 70 | #define K32_SYSEVENT_POWER 0x09 /* dh SendEvent - Power suspend event */
|
---|
| 71 | #define K32_SYSEVENT_POWEROFF 0x0a /* dh SendEvent - Power off event */
|
---|
| 72 | #define K32_SYSEVENT_CTRL_ALT_2xNUMLOCK 0x0b /* VectorSDF - System Dump */
|
---|
| 73 | #define K32_SYSEVENT_LAST K32_SYSEVENT_CTRL_ALT_2xNUMLOCK
|
---|
| 74 |
|
---|
[5112] | 75 | /*
|
---|
| 76 | * System Memory Info flags.
|
---|
| 77 | */
|
---|
| 78 | #define K32_SYSMEMINFO_ALL 0 /* Everything is queried. */
|
---|
| 79 | #define K32_SYSMEMINFO_SWAPFILE 0x01 /* Swapfile stuff is queried. */
|
---|
| 80 | #define K32_SYSMEMINFO_PAGING 0x02 /* Paging and Physical memory stuff is queried. */
|
---|
| 81 | #define K32_SYSMEMINFO_VM 0x04 /* Virtual memory stuff is all queried. */
|
---|
[5052] | 82 |
|
---|
[5112] | 83 |
|
---|
[5219] | 84 | /* NOINC */
|
---|
[5052] | 85 | #ifndef INCL_16 /* We don't need this in 16-bit code. */
|
---|
[5219] | 86 | /* INC */
|
---|
[5052] | 87 |
|
---|
[4165] | 88 | /*******************************************************************************
|
---|
[5219] | 89 | * Assembly Fixes *
|
---|
| 90 | *******************************************************************************/
|
---|
| 91 | /*ASM
|
---|
| 92 | BOOL struc
|
---|
| 93 | dd ?
|
---|
| 94 | BOOL ends
|
---|
| 95 |
|
---|
| 96 | PID struc
|
---|
| 97 | dd ?
|
---|
| 98 | PID ends
|
---|
| 99 |
|
---|
| 100 | HMODULE struc
|
---|
| 101 | dd ?
|
---|
| 102 | HMODULE ends
|
---|
| 103 |
|
---|
| 104 | HEV struc
|
---|
| 105 | dd ?
|
---|
| 106 | HEV ends
|
---|
| 107 |
|
---|
| 108 | PVOID struc
|
---|
| 109 | dd ?
|
---|
| 110 | PVOID ends
|
---|
| 111 |
|
---|
| 112 | PPVOID struc
|
---|
| 113 | dd ?
|
---|
| 114 | PPVOID ends
|
---|
| 115 |
|
---|
| 116 | PUSHORT struc
|
---|
| 117 | dd ?
|
---|
| 118 | PUSHORT ends
|
---|
| 119 |
|
---|
| 120 | CCHMAXPATH EQU 260
|
---|
| 121 |
|
---|
| 122 | */ /* end of assembly */
|
---|
| 123 |
|
---|
| 124 |
|
---|
| 125 | /*******************************************************************************
|
---|
[4165] | 126 | * Structures and Typedefs *
|
---|
| 127 | *******************************************************************************/
|
---|
| 128 | #pragma pack(1)
|
---|
| 129 |
|
---|
| 130 | /*
|
---|
| 131 | * Object Table Entry buffer.
|
---|
| 132 | */
|
---|
[5219] | 133 | struct _QueryOTE
|
---|
[4165] | 134 | {
|
---|
| 135 | ULONG ote_size; /* Object virtual size */
|
---|
| 136 | ULONG ote_base; /* Object base virtual address */
|
---|
| 137 | ULONG ote_flags; /* Attribute flags */
|
---|
| 138 | ULONG ote_pagemap; /* Object page map index */
|
---|
| 139 | ULONG ote_mapsize; /* Num of entries in obj page map */
|
---|
| 140 | /*ULONG ote_reserved;*/
|
---|
| 141 | USHORT ote_sel; /* Object Selector */
|
---|
| 142 | USHORT ote_hob; /* Object Handle */
|
---|
[5219] | 143 | };
|
---|
| 144 | typedef struct _QueryOTE QOTE;
|
---|
| 145 | typedef QOTE * PQOTE;
|
---|
[4165] | 146 |
|
---|
[5219] | 147 |
|
---|
[4165] | 148 | typedef struct _QueryOTEBuffer
|
---|
| 149 | {
|
---|
| 150 | ULONG cOTEs; /* Number of entries in aOTE. */
|
---|
| 151 | QOTE aOTE[1]; /* Array of OTEs. */
|
---|
[5219] | 152 | } QOTEBUFFER;
|
---|
| 153 | typedef QOTEBUFFER *PQOTEBUFFER;
|
---|
[4165] | 154 |
|
---|
| 155 |
|
---|
| 156 | /*
|
---|
| 157 | * Options struct.
|
---|
| 158 | *
|
---|
| 159 | * (The function of these members are described in options.h in
|
---|
| 160 | * the src\win32k\include directory.)
|
---|
| 161 | * All members of this struct (except cb ofcourse) is changable.
|
---|
| 162 | */
|
---|
| 163 | typedef struct _K32Options
|
---|
| 164 | {
|
---|
| 165 | ULONG cb;
|
---|
| 166 |
|
---|
| 167 | /** @cat logging options */
|
---|
| 168 | USHORT usCom; /* Output port no. */
|
---|
| 169 | ULONG fLogging; /* Logging. */
|
---|
| 170 |
|
---|
| 171 | /** @cat Options affecting the generated LX executables */
|
---|
| 172 | ULONG fPE; /* Flags set the type of conversion. */
|
---|
[5052] | 173 | ULONG fPEOneObject; /* All in one object. */
|
---|
[4165] | 174 | ULONG ulInfoLevel; /* Pe2Lx InfoLevel. */
|
---|
| 175 |
|
---|
| 176 | /** @cat Options affecting the generated ELF executables */
|
---|
| 177 | ULONG fElf; /* Elf flags. */
|
---|
| 178 |
|
---|
| 179 | /** @cat Options affecting the UNIX script executables */
|
---|
| 180 | ULONG fUNIXScript; /* UNIX script flags. */
|
---|
| 181 |
|
---|
| 182 | /** @cat Options affecting the REXX script executables */
|
---|
| 183 | ULONG fREXXScript; /* REXX script flags. */
|
---|
| 184 |
|
---|
| 185 | /** @cat Options affecting the JAVA executables */
|
---|
| 186 | ULONG fJava; /* Java flags. */
|
---|
| 187 |
|
---|
| 188 | /** @cat Options affecting the executables */
|
---|
| 189 | ULONG fNoLoader; /* No loader stuff. !FIXME! We should import / functions even if this flag is set!!! */
|
---|
| 190 |
|
---|
[4774] | 191 | /** @cat Options affecting the behaviour changes in the OS/2 loader */
|
---|
| 192 | ULONG fDllFixes; /* Enables the long DLL name and non .DLL extention fixes. */
|
---|
[5118] | 193 | ULONG fExeFixes; /* Enables EXE files to export entry points. */
|
---|
| 194 | ULONG fForcePreload; /* Forces the loader to preload executable images. Handy for ICAT Ring-3 debugging. */
|
---|
| 195 | ULONG fApiEnh; /* Enables the API enhancements */
|
---|
[4774] | 196 |
|
---|
[4165] | 197 | /** @cat Options affecting the heap. */
|
---|
| 198 | ULONG cbSwpHeapMax; /* Maximum heapsize. */
|
---|
| 199 | ULONG cbResHeapMax; /* Maxiumem residentheapsize. */
|
---|
[5219] | 200 | } K32OPTIONS;
|
---|
| 201 | typedef K32OPTIONS *PK32OPTIONS;
|
---|
[4165] | 202 |
|
---|
| 203 |
|
---|
| 204 | /*
|
---|
| 205 | * Status struct.
|
---|
| 206 | *
|
---|
| 207 | */
|
---|
| 208 | typedef struct _K32Status
|
---|
| 209 | {
|
---|
| 210 | ULONG cb;
|
---|
| 211 |
|
---|
| 212 | /** @cat Options status. */
|
---|
| 213 | ULONG fQuiet; /* Quiet initialization. */
|
---|
| 214 |
|
---|
| 215 | /** @cat Kernel status. */
|
---|
| 216 | ULONG fKernel; /* Smp or uni kernel. */
|
---|
| 217 | ULONG ulBuild; /* Kernel build. */
|
---|
| 218 | USHORT usVerMajor; /* OS/2 major ver - 20 */
|
---|
| 219 | USHORT usVerMinor; /* OS/2 minor ver - 30,40 */
|
---|
| 220 |
|
---|
| 221 | /** @cat Heap status. */
|
---|
| 222 | ULONG cbSwpHeapInit; /* Initial heapsize. */
|
---|
| 223 | ULONG cbSwpHeapFree; /* Amount of used space. */
|
---|
| 224 | ULONG cbSwpHeapUsed; /* Amount of free space reserved. */
|
---|
| 225 | ULONG cbSwpHeapSize; /* Amount of memory used by the heap free and used++. */
|
---|
| 226 | ULONG cSwpBlocksUsed; /* Count of used blocks. */
|
---|
| 227 | ULONG cSwpBlocksFree; /* Count of free blocks. */
|
---|
| 228 |
|
---|
| 229 | ULONG cbResHeapInit; /* Initial heapsize. */
|
---|
| 230 | ULONG cbResHeapFree; /* Amount of free space reserved. */
|
---|
| 231 | ULONG cbResHeapUsed; /* Amount of used space. */
|
---|
| 232 | ULONG cbResHeapSize; /* Amount of memory used by the heap free and used++. */
|
---|
| 233 | ULONG cResBlocksUsed; /* Count of used blocks. */
|
---|
| 234 | ULONG cResBlocksFree; /* Count of free blocks. */
|
---|
| 235 |
|
---|
| 236 | /** @cat Win32k build, version and init stuff */
|
---|
| 237 | CHAR szBuildDate[12]; /* Date of the win32k build. (Sep 02 2000) */
|
---|
| 238 | CHAR szBuildTime[9]; /* Time of the win32k build. (11:44:21) */
|
---|
| 239 | ULONG ulVersion; /* Win32k version */
|
---|
| 240 | CHAR szSymFile[CCHMAXPATH]; /* The name of the symbol file or sym database. */
|
---|
| 241 |
|
---|
| 242 | /** @cat Statistics */
|
---|
| 243 | ULONG cPe2LxModules; /* Number of Pe2Lx modules currently loaded. */
|
---|
| 244 | ULONG cElf2LxModules; /* Number of Elf2Lx modules currently loaded. */
|
---|
| 245 | /*...*/
|
---|
[5219] | 246 | } K32STATUS;
|
---|
| 247 | typedef K32STATUS * PK32STATUS;
|
---|
[4165] | 248 |
|
---|
| 249 |
|
---|
[5112] | 250 | /*
|
---|
| 251 | * Memory information struct.
|
---|
| 252 | */
|
---|
| 253 | typedef struct _k32SystemMemInfo
|
---|
| 254 | {
|
---|
| 255 | ULONG cb; /* Size of this structure - must be set. */
|
---|
| 256 | /* This will be used to distinguish futher versions. */
|
---|
| 257 | ULONG flFlags; /* This is used to limit amount of information collected - must be set. (K32_SYSMEMINFO_*) */
|
---|
| 258 | /* Some conciderations.
|
---|
| 259 | * - VM uses worker functions which traverses internal lists.
|
---|
| 260 | * - Page and physical memory traverses one internal structure (PGPhysAvail())
|
---|
| 261 | * - Swap File only accesses variables.
|
---|
| 262 | */
|
---|
[4165] | 263 |
|
---|
[5112] | 264 | /* SwapFile Info */
|
---|
| 265 | BOOL fSwapFile; /* Swap File: Swapping enabled or disabled. (SMswapping) */
|
---|
| 266 | /* (The SwapFile data below is valid when swapping is enbled!) */
|
---|
| 267 | ULONG cbSwapFileSize; /* Swap File: Current size. (smFileSize<<PAGESIZE) */
|
---|
| 268 | ULONG cbSwapFileAvail; /* Swap File: Available within current file. ((smFileSize-smcBrokenDF-SMcDFInuse)<<PAGESIZE) */
|
---|
| 269 | ULONG cbSwapFileUsed; /* Swap File: Used within current file. (SMcDFInuse<<PAGESIZE) */
|
---|
| 270 | ULONG cbSwapFileMinFree; /* Swap File: Addjusted min free on swap volume. (SMMinFree<<PAGESHIFT) */
|
---|
| 271 | ULONG cbSwapFileCFGMinFree; /* Swap File: Configured min free on swap volume. ((SMCFGMinFree<<PAGESHIFT)/4) */
|
---|
| 272 | ULONG cbSwapFileCFGSwapSize; /* Swap File: Configured initial swap file size. ((SMCFGSwapSize<<PAGESHIFT)/4) */
|
---|
| 273 | ULONG cSwapFileBrokenDF; /* Swap File: Number of broken disk frames (DF). (smcBrokenDF) */
|
---|
| 274 | ULONG cSwapFileGrowFails; /* Swap File: Number of times growoperation has failed. (smcGrowFails) */
|
---|
| 275 | ULONG cSwapFileInMemFile; /* Swap File: Number of pages in the "In-Memory-swapFile". (SMcInMemFile) */
|
---|
| 276 | /* These pages are not counted into the SMcDFInuse count I think. */
|
---|
| 277 |
|
---|
| 278 | /* Physical Memory Info */
|
---|
| 279 | ULONG cbPhysSize; /* Physical memory: total (bytes). (pgPhysPages<<PAGESHIFT) */
|
---|
| 280 | ULONG cbPhysAvail; /* Physical memory: available (bytes). (PGPhysAvail()) */
|
---|
| 281 | ULONG cbPhysUsed; /* Physical memory: used (bytes). (PGPhysPresent()<<PAGESHIFT) */
|
---|
| 282 |
|
---|
| 283 | /* Other paging info */
|
---|
| 284 | BOOL fPagingSwapEnabled; /* Paging: TRUE when swapping is enabled, else false. (PGSwapEnabled) */
|
---|
| 285 | ULONG cPagingPageFaults; /* Paging: Number of pagefaults which has occured since boot. (pgcPageFaults) */
|
---|
| 286 | ULONG cPagingPageFaultsActive;/* Paging: Number of pagefaults currently being processed. (pgcPageFaultsActive) */
|
---|
| 287 | ULONG cPagingPhysPages; /* Paging: Count of physical pages. (hope this is correct) (pgPhysPages) */
|
---|
| 288 | ULONG ulPagingPhysMax; /* Paging: Top of physical memory (physical page number) (pgPhysMax) */
|
---|
| 289 | ULONG cPagingResidentPages; /* Paging: Count of resident pages. (pgResidentPages) */
|
---|
| 290 | ULONG cPagingSwappablePages; /* Paging: Count of swappable pages which is currently present in memory. (pgSwappablePages) */
|
---|
| 291 | ULONG cPagingDiscardableInmem;/* Paging: Count of discardable pages which is currently present in memory. (pgDiscardableInmem) */
|
---|
| 292 | ULONG cPagingDiscardablePages;/* Paging: Count of discardable pages allocated. (pgDiscardablePages) */
|
---|
| 293 |
|
---|
| 294 | /* Virtual Memory manager info. */
|
---|
| 295 | ULONG ulAddressLimit; /* VM: Current user virtual address limit - use this for high arena check. (VirtualAddressLimit / 0x20000000) */
|
---|
| 296 | ULONG ulVMArenaPrivMax; /* VM: Current highest address in the private arena. (vmRecalcShrBound()) */
|
---|
| 297 | ULONG ulVMArenaSharedMin; /* VM: Current lowest address in the shared arena. (ahvmShr) */
|
---|
| 298 | ULONG ulVMArenaSharedMax; /* VM: Current highest address in the shared arena. (ahvmShr) */
|
---|
| 299 | ULONG ulVMArenaSystemMin; /* VM: Current lowest address in the system arena. (ahvmhSys) */
|
---|
| 300 | ULONG ulVMArenaSystemMax; /* VM: Current highest address in the system arena. (ahvmhSys) */
|
---|
| 301 | ULONG ulVMArenaHighPrivMax; /* VM: Current highest address in the high private arena - aurora/smp only. (vmRecalcShrBound) */
|
---|
| 302 | ULONG ulVMArenaHighSharedMin; /* VM: Current lowest address in the high shared arena - aurora/smp only. (ahvmhShr) */
|
---|
| 303 | ULONG ulVMArenaHighSharedMax; /* VM: Current highest address in the high shared arena - aurora/smp only. (ahvmhShr) */
|
---|
| 304 |
|
---|
[5219] | 305 | } K32SYSTEMMEMINFO;
|
---|
| 306 | typedef K32SYSTEMMEMINFO * PK32SYSTEMMEMINFO;
|
---|
[5112] | 307 |
|
---|
| 308 |
|
---|
[4165] | 309 | /*
|
---|
| 310 | * K32 category parameter structs
|
---|
[5219] | 311 | * ---
|
---|
| 312 | * First member is allways a K32HDR struct called hdr.
|
---|
| 313 | * The rest of it should be exactly like the parameter list for the API call.
|
---|
[4165] | 314 | */
|
---|
[5219] | 315 | struct _k32Header /* Common parameter header. */
|
---|
[4165] | 316 | {
|
---|
[5219] | 317 | ULONG cb; /* Size of the parameters struct. */
|
---|
[5200] | 318 | ULONG rc; /* Return code. */
|
---|
[5219] | 319 | };
|
---|
| 320 | typedef struct _k32Header K32HDR;
|
---|
| 321 | typedef K32HDR * PK32HDR;
|
---|
| 322 |
|
---|
| 323 |
|
---|
| 324 | struct _k32AllocMemEx
|
---|
| 325 | {
|
---|
| 326 | K32HDR hdr; /* Common parameter header */
|
---|
[5200] | 327 | PPVOID ppv; /* Pointer to pointer to the allocated memory block */
|
---|
| 328 | /* On input it (*ppv) may hold the suggested location of the block. */
|
---|
| 329 | ULONG cb; /* Blocksize (bytes) */
|
---|
| 330 | ULONG flFlags; /* Flags (equal to DosAllocMem flags) */
|
---|
| 331 | ULONG ulCS; /* Call CS */
|
---|
| 332 | ULONG ulEIP; /* Call EIP */
|
---|
[5219] | 333 | };
|
---|
| 334 | typedef struct _k32AllocMemEx K32ALLOCMEMEX;
|
---|
| 335 | typedef K32ALLOCMEMEX * PK32ALLOCMEMEX;
|
---|
[4165] | 336 |
|
---|
[5219] | 337 |
|
---|
| 338 | struct _k32QueryOTEs
|
---|
[4165] | 339 | {
|
---|
[5219] | 340 | K32HDR hdr; /* Common parameter header */
|
---|
[4165] | 341 | HMODULE hMTE; /* Module handle. */
|
---|
| 342 | PQOTEBUFFER pQOte; /* Pointer to output buffer. */
|
---|
| 343 | ULONG cbQOte; /* Size of the buffer pointed to by pQOte */
|
---|
[5219] | 344 | };
|
---|
| 345 | typedef struct _k32QueryOTEs K32QUERYOTES;
|
---|
| 346 | typedef K32QUERYOTES * PK32QUERYOTES;
|
---|
[4165] | 347 |
|
---|
[5219] | 348 |
|
---|
| 349 | struct _k32QueryOptionsStatus
|
---|
[4165] | 350 | {
|
---|
[5219] | 351 | K32HDR hdr; /* Common parameter header */
|
---|
[5200] | 352 | PK32OPTIONS pOptions; /* Pointer to option struct. (NULL allowed) */
|
---|
| 353 | PK32STATUS pStatus; /* Pointer to status struct. (NULL allowed) */
|
---|
[5219] | 354 | };
|
---|
| 355 | typedef struct _k32QueryOptionsStatus K32QUERYOPTIONSSTATUS;
|
---|
| 356 | typedef K32QUERYOPTIONSSTATUS * PK32QUERYOPTIONSSTATUS;
|
---|
[4165] | 357 |
|
---|
[5219] | 358 |
|
---|
| 359 | struct _k32SetOptions
|
---|
[4165] | 360 | {
|
---|
[5219] | 361 | K32HDR hdr; /* Common parameter header */
|
---|
| 362 | PK32OPTIONS pOptions; /* Pointer to option struct. (NULL allowed) */
|
---|
| 363 | };
|
---|
| 364 | typedef struct _k32SetOptions K32SETOPTIONS;
|
---|
| 365 | typedef K32SETOPTIONS * PK32SETOPTIONS;
|
---|
[4165] | 366 |
|
---|
[5219] | 367 |
|
---|
| 368 | struct _k32ProcessReadWrite
|
---|
[4348] | 369 | {
|
---|
[5219] | 370 | K32HDR hdr; /* Common parameter header */
|
---|
[4348] | 371 | PID pid; /* Process ID of the process to access memory in. */
|
---|
| 372 | ULONG cb; /* Number of bytes to read or write. */
|
---|
| 373 | PVOID pvSource; /* Pointer to source data. */
|
---|
| 374 | PVOID pvTarget; /* Pointer to target area. */
|
---|
| 375 | BOOL fRead; /* TRUE: pvSource is within pid while pvTarget is ours. */
|
---|
| 376 | /* FALSE: pvTarget is within pid while pvSource is ours. */
|
---|
[5219] | 377 | };
|
---|
| 378 | typedef struct _k32ProcessReadWrite K32PROCESSREADWRITE;
|
---|
| 379 | typedef K32PROCESSREADWRITE * PK32PROCESSREADWRITE;
|
---|
[4165] | 380 |
|
---|
[5219] | 381 |
|
---|
| 382 | struct _k32HandleSystemEvent
|
---|
[5052] | 383 | {
|
---|
[5219] | 384 | K32HDR hdr; /* Common parameter header */
|
---|
[5052] | 385 | ULONG ulEvent; /* Event identifier. One of the K32_SYSEVENT_ defines. */
|
---|
| 386 | HEV hev; /* Handle of shared event semaphore which should be */
|
---|
| 387 | /* posted when the the requested event occurs. */
|
---|
| 388 | BOOL fHandle; /* Action flag. */
|
---|
| 389 | /* TRUE: Take control of the event. */
|
---|
| 390 | /* FALSE: Give control back to the OS of this event. (hev must match the current handle!) */
|
---|
[5219] | 391 | };
|
---|
| 392 | typedef struct _k32HandleSystemEvent K32HANDLESYSTEMEVENT;
|
---|
| 393 | typedef K32HANDLESYSTEMEVENT * PK32HANDLESYSTEMEVENT;
|
---|
[4348] | 394 |
|
---|
[5219] | 395 |
|
---|
| 396 | struct _k32QuerySystemMemInfo
|
---|
[5112] | 397 | {
|
---|
[5219] | 398 | K32HDR hdr; /* Common parameter header */
|
---|
[5112] | 399 | PK32SYSTEMMEMINFO pMemInfo; /* Pointer to system memory info structure with cb set. */
|
---|
| 400 | /* The other members will be filled on successful return. */
|
---|
[5219] | 401 | };
|
---|
| 402 | typedef struct _k32QuerySystemMemInfo K32QUERYSYSTEMMEMINFO;
|
---|
| 403 | typedef K32QUERYSYSTEMMEMINFO * PK32QUERYSYSTEMMEMINFO;
|
---|
[4348] | 404 |
|
---|
[5112] | 405 |
|
---|
[5219] | 406 | struct _k32QueryCallGate
|
---|
| 407 | {
|
---|
| 408 | K32HDR hdr; /* Common parameter header */
|
---|
| 409 | PUSHORT pusCGSelector; /* Pointer to variable where the callgate selector */
|
---|
| 410 | /* is to be stored. */
|
---|
| 411 | };
|
---|
| 412 | typedef struct _k32QueryCallGate K32QUERYCALLGATE;
|
---|
| 413 | typedef struct _k32QueryCallGate * PK32QUERYCALLGATE;
|
---|
| 414 |
|
---|
[4165] | 415 | #pragma pack()
|
---|
| 416 |
|
---|
[5219] | 417 | /* NOINC */
|
---|
[4165] | 418 | #ifndef NO_WIN32K_LIB_FUNCTIONS
|
---|
| 419 | /*******************************************************************************
|
---|
| 420 | * External Functions *
|
---|
| 421 | *******************************************************************************/
|
---|
| 422 | /* Win32k APIs */
|
---|
| 423 | APIRET APIENTRY libWin32kInit(void);
|
---|
| 424 | APIRET APIENTRY libWin32kTerm(void);
|
---|
| 425 | BOOL APIENTRY libWin32kInstalled(void);
|
---|
| 426 | APIRET APIENTRY libWin32kQueryOptionsStatus(PK32OPTIONS pOptions, PK32STATUS pStatus);
|
---|
| 427 | APIRET APIENTRY libWin32kSetOptions(PK32OPTIONS pOptions);
|
---|
| 428 |
|
---|
| 429 | /* "Extra OS2 APIs" */
|
---|
| 430 | APIRET APIENTRY DosAllocMemEx(PPVOID ppv, ULONG cb, ULONG flag);
|
---|
| 431 | APIRET APIENTRY W32kQueryOTEs(HMODULE hMTE, PQOTEBUFFER pQOte, ULONG cbQOte);
|
---|
[5112] | 432 | APIRET APIENTRY W32kQuerySystemMemInfo(PK32SYSTEMMEMINFO pMemInfo);
|
---|
[4348] | 433 | APIRET APIENTRY W32kProcessReadWrite(PID pid, ULONG cb, PVOID pvSource, PVOID pvTarget, BOOL fRead);
|
---|
[5052] | 434 | APIRET APIENTRY W32kHandleSystemEvent(ULONG ulEvent, HEV hev, BOOL fHandle);
|
---|
[4165] | 435 |
|
---|
| 436 | /* Helper function */
|
---|
| 437 | USHORT APIENTRY libHelperGetCS(void);
|
---|
| 438 |
|
---|
| 439 | #endif
|
---|
[5219] | 440 | /* INC */
|
---|
[4165] | 441 |
|
---|
[5219] | 442 | /* NOINC */
|
---|
[5052] | 443 | #endif /* !defined(INCL_16) */
|
---|
[4165] | 444 | #endif
|
---|
[5219] | 445 | /* INC */
|
---|