1*c2c66affSColin Finck /****************************************************************************** 2*c2c66affSColin Finck * ZwXxx Functions * 3*c2c66affSColin Finck ******************************************************************************/ 4*c2c66affSColin Finck 5*c2c66affSColin Finck $if (_WDMDDK_) 6*c2c66affSColin Finck 7*c2c66affSColin Finck /* Constants */ 8*c2c66affSColin Finck #define NtCurrentProcess() ( (HANDLE)(LONG_PTR) -1 ) 9*c2c66affSColin Finck #define ZwCurrentProcess() NtCurrentProcess() 10*c2c66affSColin Finck #define NtCurrentThread() ( (HANDLE)(LONG_PTR) -2 ) 11*c2c66affSColin Finck #define ZwCurrentThread() NtCurrentThread() 12*c2c66affSColin Finck $endif (_WDMDDK_) 13*c2c66affSColin Finck 14*c2c66affSColin Finck $if (_NTDDK_) 15*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 16*c2c66affSColin Finck NTSYSAPI 17*c2c66affSColin Finck NTSTATUS 18*c2c66affSColin Finck NTAPI 19*c2c66affSColin Finck ZwAllocateLocallyUniqueId( 20*c2c66affSColin Finck _Out_ PLUID Luid); 21*c2c66affSColin Finck 22*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 23*c2c66affSColin Finck NTSYSAPI 24*c2c66affSColin Finck NTSTATUS 25*c2c66affSColin Finck NTAPI 26*c2c66affSColin Finck ZwTerminateProcess( 27*c2c66affSColin Finck _In_opt_ HANDLE ProcessHandle, 28*c2c66affSColin Finck _In_ NTSTATUS ExitStatus); 29*c2c66affSColin Finck 30*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 31*c2c66affSColin Finck NTSYSAPI 32*c2c66affSColin Finck NTSTATUS 33*c2c66affSColin Finck NTAPI 34*c2c66affSColin Finck ZwOpenProcess( 35*c2c66affSColin Finck _Out_ PHANDLE ProcessHandle, 36*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 37*c2c66affSColin Finck _In_ POBJECT_ATTRIBUTES ObjectAttributes, 38*c2c66affSColin Finck _In_opt_ PCLIENT_ID ClientId); 39*c2c66affSColin Finck $endif (_NTDDK_) 40*c2c66affSColin Finck $if (_NTIFS_) 41*c2c66affSColin Finck 42*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 43*c2c66affSColin Finck NTSYSAPI 44*c2c66affSColin Finck NTSTATUS 45*c2c66affSColin Finck NTAPI 46*c2c66affSColin Finck ZwQueryEaFile( 47*c2c66affSColin Finck _In_ HANDLE FileHandle, 48*c2c66affSColin Finck _Out_ PIO_STATUS_BLOCK IoStatusBlock, 49*c2c66affSColin Finck _Out_writes_bytes_(Length) PVOID Buffer, 50*c2c66affSColin Finck _In_ ULONG Length, 51*c2c66affSColin Finck _In_ BOOLEAN ReturnSingleEntry, 52*c2c66affSColin Finck _In_reads_bytes_opt_(EaListLength) PVOID EaList, 53*c2c66affSColin Finck _In_ ULONG EaListLength, 54*c2c66affSColin Finck _In_opt_ PULONG EaIndex, 55*c2c66affSColin Finck _In_ BOOLEAN RestartScan); 56*c2c66affSColin Finck 57*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 58*c2c66affSColin Finck NTSYSAPI 59*c2c66affSColin Finck NTSTATUS 60*c2c66affSColin Finck NTAPI 61*c2c66affSColin Finck ZwSetEaFile( 62*c2c66affSColin Finck _In_ HANDLE FileHandle, 63*c2c66affSColin Finck _Out_ PIO_STATUS_BLOCK IoStatusBlock, 64*c2c66affSColin Finck _In_reads_bytes_(Length) PVOID Buffer, 65*c2c66affSColin Finck _In_ ULONG Length); 66*c2c66affSColin Finck 67*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 68*c2c66affSColin Finck NTSYSAPI 69*c2c66affSColin Finck NTSTATUS 70*c2c66affSColin Finck NTAPI 71*c2c66affSColin Finck ZwDuplicateToken( 72*c2c66affSColin Finck _In_ HANDLE ExistingTokenHandle, 73*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 74*c2c66affSColin Finck _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 75*c2c66affSColin Finck _In_ BOOLEAN EffectiveOnly, 76*c2c66affSColin Finck _In_ TOKEN_TYPE TokenType, 77*c2c66affSColin Finck _Out_ PHANDLE NewTokenHandle); 78*c2c66affSColin Finck $endif (_NTIFS_) 79*c2c66affSColin Finck 80*c2c66affSColin Finck #if (NTDDI_VERSION >= NTDDI_WIN2K) 81*c2c66affSColin Finck $if (_WDMDDK_) 82*c2c66affSColin Finck 83*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 84*c2c66affSColin Finck NTSYSAPI 85*c2c66affSColin Finck NTSTATUS 86*c2c66affSColin Finck NTAPI 87*c2c66affSColin Finck ZwClose( 88*c2c66affSColin Finck _In_ HANDLE Handle); 89*c2c66affSColin Finck 90*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 91*c2c66affSColin Finck NTSYSAPI 92*c2c66affSColin Finck NTSTATUS 93*c2c66affSColin Finck NTAPI 94*c2c66affSColin Finck ZwCreateDirectoryObject( 95*c2c66affSColin Finck _Out_ PHANDLE DirectoryHandle, 96*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 97*c2c66affSColin Finck _In_ POBJECT_ATTRIBUTES ObjectAttributes); 98*c2c66affSColin Finck 99*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 100*c2c66affSColin Finck NTSYSAPI 101*c2c66affSColin Finck NTSTATUS 102*c2c66affSColin Finck NTAPI 103*c2c66affSColin Finck ZwCreateFile( 104*c2c66affSColin Finck _Out_ PHANDLE FileHandle, 105*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 106*c2c66affSColin Finck _In_ POBJECT_ATTRIBUTES ObjectAttributes, 107*c2c66affSColin Finck _Out_ PIO_STATUS_BLOCK IoStatusBlock, 108*c2c66affSColin Finck _In_opt_ PLARGE_INTEGER AllocationSize, 109*c2c66affSColin Finck _In_ ULONG FileAttributes, 110*c2c66affSColin Finck _In_ ULONG ShareAccess, 111*c2c66affSColin Finck _In_ ULONG CreateDisposition, 112*c2c66affSColin Finck _In_ ULONG CreateOptions, 113*c2c66affSColin Finck _In_reads_bytes_opt_(EaLength) PVOID EaBuffer, 114*c2c66affSColin Finck _In_ ULONG EaLength 115*c2c66affSColin Finck ); 116*c2c66affSColin Finck 117*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 118*c2c66affSColin Finck NTSYSAPI 119*c2c66affSColin Finck NTSTATUS 120*c2c66affSColin Finck NTAPI 121*c2c66affSColin Finck ZwCreateKey( 122*c2c66affSColin Finck _Out_ PHANDLE KeyHandle, 123*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 124*c2c66affSColin Finck _In_ POBJECT_ATTRIBUTES ObjectAttributes, 125*c2c66affSColin Finck _Reserved_ ULONG TitleIndex, 126*c2c66affSColin Finck _In_opt_ PUNICODE_STRING Class, 127*c2c66affSColin Finck _In_ ULONG CreateOptions, 128*c2c66affSColin Finck _Out_opt_ PULONG Disposition); 129*c2c66affSColin Finck 130*c2c66affSColin Finck _IRQL_requires_max_(APC_LEVEL) 131*c2c66affSColin Finck NTSYSAPI 132*c2c66affSColin Finck NTSTATUS 133*c2c66affSColin Finck NTAPI 134*c2c66affSColin Finck ZwCreateSection( 135*c2c66affSColin Finck _Out_ PHANDLE SectionHandle, 136*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 137*c2c66affSColin Finck _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 138*c2c66affSColin Finck _In_opt_ PLARGE_INTEGER MaximumSize, 139*c2c66affSColin Finck _In_ ULONG SectionPageProtection, 140*c2c66affSColin Finck _In_ ULONG AllocationAttributes, 141*c2c66affSColin Finck _In_opt_ HANDLE FileHandle); 142*c2c66affSColin Finck 143*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 144*c2c66affSColin Finck NTSYSAPI 145*c2c66affSColin Finck NTSTATUS 146*c2c66affSColin Finck NTAPI 147*c2c66affSColin Finck ZwDeleteKey( 148*c2c66affSColin Finck _In_ HANDLE KeyHandle); 149*c2c66affSColin Finck 150*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 151*c2c66affSColin Finck NTSYSAPI 152*c2c66affSColin Finck NTSTATUS 153*c2c66affSColin Finck NTAPI 154*c2c66affSColin Finck ZwDeleteValueKey( 155*c2c66affSColin Finck _In_ HANDLE KeyHandle, 156*c2c66affSColin Finck _In_ PUNICODE_STRING ValueName); 157*c2c66affSColin Finck 158*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 159*c2c66affSColin Finck _When_(Length == 0, _Post_satisfies_(return < 0)) 160*c2c66affSColin Finck _When_(Length > 0, _Post_satisfies_(return <= 0)) 161*c2c66affSColin Finck NTSYSAPI 162*c2c66affSColin Finck NTSTATUS 163*c2c66affSColin Finck NTAPI 164*c2c66affSColin Finck ZwEnumerateKey( 165*c2c66affSColin Finck _In_ HANDLE KeyHandle, 166*c2c66affSColin Finck _In_ ULONG Index, 167*c2c66affSColin Finck _In_ KEY_INFORMATION_CLASS KeyInformationClass, 168*c2c66affSColin Finck _Out_writes_bytes_opt_(Length) PVOID KeyInformation, 169*c2c66affSColin Finck _In_ ULONG Length, 170*c2c66affSColin Finck _Out_ PULONG ResultLength); 171*c2c66affSColin Finck 172*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 173*c2c66affSColin Finck _When_(Length == 0, _Post_satisfies_(return < 0)) 174*c2c66affSColin Finck _When_(Length > 0, _Post_satisfies_(return <= 0)) 175*c2c66affSColin Finck NTSYSAPI 176*c2c66affSColin Finck NTSTATUS 177*c2c66affSColin Finck NTAPI 178*c2c66affSColin Finck ZwEnumerateValueKey( 179*c2c66affSColin Finck _In_ HANDLE KeyHandle, 180*c2c66affSColin Finck _In_ ULONG Index, 181*c2c66affSColin Finck _In_ KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, 182*c2c66affSColin Finck _Out_writes_bytes_opt_(Length) PVOID KeyValueInformation, 183*c2c66affSColin Finck _In_ ULONG Length, 184*c2c66affSColin Finck _Out_ PULONG ResultLength); 185*c2c66affSColin Finck 186*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 187*c2c66affSColin Finck NTSYSAPI 188*c2c66affSColin Finck NTSTATUS 189*c2c66affSColin Finck NTAPI 190*c2c66affSColin Finck ZwFlushKey( 191*c2c66affSColin Finck _In_ HANDLE KeyHandle); 192*c2c66affSColin Finck 193*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 194*c2c66affSColin Finck NTSYSAPI 195*c2c66affSColin Finck NTSTATUS 196*c2c66affSColin Finck NTAPI 197*c2c66affSColin Finck ZwLoadDriver( 198*c2c66affSColin Finck _In_ PUNICODE_STRING DriverServiceName); 199*c2c66affSColin Finck 200*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 201*c2c66affSColin Finck NTSYSAPI 202*c2c66affSColin Finck NTSTATUS 203*c2c66affSColin Finck NTAPI 204*c2c66affSColin Finck ZwMakeTemporaryObject( 205*c2c66affSColin Finck _In_ HANDLE Handle); 206*c2c66affSColin Finck 207*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 208*c2c66affSColin Finck NTSYSAPI 209*c2c66affSColin Finck NTSTATUS 210*c2c66affSColin Finck NTAPI 211*c2c66affSColin Finck ZwMapViewOfSection( 212*c2c66affSColin Finck _In_ HANDLE SectionHandle, 213*c2c66affSColin Finck _In_ HANDLE ProcessHandle, 214*c2c66affSColin Finck _Outptr_result_bytebuffer_(*ViewSize) PVOID *BaseAddress, 215*c2c66affSColin Finck _In_ ULONG_PTR ZeroBits, 216*c2c66affSColin Finck _In_ SIZE_T CommitSize, 217*c2c66affSColin Finck _Inout_opt_ PLARGE_INTEGER SectionOffset, 218*c2c66affSColin Finck _Inout_ PSIZE_T ViewSize, 219*c2c66affSColin Finck _In_ SECTION_INHERIT InheritDisposition, 220*c2c66affSColin Finck _In_ ULONG AllocationType, 221*c2c66affSColin Finck _In_ ULONG Protect); 222*c2c66affSColin Finck 223*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 224*c2c66affSColin Finck NTSYSAPI 225*c2c66affSColin Finck NTSTATUS 226*c2c66affSColin Finck NTAPI 227*c2c66affSColin Finck ZwOpenFile( 228*c2c66affSColin Finck _Out_ PHANDLE FileHandle, 229*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 230*c2c66affSColin Finck _In_ POBJECT_ATTRIBUTES ObjectAttributes, 231*c2c66affSColin Finck _Out_ PIO_STATUS_BLOCK IoStatusBlock, 232*c2c66affSColin Finck _In_ ULONG ShareAccess, 233*c2c66affSColin Finck _In_ ULONG OpenOptions); 234*c2c66affSColin Finck 235*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 236*c2c66affSColin Finck NTSYSAPI 237*c2c66affSColin Finck NTSTATUS 238*c2c66affSColin Finck NTAPI 239*c2c66affSColin Finck ZwOpenKey( 240*c2c66affSColin Finck _Out_ PHANDLE KeyHandle, 241*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 242*c2c66affSColin Finck _In_ POBJECT_ATTRIBUTES ObjectAttributes); 243*c2c66affSColin Finck 244*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 245*c2c66affSColin Finck NTSYSAPI 246*c2c66affSColin Finck NTSTATUS 247*c2c66affSColin Finck NTAPI 248*c2c66affSColin Finck ZwOpenSection( 249*c2c66affSColin Finck _Out_ PHANDLE SectionHandle, 250*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 251*c2c66affSColin Finck _In_ POBJECT_ATTRIBUTES ObjectAttributes); 252*c2c66affSColin Finck 253*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 254*c2c66affSColin Finck NTSYSAPI 255*c2c66affSColin Finck NTSTATUS 256*c2c66affSColin Finck NTAPI 257*c2c66affSColin Finck ZwOpenSymbolicLinkObject( 258*c2c66affSColin Finck _Out_ PHANDLE LinkHandle, 259*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 260*c2c66affSColin Finck _In_ POBJECT_ATTRIBUTES ObjectAttributes); 261*c2c66affSColin Finck 262*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 263*c2c66affSColin Finck NTSYSAPI 264*c2c66affSColin Finck NTSTATUS 265*c2c66affSColin Finck NTAPI 266*c2c66affSColin Finck ZwQueryInformationFile( 267*c2c66affSColin Finck _In_ HANDLE FileHandle, 268*c2c66affSColin Finck _Out_ PIO_STATUS_BLOCK IoStatusBlock, 269*c2c66affSColin Finck _Out_writes_bytes_(Length) PVOID FileInformation, 270*c2c66affSColin Finck _In_ ULONG Length, 271*c2c66affSColin Finck _In_ FILE_INFORMATION_CLASS FileInformationClass); 272*c2c66affSColin Finck 273*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 274*c2c66affSColin Finck _When_(Length == 0, _Post_satisfies_(return < 0)) 275*c2c66affSColin Finck _When_(Length > 0, _Post_satisfies_(return <= 0)) 276*c2c66affSColin Finck NTSYSAPI 277*c2c66affSColin Finck NTSTATUS 278*c2c66affSColin Finck NTAPI 279*c2c66affSColin Finck ZwQueryKey( 280*c2c66affSColin Finck _In_ HANDLE KeyHandle, 281*c2c66affSColin Finck _In_ KEY_INFORMATION_CLASS KeyInformationClass, 282*c2c66affSColin Finck _Out_writes_bytes_opt_(Length) PVOID KeyInformation, 283*c2c66affSColin Finck _In_ ULONG Length, 284*c2c66affSColin Finck _Out_ PULONG ResultLength); 285*c2c66affSColin Finck 286*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 287*c2c66affSColin Finck NTSYSAPI 288*c2c66affSColin Finck NTSTATUS 289*c2c66affSColin Finck NTAPI 290*c2c66affSColin Finck ZwQuerySymbolicLinkObject( 291*c2c66affSColin Finck _In_ HANDLE LinkHandle, 292*c2c66affSColin Finck _Inout_ PUNICODE_STRING LinkTarget, 293*c2c66affSColin Finck _Out_opt_ PULONG ReturnedLength); 294*c2c66affSColin Finck 295*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 296*c2c66affSColin Finck _When_(Length == 0, _Post_satisfies_(return < 0)) 297*c2c66affSColin Finck _When_(Length > 0, _Post_satisfies_(return <= 0)) 298*c2c66affSColin Finck NTSYSAPI 299*c2c66affSColin Finck NTSTATUS 300*c2c66affSColin Finck NTAPI 301*c2c66affSColin Finck ZwQueryValueKey( 302*c2c66affSColin Finck _In_ HANDLE KeyHandle, 303*c2c66affSColin Finck _In_ PUNICODE_STRING ValueName, 304*c2c66affSColin Finck _In_ KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, 305*c2c66affSColin Finck _Out_writes_bytes_opt_(Length) PVOID KeyValueInformation, 306*c2c66affSColin Finck _In_ ULONG Length, 307*c2c66affSColin Finck _Out_ PULONG ResultLength); 308*c2c66affSColin Finck 309*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 310*c2c66affSColin Finck NTSYSAPI 311*c2c66affSColin Finck NTSTATUS 312*c2c66affSColin Finck NTAPI 313*c2c66affSColin Finck ZwReadFile( 314*c2c66affSColin Finck _In_ HANDLE FileHandle, 315*c2c66affSColin Finck _In_opt_ HANDLE Event, 316*c2c66affSColin Finck _In_opt_ PIO_APC_ROUTINE ApcRoutine, 317*c2c66affSColin Finck _In_opt_ PVOID ApcContext, 318*c2c66affSColin Finck _Out_ PIO_STATUS_BLOCK IoStatusBlock, 319*c2c66affSColin Finck _Out_writes_bytes_(Length) PVOID Buffer, 320*c2c66affSColin Finck _In_ ULONG Length, 321*c2c66affSColin Finck _In_opt_ PLARGE_INTEGER ByteOffset, 322*c2c66affSColin Finck _In_opt_ PULONG Key); 323*c2c66affSColin Finck 324*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 325*c2c66affSColin Finck NTSYSAPI 326*c2c66affSColin Finck NTSTATUS 327*c2c66affSColin Finck NTAPI 328*c2c66affSColin Finck ZwSetInformationFile( 329*c2c66affSColin Finck _In_ HANDLE FileHandle, 330*c2c66affSColin Finck _Out_ PIO_STATUS_BLOCK IoStatusBlock, 331*c2c66affSColin Finck _In_reads_bytes_(Length) PVOID FileInformation, 332*c2c66affSColin Finck _In_ ULONG Length, 333*c2c66affSColin Finck _In_ FILE_INFORMATION_CLASS FileInformationClass); 334*c2c66affSColin Finck 335*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 336*c2c66affSColin Finck NTSYSAPI 337*c2c66affSColin Finck NTSTATUS 338*c2c66affSColin Finck NTAPI 339*c2c66affSColin Finck ZwSetValueKey( 340*c2c66affSColin Finck _In_ HANDLE KeyHandle, 341*c2c66affSColin Finck _In_ PUNICODE_STRING ValueName, 342*c2c66affSColin Finck _In_opt_ ULONG TitleIndex, 343*c2c66affSColin Finck _In_ ULONG Type, 344*c2c66affSColin Finck _In_reads_bytes_opt_(DataSize) PVOID Data, 345*c2c66affSColin Finck _In_ ULONG DataSize); 346*c2c66affSColin Finck 347*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 348*c2c66affSColin Finck NTSYSAPI 349*c2c66affSColin Finck NTSTATUS 350*c2c66affSColin Finck NTAPI 351*c2c66affSColin Finck ZwUnloadDriver( 352*c2c66affSColin Finck _In_ PUNICODE_STRING DriverServiceName); 353*c2c66affSColin Finck 354*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 355*c2c66affSColin Finck NTSYSAPI 356*c2c66affSColin Finck NTSTATUS 357*c2c66affSColin Finck NTAPI 358*c2c66affSColin Finck ZwUnmapViewOfSection( 359*c2c66affSColin Finck _In_ HANDLE ProcessHandle, 360*c2c66affSColin Finck _In_opt_ PVOID BaseAddress); 361*c2c66affSColin Finck 362*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 363*c2c66affSColin Finck NTSYSAPI 364*c2c66affSColin Finck NTSTATUS 365*c2c66affSColin Finck NTAPI 366*c2c66affSColin Finck ZwWriteFile( 367*c2c66affSColin Finck _In_ HANDLE FileHandle, 368*c2c66affSColin Finck _In_opt_ HANDLE Event, 369*c2c66affSColin Finck _In_opt_ PIO_APC_ROUTINE ApcRoutine, 370*c2c66affSColin Finck _In_opt_ PVOID ApcContext, 371*c2c66affSColin Finck _Out_ PIO_STATUS_BLOCK IoStatusBlock, 372*c2c66affSColin Finck _In_reads_bytes_(Length) PVOID Buffer, 373*c2c66affSColin Finck _In_ ULONG Length, 374*c2c66affSColin Finck _In_opt_ PLARGE_INTEGER ByteOffset, 375*c2c66affSColin Finck _In_opt_ PULONG Key); 376*c2c66affSColin Finck 377*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 378*c2c66affSColin Finck NTSYSAPI 379*c2c66affSColin Finck NTSTATUS 380*c2c66affSColin Finck NTAPI 381*c2c66affSColin Finck ZwQueryFullAttributesFile( 382*c2c66affSColin Finck _In_ POBJECT_ATTRIBUTES ObjectAttributes, 383*c2c66affSColin Finck _Out_ PFILE_NETWORK_OPEN_INFORMATION FileInformation); 384*c2c66affSColin Finck 385*c2c66affSColin Finck $endif (_WDMDDK_) 386*c2c66affSColin Finck $if (_NTDDK_) 387*c2c66affSColin Finck 388*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 389*c2c66affSColin Finck NTSTATUS 390*c2c66affSColin Finck NTAPI 391*c2c66affSColin Finck ZwCancelTimer( 392*c2c66affSColin Finck _In_ HANDLE TimerHandle, 393*c2c66affSColin Finck _Out_opt_ PBOOLEAN CurrentState); 394*c2c66affSColin Finck 395*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 396*c2c66affSColin Finck _When_(return == 0, __drv_allocatesMem(TimerObject)) 397*c2c66affSColin Finck NTSTATUS 398*c2c66affSColin Finck NTAPI 399*c2c66affSColin Finck ZwCreateTimer( 400*c2c66affSColin Finck _Out_ PHANDLE TimerHandle, 401*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 402*c2c66affSColin Finck _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 403*c2c66affSColin Finck _In_ TIMER_TYPE TimerType); 404*c2c66affSColin Finck 405*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 406*c2c66affSColin Finck NTSTATUS 407*c2c66affSColin Finck NTAPI 408*c2c66affSColin Finck ZwOpenTimer( 409*c2c66affSColin Finck _Out_ PHANDLE TimerHandle, 410*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 411*c2c66affSColin Finck _In_ POBJECT_ATTRIBUTES ObjectAttributes); 412*c2c66affSColin Finck 413*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 414*c2c66affSColin Finck NTSYSAPI 415*c2c66affSColin Finck NTSTATUS 416*c2c66affSColin Finck NTAPI 417*c2c66affSColin Finck ZwSetInformationThread( 418*c2c66affSColin Finck _In_ HANDLE ThreadHandle, 419*c2c66affSColin Finck _In_ THREADINFOCLASS ThreadInformationClass, 420*c2c66affSColin Finck _In_reads_bytes_(ThreadInformationLength) PVOID ThreadInformation, 421*c2c66affSColin Finck _In_ ULONG ThreadInformationLength); 422*c2c66affSColin Finck 423*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 424*c2c66affSColin Finck NTSTATUS 425*c2c66affSColin Finck NTAPI 426*c2c66affSColin Finck ZwSetTimer( 427*c2c66affSColin Finck _In_ HANDLE TimerHandle, 428*c2c66affSColin Finck _In_ PLARGE_INTEGER DueTime, 429*c2c66affSColin Finck _In_opt_ PTIMER_APC_ROUTINE TimerApcRoutine, 430*c2c66affSColin Finck _In_opt_ PVOID TimerContext, 431*c2c66affSColin Finck _In_ BOOLEAN ResumeTimer, 432*c2c66affSColin Finck _In_opt_ LONG Period, 433*c2c66affSColin Finck _Out_opt_ PBOOLEAN PreviousState); 434*c2c66affSColin Finck 435*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 436*c2c66affSColin Finck NTSYSAPI 437*c2c66affSColin Finck NTSTATUS 438*c2c66affSColin Finck NTAPI 439*c2c66affSColin Finck ZwDisplayString( 440*c2c66affSColin Finck _In_ PUNICODE_STRING String); 441*c2c66affSColin Finck 442*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 443*c2c66affSColin Finck NTSYSAPI 444*c2c66affSColin Finck NTSTATUS 445*c2c66affSColin Finck NTAPI 446*c2c66affSColin Finck ZwPowerInformation( 447*c2c66affSColin Finck _In_ POWER_INFORMATION_LEVEL PowerInformationLevel, 448*c2c66affSColin Finck _In_reads_bytes_opt_(InputBufferLength) PVOID InputBuffer, 449*c2c66affSColin Finck _In_ ULONG InputBufferLength, 450*c2c66affSColin Finck _Out_writes_bytes_opt_(OutputBufferLength) PVOID OutputBuffer, 451*c2c66affSColin Finck _In_ ULONG OutputBufferLength); 452*c2c66affSColin Finck 453*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 454*c2c66affSColin Finck NTSYSAPI 455*c2c66affSColin Finck NTSTATUS 456*c2c66affSColin Finck NTAPI 457*c2c66affSColin Finck ZwQueryVolumeInformationFile( 458*c2c66affSColin Finck _In_ HANDLE FileHandle, 459*c2c66affSColin Finck _Out_ PIO_STATUS_BLOCK IoStatusBlock, 460*c2c66affSColin Finck _Out_writes_bytes_(Length) PVOID FsInformation, 461*c2c66affSColin Finck _In_ ULONG Length, 462*c2c66affSColin Finck _In_ FS_INFORMATION_CLASS FsInformationClass); 463*c2c66affSColin Finck 464*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 465*c2c66affSColin Finck NTSYSAPI 466*c2c66affSColin Finck NTSTATUS 467*c2c66affSColin Finck NTAPI 468*c2c66affSColin Finck ZwDeviceIoControlFile( 469*c2c66affSColin Finck _In_ HANDLE FileHandle, 470*c2c66affSColin Finck _In_opt_ HANDLE Event, 471*c2c66affSColin Finck _In_opt_ PIO_APC_ROUTINE ApcRoutine, 472*c2c66affSColin Finck _In_opt_ PVOID ApcContext, 473*c2c66affSColin Finck _Out_ PIO_STATUS_BLOCK IoStatusBlock, 474*c2c66affSColin Finck _In_ ULONG IoControlCode, 475*c2c66affSColin Finck _In_reads_bytes_opt_(InputBufferLength) PVOID InputBuffer, 476*c2c66affSColin Finck _In_ ULONG InputBufferLength, 477*c2c66affSColin Finck _Out_writes_bytes_opt_(OutputBufferLength) PVOID OutputBuffer, 478*c2c66affSColin Finck _In_ ULONG OutputBufferLength); 479*c2c66affSColin Finck 480*c2c66affSColin Finck $endif (_NTDDK_) 481*c2c66affSColin Finck $if (_NTIFS_) 482*c2c66affSColin Finck 483*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 484*c2c66affSColin Finck NTSYSAPI 485*c2c66affSColin Finck NTSTATUS 486*c2c66affSColin Finck NTAPI 487*c2c66affSColin Finck ZwQueryObject( 488*c2c66affSColin Finck _In_opt_ HANDLE Handle, 489*c2c66affSColin Finck _In_ OBJECT_INFORMATION_CLASS ObjectInformationClass, 490*c2c66affSColin Finck _Out_writes_bytes_opt_(ObjectInformationLength) PVOID ObjectInformation, 491*c2c66affSColin Finck _In_ ULONG ObjectInformationLength, 492*c2c66affSColin Finck _Out_opt_ PULONG ReturnLength); 493*c2c66affSColin Finck 494*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 495*c2c66affSColin Finck NTSYSAPI 496*c2c66affSColin Finck NTSTATUS 497*c2c66affSColin Finck NTAPI 498*c2c66affSColin Finck ZwNotifyChangeKey( 499*c2c66affSColin Finck _In_ HANDLE KeyHandle, 500*c2c66affSColin Finck _In_opt_ HANDLE EventHandle, 501*c2c66affSColin Finck _In_opt_ PIO_APC_ROUTINE ApcRoutine, 502*c2c66affSColin Finck _In_opt_ PVOID ApcContext, 503*c2c66affSColin Finck _Out_ PIO_STATUS_BLOCK IoStatusBlock, 504*c2c66affSColin Finck _In_ ULONG NotifyFilter, 505*c2c66affSColin Finck _In_ BOOLEAN WatchSubtree, 506*c2c66affSColin Finck _Out_writes_bytes_opt_(BufferLength) PVOID Buffer, 507*c2c66affSColin Finck _In_ ULONG BufferLength, 508*c2c66affSColin Finck _In_ BOOLEAN Asynchronous); 509*c2c66affSColin Finck 510*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 511*c2c66affSColin Finck NTSYSAPI 512*c2c66affSColin Finck NTSTATUS 513*c2c66affSColin Finck NTAPI 514*c2c66affSColin Finck ZwCreateEvent( 515*c2c66affSColin Finck _Out_ PHANDLE EventHandle, 516*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 517*c2c66affSColin Finck _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 518*c2c66affSColin Finck _In_ EVENT_TYPE EventType, 519*c2c66affSColin Finck _In_ BOOLEAN InitialState); 520*c2c66affSColin Finck 521*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 522*c2c66affSColin Finck NTSYSAPI 523*c2c66affSColin Finck NTSTATUS 524*c2c66affSColin Finck NTAPI 525*c2c66affSColin Finck ZwDeleteFile( 526*c2c66affSColin Finck _In_ POBJECT_ATTRIBUTES ObjectAttributes); 527*c2c66affSColin Finck 528*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 529*c2c66affSColin Finck NTSYSAPI 530*c2c66affSColin Finck NTSTATUS 531*c2c66affSColin Finck NTAPI 532*c2c66affSColin Finck ZwQueryDirectoryFile( 533*c2c66affSColin Finck _In_ HANDLE FileHandle, 534*c2c66affSColin Finck _In_opt_ HANDLE Event, 535*c2c66affSColin Finck _In_opt_ PIO_APC_ROUTINE ApcRoutine, 536*c2c66affSColin Finck _In_opt_ PVOID ApcContext, 537*c2c66affSColin Finck _Out_ PIO_STATUS_BLOCK IoStatusBlock, 538*c2c66affSColin Finck _Out_writes_bytes_(Length) PVOID FileInformation, 539*c2c66affSColin Finck _In_ ULONG Length, 540*c2c66affSColin Finck _In_ FILE_INFORMATION_CLASS FileInformationClass, 541*c2c66affSColin Finck _In_ BOOLEAN ReturnSingleEntry, 542*c2c66affSColin Finck _In_opt_ PUNICODE_STRING FileName, 543*c2c66affSColin Finck _In_ BOOLEAN RestartScan); 544*c2c66affSColin Finck 545*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 546*c2c66affSColin Finck NTSYSAPI 547*c2c66affSColin Finck NTSTATUS 548*c2c66affSColin Finck NTAPI 549*c2c66affSColin Finck ZwSetVolumeInformationFile( 550*c2c66affSColin Finck _In_ HANDLE FileHandle, 551*c2c66affSColin Finck _Out_ PIO_STATUS_BLOCK IoStatusBlock, 552*c2c66affSColin Finck _In_reads_bytes_(Length) PVOID FsInformation, 553*c2c66affSColin Finck _In_ ULONG Length, 554*c2c66affSColin Finck _In_ FS_INFORMATION_CLASS FsInformationClass); 555*c2c66affSColin Finck 556*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 557*c2c66affSColin Finck NTSYSAPI 558*c2c66affSColin Finck NTSTATUS 559*c2c66affSColin Finck NTAPI 560*c2c66affSColin Finck ZwFsControlFile( 561*c2c66affSColin Finck _In_ HANDLE FileHandle, 562*c2c66affSColin Finck _In_opt_ HANDLE Event, 563*c2c66affSColin Finck _In_opt_ PIO_APC_ROUTINE ApcRoutine, 564*c2c66affSColin Finck _In_opt_ PVOID ApcContext, 565*c2c66affSColin Finck _Out_ PIO_STATUS_BLOCK IoStatusBlock, 566*c2c66affSColin Finck _In_ ULONG FsControlCode, 567*c2c66affSColin Finck _In_reads_bytes_opt_(InputBufferLength) PVOID InputBuffer, 568*c2c66affSColin Finck _In_ ULONG InputBufferLength, 569*c2c66affSColin Finck _Out_writes_bytes_opt_(OutputBufferLength) PVOID OutputBuffer, 570*c2c66affSColin Finck _In_ ULONG OutputBufferLength); 571*c2c66affSColin Finck 572*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 573*c2c66affSColin Finck NTSYSAPI 574*c2c66affSColin Finck NTSTATUS 575*c2c66affSColin Finck NTAPI 576*c2c66affSColin Finck ZwDuplicateObject( 577*c2c66affSColin Finck _In_ HANDLE SourceProcessHandle, 578*c2c66affSColin Finck _In_ HANDLE SourceHandle, 579*c2c66affSColin Finck _In_opt_ HANDLE TargetProcessHandle, 580*c2c66affSColin Finck _Out_opt_ PHANDLE TargetHandle, 581*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 582*c2c66affSColin Finck _In_ ULONG HandleAttributes, 583*c2c66affSColin Finck _In_ ULONG Options); 584*c2c66affSColin Finck 585*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 586*c2c66affSColin Finck NTSYSAPI 587*c2c66affSColin Finck NTSTATUS 588*c2c66affSColin Finck NTAPI 589*c2c66affSColin Finck ZwOpenDirectoryObject( 590*c2c66affSColin Finck _Out_ PHANDLE DirectoryHandle, 591*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 592*c2c66affSColin Finck _In_ POBJECT_ATTRIBUTES ObjectAttributes); 593*c2c66affSColin Finck 594*c2c66affSColin Finck _Must_inspect_result_ 595*c2c66affSColin Finck _At_(*BaseAddress, __drv_allocatesMem(Mem)) 596*c2c66affSColin Finck __kernel_entry 597*c2c66affSColin Finck NTSYSAPI 598*c2c66affSColin Finck NTSTATUS 599*c2c66affSColin Finck NTAPI 600*c2c66affSColin Finck ZwAllocateVirtualMemory( 601*c2c66affSColin Finck _In_ HANDLE ProcessHandle, 602*c2c66affSColin Finck _Inout_ _Outptr_result_buffer_(*RegionSize) PVOID *BaseAddress, 603*c2c66affSColin Finck _In_ ULONG_PTR ZeroBits, 604*c2c66affSColin Finck _Inout_ PSIZE_T RegionSize, 605*c2c66affSColin Finck _In_ ULONG AllocationType, 606*c2c66affSColin Finck _In_ ULONG Protect); 607*c2c66affSColin Finck 608*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 609*c2c66affSColin Finck NTSYSAPI 610*c2c66affSColin Finck NTSTATUS 611*c2c66affSColin Finck NTAPI 612*c2c66affSColin Finck ZwFreeVirtualMemory( 613*c2c66affSColin Finck _In_ HANDLE ProcessHandle, 614*c2c66affSColin Finck _Inout_ __drv_freesMem(Mem) PVOID *BaseAddress, 615*c2c66affSColin Finck _Inout_ PSIZE_T RegionSize, 616*c2c66affSColin Finck _In_ ULONG FreeType); 617*c2c66affSColin Finck 618*c2c66affSColin Finck _When_(Timeout == NULL, _IRQL_requires_max_(APC_LEVEL)) 619*c2c66affSColin Finck _When_(Timeout->QuadPart != 0, _IRQL_requires_max_(APC_LEVEL)) 620*c2c66affSColin Finck _When_(Timeout->QuadPart == 0, _IRQL_requires_max_(DISPATCH_LEVEL)) 621*c2c66affSColin Finck NTSYSAPI 622*c2c66affSColin Finck NTSTATUS 623*c2c66affSColin Finck NTAPI 624*c2c66affSColin Finck ZwWaitForSingleObject( 625*c2c66affSColin Finck _In_ HANDLE Handle, 626*c2c66affSColin Finck _In_ BOOLEAN Alertable, 627*c2c66affSColin Finck _In_opt_ PLARGE_INTEGER Timeout); 628*c2c66affSColin Finck 629*c2c66affSColin Finck _IRQL_requires_max_(DISPATCH_LEVEL) 630*c2c66affSColin Finck NTSYSAPI 631*c2c66affSColin Finck NTSTATUS 632*c2c66affSColin Finck NTAPI 633*c2c66affSColin Finck ZwSetEvent( 634*c2c66affSColin Finck _In_ HANDLE EventHandle, 635*c2c66affSColin Finck _Out_opt_ PLONG PreviousState); 636*c2c66affSColin Finck 637*c2c66affSColin Finck _IRQL_requires_max_(APC_LEVEL) 638*c2c66affSColin Finck NTSYSAPI 639*c2c66affSColin Finck NTSTATUS 640*c2c66affSColin Finck NTAPI 641*c2c66affSColin Finck ZwFlushVirtualMemory( 642*c2c66affSColin Finck _In_ HANDLE ProcessHandle, 643*c2c66affSColin Finck _Inout_ PVOID *BaseAddress, 644*c2c66affSColin Finck _Inout_ PSIZE_T RegionSize, 645*c2c66affSColin Finck _Out_ PIO_STATUS_BLOCK IoStatusBlock); 646*c2c66affSColin Finck 647*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 648*c2c66affSColin Finck NTSYSAPI 649*c2c66affSColin Finck NTSTATUS 650*c2c66affSColin Finck NTAPI 651*c2c66affSColin Finck ZwQueryInformationToken( 652*c2c66affSColin Finck _In_ HANDLE TokenHandle, 653*c2c66affSColin Finck _In_ TOKEN_INFORMATION_CLASS TokenInformationClass, 654*c2c66affSColin Finck _Out_writes_bytes_to_opt_(Length,*ResultLength) PVOID TokenInformation, 655*c2c66affSColin Finck _In_ ULONG Length, 656*c2c66affSColin Finck _Out_ PULONG ResultLength); 657*c2c66affSColin Finck 658*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 659*c2c66affSColin Finck NTSYSAPI 660*c2c66affSColin Finck NTSTATUS 661*c2c66affSColin Finck NTAPI 662*c2c66affSColin Finck ZwSetSecurityObject( 663*c2c66affSColin Finck _In_ HANDLE Handle, 664*c2c66affSColin Finck _In_ SECURITY_INFORMATION SecurityInformation, 665*c2c66affSColin Finck _In_ PSECURITY_DESCRIPTOR SecurityDescriptor); 666*c2c66affSColin Finck 667*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 668*c2c66affSColin Finck NTSYSAPI 669*c2c66affSColin Finck NTSTATUS 670*c2c66affSColin Finck NTAPI 671*c2c66affSColin Finck ZwQuerySecurityObject( 672*c2c66affSColin Finck _In_ HANDLE FileHandle, 673*c2c66affSColin Finck _In_ SECURITY_INFORMATION SecurityInformation, 674*c2c66affSColin Finck _Out_writes_bytes_to_(Length,*ResultLength) PSECURITY_DESCRIPTOR SecurityDescriptor, 675*c2c66affSColin Finck _In_ ULONG Length, 676*c2c66affSColin Finck _Out_ PULONG ResultLength); 677*c2c66affSColin Finck $endif (_NTIFS_) 678*c2c66affSColin Finck #endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */ 679*c2c66affSColin Finck 680*c2c66affSColin Finck $if (_NTIFS_) 681*c2c66affSColin Finck #if (NTDDI_VERSION >= NTDDI_WINXP) 682*c2c66affSColin Finck 683*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 684*c2c66affSColin Finck NTSYSAPI 685*c2c66affSColin Finck NTSTATUS 686*c2c66affSColin Finck NTAPI 687*c2c66affSColin Finck ZwOpenProcessTokenEx( 688*c2c66affSColin Finck _In_ HANDLE ProcessHandle, 689*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 690*c2c66affSColin Finck _In_ ULONG HandleAttributes, 691*c2c66affSColin Finck _Out_ PHANDLE TokenHandle); 692*c2c66affSColin Finck 693*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 694*c2c66affSColin Finck NTSYSAPI 695*c2c66affSColin Finck NTSTATUS 696*c2c66affSColin Finck NTAPI 697*c2c66affSColin Finck ZwOpenThreadTokenEx( 698*c2c66affSColin Finck _In_ HANDLE ThreadHandle, 699*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 700*c2c66affSColin Finck _In_ BOOLEAN OpenAsSelf, 701*c2c66affSColin Finck _In_ ULONG HandleAttributes, 702*c2c66affSColin Finck _Out_ PHANDLE TokenHandle); 703*c2c66affSColin Finck 704*c2c66affSColin Finck #endif /* (NTDDI_VERSION >= NTDDI_WINXP) */ 705*c2c66affSColin Finck $endif (_NTIFS_) 706*c2c66affSColin Finck $if (_WDMDDK_) 707*c2c66affSColin Finck 708*c2c66affSColin Finck #if (NTDDI_VERSION >= NTDDI_WS03) 709*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 710*c2c66affSColin Finck NTSYSCALLAPI 711*c2c66affSColin Finck NTSTATUS 712*c2c66affSColin Finck NTAPI 713*c2c66affSColin Finck ZwOpenEvent( 714*c2c66affSColin Finck _Out_ PHANDLE EventHandle, 715*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 716*c2c66affSColin Finck _In_ POBJECT_ATTRIBUTES ObjectAttributes); 717*c2c66affSColin Finck #endif 718*c2c66affSColin Finck $endif (_WDMDDK_) 719*c2c66affSColin Finck 720*c2c66affSColin Finck $if (_WDMDDK_ || _NTIFS_) 721*c2c66affSColin Finck #if (NTDDI_VERSION >= NTDDI_VISTA) 722*c2c66affSColin Finck $endif (_WDMDDK_ || _NTIFS_) 723*c2c66affSColin Finck $if (_WDMDDK_) 724*c2c66affSColin Finck 725*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 726*c2c66affSColin Finck NTSYSAPI 727*c2c66affSColin Finck NTSTATUS 728*c2c66affSColin Finck ZwCreateKeyTransacted( 729*c2c66affSColin Finck _Out_ PHANDLE KeyHandle, 730*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 731*c2c66affSColin Finck _In_ POBJECT_ATTRIBUTES ObjectAttributes, 732*c2c66affSColin Finck _Reserved_ ULONG TitleIndex, 733*c2c66affSColin Finck _In_opt_ PUNICODE_STRING Class, 734*c2c66affSColin Finck _In_ ULONG CreateOptions, 735*c2c66affSColin Finck _In_ HANDLE TransactionHandle, 736*c2c66affSColin Finck _Out_opt_ PULONG Disposition); 737*c2c66affSColin Finck 738*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 739*c2c66affSColin Finck NTSYSAPI 740*c2c66affSColin Finck NTSTATUS 741*c2c66affSColin Finck NTAPI 742*c2c66affSColin Finck ZwOpenKeyTransacted( 743*c2c66affSColin Finck _Out_ PHANDLE KeyHandle, 744*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 745*c2c66affSColin Finck _In_ POBJECT_ATTRIBUTES ObjectAttributes, 746*c2c66affSColin Finck _In_ HANDLE TransactionHandle); 747*c2c66affSColin Finck 748*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 749*c2c66affSColin Finck NTSYSCALLAPI 750*c2c66affSColin Finck NTSTATUS 751*c2c66affSColin Finck NTAPI 752*c2c66affSColin Finck ZwCreateTransactionManager( 753*c2c66affSColin Finck _Out_ PHANDLE TmHandle, 754*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 755*c2c66affSColin Finck _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 756*c2c66affSColin Finck _In_opt_ PUNICODE_STRING LogFileName, 757*c2c66affSColin Finck _In_opt_ ULONG CreateOptions, 758*c2c66affSColin Finck _In_opt_ ULONG CommitStrength); 759*c2c66affSColin Finck 760*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 761*c2c66affSColin Finck NTSYSCALLAPI 762*c2c66affSColin Finck NTSTATUS 763*c2c66affSColin Finck NTAPI 764*c2c66affSColin Finck ZwOpenTransactionManager( 765*c2c66affSColin Finck _Out_ PHANDLE TmHandle, 766*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 767*c2c66affSColin Finck _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 768*c2c66affSColin Finck _In_opt_ PUNICODE_STRING LogFileName, 769*c2c66affSColin Finck _In_opt_ LPGUID TmIdentity, 770*c2c66affSColin Finck _In_opt_ ULONG OpenOptions); 771*c2c66affSColin Finck 772*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 773*c2c66affSColin Finck NTSYSCALLAPI 774*c2c66affSColin Finck NTSTATUS 775*c2c66affSColin Finck NTAPI 776*c2c66affSColin Finck ZwRollforwardTransactionManager( 777*c2c66affSColin Finck _In_ HANDLE TransactionManagerHandle, 778*c2c66affSColin Finck _In_opt_ PLARGE_INTEGER TmVirtualClock); 779*c2c66affSColin Finck 780*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 781*c2c66affSColin Finck NTSYSCALLAPI 782*c2c66affSColin Finck NTSTATUS 783*c2c66affSColin Finck NTAPI 784*c2c66affSColin Finck ZwRecoverTransactionManager( 785*c2c66affSColin Finck _In_ HANDLE TransactionManagerHandle); 786*c2c66affSColin Finck 787*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 788*c2c66affSColin Finck NTSYSCALLAPI 789*c2c66affSColin Finck NTSTATUS 790*c2c66affSColin Finck NTAPI 791*c2c66affSColin Finck ZwQueryInformationTransactionManager( 792*c2c66affSColin Finck _In_ HANDLE TransactionManagerHandle, 793*c2c66affSColin Finck _In_ TRANSACTIONMANAGER_INFORMATION_CLASS TransactionManagerInformationClass, 794*c2c66affSColin Finck _Out_writes_bytes_(TransactionManagerInformationLength) PVOID TransactionManagerInformation, 795*c2c66affSColin Finck _In_ ULONG TransactionManagerInformationLength, 796*c2c66affSColin Finck _Out_opt_ PULONG ReturnLength); 797*c2c66affSColin Finck 798*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 799*c2c66affSColin Finck NTSYSCALLAPI 800*c2c66affSColin Finck NTSTATUS 801*c2c66affSColin Finck NTAPI 802*c2c66affSColin Finck ZwSetInformationTransactionManager( 803*c2c66affSColin Finck _In_ HANDLE TmHandle, 804*c2c66affSColin Finck _In_ TRANSACTIONMANAGER_INFORMATION_CLASS TransactionManagerInformationClass, 805*c2c66affSColin Finck _In_ PVOID TransactionManagerInformation, 806*c2c66affSColin Finck _In_ ULONG TransactionManagerInformationLength); 807*c2c66affSColin Finck 808*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 809*c2c66affSColin Finck NTSYSCALLAPI 810*c2c66affSColin Finck NTSTATUS 811*c2c66affSColin Finck NTAPI 812*c2c66affSColin Finck ZwEnumerateTransactionObject( 813*c2c66affSColin Finck _In_opt_ HANDLE RootObjectHandle, 814*c2c66affSColin Finck _In_ KTMOBJECT_TYPE QueryType, 815*c2c66affSColin Finck _Inout_updates_bytes_(ObjectCursorLength) PKTMOBJECT_CURSOR ObjectCursor, 816*c2c66affSColin Finck _In_ ULONG ObjectCursorLength, 817*c2c66affSColin Finck _Out_ PULONG ReturnLength); 818*c2c66affSColin Finck 819*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 820*c2c66affSColin Finck NTSYSCALLAPI 821*c2c66affSColin Finck NTSTATUS 822*c2c66affSColin Finck NTAPI 823*c2c66affSColin Finck ZwCreateTransaction( 824*c2c66affSColin Finck _Out_ PHANDLE TransactionHandle, 825*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 826*c2c66affSColin Finck _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 827*c2c66affSColin Finck _In_opt_ LPGUID Uow, 828*c2c66affSColin Finck _In_opt_ HANDLE TmHandle, 829*c2c66affSColin Finck _In_opt_ ULONG CreateOptions, 830*c2c66affSColin Finck _In_opt_ ULONG IsolationLevel, 831*c2c66affSColin Finck _In_opt_ ULONG IsolationFlags, 832*c2c66affSColin Finck _In_opt_ PLARGE_INTEGER Timeout, 833*c2c66affSColin Finck _In_opt_ PUNICODE_STRING Description); 834*c2c66affSColin Finck 835*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 836*c2c66affSColin Finck NTSYSCALLAPI 837*c2c66affSColin Finck NTSTATUS 838*c2c66affSColin Finck NTAPI 839*c2c66affSColin Finck ZwOpenTransaction( 840*c2c66affSColin Finck _Out_ PHANDLE TransactionHandle, 841*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 842*c2c66affSColin Finck _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 843*c2c66affSColin Finck _In_ LPGUID Uow, 844*c2c66affSColin Finck _In_opt_ HANDLE TmHandle); 845*c2c66affSColin Finck 846*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 847*c2c66affSColin Finck NTSYSCALLAPI 848*c2c66affSColin Finck NTSTATUS 849*c2c66affSColin Finck NTAPI 850*c2c66affSColin Finck ZwQueryInformationTransaction( 851*c2c66affSColin Finck _In_ HANDLE TransactionHandle, 852*c2c66affSColin Finck _In_ TRANSACTION_INFORMATION_CLASS TransactionInformationClass, 853*c2c66affSColin Finck _Out_writes_bytes_(TransactionInformationLength) PVOID TransactionInformation, 854*c2c66affSColin Finck _In_ ULONG TransactionInformationLength, 855*c2c66affSColin Finck _Out_opt_ PULONG ReturnLength); 856*c2c66affSColin Finck 857*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 858*c2c66affSColin Finck NTSYSCALLAPI 859*c2c66affSColin Finck NTSTATUS 860*c2c66affSColin Finck NTAPI 861*c2c66affSColin Finck ZwSetInformationTransaction( 862*c2c66affSColin Finck _In_ HANDLE TransactionHandle, 863*c2c66affSColin Finck _In_ TRANSACTION_INFORMATION_CLASS TransactionInformationClass, 864*c2c66affSColin Finck _In_ PVOID TransactionInformation, 865*c2c66affSColin Finck _In_ ULONG TransactionInformationLength); 866*c2c66affSColin Finck 867*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 868*c2c66affSColin Finck NTSYSCALLAPI 869*c2c66affSColin Finck NTSTATUS 870*c2c66affSColin Finck NTAPI 871*c2c66affSColin Finck ZwCommitTransaction( 872*c2c66affSColin Finck _In_ HANDLE TransactionHandle, 873*c2c66affSColin Finck _In_ BOOLEAN Wait); 874*c2c66affSColin Finck 875*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 876*c2c66affSColin Finck NTSYSCALLAPI 877*c2c66affSColin Finck NTSTATUS 878*c2c66affSColin Finck NTAPI 879*c2c66affSColin Finck ZwRollbackTransaction( 880*c2c66affSColin Finck _In_ HANDLE TransactionHandle, 881*c2c66affSColin Finck _In_ BOOLEAN Wait); 882*c2c66affSColin Finck 883*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 884*c2c66affSColin Finck NTSYSCALLAPI 885*c2c66affSColin Finck NTSTATUS 886*c2c66affSColin Finck NTAPI 887*c2c66affSColin Finck ZwCreateResourceManager( 888*c2c66affSColin Finck _Out_ PHANDLE ResourceManagerHandle, 889*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 890*c2c66affSColin Finck _In_ HANDLE TmHandle, 891*c2c66affSColin Finck _In_opt_ LPGUID ResourceManagerGuid, 892*c2c66affSColin Finck _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 893*c2c66affSColin Finck _In_opt_ ULONG CreateOptions, 894*c2c66affSColin Finck _In_opt_ PUNICODE_STRING Description); 895*c2c66affSColin Finck 896*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 897*c2c66affSColin Finck NTSYSCALLAPI 898*c2c66affSColin Finck NTSTATUS 899*c2c66affSColin Finck NTAPI 900*c2c66affSColin Finck ZwOpenResourceManager( 901*c2c66affSColin Finck _Out_ PHANDLE ResourceManagerHandle, 902*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 903*c2c66affSColin Finck _In_ HANDLE TmHandle, 904*c2c66affSColin Finck _In_ LPGUID ResourceManagerGuid, 905*c2c66affSColin Finck _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes); 906*c2c66affSColin Finck 907*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 908*c2c66affSColin Finck NTSYSCALLAPI 909*c2c66affSColin Finck NTSTATUS 910*c2c66affSColin Finck NTAPI 911*c2c66affSColin Finck ZwRecoverResourceManager( 912*c2c66affSColin Finck _In_ HANDLE ResourceManagerHandle); 913*c2c66affSColin Finck 914*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 915*c2c66affSColin Finck NTSYSCALLAPI 916*c2c66affSColin Finck NTSTATUS 917*c2c66affSColin Finck NTAPI 918*c2c66affSColin Finck ZwGetNotificationResourceManager( 919*c2c66affSColin Finck _In_ HANDLE ResourceManagerHandle, 920*c2c66affSColin Finck _Out_ PTRANSACTION_NOTIFICATION TransactionNotification, 921*c2c66affSColin Finck _In_ ULONG NotificationLength, 922*c2c66affSColin Finck _In_ PLARGE_INTEGER Timeout, 923*c2c66affSColin Finck _Out_opt_ PULONG ReturnLength, 924*c2c66affSColin Finck _In_ ULONG Asynchronous, 925*c2c66affSColin Finck _In_opt_ ULONG_PTR AsynchronousContext); 926*c2c66affSColin Finck 927*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 928*c2c66affSColin Finck NTSYSCALLAPI 929*c2c66affSColin Finck NTSTATUS 930*c2c66affSColin Finck NTAPI 931*c2c66affSColin Finck ZwQueryInformationResourceManager( 932*c2c66affSColin Finck _In_ HANDLE ResourceManagerHandle, 933*c2c66affSColin Finck _In_ RESOURCEMANAGER_INFORMATION_CLASS ResourceManagerInformationClass, 934*c2c66affSColin Finck _Out_writes_bytes_(ResourceManagerInformationLength) PVOID ResourceManagerInformation, 935*c2c66affSColin Finck _In_ ULONG ResourceManagerInformationLength, 936*c2c66affSColin Finck _Out_opt_ PULONG ReturnLength); 937*c2c66affSColin Finck 938*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 939*c2c66affSColin Finck NTSYSCALLAPI 940*c2c66affSColin Finck NTSTATUS 941*c2c66affSColin Finck NTAPI 942*c2c66affSColin Finck ZwSetInformationResourceManager( 943*c2c66affSColin Finck _In_ HANDLE ResourceManagerHandle, 944*c2c66affSColin Finck _In_ RESOURCEMANAGER_INFORMATION_CLASS ResourceManagerInformationClass, 945*c2c66affSColin Finck _In_reads_bytes_(ResourceManagerInformationLength) PVOID ResourceManagerInformation, 946*c2c66affSColin Finck _In_ ULONG ResourceManagerInformationLength); 947*c2c66affSColin Finck 948*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 949*c2c66affSColin Finck NTSYSCALLAPI 950*c2c66affSColin Finck NTSTATUS 951*c2c66affSColin Finck NTAPI 952*c2c66affSColin Finck ZwCreateEnlistment( 953*c2c66affSColin Finck _Out_ PHANDLE EnlistmentHandle, 954*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 955*c2c66affSColin Finck _In_ HANDLE ResourceManagerHandle, 956*c2c66affSColin Finck _In_ HANDLE TransactionHandle, 957*c2c66affSColin Finck _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 958*c2c66affSColin Finck _In_opt_ ULONG CreateOptions, 959*c2c66affSColin Finck _In_ NOTIFICATION_MASK NotificationMask, 960*c2c66affSColin Finck _In_opt_ PVOID EnlistmentKey); 961*c2c66affSColin Finck 962*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 963*c2c66affSColin Finck NTSYSCALLAPI 964*c2c66affSColin Finck NTSTATUS 965*c2c66affSColin Finck NTAPI 966*c2c66affSColin Finck ZwOpenEnlistment( 967*c2c66affSColin Finck _Out_ PHANDLE EnlistmentHandle, 968*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 969*c2c66affSColin Finck _In_ HANDLE RmHandle, 970*c2c66affSColin Finck _In_ LPGUID EnlistmentGuid, 971*c2c66affSColin Finck _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes); 972*c2c66affSColin Finck 973*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 974*c2c66affSColin Finck NTSYSCALLAPI 975*c2c66affSColin Finck NTSTATUS 976*c2c66affSColin Finck NTAPI 977*c2c66affSColin Finck ZwQueryInformationEnlistment( 978*c2c66affSColin Finck _In_ HANDLE EnlistmentHandle, 979*c2c66affSColin Finck _In_ ENLISTMENT_INFORMATION_CLASS EnlistmentInformationClass, 980*c2c66affSColin Finck _Out_writes_bytes_(EnlistmentInformationLength) PVOID EnlistmentInformation, 981*c2c66affSColin Finck _In_ ULONG EnlistmentInformationLength, 982*c2c66affSColin Finck _Out_opt_ PULONG ReturnLength); 983*c2c66affSColin Finck 984*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 985*c2c66affSColin Finck NTSYSCALLAPI 986*c2c66affSColin Finck NTSTATUS 987*c2c66affSColin Finck NTAPI 988*c2c66affSColin Finck ZwSetInformationEnlistment( 989*c2c66affSColin Finck _In_ HANDLE EnlistmentHandle, 990*c2c66affSColin Finck _In_ ENLISTMENT_INFORMATION_CLASS EnlistmentInformationClass, 991*c2c66affSColin Finck _In_reads_bytes_(EnlistmentInformationLength) PVOID EnlistmentInformation, 992*c2c66affSColin Finck _In_ ULONG EnlistmentInformationLength); 993*c2c66affSColin Finck 994*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 995*c2c66affSColin Finck NTSYSCALLAPI 996*c2c66affSColin Finck NTSTATUS 997*c2c66affSColin Finck NTAPI 998*c2c66affSColin Finck ZwRecoverEnlistment( 999*c2c66affSColin Finck _In_ HANDLE EnlistmentHandle, 1000*c2c66affSColin Finck _In_opt_ PVOID EnlistmentKey); 1001*c2c66affSColin Finck 1002*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 1003*c2c66affSColin Finck NTSYSCALLAPI 1004*c2c66affSColin Finck NTSTATUS 1005*c2c66affSColin Finck NTAPI 1006*c2c66affSColin Finck ZwPrePrepareEnlistment( 1007*c2c66affSColin Finck _In_ HANDLE EnlistmentHandle, 1008*c2c66affSColin Finck _In_opt_ PLARGE_INTEGER TmVirtualClock); 1009*c2c66affSColin Finck 1010*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 1011*c2c66affSColin Finck NTSYSCALLAPI 1012*c2c66affSColin Finck NTSTATUS 1013*c2c66affSColin Finck NTAPI 1014*c2c66affSColin Finck ZwPrepareEnlistment( 1015*c2c66affSColin Finck _In_ HANDLE EnlistmentHandle, 1016*c2c66affSColin Finck _In_opt_ PLARGE_INTEGER TmVirtualClock); 1017*c2c66affSColin Finck 1018*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 1019*c2c66affSColin Finck NTSYSCALLAPI 1020*c2c66affSColin Finck NTSTATUS 1021*c2c66affSColin Finck NTAPI 1022*c2c66affSColin Finck ZwCommitEnlistment( 1023*c2c66affSColin Finck _In_ HANDLE EnlistmentHandle, 1024*c2c66affSColin Finck _In_opt_ PLARGE_INTEGER TmVirtualClock); 1025*c2c66affSColin Finck 1026*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 1027*c2c66affSColin Finck NTSYSCALLAPI 1028*c2c66affSColin Finck NTSTATUS 1029*c2c66affSColin Finck NTAPI 1030*c2c66affSColin Finck ZwRollbackEnlistment( 1031*c2c66affSColin Finck _In_ HANDLE EnlistmentHandle, 1032*c2c66affSColin Finck _In_opt_ PLARGE_INTEGER TmVirtualClock); 1033*c2c66affSColin Finck 1034*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 1035*c2c66affSColin Finck NTSYSCALLAPI 1036*c2c66affSColin Finck NTSTATUS 1037*c2c66affSColin Finck NTAPI 1038*c2c66affSColin Finck ZwPrePrepareComplete( 1039*c2c66affSColin Finck _In_ HANDLE EnlistmentHandle, 1040*c2c66affSColin Finck _In_opt_ PLARGE_INTEGER TmVirtualClock); 1041*c2c66affSColin Finck 1042*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 1043*c2c66affSColin Finck NTSYSCALLAPI 1044*c2c66affSColin Finck NTSTATUS 1045*c2c66affSColin Finck NTAPI 1046*c2c66affSColin Finck ZwPrepareComplete( 1047*c2c66affSColin Finck _In_ HANDLE EnlistmentHandle, 1048*c2c66affSColin Finck _In_opt_ PLARGE_INTEGER TmVirtualClock); 1049*c2c66affSColin Finck 1050*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 1051*c2c66affSColin Finck NTSYSCALLAPI 1052*c2c66affSColin Finck NTSTATUS 1053*c2c66affSColin Finck NTAPI 1054*c2c66affSColin Finck ZwCommitComplete( 1055*c2c66affSColin Finck _In_ HANDLE EnlistmentHandle, 1056*c2c66affSColin Finck _In_opt_ PLARGE_INTEGER TmVirtualClock); 1057*c2c66affSColin Finck 1058*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 1059*c2c66affSColin Finck NTSYSCALLAPI 1060*c2c66affSColin Finck NTSTATUS 1061*c2c66affSColin Finck NTAPI 1062*c2c66affSColin Finck ZwReadOnlyEnlistment( 1063*c2c66affSColin Finck _In_ HANDLE EnlistmentHandle, 1064*c2c66affSColin Finck _In_opt_ PLARGE_INTEGER TmVirtualClock); 1065*c2c66affSColin Finck 1066*c2c66affSColin Finck NTSYSCALLAPI 1067*c2c66affSColin Finck NTSTATUS 1068*c2c66affSColin Finck NTAPI 1069*c2c66affSColin Finck ZwRollbackComplete( 1070*c2c66affSColin Finck _In_ HANDLE EnlistmentHandle, 1071*c2c66affSColin Finck _In_opt_ PLARGE_INTEGER TmVirtualClock); 1072*c2c66affSColin Finck 1073*c2c66affSColin Finck NTSYSCALLAPI 1074*c2c66affSColin Finck NTSTATUS 1075*c2c66affSColin Finck NTAPI 1076*c2c66affSColin Finck ZwSinglePhaseReject( 1077*c2c66affSColin Finck _In_ HANDLE EnlistmentHandle, 1078*c2c66affSColin Finck _In_opt_ PLARGE_INTEGER TmVirtualClock); 1079*c2c66affSColin Finck $endif (_WDMDDK_) 1080*c2c66affSColin Finck $if (_NTIFS_) 1081*c2c66affSColin Finck 1082*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 1083*c2c66affSColin Finck NTSYSAPI 1084*c2c66affSColin Finck NTSTATUS 1085*c2c66affSColin Finck NTAPI 1086*c2c66affSColin Finck ZwLockFile( 1087*c2c66affSColin Finck _In_ HANDLE FileHandle, 1088*c2c66affSColin Finck _In_opt_ HANDLE Event, 1089*c2c66affSColin Finck _In_opt_ PIO_APC_ROUTINE ApcRoutine, 1090*c2c66affSColin Finck _In_opt_ PVOID ApcContext, 1091*c2c66affSColin Finck _Out_ PIO_STATUS_BLOCK IoStatusBlock, 1092*c2c66affSColin Finck _In_ PLARGE_INTEGER ByteOffset, 1093*c2c66affSColin Finck _In_ PLARGE_INTEGER Length, 1094*c2c66affSColin Finck _In_ ULONG Key, 1095*c2c66affSColin Finck _In_ BOOLEAN FailImmediately, 1096*c2c66affSColin Finck _In_ BOOLEAN ExclusiveLock); 1097*c2c66affSColin Finck 1098*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 1099*c2c66affSColin Finck NTSYSAPI 1100*c2c66affSColin Finck NTSTATUS 1101*c2c66affSColin Finck NTAPI 1102*c2c66affSColin Finck ZwUnlockFile( 1103*c2c66affSColin Finck _In_ HANDLE FileHandle, 1104*c2c66affSColin Finck _Out_ PIO_STATUS_BLOCK IoStatusBlock, 1105*c2c66affSColin Finck _In_ PLARGE_INTEGER ByteOffset, 1106*c2c66affSColin Finck _In_ PLARGE_INTEGER Length, 1107*c2c66affSColin Finck _In_ ULONG Key); 1108*c2c66affSColin Finck 1109*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 1110*c2c66affSColin Finck NTSYSAPI 1111*c2c66affSColin Finck NTSTATUS 1112*c2c66affSColin Finck NTAPI 1113*c2c66affSColin Finck ZwQueryQuotaInformationFile( 1114*c2c66affSColin Finck _In_ HANDLE FileHandle, 1115*c2c66affSColin Finck _Out_ PIO_STATUS_BLOCK IoStatusBlock, 1116*c2c66affSColin Finck _Out_writes_bytes_(Length) PVOID Buffer, 1117*c2c66affSColin Finck _In_ ULONG Length, 1118*c2c66affSColin Finck _In_ BOOLEAN ReturnSingleEntry, 1119*c2c66affSColin Finck _In_reads_bytes_opt_(SidListLength) PVOID SidList, 1120*c2c66affSColin Finck _In_ ULONG SidListLength, 1121*c2c66affSColin Finck _In_opt_ PSID StartSid, 1122*c2c66affSColin Finck _In_ BOOLEAN RestartScan); 1123*c2c66affSColin Finck 1124*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 1125*c2c66affSColin Finck NTSYSAPI 1126*c2c66affSColin Finck NTSTATUS 1127*c2c66affSColin Finck NTAPI 1128*c2c66affSColin Finck ZwSetQuotaInformationFile( 1129*c2c66affSColin Finck _In_ HANDLE FileHandle, 1130*c2c66affSColin Finck _Out_ PIO_STATUS_BLOCK IoStatusBlock, 1131*c2c66affSColin Finck _In_reads_bytes_(Length) PVOID Buffer, 1132*c2c66affSColin Finck _In_ ULONG Length); 1133*c2c66affSColin Finck 1134*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 1135*c2c66affSColin Finck NTSYSAPI 1136*c2c66affSColin Finck NTSTATUS 1137*c2c66affSColin Finck NTAPI 1138*c2c66affSColin Finck ZwFlushBuffersFile( 1139*c2c66affSColin Finck _In_ HANDLE FileHandle, 1140*c2c66affSColin Finck _Out_ PIO_STATUS_BLOCK IoStatusBlock); 1141*c2c66affSColin Finck $endif (_NTIFS_) 1142*c2c66affSColin Finck $if (_WDMDDK_ || _NTIFS_) 1143*c2c66affSColin Finck #endif /* (NTDDI_VERSION >= NTDDI_VISTA) */ 1144*c2c66affSColin Finck $endif (_WDMDDK_ || _NTIFS_) 1145*c2c66affSColin Finck #if (NTDDI_VERSION >= NTDDI_WIN7) 1146*c2c66affSColin Finck $if (_WDMDDK_) 1147*c2c66affSColin Finck 1148*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 1149*c2c66affSColin Finck NTSYSAPI 1150*c2c66affSColin Finck NTSTATUS 1151*c2c66affSColin Finck NTAPI 1152*c2c66affSColin Finck ZwOpenKeyEx( 1153*c2c66affSColin Finck _Out_ PHANDLE KeyHandle, 1154*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 1155*c2c66affSColin Finck _In_ POBJECT_ATTRIBUTES ObjectAttributes, 1156*c2c66affSColin Finck _In_ ULONG OpenOptions); 1157*c2c66affSColin Finck 1158*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 1159*c2c66affSColin Finck NTSYSAPI 1160*c2c66affSColin Finck NTSTATUS 1161*c2c66affSColin Finck NTAPI 1162*c2c66affSColin Finck ZwOpenKeyTransactedEx( 1163*c2c66affSColin Finck _Out_ PHANDLE KeyHandle, 1164*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 1165*c2c66affSColin Finck _In_ POBJECT_ATTRIBUTES ObjectAttributes, 1166*c2c66affSColin Finck _In_ ULONG OpenOptions, 1167*c2c66affSColin Finck _In_ HANDLE TransactionHandle); 1168*c2c66affSColin Finck 1169*c2c66affSColin Finck NTSYSAPI 1170*c2c66affSColin Finck NTSTATUS 1171*c2c66affSColin Finck NTAPI 1172*c2c66affSColin Finck ZwNotifyChangeMultipleKeys( 1173*c2c66affSColin Finck _In_ HANDLE MasterKeyHandle, 1174*c2c66affSColin Finck _In_opt_ ULONG Count, 1175*c2c66affSColin Finck _In_opt_ OBJECT_ATTRIBUTES SubordinateObjects[], 1176*c2c66affSColin Finck _In_opt_ HANDLE Event, 1177*c2c66affSColin Finck _In_opt_ PIO_APC_ROUTINE ApcRoutine, 1178*c2c66affSColin Finck _In_opt_ PVOID ApcContext, 1179*c2c66affSColin Finck _Out_ PIO_STATUS_BLOCK IoStatusBlock, 1180*c2c66affSColin Finck _In_ ULONG CompletionFilter, 1181*c2c66affSColin Finck _In_ BOOLEAN WatchTree, 1182*c2c66affSColin Finck _Out_opt_ PVOID Buffer, 1183*c2c66affSColin Finck _In_ ULONG BufferSize, 1184*c2c66affSColin Finck _In_ BOOLEAN Asynchronous); 1185*c2c66affSColin Finck 1186*c2c66affSColin Finck NTSYSAPI 1187*c2c66affSColin Finck NTSTATUS 1188*c2c66affSColin Finck NTAPI 1189*c2c66affSColin Finck ZwQueryMultipleValueKey( 1190*c2c66affSColin Finck _In_ HANDLE KeyHandle, 1191*c2c66affSColin Finck _Inout_ PKEY_VALUE_ENTRY ValueEntries, 1192*c2c66affSColin Finck _In_ ULONG EntryCount, 1193*c2c66affSColin Finck _Out_ PVOID ValueBuffer, 1194*c2c66affSColin Finck _Inout_ PULONG BufferLength, 1195*c2c66affSColin Finck _Out_opt_ PULONG RequiredBufferLength); 1196*c2c66affSColin Finck 1197*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 1198*c2c66affSColin Finck NTSYSAPI 1199*c2c66affSColin Finck NTSTATUS 1200*c2c66affSColin Finck NTAPI 1201*c2c66affSColin Finck ZwRenameKey( 1202*c2c66affSColin Finck _In_ HANDLE KeyHandle, 1203*c2c66affSColin Finck _In_ PUNICODE_STRING NewName); 1204*c2c66affSColin Finck 1205*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 1206*c2c66affSColin Finck NTSYSAPI 1207*c2c66affSColin Finck NTSTATUS 1208*c2c66affSColin Finck NTAPI 1209*c2c66affSColin Finck ZwSetInformationKey( 1210*c2c66affSColin Finck _In_ HANDLE KeyHandle, 1211*c2c66affSColin Finck _In_ __drv_strictTypeMatch(__drv_typeConst) KEY_SET_INFORMATION_CLASS KeySetInformationClass, 1212*c2c66affSColin Finck _In_reads_bytes_(KeySetInformationLength) PVOID KeySetInformation, 1213*c2c66affSColin Finck _In_ ULONG KeySetInformationLength); 1214*c2c66affSColin Finck 1215*c2c66affSColin Finck $endif (_WDMDDK_) 1216*c2c66affSColin Finck $if (_NTDDK_) 1217*c2c66affSColin Finck 1218*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 1219*c2c66affSColin Finck NTSTATUS 1220*c2c66affSColin Finck NTAPI 1221*c2c66affSColin Finck ZwSetTimerEx( 1222*c2c66affSColin Finck _In_ HANDLE TimerHandle, 1223*c2c66affSColin Finck _In_ TIMER_SET_INFORMATION_CLASS TimerSetInformationClass, 1224*c2c66affSColin Finck _Inout_updates_bytes_opt_(TimerSetInformationLength) PVOID TimerSetInformation, 1225*c2c66affSColin Finck _In_ ULONG TimerSetInformationLength); 1226*c2c66affSColin Finck $endif (_NTDDK_) 1227*c2c66affSColin Finck $if (_NTIFS_) 1228*c2c66affSColin Finck 1229*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 1230*c2c66affSColin Finck NTSYSAPI 1231*c2c66affSColin Finck NTSTATUS 1232*c2c66affSColin Finck NTAPI 1233*c2c66affSColin Finck ZwSetInformationToken( 1234*c2c66affSColin Finck _In_ HANDLE TokenHandle, 1235*c2c66affSColin Finck _In_ TOKEN_INFORMATION_CLASS TokenInformationClass, 1236*c2c66affSColin Finck _In_reads_bytes_(TokenInformationLength) PVOID TokenInformation, 1237*c2c66affSColin Finck _In_ ULONG TokenInformationLength); 1238*c2c66affSColin Finck 1239*c2c66affSColin Finck #if (VER_PRODUCTBUILD >= 2195) 1240*c2c66affSColin Finck NTSYSAPI 1241*c2c66affSColin Finck NTSTATUS 1242*c2c66affSColin Finck NTAPI 1243*c2c66affSColin Finck ZwAdjustPrivilegesToken ( 1244*c2c66affSColin Finck _In_ HANDLE TokenHandle, 1245*c2c66affSColin Finck _In_ BOOLEAN DisableAllPrivileges, 1246*c2c66affSColin Finck _In_ PTOKEN_PRIVILEGES NewState, 1247*c2c66affSColin Finck _In_ ULONG BufferLength, 1248*c2c66affSColin Finck _Out_opt_ PTOKEN_PRIVILEGES PreviousState, 1249*c2c66affSColin Finck _Out_ PULONG ReturnLength 1250*c2c66affSColin Finck ); 1251*c2c66affSColin Finck #endif /* (VER_PRODUCTBUILD >= 2195) */ 1252*c2c66affSColin Finck 1253*c2c66affSColin Finck NTSYSAPI 1254*c2c66affSColin Finck NTSTATUS 1255*c2c66affSColin Finck NTAPI 1256*c2c66affSColin Finck ZwAlertThread ( 1257*c2c66affSColin Finck _In_ HANDLE ThreadHandle 1258*c2c66affSColin Finck ); 1259*c2c66affSColin Finck 1260*c2c66affSColin Finck NTSYSAPI 1261*c2c66affSColin Finck NTSTATUS 1262*c2c66affSColin Finck NTAPI 1263*c2c66affSColin Finck ZwAccessCheckAndAuditAlarm ( 1264*c2c66affSColin Finck _In_ PUNICODE_STRING SubsystemName, 1265*c2c66affSColin Finck _In_ PVOID HandleId, 1266*c2c66affSColin Finck _In_ PUNICODE_STRING ObjectTypeName, 1267*c2c66affSColin Finck _In_ PUNICODE_STRING ObjectName, 1268*c2c66affSColin Finck _In_ PSECURITY_DESCRIPTOR SecurityDescriptor, 1269*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 1270*c2c66affSColin Finck _In_ PGENERIC_MAPPING GenericMapping, 1271*c2c66affSColin Finck _In_ BOOLEAN ObjectCreation, 1272*c2c66affSColin Finck _Out_ PACCESS_MASK GrantedAccess, 1273*c2c66affSColin Finck _Out_ PBOOLEAN AccessStatus, 1274*c2c66affSColin Finck _Out_ PBOOLEAN GenerateOnClose 1275*c2c66affSColin Finck ); 1276*c2c66affSColin Finck 1277*c2c66affSColin Finck #if (VER_PRODUCTBUILD >= 2195) 1278*c2c66affSColin Finck NTSYSAPI 1279*c2c66affSColin Finck NTSTATUS 1280*c2c66affSColin Finck NTAPI 1281*c2c66affSColin Finck ZwCancelIoFile ( 1282*c2c66affSColin Finck _In_ HANDLE FileHandle, 1283*c2c66affSColin Finck _Out_ PIO_STATUS_BLOCK IoStatusBlock 1284*c2c66affSColin Finck ); 1285*c2c66affSColin Finck #endif /* (VER_PRODUCTBUILD >= 2195) */ 1286*c2c66affSColin Finck 1287*c2c66affSColin Finck NTSYSAPI 1288*c2c66affSColin Finck NTSTATUS 1289*c2c66affSColin Finck NTAPI 1290*c2c66affSColin Finck ZwClearEvent ( 1291*c2c66affSColin Finck _In_ HANDLE EventHandle 1292*c2c66affSColin Finck ); 1293*c2c66affSColin Finck 1294*c2c66affSColin Finck NTSYSAPI 1295*c2c66affSColin Finck NTSTATUS 1296*c2c66affSColin Finck NTAPI 1297*c2c66affSColin Finck ZwCloseObjectAuditAlarm ( 1298*c2c66affSColin Finck _In_ PUNICODE_STRING SubsystemName, 1299*c2c66affSColin Finck _In_ PVOID HandleId, 1300*c2c66affSColin Finck _In_ BOOLEAN GenerateOnClose 1301*c2c66affSColin Finck ); 1302*c2c66affSColin Finck 1303*c2c66affSColin Finck NTSYSAPI 1304*c2c66affSColin Finck NTSTATUS 1305*c2c66affSColin Finck NTAPI 1306*c2c66affSColin Finck ZwCreateSymbolicLinkObject ( 1307*c2c66affSColin Finck _Out_ PHANDLE SymbolicLinkHandle, 1308*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 1309*c2c66affSColin Finck _In_ POBJECT_ATTRIBUTES ObjectAttributes, 1310*c2c66affSColin Finck _In_ PUNICODE_STRING TargetName 1311*c2c66affSColin Finck ); 1312*c2c66affSColin Finck 1313*c2c66affSColin Finck NTSYSAPI 1314*c2c66affSColin Finck NTSTATUS 1315*c2c66affSColin Finck NTAPI 1316*c2c66affSColin Finck ZwFlushInstructionCache ( 1317*c2c66affSColin Finck _In_ HANDLE ProcessHandle, 1318*c2c66affSColin Finck _In_opt_ PVOID BaseAddress, 1319*c2c66affSColin Finck _In_ ULONG FlushSize 1320*c2c66affSColin Finck ); 1321*c2c66affSColin Finck 1322*c2c66affSColin Finck NTSYSAPI 1323*c2c66affSColin Finck NTSTATUS 1324*c2c66affSColin Finck NTAPI 1325*c2c66affSColin Finck ZwFlushBuffersFile( 1326*c2c66affSColin Finck _In_ HANDLE FileHandle, 1327*c2c66affSColin Finck _Out_ PIO_STATUS_BLOCK IoStatusBlock 1328*c2c66affSColin Finck ); 1329*c2c66affSColin Finck 1330*c2c66affSColin Finck #if (VER_PRODUCTBUILD >= 2195) 1331*c2c66affSColin Finck NTSYSAPI 1332*c2c66affSColin Finck NTSTATUS 1333*c2c66affSColin Finck NTAPI 1334*c2c66affSColin Finck ZwInitiatePowerAction ( 1335*c2c66affSColin Finck _In_ POWER_ACTION SystemAction, 1336*c2c66affSColin Finck _In_ SYSTEM_POWER_STATE MinSystemState, 1337*c2c66affSColin Finck _In_ ULONG Flags, 1338*c2c66affSColin Finck _In_ BOOLEAN Asynchronous 1339*c2c66affSColin Finck ); 1340*c2c66affSColin Finck #endif /* (VER_PRODUCTBUILD >= 2195) */ 1341*c2c66affSColin Finck 1342*c2c66affSColin Finck NTSYSAPI 1343*c2c66affSColin Finck NTSTATUS 1344*c2c66affSColin Finck NTAPI 1345*c2c66affSColin Finck ZwLoadKey ( 1346*c2c66affSColin Finck _In_ POBJECT_ATTRIBUTES KeyObjectAttributes, 1347*c2c66affSColin Finck _In_ POBJECT_ATTRIBUTES FileObjectAttributes 1348*c2c66affSColin Finck ); 1349*c2c66affSColin Finck 1350*c2c66affSColin Finck NTSYSAPI 1351*c2c66affSColin Finck NTSTATUS 1352*c2c66affSColin Finck NTAPI 1353*c2c66affSColin Finck ZwOpenProcessToken ( 1354*c2c66affSColin Finck _In_ HANDLE ProcessHandle, 1355*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 1356*c2c66affSColin Finck _Out_ PHANDLE TokenHandle 1357*c2c66affSColin Finck ); 1358*c2c66affSColin Finck 1359*c2c66affSColin Finck NTSYSAPI 1360*c2c66affSColin Finck NTSTATUS 1361*c2c66affSColin Finck NTAPI 1362*c2c66affSColin Finck ZwOpenThread ( 1363*c2c66affSColin Finck _Out_ PHANDLE ThreadHandle, 1364*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 1365*c2c66affSColin Finck _In_ POBJECT_ATTRIBUTES ObjectAttributes, 1366*c2c66affSColin Finck _In_ PCLIENT_ID ClientId 1367*c2c66affSColin Finck ); 1368*c2c66affSColin Finck 1369*c2c66affSColin Finck NTSYSAPI 1370*c2c66affSColin Finck NTSTATUS 1371*c2c66affSColin Finck NTAPI 1372*c2c66affSColin Finck ZwOpenThreadToken ( 1373*c2c66affSColin Finck _In_ HANDLE ThreadHandle, 1374*c2c66affSColin Finck _In_ ACCESS_MASK DesiredAccess, 1375*c2c66affSColin Finck _In_ BOOLEAN OpenAsSelf, 1376*c2c66affSColin Finck _Out_ PHANDLE TokenHandle 1377*c2c66affSColin Finck ); 1378*c2c66affSColin Finck 1379*c2c66affSColin Finck NTSYSAPI 1380*c2c66affSColin Finck NTSTATUS 1381*c2c66affSColin Finck NTAPI 1382*c2c66affSColin Finck ZwPulseEvent ( 1383*c2c66affSColin Finck _In_ HANDLE EventHandle, 1384*c2c66affSColin Finck _In_opt_ PLONG PulseCount 1385*c2c66affSColin Finck ); 1386*c2c66affSColin Finck 1387*c2c66affSColin Finck NTSYSAPI 1388*c2c66affSColin Finck NTSTATUS 1389*c2c66affSColin Finck NTAPI 1390*c2c66affSColin Finck ZwQueryDefaultLocale ( 1391*c2c66affSColin Finck _In_ BOOLEAN UserProfile, 1392*c2c66affSColin Finck _Out_ PLCID DefaultLocaleId 1393*c2c66affSColin Finck ); 1394*c2c66affSColin Finck 1395*c2c66affSColin Finck #if (VER_PRODUCTBUILD >= 2195) 1396*c2c66affSColin Finck _IRQL_requires_max_(PASSIVE_LEVEL) 1397*c2c66affSColin Finck NTSYSAPI 1398*c2c66affSColin Finck NTSTATUS 1399*c2c66affSColin Finck NTAPI 1400*c2c66affSColin Finck ZwQueryDirectoryObject( 1401*c2c66affSColin Finck _In_ HANDLE DirectoryHandle, 1402*c2c66affSColin Finck _Out_ PVOID Buffer, 1403*c2c66affSColin Finck _In_ ULONG BufferLength, 1404*c2c66affSColin Finck _In_ BOOLEAN ReturnSingleEntry, 1405*c2c66affSColin Finck _In_ BOOLEAN RestartScan, 1406*c2c66affSColin Finck _Inout_ PULONG Context, 1407*c2c66affSColin Finck _Out_opt_ PULONG ReturnLength 1408*c2c66affSColin Finck ); 1409*c2c66affSColin Finck #endif /* (VER_PRODUCTBUILD >= 2195) */ 1410*c2c66affSColin Finck 1411*c2c66affSColin Finck NTSYSAPI 1412*c2c66affSColin Finck NTSTATUS 1413*c2c66affSColin Finck NTAPI 1414*c2c66affSColin Finck ZwReplaceKey ( 1415*c2c66affSColin Finck _In_ POBJECT_ATTRIBUTES NewFileObjectAttributes, 1416*c2c66affSColin Finck _In_ HANDLE KeyHandle, 1417*c2c66affSColin Finck _In_ POBJECT_ATTRIBUTES OldFileObjectAttributes 1418*c2c66affSColin Finck ); 1419*c2c66affSColin Finck 1420*c2c66affSColin Finck NTSYSAPI 1421*c2c66affSColin Finck NTSTATUS 1422*c2c66affSColin Finck NTAPI 1423*c2c66affSColin Finck ZwResetEvent ( 1424*c2c66affSColin Finck _In_ HANDLE EventHandle, 1425*c2c66affSColin Finck _Out_opt_ PLONG NumberOfWaitingThreads 1426*c2c66affSColin Finck ); 1427*c2c66affSColin Finck 1428*c2c66affSColin Finck #if (VER_PRODUCTBUILD >= 2195) 1429*c2c66affSColin Finck NTSYSAPI 1430*c2c66affSColin Finck NTSTATUS 1431*c2c66affSColin Finck NTAPI 1432*c2c66affSColin Finck ZwRestoreKey ( 1433*c2c66affSColin Finck _In_ HANDLE KeyHandle, 1434*c2c66affSColin Finck _In_ HANDLE FileHandle, 1435*c2c66affSColin Finck _In_ ULONG Flags 1436*c2c66affSColin Finck ); 1437*c2c66affSColin Finck #endif /* (VER_PRODUCTBUILD >= 2195) */ 1438*c2c66affSColin Finck 1439*c2c66affSColin Finck NTSYSAPI 1440*c2c66affSColin Finck NTSTATUS 1441*c2c66affSColin Finck NTAPI 1442*c2c66affSColin Finck ZwSaveKey ( 1443*c2c66affSColin Finck _In_ HANDLE KeyHandle, 1444*c2c66affSColin Finck _In_ HANDLE FileHandle 1445*c2c66affSColin Finck ); 1446*c2c66affSColin Finck 1447*c2c66affSColin Finck NTSYSAPI 1448*c2c66affSColin Finck NTSTATUS 1449*c2c66affSColin Finck NTAPI 1450*c2c66affSColin Finck ZwSetDefaultLocale ( 1451*c2c66affSColin Finck _In_ BOOLEAN UserProfile, 1452*c2c66affSColin Finck _In_ LCID DefaultLocaleId 1453*c2c66affSColin Finck ); 1454*c2c66affSColin Finck 1455*c2c66affSColin Finck #if (VER_PRODUCTBUILD >= 2195) 1456*c2c66affSColin Finck NTSYSAPI 1457*c2c66affSColin Finck NTSTATUS 1458*c2c66affSColin Finck NTAPI 1459*c2c66affSColin Finck ZwSetDefaultUILanguage ( 1460*c2c66affSColin Finck _In_ LANGID LanguageId 1461*c2c66affSColin Finck ); 1462*c2c66affSColin Finck #endif /* (VER_PRODUCTBUILD >= 2195) */ 1463*c2c66affSColin Finck 1464*c2c66affSColin Finck NTSYSAPI 1465*c2c66affSColin Finck NTSTATUS 1466*c2c66affSColin Finck NTAPI 1467*c2c66affSColin Finck ZwSetInformationProcess ( 1468*c2c66affSColin Finck _In_ HANDLE ProcessHandle, 1469*c2c66affSColin Finck _In_ PROCESSINFOCLASS ProcessInformationClass, 1470*c2c66affSColin Finck _In_ PVOID ProcessInformation, 1471*c2c66affSColin Finck _In_ ULONG ProcessInformationLength 1472*c2c66affSColin Finck ); 1473*c2c66affSColin Finck 1474*c2c66affSColin Finck NTSYSAPI 1475*c2c66affSColin Finck NTSTATUS 1476*c2c66affSColin Finck NTAPI 1477*c2c66affSColin Finck ZwSetSystemTime ( 1478*c2c66affSColin Finck _In_ PLARGE_INTEGER NewTime, 1479*c2c66affSColin Finck _Out_opt_ PLARGE_INTEGER OldTime 1480*c2c66affSColin Finck ); 1481*c2c66affSColin Finck 1482*c2c66affSColin Finck NTSYSAPI 1483*c2c66affSColin Finck NTSTATUS 1484*c2c66affSColin Finck NTAPI 1485*c2c66affSColin Finck ZwUnloadKey ( 1486*c2c66affSColin Finck _In_ POBJECT_ATTRIBUTES KeyObjectAttributes 1487*c2c66affSColin Finck ); 1488*c2c66affSColin Finck 1489*c2c66affSColin Finck NTSYSAPI 1490*c2c66affSColin Finck NTSTATUS 1491*c2c66affSColin Finck NTAPI 1492*c2c66affSColin Finck ZwWaitForMultipleObjects ( 1493*c2c66affSColin Finck _In_ ULONG HandleCount, 1494*c2c66affSColin Finck _In_ PHANDLE Handles, 1495*c2c66affSColin Finck _In_ WAIT_TYPE WaitType, 1496*c2c66affSColin Finck _In_ BOOLEAN Alertable, 1497*c2c66affSColin Finck _In_opt_ PLARGE_INTEGER Timeout 1498*c2c66affSColin Finck ); 1499*c2c66affSColin Finck 1500*c2c66affSColin Finck NTSYSAPI 1501*c2c66affSColin Finck NTSTATUS 1502*c2c66affSColin Finck NTAPI 1503*c2c66affSColin Finck ZwYieldExecution ( 1504*c2c66affSColin Finck VOID 1505*c2c66affSColin Finck ); 1506*c2c66affSColin Finck 1507*c2c66affSColin Finck $endif (_NTIFS_) 1508*c2c66affSColin Finck #endif /* (NTDDI_VERSION >= NTDDI_WIN7) */ 1509*c2c66affSColin Finck 1510