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