From b24c1ddcbc942a7782f613185722012f5cd3501c Mon Sep 17 00:00:00 2001 From: Xoro-1337 Date: Thu, 6 Nov 2025 15:36:24 -0500 Subject: [PATCH] Initial commit --- .gitattributes | 63 + .gitignore | 261 + xbdm.sln | 95 + xbdm/coz.c | 182 + xbdm/coz.h | 7 + xbdm/dm.def | 13 + xbdm/dmbreak.c | 1425 ++ xbdm/dmbreak.h | 158 + xbdm/dmexports.c | 1023 + xbdm/dmexports.h | 30 + xbdm/dmglobals.h | 145 + xbdm/dmincludes.h | 46 + xbdm/dmmain.c | 214 + xbdm/dmnet.h | 69 + xbdm/dmnotify.c | 493 + xbdm/dmnotify.h | 58 + xbdm/dmserv.c | 3630 ++++ xbdm/dmserv.h | 160 + xbdm/file.c | 213 + xbdm/file.h | 53 + xbdm/hvx.c | 214 + xbdm/hvx.h | 122 + xbdm/imp/KernelExports.h | 721 + xbdm/imp/XeCrypt.h | 809 + xbdm/imp/automation.h | 119 + xbdm/imp/cabinet.h | 383 + xbdm/imp/consolecert.h | 58 + xbdm/imp/contentpkg.h | 368 + xbdm/imp/kernelp.h | 419 + xbdm/imp/xamcache.h | 169 + xbdm/imp/xamdbg.h | 240 + xbdm/imp/xamp.h | 3622 ++++ xbdm/imp/xboxp.h | 1402 ++ xbdm/imp/xcabinet.h | 362 + xbdm/imp/xdbg.h | 266 + xbdm/imp/xex.h | 704 + xbdm/imp/xexhv.h | 155 + xbdm/imp/xinput.h | 181 + xbdm/imp/xonlinep.h | 9489 ++++++++++ xbdm/ini.c | 161 + xbdm/ini.h | 29 + xbdm/ntstatus.h | 37025 +++++++++++++++++++++++++++++++++++++ xbdm/xbdm.vcxproj | 378 + xbdm/xex.xml | 29 + xbdm/xexd.xml | 27 + 45 files changed, 65790 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 xbdm.sln create mode 100644 xbdm/coz.c create mode 100644 xbdm/coz.h create mode 100644 xbdm/dm.def create mode 100644 xbdm/dmbreak.c create mode 100644 xbdm/dmbreak.h create mode 100644 xbdm/dmexports.c create mode 100644 xbdm/dmexports.h create mode 100644 xbdm/dmglobals.h create mode 100644 xbdm/dmincludes.h create mode 100644 xbdm/dmmain.c create mode 100644 xbdm/dmnet.h create mode 100644 xbdm/dmnotify.c create mode 100644 xbdm/dmnotify.h create mode 100644 xbdm/dmserv.c create mode 100644 xbdm/dmserv.h create mode 100644 xbdm/file.c create mode 100644 xbdm/file.h create mode 100644 xbdm/hvx.c create mode 100644 xbdm/hvx.h create mode 100644 xbdm/imp/KernelExports.h create mode 100644 xbdm/imp/XeCrypt.h create mode 100644 xbdm/imp/automation.h create mode 100644 xbdm/imp/cabinet.h create mode 100644 xbdm/imp/consolecert.h create mode 100644 xbdm/imp/contentpkg.h create mode 100644 xbdm/imp/kernelp.h create mode 100644 xbdm/imp/xamcache.h create mode 100644 xbdm/imp/xamdbg.h create mode 100644 xbdm/imp/xamp.h create mode 100644 xbdm/imp/xboxp.h create mode 100644 xbdm/imp/xcabinet.h create mode 100644 xbdm/imp/xdbg.h create mode 100644 xbdm/imp/xex.h create mode 100644 xbdm/imp/xexhv.h create mode 100644 xbdm/imp/xinput.h create mode 100644 xbdm/imp/xonlinep.h create mode 100644 xbdm/ini.c create mode 100644 xbdm/ini.h create mode 100644 xbdm/ntstatus.h create mode 100644 xbdm/xbdm.vcxproj create mode 100644 xbdm/xex.xml create mode 100644 xbdm/xexd.xml diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3c4efe2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,261 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +project.fragment.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +#*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc \ No newline at end of file diff --git a/xbdm.sln b/xbdm.sln new file mode 100644 index 0000000..0e55573 --- /dev/null +++ b/xbdm.sln @@ -0,0 +1,95 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xbdm", "xbdm\xbdm.vcxproj", "{037F11DD-1508-4D28-860F-009AAEEA26F7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + CodeAnalysis|Mixed Platforms = CodeAnalysis|Mixed Platforms + CodeAnalysis|Win32 = CodeAnalysis|Win32 + CodeAnalysis|Xbox 360 = CodeAnalysis|Xbox 360 + Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|Win32 = Debug|Win32 + Debug|Xbox 360 = Debug|Xbox 360 + Profile_FastCap|Mixed Platforms = Profile_FastCap|Mixed Platforms + Profile_FastCap|Win32 = Profile_FastCap|Win32 + Profile_FastCap|Xbox 360 = Profile_FastCap|Xbox 360 + Profile|Mixed Platforms = Profile|Mixed Platforms + Profile|Win32 = Profile|Win32 + Profile|Xbox 360 = Profile|Xbox 360 + Release_LTCG|Mixed Platforms = Release_LTCG|Mixed Platforms + Release_LTCG|Win32 = Release_LTCG|Win32 + Release_LTCG|Xbox 360 = Release_LTCG|Xbox 360 + Release|Mixed Platforms = Release|Mixed Platforms + Release|Win32 = Release|Win32 + Release|Xbox 360 = Release|Xbox 360 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {037F11DD-1508-4D28-860F-009AAEEA26F7}.CodeAnalysis|Mixed Platforms.ActiveCfg = CodeAnalysis|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.CodeAnalysis|Mixed Platforms.Build.0 = CodeAnalysis|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.CodeAnalysis|Win32.ActiveCfg = CodeAnalysis|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.CodeAnalysis|Xbox 360.ActiveCfg = CodeAnalysis|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.CodeAnalysis|Xbox 360.Build.0 = CodeAnalysis|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Debug|Mixed Platforms.ActiveCfg = Debug|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Debug|Mixed Platforms.Build.0 = Debug|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Debug|Win32.ActiveCfg = Debug|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Debug|Xbox 360.Build.0 = Debug|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Profile_FastCap|Mixed Platforms.ActiveCfg = Profile_FastCap|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Profile_FastCap|Mixed Platforms.Build.0 = Profile_FastCap|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Profile_FastCap|Win32.ActiveCfg = Profile_FastCap|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Profile_FastCap|Xbox 360.ActiveCfg = Profile_FastCap|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Profile_FastCap|Xbox 360.Build.0 = Profile_FastCap|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Profile|Mixed Platforms.ActiveCfg = Profile|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Profile|Mixed Platforms.Build.0 = Profile|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Profile|Win32.ActiveCfg = Profile|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Profile|Xbox 360.ActiveCfg = Profile|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Profile|Xbox 360.Build.0 = Profile|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Release_LTCG|Mixed Platforms.ActiveCfg = Release_LTCG|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Release_LTCG|Mixed Platforms.Build.0 = Release_LTCG|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Release_LTCG|Win32.ActiveCfg = Release_LTCG|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Release_LTCG|Xbox 360.ActiveCfg = Release_LTCG|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Release_LTCG|Xbox 360.Build.0 = Release_LTCG|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Release|Mixed Platforms.ActiveCfg = Release|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Release|Mixed Platforms.Build.0 = Release|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Release|Win32.ActiveCfg = Release|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Release|Xbox 360.ActiveCfg = Release|Xbox 360 + {037F11DD-1508-4D28-860F-009AAEEA26F7}.Release|Xbox 360.Build.0 = Release|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.CodeAnalysis|Mixed Platforms.ActiveCfg = CodeAnalysis|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.CodeAnalysis|Mixed Platforms.Build.0 = CodeAnalysis|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.CodeAnalysis|Win32.ActiveCfg = CodeAnalysis|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.CodeAnalysis|Xbox 360.ActiveCfg = CodeAnalysis|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.CodeAnalysis|Xbox 360.Build.0 = CodeAnalysis|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Debug|Mixed Platforms.ActiveCfg = Debug|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Debug|Mixed Platforms.Build.0 = Debug|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Debug|Win32.ActiveCfg = Debug|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Debug|Xbox 360.Build.0 = Debug|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Profile_FastCap|Mixed Platforms.ActiveCfg = Profile_FastCap|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Profile_FastCap|Mixed Platforms.Build.0 = Profile_FastCap|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Profile_FastCap|Win32.ActiveCfg = Profile_FastCap|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Profile_FastCap|Xbox 360.ActiveCfg = Profile_FastCap|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Profile_FastCap|Xbox 360.Build.0 = Profile_FastCap|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Profile|Mixed Platforms.ActiveCfg = Profile|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Profile|Mixed Platforms.Build.0 = Profile|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Profile|Win32.ActiveCfg = Profile|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Profile|Xbox 360.ActiveCfg = Profile|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Profile|Xbox 360.Build.0 = Profile|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Release_LTCG|Mixed Platforms.ActiveCfg = Release_LTCG|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Release_LTCG|Mixed Platforms.Build.0 = Release_LTCG|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Release_LTCG|Win32.ActiveCfg = Release_LTCG|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Release_LTCG|Xbox 360.ActiveCfg = Release_LTCG|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Release_LTCG|Xbox 360.Build.0 = Release_LTCG|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Release|Mixed Platforms.ActiveCfg = Release|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Release|Mixed Platforms.Build.0 = Release|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Release|Win32.ActiveCfg = Release|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Release|Xbox 360.ActiveCfg = Release|Xbox 360 + {278C1C74-01E8-41CB-9CB5-D57DA369C498}.Release|Xbox 360.Build.0 = Release|Xbox 360 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + BuildVersion_ConfigurationName = CodeAnalysis + EndGlobalSection +EndGlobal diff --git a/xbdm/coz.c b/xbdm/coz.c new file mode 100644 index 0000000..b3ff850 --- /dev/null +++ b/xbdm/coz.c @@ -0,0 +1,182 @@ +#include "dmincludes.h" + +// Please note, I (Nathan LeRoux) did not write this file! +// cOz requested that I add this into xbdm, so I did + +#define TOTAL_TYPES 4 +DWORD obtypes[] = { + OBJ_TYP_SYMBLINK, + OBJ_TYP_DEVICE, + 0x0, + OBJ_TYP_DIRECTORY +}; +static int iLevel = 0; +VOID DumpAllObjects(char* pszDir, SOCKET s) +{ + int i, typeCount = 0; + ANSI_STRING UName; + BOOL restart = FALSE; + HANDLE hObj, hLink; + NTSTATUS ntStatus, ntStatusTmp; + OBJECT_ATTRIBUTES ObjectAttributes; + POBJECT_DIRECTORY_INFORMATION DirObjInformation; + CHAR szData[256]; + CHAR szLinkName[256]; + CHAR tabs[32]; + CHAR dirTabs[32]; + DWORD dw, index; + DirObjInformation = (POBJECT_DIRECTORY_INFORMATION)szData; + ZeroMemory(tabs, 32); + ZeroMemory(dirTabs, 32); + if(iLevel == 0) + { + strcat_s(tabs, sizeof(tabs), " "); + } + else + { + for(i=0; iName.Buffer); + else + RtlSnprintf(szLinkName, 256, "%s%s", pszDir, DirObjInformation->Name.Buffer); + //DbgPrint("checking type %x index %x typecount %d\r\n", obtypes[typeCount], index, typeCount); + + if((DirObjInformation->Type == obtypes[typeCount])&&(obtypes[typeCount] == OBJ_TYP_SYMBLINK)) + { + ANSI_STRING symb; + FSendLine(s, "%s'%s' ", tabs, szLinkName); + RtlInitAnsiString(&symb, szLinkName); + InitializeObjectAttributes(&ObjectAttributes, &symb, OBJ_CASE_INSENSITIVE, NULL); + ntStatusTmp = NtOpenSymbolicLinkObject(&hLink, &ObjectAttributes); + if(NT_SUCCESS(ntStatusTmp)) + { + ANSI_STRING LName; + char outstr[256]; + LName.Buffer = outstr; + LName.Length = 0; + LName.MaximumLength = 256; + memset(outstr, 0x0, 256); + ntStatusTmp = NtQuerySymbolicLinkObject(hLink, &LName, &dw); + if(NT_SUCCESS(ntStatusTmp)) + FSendLine(s, "linked to: '%s' (SymbolicLink)", outstr); + else + FSendLine(s, "\r\n NtQuerySymbolicLinkObject fail = 0x%lX\r\n", ntStatusTmp); + NtClose(hLink); + } + else + FSendLine(s, "\r\n NtOpenSymboliclinkObject fail = 0x%lX\r\n", ntStatusTmp); + } + else if((DirObjInformation->Type == obtypes[typeCount])&&(obtypes[typeCount] == OBJ_TYP_DEVICE)) + { + FSendLine(s, "%s'%s' (Device)", tabs, szLinkName); + } + else if((DirObjInformation->Type == obtypes[typeCount])&&(obtypes[typeCount] == OBJ_TYP_DIRECTORY)) + { + iLevel++; + DumpAllObjects(szLinkName, s); + iLevel--; + } + else if(obtypes[typeCount] == 0x0) + { + DWORD tt = DirObjInformation->Type; + if((tt != OBJ_TYP_DIRECTORY)&&(tt != OBJ_TYP_DEVICE)&&(tt != OBJ_TYP_SYMBLINK)) + { + if(DirObjInformation->Type == OBJ_TYP_EVENT) + FSendLine(s, "%s'%s' (Event)", tabs, szLinkName); + else if(DirObjInformation->Type == OBJ_TYP_DEBUG) + FSendLine(s, "%s'%s' (Debug)", tabs, szLinkName); + else + { + FSendLine(s, "%s**** '%s' (unknown %08x-'%c%c%c%c')", tabs, szLinkName, tt, tt&0xFF, (tt>>8)&0xFF, (tt>>16)&0xFF, (tt>>24)&0xFF); + } + } + } + } + else + { + FSendLine(s, "NtQueryDirectoryObject = 0x%lX (%S)", ntStatus, pszDir); + } + } + + NtClose(hObj); + } + else + { + printf("NtOpenDirectoryObject = 0x%lX (%S)\r\n", ntStatus, pszDir); + } +} + +// Xam 0x9BB(Open), Xam 0x9BC(Close) +DWORD XSecurityAllOk_Hook() +{ + return ERROR_SUCCESS; +} + +// Xam 0x9BD(Verify) +DWORD XSecurityVerify_Hook(DWORD dwMilliseconds, LPOVERLAPPED lpOverlapped, + LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine) +{ + if(lpCompletionRoutine) + lpCompletionRoutine(0, 0, lpOverlapped); + + return ERROR_SUCCESS; +} + +// Xam 0x9BE(GetFailures) +DWORD XSecurityGetFailureInfo_Hook(PXSECURITY_FAILURE_INFORMATION pFailureInformation) +{ + if(pFailureInformation->dwSize == 0x14) + { + pFailureInformation->dwBlocksChecked = 0x64; + pFailureInformation->dwFailedHashes = 0; + pFailureInformation->dwFailedReads = 0; + pFailureInformation->dwTotalBlocks = 0x64; + } + else if(pFailureInformation->dwSize == sizeof(XSECURITY_FAILURE_INFORMATION)) + { + pFailureInformation->dwBlocksChecked = 0x100; + pFailureInformation->dwFailedHashes = 0; + pFailureInformation->dwFailedReads = 0; + pFailureInformation->dwTotalBlocks = 0x100; + pFailureInformation->fComplete = TRUE; + } + else + return ERROR_NOT_ENOUGH_MEMORY; + + return ERROR_SUCCESS; +} \ No newline at end of file diff --git a/xbdm/coz.h b/xbdm/coz.h new file mode 100644 index 0000000..d96c7dc --- /dev/null +++ b/xbdm/coz.h @@ -0,0 +1,7 @@ + +#ifndef _COZ_H +#define _COZ_H + +VOID DumpAllObjects(char* pszDir, SOCKET s); + +#endif \ No newline at end of file diff --git a/xbdm/dm.def b/xbdm/dm.def new file mode 100644 index 0000000..fdc1641 --- /dev/null +++ b/xbdm/dm.def @@ -0,0 +1,13 @@ +LIBRARY xbdm.dll +EXPORTS + DmAllocatePool @1 + DmAllocatePoolWithTag @2 + + DmGetXbeInfo @16 + DmGetXboxName @17 + + DmGetThreadInfoEx @89 + + DmMapDevkitDrive @141 + + DmGetSystemInfo @161 \ No newline at end of file diff --git a/xbdm/dmbreak.c b/xbdm/dmbreak.c new file mode 100644 index 0000000..0716a03 --- /dev/null +++ b/xbdm/dmbreak.c @@ -0,0 +1,1425 @@ +// Copyright (c) 2013 Nathan LeRoux +// Project started early 2011 +// If you want to get in touch, shoot me an email +// I'm currently seeking employment, and figured 'what the hell, its free advertising' + +/* +Copyright (c) 2013 Nathan LeRoux + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + */ + +#include "dmincludes.h" + +DWORD DmpBreakSpinLock; +CRITICAL_SECTION csExceptionStack, csExceptionStackTitle, csDebugMonitorData, csExecState; +PVOID ExceptionStack, ExceptionStackTitle; +LIST_ENTRY leDebugMonitorData, leBreaks; +DMHB HardwareBreakpoint; + +DWORD dwExecState = DMN_EXEC_PENDING; + +DWORD __declspec(naked) DebugRtlAssert(PANSI_STRING Message) +{ + __asm + { + lhz r4, 0(r3) + lwz r3, 4(r3) + twi 31, r0, 26 + blr + } +} + +VOID __declspec(naked) DbgBreakPoint() +{ + __asm + { + twi 31, r0, 22 + blr + } +} + +VOID __declspec(naked) DebugPrint(PANSI_STRING String) +{ + __asm + { + lhz r4, 0(r3) + lwz r3, 4(r3) + twi 31, r0, 20 + blr + } +} + +VOID __stdcall RtlAssert(LPCSTR FailedAssertion, LPCSTR FileName, ULONG LineNumber, PCHAR Message) +{ + char result; + char sz[0x200]; + ANSI_STRING as; + + _snprintf(sz, sizeof(sz), "\n*** Assertion failed: %s%s\n*** Source File: %s, line %ld\n\n", Message, FailedAssertion, FileName, LineNumber); + + RtlInitAnsiString(&as, sz); + + for(;;) + { + result = (BYTE)DebugRtlAssert(&as); + if(result == 'b' || result == 'B') + DbgBreakPoint(); + else if(result == 'i' || result == 'I') + return; + else if(result == 'T' || result == 't') + ExTerminateThread(STATUS_UNSUCCESSFUL); + } +} + +DMHRAPI DwChangeExecState(DWORD dwState, BOOL fAlterThreads, BOOL fTell, BOOL bStop) +{ + // dwState = DMN_EXEC_XXX + // fAlterThreads = TRUE to start/stop threads + // fTell = TRUE to tell others, FALSE to hide (notifications) + // bStop = TRUE to add a DM_STOPTHREAD flag to the notification + PLIST_ENTRY ple; + PKTHREAD pthr; + DMTD *pdmtd; + BYTE irql; + int i; + + if(dwExecState == dwState) + { + if(dwState == DMN_EXEC_START) + return XBDM_NOTSTOPPED; + else + return XBDM_ALREADYSTOPPED; + } + + if(dwState > DMN_EXEC_PENDING_TITLE) + return E_INVALIDARG; + + KeEnterCriticalRegion(); + + dwExecState = dwState; + + if(fAlterThreads) + { + irql = KfAcquireSpinLock(&g_dmDebug.KeTitleProcess->ThreadListLock); + ple = g_dmDebug.KeTitleProcess->ThreadListHead.Flink; + + for(i = 0;i < 2;i++) + { + while(ple != &g_dmDebug.KeTitleProcess->ThreadListHead + && ple != &g_dmDebug.KeSystemProcess->ThreadListHead) + { + pthr = CONTAINING_RECORD(ple, KTHREAD, ThreadListEntry); +#if 0 + pdmtd = DmGetThreadDmtd((DWORD)pthr->ThreadId); +#else + pdmtd = (DMTD*)pthr->DebugMonitorData; +#endif + + if(!pdmtd) + { + FInitThreadDebugData(pthr); + pdmtd = (DMTD*)pthr->DebugMonitorData; + } + + ple = ple->Flink; + + if(!pdmtd || (pdmtd->DebugFlags & DMFLAG_DEBUGTHREAD) + || (PsGetCurrentThread()->ThreadId == pthr->ThreadId)) + continue; + + if(dwState == DMN_EXEC_START) + KeSetEvent(pdmtd->DebugEvent, TRUE, FALSE); + + if((dwState == DMN_EXEC_START) & (pdmtd->DebugFlags & DMFLAG_STOPPED)) + { + KeResumeThread(pthr); + pdmtd->DebugFlags &= ~DMFLAG_STOPPED; + } + else if((dwState != DMN_EXEC_START) && !(pdmtd->DebugFlags & DMFLAG_STOPPED)) + { + KeSuspendThread(pthr); + pdmtd->DebugFlags |= DMFLAG_STOPPED; + } + } + + if(i == 0) + { + KfReleaseSpinLock(&g_dmDebug.KeTitleProcess->ThreadListLock, irql); + + irql = KfAcquireSpinLock(&g_dmDebug.KeSystemProcess->ThreadListLock); + ple = g_dmDebug.KeSystemProcess->ThreadListHead.Flink; + } + else + KfReleaseSpinLock(&g_dmDebug.KeSystemProcess->ThreadListLock, irql); + } + } + + if(fTell) + FNotify(bStop ? (DM_EXEC | DM_STOPTHREAD) : DM_EXEC, dwState); + + KeLeaveCriticalRegion(); + + return XBDM_NOERR; +} + +DMHRAPI DmGetThreadInfoEx(DWORD dwThreadId, PDM_THREADINFOEX pdmti) +{ + PKTHREAD pthr; + BYTE irql; + DMTD *pdmtd; + + if(!pdmti || pdmti->Size < sizeof(DM_THREADINFOEX)) // Kill everything compiled before a certain date? WHY CERTAINLY I SHALL + return E_INVALIDARG; + + if(FAILED(ObLookupAnyThreadByThreadId(dwThreadId, &pthr))) + return XBDM_NOTHREAD; + + irql = KfAcquireSpinLock(pthr->Process); + + ZeroMemory(pdmti + 4, pdmti->Size - 4); + +#if 0 + pdmtd = DmGetThreadDmtd(dwThreadId); +#else + pdmtd = (DMTD*)pthr->DebugMonitorData; +#endif + + pdmti->SuspendCount = pthr->SuspendCount; + pdmti->Priority = pthr->Priority; + pdmti->TlsBase = pthr->TlsData; + pdmti->StartAddress = pthr->StartAddress; + pdmti->StackBase = pthr->StackBase; + pdmti->StackLimit = pthr->StackLimit; + pdmti->CreateTime.dwHighDateTime = pthr->CreateTime.HighPart; + pdmti->CreateTime.dwLowDateTime = pthr->CreateTime.LowPart; + pdmti->StackSlackSpace = 0x540; + + if(pdmtd) + { + if(pdmtd->DebugFlags & DMFLAG_STOPPED) + pdmti->SuspendCount--; + + pdmti->ThreadNameAddress = pdmtd->ThreadName; + + if(pdmti->ThreadNameAddress) + pdmti->ThreadNameLength = strlen(pdmtd->ThreadName) + 1; + else + pdmti->ThreadNameLength = 0; + } + + pdmti->CurrentProcessor = pthr->CurrentProcessor; + pdmti->LastError = pthr->LastWin32ErrorCode; + + KfReleaseSpinLock(pthr->Process, irql); + + ObDereferenceObject(pthr); + + return XBDM_NOERR; +} + +VOID VSetThreadName(DWORD dwThreadId, LPCSTR szName) +{ + DMTD *pdmtd; + PKTHREAD pthr = NULL; + int i; + + if(dwThreadId == -1) + pdmtd = DmGetCurrentDmtd(); + else + { + if(NT_SUCCESS(ObLookupAnyThreadByThreadId(dwThreadId, &pthr))) + { +#if 0 + if(!(pdmtd = DmGetThreadDmtd(dwThreadId))) +#else + if(!(pdmtd = (DMTD*)pthr->DebugMonitorData)) +#endif + { + FInitThreadDebugData(pthr); +#if 0 + pdmtd = DmGetThreadDmtd(dwThreadId); +#else + pdmtd = (DMTD*)pthr->DebugMonitorData; +#endif + } + } + } + + if(pdmtd) + { + if(pdmtd->ThreadName) + DmFreePool(pdmtd->ThreadName); + + if(szName) + { + i = strlen(szName) + 1; + + pdmtd->ThreadName = (char*)DmAllocatePoolTypeWithTag(i, 'Dmtd', 2); + + if(pdmtd->ThreadName) + strcpy_s(pdmtd->ThreadName, i, szName); + } + else + pdmtd->ThreadName = NULL; + } + + if(pthr) + ObDereferenceObject(pthr); +} + +BOOL FInitThreadDebugData(PKTHREAD pthr) +{ + DMTD *pdmtd = (DMTD*)DmAllocatePoolTypeWithTag(sizeof(DMTD), 'Dmtd', 2); + + if(!pdmtd) + return FALSE; + + ZeroMemory(pdmtd, sizeof(DMTD)); + + if(pthr->CreateOptions & 0x400) + pdmtd->DebugFlags |= DMFLAG_DEBUGTHREAD; + + KeInitializeEvent(&pdmtd->DebugEventData, 0, FALSE); + KeSetEvent(&pdmtd->DebugEventData, TRUE, FALSE); + + pdmtd->DebugEvent = &pdmtd->DebugEventData; + + pdmtd->dwThreadId = (DWORD)pthr->ThreadId; +#if 0 + // Add the data to the list + EnterCriticalSection(&csDebugMonitorData); + pdmtd->Link.Flink = leDebugMonitorData.Flink; + pdmtd->Link.Blink = &leDebugMonitorData; + leDebugMonitorData.Flink->Blink = &pdmtd->Link; + leDebugMonitorData.Flink = &pdmtd->Link; + LeaveCriticalSection(&csDebugMonitorData); +#else + pthr->DebugMonitorData = pdmtd; +#endif + return TRUE; +} + +VOID DmFreeThreadData(DMTD *pdmtd) +{ +#if 0 + // Patch up the hole + EnterCriticalSection(&csDebugMonitorData); + pdmtd->Link.Flink->Blink = pdmtd->Link.Blink; + pdmtd->Link.Blink->Flink = pdmtd->Link.Flink; + LeaveCriticalSection(&csDebugMonitorData); +#endif + if(!pdmtd) + return; + + if(pdmtd->ThreadName) + DmFreePool(pdmtd->ThreadName); + + DmFreePool(pdmtd); +} +#if 0 +DMTD *DmGetThreadDmtd(DWORD dwThreadId) +{ + DMTD *pdmtd = NULL; + PLIST_ENTRY ple; + + EnterCriticalSection(&csDebugMonitorData); + + ple = leDebugMonitorData.Flink; + + while(ple != &leDebugMonitorData) + { + pdmtd = CONTAINING_RECORD(ple, DMTD, Link); + ple = ple->Flink; + + if(pdmtd->dwThreadId == dwThreadId) + break; + else + pdmtd = NULL; + } + + LeaveCriticalSection(&csDebugMonitorData); + + return pdmtd; +} +#endif +DMTD *DmGetCurrentDmtd() +{ +#if 0 + DMTD *pdmtd = NULL; + PLIST_ENTRY ple; + + EnterCriticalSection(&csDebugMonitorData); + + ple = leDebugMonitorData.Flink; + + while(ple != &leDebugMonitorData) + { + pdmtd = CONTAINING_RECORD(ple, DMTD, Link); + ple = ple->Flink; + + if(pdmtd->dwThreadId == (DWORD)PsGetCurrentThread()->ThreadId) + break; + else + pdmtd = NULL; + } + + LeaveCriticalSection(&csDebugMonitorData); + + return pdmtd; +#else + return (DMTD*)PsGetCurrentThread()->DebugMonitorData; +#endif +} + +VOID DbgOut(LPCSTR fmt, ...) +{ + char sz[0x200]; + va_list va; + ANSI_STRING as; + + va_start(va, fmt); + RtlVsnprintf(sz, sizeof(sz), fmt, va); + va_end(va); + + if(KeGetCurrentIrql() == PASSIVE_LEVEL) + { + RtlInitAnsiString(&as, sz); + DebugPrint(&as); + } +} + +BOOL ResumeAfterBreakpoint(PCONTEXT pcr) +{ + BOOL fRet = FALSE; + PDMBP bp = FFindBreak((PVOID)pcr->Iar, TRUE); + + if(bp) + { + fRet = TRUE; + + DoDisableBreak(bp); + + // Single step exceptions + pcr->Msr |= 0x400; + } + + return fRet; +} + +VOID PrepareToStop() +{ + DMTD *pdmtd = DmGetCurrentDmtd(); + + if(!pdmtd) + ASSERT(FALSE); + + KeResetEvent(pdmtd->DebugEvent); + + DwChangeExecState(DMN_EXEC_STOP, TRUE, TRUE, FALSE); +} + +BOOL FStopAtException() +{ + BOOL fRet = TRUE; + DMTD *pdmtd = DmGetCurrentDmtd(); + NTSTATUS st; + + if(!pdmtd) + ASSERT(FALSE); + + pdmtd->DebugFlags |= DMFLAG_CONTINUEABLE; + + st = KeWaitForSingleObject(pdmtd->DebugEvent, 3, 1, 0, NULL); + ASSERT(NT_SUCCESS(st)); + + pdmtd->DebugFlags &= ~DMFLAG_CONTINUEABLE; + + fRet = pdmtd->DebugFlags & DMFLAG_EXCEPTION; + pdmtd->DebugFlags &= ~DMFLAG_EXCEPTION; + + return fRet; // True means that the debugger did not handle the exception +} + +BOOL FTrapNotify(DWORD dwMask, ULONG_PTR ulpParam, BOOL fStop, BOOL *pPassAlong) +{ + BOOL fRet = FALSE; + DMTD *pdmtd = DmGetCurrentDmtd(); + + if(!pdmtd) + return FALSE; + + if((KeGetCurrentIrql() != PASSIVE_LEVEL) || (pdmtd->DebugFlags & DMFLAG_DEBUGTHREAD)) + fStop = FALSE; + else if(!g_dmGlobals.bDebugging) + fStop = FALSE; // TODO: get kd working so i can check if kd is connected before passing to it + + if(fStop) + PrepareToStop(); + + pdmtd->StopReason = dwMask & DM_NOTIFICATIONMASK; + + FNotify(fStop ? (dwMask | DM_STOPTHREAD) : dwMask, ulpParam); + + if(fStop) + { + fRet = FStopAtException(); + + if(!fRet && pPassAlong) // Debugger did not handle, thus pass it along + *pPassAlong = FALSE; + } + + pdmtd->StopReason = 0; + + return fRet; +} + +VOID DoModuleWait() +{ + DWORD dwFlags; + LARGE_INTEGER li; + PLARGE_INTEGER pli; + DMTD* pdmtd = DmGetCurrentDmtd(); + + dwFlags = g_dmGlobals.dwBootFlags & (DMBOOT_WAIT | DMBOOT_STOP); + g_dmGlobals.dwBootFlags &= ~(DMBOOT_WAIT | DMBOOT_STOP); + g_dmGlobals.bDirty = TRUE; + + if(!dwFlags || !pdmtd || (KeGetCurrentIrql() != PASSIVE_LEVEL)) + return; + + if(dwFlags == DMBOOT_STOP) + pli = NULL; + else + { + pli = &li; + li.QuadPart = -150000000; + } + + KeResetEvent(pdmtd->DebugEvent); + DwChangeExecState(DMN_EXEC_PENDING_TITLE, TRUE, TRUE, TRUE); + + if(KeWaitForSingleObject(pdmtd->DebugEvent, 3, 1, FALSE, pli) == STATUS_TIMEOUT) + DwChangeExecState(DMN_EXEC_START, TRUE, TRUE, FALSE); +} + +typedef struct tagTHREADNAME_INFO +{ + DWORD dwType; // Must be 0x1000. + LPCSTR szName; // Pointer to name (in user addr space). + DWORD dwThreadID; // Thread ID (-1=caller thread). + DWORD dwFlags; // Reserved for future use, must be zero. +} THREADNAME_INFO; +BOOL DmTrapHandlerImp(PKTRAP_FRAME ptf, PKEXCEPTION_FRAME pef, + PCONTEXT pcr, BOOL fSecondChance, PVOID Unused) +{ + BOOL fPassAlong = TRUE; + BOOL fRet = TRUE; + DMTD *pdmtd = DmGetCurrentDmtd(); + PIMAGE_NT_HEADERS pinh; + PANSI_STRING pas; + BOOL fSkip = TRUE; + + pdmtd = DmGetCurrentDmtd(); + + if(pdmtd) + { + pdmtd->Context = pcr; + pdmtd->Exception = pef; + + if(pef->Status == STATUS_BREAKPOINT) + { + if(pef->ExceptionInformation[0] == BREAKPOINT_PRINT) + { + DMN_DEBUGSTR dmds; + dmds.ThreadId = (DWORD)PsGetCurrentThread()->ThreadId; + dmds.String = (LPCSTR)pcr->Gpr3; + dmds.Length = (DWORD)pcr->Gpr4; + + FTrapNotify(DM_DEBUGSTR, (ULONG_PTR)&dmds, g_dmGlobals.dwStopFlags & DMSTOP_DEBUGSTR, NULL); + } + else if(pef->ExceptionInformation[0] == BREAKPOINT_LOAD_SYMBOLS) + { + if(pcr->Gpr3 && pcr->Gpr4) + { + DMN_MODLOAD_EX dmmd; + LPDWORD lp; + + ZeroMemory(&dmmd, sizeof(dmmd)); + + dmmd.SizeOfStruct = sizeof(dmmd); + + pas = (PANSI_STRING)pcr->Gpr3; + lp = (LPDWORD)pcr->Gpr4; + pinh = RtlImageNtHeader((PVOID)lp[0]); + + strncpy_s(dmmd.Name, 260, pas->Buffer, pas->Length); + dmmd.BaseAddress = (PVOID)lp[0]; + dmmd.Size = lp[3]; + dmmd.CheckSum = _byteswap_ulong(pinh->OptionalHeader.CheckSum); + dmmd.Flags = 0; + dmmd.OriginalSize = _byteswap_ulong(pinh->OptionalHeader.SizeOfImage); + dmmd.PDataAddress = (LPDWORD)RtlImageDirectoryEntryToData(dmmd.BaseAddress, TRUE, 3, &dmmd.PDataSize); + dmmd.ThreadId = (DWORD)PsGetCurrentThread()->ThreadId; + + if((lp[0] & 0xEFFFFFFF) == 0x82000000) + DoModuleWait(); + + FTrapNotify(DM_MODLOAD, (ULONG_PTR)&dmmd, g_dmGlobals.dwStopFlags & DMSTOP_MODLOAD, NULL); + } + } + else if(pef->ExceptionInformation[0] == BREAKPOINT_UNLOAD_SYMBOLS) + { + if(pcr->Gpr3 && pcr->Gpr4) + { + DMN_MODLOAD_EX dmmd; + LPDWORD lp; + + pas = (PANSI_STRING)pcr->Gpr3; + lp = (LPDWORD)pcr->Gpr4; + + strcpy_s(dmmd.Name, 260, pas->Buffer); + + dmmd.BaseAddress = (PVOID)lp[0]; + dmmd.Size = lp[3]; + dmmd.ThreadId = (DWORD)PsGetCurrentThread()->ThreadId; + + pas = (PANSI_STRING)pcr->Gpr3; + + FTrapNotify(DM_MODUNLOAD, (ULONG_PTR)&dmmd, FALSE, NULL); + } + } + else if(pef->ExceptionInformation[0] == BREAKPOINT_BREAK) + { + DMN_BREAK dmb; + + dmb.Address = (PVOID)pcr->Iar; + dmb.ThreadId = (DWORD)PsGetCurrentThread()->ThreadId; + + if(FFindBreak(dmb.Address, TRUE)) + fSkip = FALSE; + + FTrapNotify(DM_BREAK, (ULONG_PTR)&dmb, TRUE, &fPassAlong); + + if(g_dmGlobals.bDebugging) + fPassAlong = FALSE; // we dont pass along breakpoints while debugging + + if(ResumeAfterBreakpoint(pcr)) + pdmtd->BreakpointAddress = (DWORD)dmb.Address; + } + else if(pef->ExceptionInformation[0] == BREAKPOINT_ASSERT) + { + DMN_DEBUGSTR dmds; + dmds.String = (LPCSTR)pcr->Gpr3; + dmds.Length = (DWORD)pcr->Gpr4; + dmds.ThreadId = (DWORD)PsGetCurrentThread()->ThreadId; + + FTrapNotify(DM_ASSERT, (ULONG_PTR)&dmds, TRUE, &fPassAlong); + } + else if(pef->ExceptionInformation[0] == BREAKPOINT_RIP) + { + // TODO: this thing here + ASSERT(FALSE); + } + } + else if(pef->Status == STATUS_SINGLE_STEP) + { + // We dont want to skip the current instruction in a single step exception + fSkip = FALSE; + + if(pef->ExceptionInformation[0]) + { + BOOL fStep = pdmtd->DebugFlags & DMFLAG_SINGLESTEP; + pdmtd->DebugFlags &= ~DMFLAG_SINGLESTEP; + pcr->Msr &= ~0x400; + + // Single step exception + if(pdmtd->BreakpointAddress) + { + PDMBP bp = FFindBreak((PVOID)pdmtd->BreakpointAddress, TRUE); + if(bp) + DoEnableBreak(bp); + + pdmtd->BreakpointAddress = 0; + + fPassAlong = FALSE; + } + else if(pdmtd->DebugFlags & DMFLAG_DATABREAK) + { + // Set the breakpoint again + DmSetDataBreakpoint((PVOID)HardwareBreakpoint.dwAddr, HardwareBreakpoint.dwType, HardwareBreakpoint.dwSize); + pdmtd->DebugFlags &= ~DMFLAG_DATABREAK; + + fPassAlong = FALSE; + } + else + fStep = TRUE; + + if(fStep) + { + // we have to stop + DMN_BREAK dmb; + dmb.Address = (PVOID)pcr->Iar; + dmb.ThreadId = (DWORD)PsGetCurrentThread()->ThreadId; + + FTrapNotify(DM_SINGLESTEP, (ULONG_PTR)&dmb, TRUE, &fPassAlong); + + if(g_dmGlobals.bDebugging) + fPassAlong = FALSE; + } + } + else + { + // Data breakpoint + + if(FMatchDataBreak((PVOID)pef->ExceptionInformation[1])) + { + DMN_DATABREAK dmdb; + dmdb.Address = (PVOID)pcr->Iar; + dmdb.DataAddress = (PVOID)pef->ExceptionInformation[1]; + + pdmtd->DebugFlags |= DMFLAG_DATABREAK; + + KeIpiGenericCall(DmpSetHardwareBreakpoint, 0); + + FTrapNotify(DM_DATABREAK, (ULONG_PTR)&dmdb, TRUE, &fPassAlong); + + // Single step + pcr->Msr |= 0x400; + } + else + { + DMN_BREAK dmb; + dmb.Address = (PVOID)pcr->Iar; + dmb.ThreadId = (DWORD)PsGetCurrentThread()->ThreadId; + + FTrapNotify(DM_DATABREAK, (ULONG_PTR)&dmb, TRUE, &fPassAlong); + } + + if(g_dmGlobals.bDebugging) + fPassAlong = FALSE; + } + } + else if(pef->Status == 0x406D1388) + { + if(pef->ExceptionInformation[0] == 0x1000) + { + VSetThreadName(pef->ExceptionInformation[2], (LPCSTR)pef->ExceptionInformation[1]); + } + } + else + { + DMN_EXCEPTION dme; + BOOL fStop = TRUE; + + dme.Address = (PVOID)pcr->Iar; + dme.Code = pef->Status; + dme.ThreadId = (DWORD)PsGetCurrentThread()->ThreadId; + + if(!fSecondChance) + { + dme.Flags = DM_EXCEPT_FIRSTCHANCE; + pdmtd->DebugFlags |= DMFLAG_FIRSTCHANCE; + fStop = (g_dmGlobals.dwStopFlags & DMSTOP_FCE); + } + else + dme.Flags = 0; + + if(pef->Status == STATUS_ACCESS_VIOLATION) + { + dme.Information[0] = pef->ExceptionInformation[0]; + dme.Information[1] = pef->ExceptionInformation[1]; + } + else + { + dme.Information[0] = pef->Continuable; + dme.Information[1] = (DWORD)&pef->ExceptionInformation[0]; + } + + fRet = !FTrapNotify(DM_EXCEPTION, (ULONG_PTR)&dme, fStop, &fPassAlong); + + pdmtd->DebugFlags &= ~DMFLAG_FIRSTCHANCE; + + if(g_dmGlobals.bDebugging && (KeGetCurrentIrql() == PASSIVE_LEVEL)) + { + fPassAlong = FALSE; // We don't pass along if we are debugging + + if(fSecondChance) + fRet = TRUE; // continue second chance if we are debugging no matter what + } + + fSkip = FALSE; + } + + pdmtd->Context = NULL; + pdmtd->Exception = NULL; + } + + if(fPassAlong) + return g_dmGlobals.PreviousTrap(ptf, pef, pcr, fSecondChance); + + if(fSkip) + pcr->Iar += 4; + + return fRet; +} + +BOOL __declspec(naked) DmTrapOnStack(PKTRAP_FRAME ptf, PKEXCEPTION_FRAME pef, + PCONTEXT pcr, BOOL fSecondChance, PVOID Unused, PVOID stack) +{ + __asm + { + // Store LR + mflr r12 + stw r12, -8(sp) + + // Get some stack + stwu sp, -0x60(sp) + + // Get some breathing room + addi r8, r8, -0x50 + + // r8 = sp - r8 + subf r8, sp, r8 + + // r9 = sp + 0x60 + addi r9, sp, 0x60 + + // temp = sp + r8 + // *r9 = temp + // sp = temp + stwux r9, sp, r8 + + // Branch + bl DmTrapHandlerImp + + // Get the stack pointer + lwz sp, 0(sp) + + // Get the link register + lwz r12, -8(sp) + mtlr r12 + + // Return + blr + } +} + +BOOL DmTrapHandler(PKTRAP_FRAME ptf, PKEXCEPTION_FRAME pef, + PCONTEXT pcr, BOOL fSecondChance) +{ + BOOL fRet; + DMTD *pdmtd = DmGetCurrentDmtd(); + PCRITICAL_SECTION cs; + PVOID stack; + + if((KeGetCurrentIrql() == PASSIVE_LEVEL) && pdmtd && !(pdmtd->DebugFlags & DMFLAG_TRAPPED) && !(pdmtd->DebugFlags & DMFLAG_DEBUGTHREAD)) // Prevent trapception + { + if(KeGetCurrentProcessType() == 2) + { + cs = &csExceptionStack; + stack = ExceptionStack; + } + else + { + cs = &csExceptionStackTitle; + stack = ExceptionStackTitle; + } + + EnterCriticalSection(cs); + + pdmtd->DebugFlags |= DMFLAG_TRAPPED; + + // swap stack and trap + fRet = DmTrapOnStack(ptf, pef, pcr, fSecondChance, NULL, stack); + + pdmtd->DebugFlags &= ~DMFLAG_TRAPPED; + + LeaveCriticalSection(cs); + } + else + fRet = DmTrapHandlerImp(ptf, pef, pcr, fSecondChance, NULL); + + return fRet; +} + +VOID LpTitleTerminateRoutine() +{ + // TODO: free up stuff used by titles (notifications, command handlers, etc) + + DwChangeExecState(DMN_EXEC_REBOOT_TITLE, FALSE, TRUE, FALSE); +} + +VOID LpThreadNotificationRoutine(PEX_THREAD_REGISTRATION ThisRegistration, PKTHREAD Thread, BOOL Creating) +{ + DMTD *pdmtd; + BOOL bBreak = FALSE; + BOOL bStop = FALSE; + + if(Creating) + { + DMN_CREATETHREAD dmct; + + FInitThreadDebugData(Thread); + pdmtd = (DMTD*)Thread->DebugMonitorData; + + if(Thread->CreateOptions & 0x100) + { + // Title launched, initial breakpoint + if(g_dmGlobals.dwStopFlags & DMSTOP_TITLELAUNCH) + { + g_dmGlobals.dwStopFlags &= ~DMSTOP_TITLELAUNCH; + bBreak = TRUE; + } + else + DwChangeExecState(DMN_EXEC_START, FALSE, TRUE, FALSE); + } + + dmct.StartAddress = Thread->StartAddress; + dmct.ThreadId = (DWORD)Thread->ThreadId; + dmct.ThreadNameAddress = NULL; + + bStop = g_dmGlobals.dwStopFlags & DMSTOP_CREATETHREAD; + + if(!pdmtd || !(pdmtd->DebugFlags & DMFLAG_DEBUGTHREAD)) + { + if(bStop) + PrepareToStop(); + + FNotify(bStop ? (DM_CREATETHREAD | DM_STOPTHREAD) : DM_CREATETHREAD, (ULONG_PTR)&dmct); + + if(bStop) + FStopAtException(); + + if(bBreak) + __emit(BREAKPOINT_BREAK); + } + } + else + { +#if 0 + pdmtd = DmGetThreadDmtd((DWORD)Thread->ThreadId); +#else + pdmtd = (DMTD*)Thread->DebugMonitorData; +#endif + KeEnterCriticalRegion(); + + FNotify(DM_DESTROYTHREAD, (ULONG_PTR)Thread->ThreadId); + + if(pdmtd) + DmFreeThreadData(pdmtd); + + KeLeaveCriticalRegion(); + } +} + +BOOL FGetMemory(DWORD dwAddr, PBYTE pb) +{ + BYTE irql; + BOOL fRet = TRUE; + PBYTE pAddr; + PDMBP bp; + + irql = KfRaiseIrql(0x7C); + KeAcquireSpinLockAtRaisedIrql(&DmpBreakSpinLock); + + bp = FFindBreak((PVOID)dwAddr, FALSE); + + if(bp) + dwAddr = (DWORD)bp->Code + (dwAddr & 3); + + pAddr = (PBYTE)PvDbgReadCheck((PVOID)dwAddr); + if(pAddr) + *pb = *pAddr; + else + fRet = FALSE; + + KeReleaseSpinLockFromRaisedIrql(&DmpBreakSpinLock); + KfLowerIrql(irql); + + return fRet; +} + +BOOL FSetMemory(DWORD dwAddr, BYTE b) +{ + BYTE irql; + BOOL fRet = TRUE; + PBYTE pAddr; + HANDLE h; + PDMBP bp; + + irql = KfRaiseIrql(0x7C); + KeAcquireSpinLockAtRaisedIrql(&DmpBreakSpinLock); + + bp = FFindBreak((PVOID)dwAddr, FALSE); + if(bp) + dwAddr = (DWORD)bp->Code + (dwAddr & 3); + + pAddr = (PBYTE)PvDbgWriteCheck((PVOID)dwAddr, &h); + + if(pAddr) + { + *pAddr = b; + + KeSweepIcacheRange((PVOID)pAddr, 1); + MmDbgReleaseAddress((PVOID)pAddr, &h); + } + else + fRet = FALSE; + + KeReleaseSpinLockFromRaisedIrql(&DmpBreakSpinLock); + KfLowerIrql(irql); + + return fRet; +} + +// Breakpoints +DMHRAPI DmSetBreakpoint(PVOID addr) +{ + BYTE irql; + HRESULT hr = XBDM_NOERR; + PDMBP bp = (PDMBP)DmAllocatePoolTypeWithTag(sizeof(DMBP), 'dmbp', 2); + + irql = KfRaiseIrql(0x7C); + KeAcquireSpinLockAtRaisedIrql(&DmpBreakSpinLock); + + if(FFindBreak(addr, FALSE)) + hr = E_FAIL; + else + { + if(bp == NULL) + hr = E_FAIL; + else + { + InsertHeadList(&leBreaks, &bp->Link); + + bp->bEnabled = FALSE; + bp->dwAddr = (DWORD)addr; + DoEnableBreak(bp); + } + } + + KeReleaseSpinLockFromRaisedIrql(&DmpBreakSpinLock); + KfLowerIrql(irql); + + if(FAILED(hr)) + DmFreePool(bp); + + return hr; +} + +DMHRAPI DmRemoveBreakpoint(PVOID addr) +{ + BYTE irql; + HRESULT hr = XBDM_NOERR; + PDMBP bp; + + irql = KfRaiseIrql(0x7C); + KeAcquireSpinLockAtRaisedIrql(&DmpBreakSpinLock); + + bp = FFindBreak(addr, FALSE); + if(bp) + { + DoDisableBreak(bp); + RemoveEntryList(&bp->Link); + } + else + hr = E_FAIL; + + KeReleaseSpinLockFromRaisedIrql(&DmpBreakSpinLock); + KfLowerIrql(irql); + + if(NT_SUCCESS(hr)) + DmFreePool(bp); + + return hr; +} + +DMHRAPI DmIsBreakpoint(PVOID addr, LPDWORD dwType) +{ + if(FFindBreak(addr, TRUE)) + *dwType = DMBREAK_FIXED; + else + { + // TODO: check hardware breakpoint + *dwType = DMBREAK_NONE; + } + + return XBDM_NOERR; +} + +DMHRAPI DmSetInitialBreakpoint() +{ + if(dwExecState != DMN_EXEC_PENDING_TITLE + && dwExecState != DMN_EXEC_PENDING) + return XBDM_NOTSTOPPED; + + g_dmGlobals.dwStopFlags |= DMSTOP_TITLELAUNCH; + return XBDM_NOERR; +} + +VOID DoDisableBreak(PDMBP bp) +{ + PVOID addr; + HANDLE h; + + if(!bp->bEnabled) + return; + + if(addr = PvDbgWriteCheck((PVOID)bp->dwAddr, &h)) + { + *(LPDWORD)addr = *(LPDWORD)bp->Code; + + KeSweepIcacheRange((PVOID)bp->dwAddr, 4); + MmDbgReleaseAddress(addr, &h); + + bp->bEnabled = FALSE; + } +} + +VOID DoEnableBreak(PDMBP bp) +{ + PVOID addr; + HANDLE h; + + if(bp->bEnabled) + return; + + if(addr = PvDbgWriteCheck((PVOID)bp->dwAddr, &h)) + { + *(LPDWORD)bp->Code = *(LPDWORD)addr; + *(LPDWORD)addr = BREAKPOINT_BREAK; + + KeSweepIcacheRange((PVOID)bp->dwAddr, 4); + MmDbgReleaseAddress(addr, &h); + + bp->bEnabled = TRUE; + } +} + +DMHRAPI DmRemoveAllBreakpoints() +{ + BYTE irql; + PLIST_ENTRY ple; + PDMBP bp; + + irql = KfAcquireSpinLock(&DmpBreakSpinLock); + + ple = leBreaks.Flink; + while(ple != &leBreaks) + { + bp = CONTAINING_RECORD(ple, DMBP, Link); + ple = ple->Flink; + + DoDisableBreak(bp); + RemoveEntryList(&bp->Link); + DmFreePool(bp); + } + + KfReleaseSpinLock(&DmpBreakSpinLock, irql); + + return E_FAIL; +} + +BOOL FMatchDataBreak(PVOID addr) +{ + DWORD dw = (DWORD)addr; + + if(dw >= HardwareBreakpoint.dwAddr && dw < (HardwareBreakpoint.dwAddr + HardwareBreakpoint.dwSize)) + return TRUE; + + return FALSE; +} + +ULONG_PTR DmpSetHardwareBreakpoint(DWORD Context) +{ +#ifdef _DEBUG + if(!Context) + KeSetSpecialPurposeRegister(SPR_DABRX, 0); // break disabled + + KeSetSpecialPurposeRegister(SPR_DABR, Context); // set context + + if(Context) + KeSetSpecialPurposeRegister(SPR_DABRX, 3); // break enabled +#else + if(!Context) + HvPokeSPR(SPR_DABRX, 0); // break disabled + + HvPokeSPR(SPR_DABR, Context); // set context + + if(Context) + HvPokeSPR(SPR_DABRX, 3); // break enabled +#endif + return Context; +} + +DMHRAPI DmSetDataBreakpoint(PVOID addr, DWORD dwType, DWORD dwSize) +{ + BYTE irql; + DWORD dw = (DWORD)addr; + DWORD dwMask = 0; + HRESULT hr = XBDM_NOERR; + + irql = KfAcquireSpinLock(&DmpBreakSpinLock); + + if(dwType == DMBREAK_NONE) + { + HardwareBreakpoint.dwAddr = 0; + HardwareBreakpoint.dwType = 0; + HardwareBreakpoint.dwSize = 0; + } + else + { + if((dw & 3) + dwSize > 8) + hr = E_INVALIDARG; + else + { + if(dwType == DMBREAK_WRITE) + dwMask = HWBP_WRITE; + else if(dwType == DMBREAK_READ) + dwMask = HWBP_READ; + else if(dwType == DMBREAK_READWRITE) + dwMask = HWBP_READWRITE; + else if(dwType == DMBREAK_EXECUTE) + dwMask = HWBP_EXECUTE; + + HardwareBreakpoint.dwType = dwMask; + HardwareBreakpoint.dwAddr = dw; + HardwareBreakpoint.dwSize = dwSize; + + dwMask |= (dw & 0xFFFFFFF8) | 4; + } + + KeIpiGenericCall(DmpSetHardwareBreakpoint, dwMask); + } + + KfReleaseSpinLock(&DmpBreakSpinLock, irql); + + return hr; +} + +PDMBP FFindBreak(PVOID addr, BOOL lock) +{ + BYTE irql; + PDMBP bp = NULL, pbp; + PLIST_ENTRY ple; + + if(lock) + { + irql = KfRaiseIrql(0x7C); + KeAcquireSpinLockAtRaisedIrql(&DmpBreakSpinLock); + } + + ple = leBreaks.Flink; + while(ple != &leBreaks) + { + pbp = CONTAINING_RECORD(ple, DMBP, Link); + ple = ple->Flink; + + if(pbp->dwAddr == ((DWORD)addr & 0xFFFFFFFC)) + { + bp = pbp; + break; + } + } + + if(lock) + { + KeReleaseSpinLockFromRaisedIrql(&DmpBreakSpinLock); + KfLowerIrql(irql); + } + + return bp; +} + +BOOL FIsBreakpoint(PVOID addr) +{ + return (BOOL)FFindBreak(addr, TRUE); +} + +const DWORD MMIORangeTable[] = +{ + 0x7FC80000, 0x7FC9FFFF, + 0x7FD00000, 0x7FDFFFFF, + 0x7FEA0000, 0x7FEAFFFF, + 0x7FED0000, 0x7FEDFFFF, + 0x7FED0000, 0x7FEDFFFF, + 0x8FFF0000, 0x8FFF0FFF, + 0x8FFF1000, 0x8FFF1FFF, + 0x00000000, 0x00000000, +}; +BOOL FIsMmIoAddress(PVOID addr) +{ + int i; + + for(i = 0;MMIORangeTable[i];i += 2) + { + if(((DWORD)addr > MMIORangeTable[i]) + && ((DWORD)addr < MMIORangeTable[i + 1])) + return TRUE; + } + + return FALSE; +} +PVOID PvDbgWriteCheck(PVOID Address, PHANDLE Handle) +{ + PVOID addr; + +#ifndef _DEBUG + if(!FIsMmIoAddress(Address) && MmIsAddressValid(Address)) + addr = Address; + else + addr = NULL; +#else + if(addr = MmDbgWriteCheck(Address, Handle)) + { + if(FIsMmIoAddress(addr)) + { + MmDbgReleaseAddress(addr, Handle); + addr = NULL; + } + } +#endif + + return addr; +} +PVOID PvDbgReadCheck(PVOID Address) +{ + PVOID addr; + + if(addr = MmDbgReadCheck(Address)) + { + if(FIsMmIoAddress(addr)) + addr = NULL; + } + + return addr; +} + +#define MAKE_CONTEXT(x, y) { #x, y, (DWORD)&((XCONTEXT*)0)->##x, sizeof(((XCONTEXT*)0)->##x) }, +#define MV(a) \ + MAKE_CONTEXT(a##0, CONTEXT_VECTOR) MAKE_CONTEXT(a##1, CONTEXT_VECTOR) MAKE_CONTEXT(a##2, CONTEXT_VECTOR) \ + MAKE_CONTEXT(a##3, CONTEXT_VECTOR) MAKE_CONTEXT(a##4, CONTEXT_VECTOR) MAKE_CONTEXT(a##5, CONTEXT_VECTOR) \ + MAKE_CONTEXT(a##6, CONTEXT_VECTOR) MAKE_CONTEXT(a##7, CONTEXT_VECTOR) MAKE_CONTEXT(a##8, CONTEXT_VECTOR) \ + MAKE_CONTEXT(a##9, CONTEXT_VECTOR) + + +DMREG rgbregs[] = +{ + MAKE_CONTEXT(Msr, CONTEXT_CONTROL) + MAKE_CONTEXT(Iar, CONTEXT_CONTROL) + MAKE_CONTEXT(Lr, CONTEXT_CONTROL) + MAKE_CONTEXT(Ctr, CONTEXT_CONTROL) + + MAKE_CONTEXT(Gpr0, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr1, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr2, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr3, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr4, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr5, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr6, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr7, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr8, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr9, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr10, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr11, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr12, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr13, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr14, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr15, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr16, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr17, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr18, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr19, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr20, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr21, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr22, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr23, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr24, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr25, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr26, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr27, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr28, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr29, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr30, CONTEXT_INTEGER) + MAKE_CONTEXT(Gpr31, CONTEXT_INTEGER) + MAKE_CONTEXT(Cr, CONTEXT_INTEGER) + MAKE_CONTEXT(Xer, CONTEXT_INTEGER) + + MAKE_CONTEXT(Fpscr, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr0, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr1, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr2, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr3, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr4, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr5, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr6, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr7, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr8, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr9, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr10, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr11, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr12, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr13, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr14, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr15, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr16, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr17, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr18, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr19, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr20, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr21, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr22, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr23, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr24, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr25, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr26, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr27, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr28, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr29, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr30, CONTEXT_FLOATING_POINT) + MAKE_CONTEXT(Fpr31, CONTEXT_FLOATING_POINT) + + MAKE_CONTEXT(Vscr, CONTEXT_VECTOR) + MV(Vr) + MV(Vr1) + MV(Vr2) + MV(Vr3) + MV(Vr4) + MV(Vr5) + MV(Vr6) + MV(Vr7) + MV(Vr8) + MV(Vr9) + MV(Vr10) + MV(Vr11) + MAKE_CONTEXT(Vr120, CONTEXT_VECTOR) + MAKE_CONTEXT(Vr121, CONTEXT_VECTOR) + MAKE_CONTEXT(Vr122, CONTEXT_VECTOR) + MAKE_CONTEXT(Vr123, CONTEXT_VECTOR) + MAKE_CONTEXT(Vr124, CONTEXT_VECTOR) + MAKE_CONTEXT(Vr125, CONTEXT_VECTOR) + MAKE_CONTEXT(Vr126, CONTEXT_VECTOR) + MAKE_CONTEXT(Vr127, CONTEXT_VECTOR) + { 0, 0, 0} +}; +int cchregs = (sizeof(rgbregs) / sizeof(DMREG)); + +#undef MV +#undef MAKE_CONTEXT \ No newline at end of file diff --git a/xbdm/dmbreak.h b/xbdm/dmbreak.h new file mode 100644 index 0000000..f16c2e0 --- /dev/null +++ b/xbdm/dmbreak.h @@ -0,0 +1,158 @@ +/* + Copyright (c) 2013 Nathan LeRoux + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#ifndef _DMBREAK_H +#define _DMBREAK_H + +// Thread data structure +typedef struct _DMTD +{ + DWORD DebugFlags; + + char *ThreadName; + + DWORD dwThreadId; +#if 0 + LIST_ENTRY Link; +#endif + + DWORD StopReason; + + DWORD BreakpointAddress; + + PCONTEXT Context; + PKEXCEPTION_FRAME Exception; + + HANDLE DebugEvent; + KEVENT DebugEventData; +} DMTD; + +// Breakpoint structure +typedef struct _DMBP +{ + DWORD dwAddr; // The address of the breakpoint + BYTE Code[4]; // The code data that used to be there + BOOL bEnabled; // If the breakpoint is active + + LIST_ENTRY Link; // List entry +} DMBP, *PDMBP; + +// Hardware breakpoint structure +typedef struct _DMHB +{ + DWORD dwAddr; // The address + DWORD dwType; // The type + DWORD dwSize; // The size +} DMHB; + +// Debug thread flags +#define DMFLAG_STOPPED 0x0001 // Execution is stopped +#define DMFLAG_DEBUGTHREAD 0x0002 // We are a debug thread +#define DMFLAG_TRAPPED 0x0004 // We are in a trap handler +#define DMFLAG_EXCEPTION 0x0008 // Thread is stopped +#define DMFLAG_SINGLESTEP 0x0010 // We are single stepping from the debugger +#define DMFLAG_DATABREAK 0x0020 // We are patching up the data breakpoint +#define DMFLAG_FIRSTCHANCE 0x0040 // We are in a first chance exception +#define DMFLAG_CONTINUEABLE 0x0080 // Thread is continuable via dmcontinue +// 0x0100 +// 0x0400 +// 0x0800 +// 0x0C00 +// 0x1000 +// 0x2000 +// 0x4000 +// 0x8000 + +// Breakpoints +#define BREAKPOINT_PRINT 0x0FE00014 // Debug printing +#define BREAKPOINT_PROMPT 0x0FE00015 // Debug prompt from the kernel debugger +#define BREAKPOINT_BREAK 0x0FE00016 // Breakpoint +#define BREAKPOINT_LOAD_SYMBOLS 0x0FE00017 // Load symbols for an exe +#define BREAKPOINT_UNLOAD_SYMBOLS 0x0FE00018 // Unload symbols for an exe +#define BREAKPOINT_ASSERT 0x0FE0001A // Failed an assert +#define BREAKPOINT_RIP 0x0FE0001B // Failed a rip + +#define BREAKPOINT_MAX 128 // Maximum breakpoint count + +// Hardware breakpoints +#define HWBP_READ 1 +#define HWBP_WRITE 2 +#define HWBP_EXECUTE 4 +#define HWBP_READWRITE (HWBP_READ | HWBP_WRITE) + +VOID VSetThreadName(DWORD dwThreadId, LPCSTR szName); +BOOL FInitThreadDebugData(PKTHREAD pthr); +VOID DmFreeThreadData(DMTD *pdmtd); +DMTD *DmGetCurrentDmtd(); + +#if 0 +DMTD *DmGetThreadDmtd(DWORD dwThreadId); +#endif + +VOID LpTitleTerminateRoutine(); +VOID LpThreadNotificationRoutine(PEX_THREAD_REGISTRATION ThisRegistration, PKTHREAD Thread, BOOL Creating); + +BOOL DmTrapHandler(PKTRAP_FRAME ptf, PKEXCEPTION_FRAME pef, + PCONTEXT pcr, BOOL fSecondChance); + +BOOL FSetMemory(DWORD dwAddr, BYTE b); +BOOL FGetMemory(DWORD dwAddr, PBYTE pb); + +DMHRAPI DwChangeExecState(DWORD dwState, BOOL fAlterThreads, BOOL fTell, BOOL bStop); + +PVOID PvDbgWriteCheck(PVOID Address, PHANDLE Handle); +PVOID PvDbgReadCheck(PVOID Address); +BOOL FIsMmIoAddress(PVOID addr); + +BOOL FIsBreakpoint(PVOID addr); +DMHRAPI DmRemoveAllBreakpoints(); +PDMBP FFindBreak(PVOID addr, BOOL raiseIrql); +VOID DoEnableBreak(PDMBP bp); +VOID DoDisableBreak(PDMBP bp); +BOOL FMatchDataBreak(PVOID addr); +ULONG_PTR DmpSetHardwareBreakpoint(DWORD Context); +PKPCR __forceinline __declspec(naked) KeGetCurrentPcr() +{ + __asm + { + mr r3, r13 + blr + } +} + +PKTHREAD __forceinline PsGetCurrentThread() +{ + return KeGetCurrentPcr()->Prcb->CurrentThread; +} + +BYTE __forceinline KeGetCurrentIrql() +{ + return KeGetCurrentPcr()->CurrentIrql; +} + +extern DWORD DmpBreakSpinLock, dwExecState; +extern CRITICAL_SECTION csExceptionStack, csExceptionStackTitle, csDebugMonitorData, csExecState; +extern PVOID ExceptionStack, ExceptionStackTitle; +extern LIST_ENTRY leDebugMonitorData, leBreaks; +extern DMHB HardwareBreakpoint; + +#endif \ No newline at end of file diff --git a/xbdm/dmexports.c b/xbdm/dmexports.c new file mode 100644 index 0000000..8ee8720 --- /dev/null +++ b/xbdm/dmexports.c @@ -0,0 +1,1023 @@ +/* + Copyright (c) 2013 Nathan LeRoux + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#include "dmincludes.h" + +DMHRAPI DmStub() +{ + return E_FAIL; +} + +PVOID __stdcall DmAllocatePool(ULONG cb) +{ + return ExAllocatePoolWithTag(cb, 'xbdm'); +} + +PVOID __stdcall DmAllocatePoolWithTag(ULONG cb, ULONG tag) +{ + return ExAllocatePoolWithTag(cb, tag); +} + +PVOID DmAllocatePoolTypeWithTag(ULONG cb, ULONG tag, ULONG type) +{ + return ExAllocatePoolTypeWithTag(cb, tag, type); +} + +VOID __stdcall DmFreePool(PVOID p) +{ + ExFreePool(p); +} + +DMHRAPI DmGetXboxName(LPSTR szName, LPDWORD pcch) +{ + DWORD i; + + if(!szName || !pcch) + return E_INVALIDARG; + + if(strlen(g_dmGlobals.rgchDbgName) >= *pcch) + return XBDM_BUFFER_TOO_SMALL; + + for(i = 0;i < *pcch;i++) + { + szName[i] = g_dmGlobals.rgchDbgName[i]; + + if(g_dmGlobals.rgchDbgName[i] == 0) + break; + } + + if(g_dmGlobals.rgchDbgName[i]) + return XBDM_BUFFER_TOO_SMALL; + else + return XBDM_NOERR; +} + +DMHRAPI DmGetXbeInfo(LPCSTR szName, PDM_XBE pdxbe) +{ + return DmGetXbeInfoEx(szName, pdxbe, 0); +} + +DMHRAPI DmGetXbeInfoEx(LPCSTR szName, PDM_XBE pdxbe, DWORD dwFlags) +{ + if(!pdxbe) + return E_INVALIDARG; + + if(dwFlags & DM_XBEONDISKONLY) + return XBDM_NOSUCHFILE; + + ZeroMemory(pdxbe, sizeof(DM_XBE)); + + if(ExLoadedImageName) + strcpy(pdxbe->LaunchPath, ExLoadedImageName); + + pdxbe->CheckSum = 0; + pdxbe->StackSize = 0; + pdxbe->TimeStamp = 0; + + return XBDM_NOERR; +} + +DMHRAPI DmGetMemory(LPCVOID lpbAddr, DWORD cb, LPVOID lpbBuf, + LPDWORD pcbRet) +{ + DWORD page; + DWORD addr; + LPCSTR lpBuf = (LPCSTR)lpbBuf; + LPSTR lpAddr = (LPSTR)lpbAddr; + BOOL pageValid = TRUE; + + if(!lpbBuf) + return E_INVALIDARG; + + addr = (DWORD)lpbAddr; + page = addr + 0x1000; + + while(pageValid && (addr < (DWORD)lpbAddr + cb)) + { + if((addr ^ page) & 0xFFFFF000) + { + page = addr & 0xFFFFF000; + pageValid = MmIsAddressValid((LPVOID)addr); + } + + if(pageValid) + pageValid = FGetMemory(addr, (PBYTE)lpBuf); + + lpBuf++; + addr++; + } + + if(!pageValid) + return XBDM_MEMUNMAPPED; + + return XBDM_NOERR; +} + +DMHRAPI DmSetMemory(LPVOID lpbAddr, DWORD cb, LPCVOID lpbBuf, + LPDWORD pcbRet) +{ + DWORD page; + DWORD addr; + LPCSTR lpBuf = (LPCSTR)lpbBuf; + LPSTR lpAddr = (LPSTR)lpbAddr; + BOOL pageValid = TRUE; + + if(!lpbBuf) + return E_INVALIDARG; + + addr = (DWORD)lpbAddr; + page = addr + 0x1000; + + while(pageValid && (addr < (DWORD)lpbAddr + cb)) + { + if((addr ^ page) & 0xFFFFF000) + { + page = addr & 0xFFFFF000; + pageValid = MmIsAddressValid((LPVOID)addr); + } + + if(pageValid) + pageValid = FSetMemory(addr, *lpBuf); + + lpBuf++; + addr++; + } + + if(!pageValid) + return XBDM_MEMUNMAPPED; + + return XBDM_NOERR; +} + +typedef struct _DM_WALK_MODULES +{ + LIST_ENTRY Link; + DMN_MODLOAD_EX pdml; +} DM_WALK_MODULES; + +DWORD g_ = 0; +DMHRAPI DmWalkLoadedModules(PDM_WALK_MODULES *ppdwm, PDMN_MODLOAD pdml) +{ + HRESULT hr; + DMN_MODLOAD_EX dml; + + dml.SizeOfStruct = sizeof(DMN_MODLOAD_EX); + + hr = DmWalkLoadedModulesEx(ppdwm, &dml); + + if(pdml) + memcpy(pdml, dml.Name, sizeof(DMN_MODLOAD)); + + return hr; +} + +DMHRAPI DmWalkLoadedModulesEx(PDM_WALK_MODULES *ppdwm, PDMN_MODLOAD_EX pdml) +{ + BYTE irql; + PLIST_ENTRY plemod; + PLIST_ENTRY ple = (PLIST_ENTRY)*ppdwm; + PLDR_DATA_TABLE_ENTRY pldte; + PDM_WALK_MODULES pdwm; + HRESULT hr = XBDM_NOERR; + PIMAGE_NT_HEADERS pinh; + + if(!ppdwm || !pdml) + return E_INVALIDARG; + + if(ple == NULL) + { + // Initialize the list entry + ple = (PLIST_ENTRY)DmAllocatePoolWithTag(sizeof(LIST_ENTRY), 'dmwm'); + + if(!ple) + return E_OUTOFMEMORY; + + InitializeListHead(ple); + + *ppdwm = (PDM_WALK_MODULES)ple; + + irql = KfAcquireSpinLock(g_dmDebug.XexLoadedModuleListLock); + + plemod = g_dmDebug.PsLoadedModuleList->Flink; + while(plemod != g_dmDebug.PsLoadedModuleList) + { + pldte = CONTAINING_RECORD(plemod, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks); + plemod = plemod->Flink; + + pdwm = (PDM_WALK_MODULES)DmAllocatePoolWithTag(sizeof(DM_WALK_MODULES), 'dmwm'); + + if(!pdwm) + { + hr = E_OUTOFMEMORY; + break; + } + + pinh = RtlImageNtHeader(pldte->ImageBase); + + ZeroMemory(pdwm, sizeof(DM_WALK_MODULES)); + + InsertTailList(ple, &pdwm->Link); + + pdwm->pdml.SizeOfStruct = sizeof(DMN_MODLOAD_EX); + + // Fetch ALL the info + pdwm->pdml.BaseAddress = pldte->ImageBase; + pdwm->pdml.CheckSum = pldte->CheckSum; + pdwm->pdml.Flags = 0; + if(!(pinh->FileHeader.Characteristics & 0x20)) + pdwm->pdml.Flags |= DMN_MODFLAG_TLS; + + WideCharToMultiByte(CP_UTF8, 0, pldte->BaseDllName.Buffer, -1, pdwm->pdml.Name, MAX_PATH, NULL, NULL); + pdwm->pdml.OriginalSize = _byteswap_ulong(pinh->OptionalHeader.SizeOfImage); + pdwm->pdml.PDataAddress = RtlImageDirectoryEntryToData(pldte->NtHeadersBase, TRUE, 3, &pdwm->pdml.PDataSize); + pdwm->pdml.Size = pldte->SizeOfNtImage; + pdwm->pdml.ThreadId = 0;//(DWORD)PsGetCurrentThread()->ThreadId; + pdwm->pdml.TimeStamp = pldte->TimeDateStamp; + } + + KfReleaseSpinLock(g_dmDebug.XexLoadedModuleListLock, irql); + + if(FAILED(hr)) + { + DmCloseLoadedModules(*ppdwm); + *ppdwm = NULL; + } + } + + if(NT_SUCCESS(hr)) + { + // Take an entry, copy the data, remove from list, free the memory + ple = ((PLIST_ENTRY)*ppdwm)->Flink; + + if(ple->Flink == ple->Blink) + hr = XBDM_ENDOFLIST; + + memcpy(pdml, &CONTAINING_RECORD(ple, DM_WALK_MODULES, Link)->pdml, sizeof(DMN_MODLOAD_EX)); + + ple->Flink->Blink = ple->Blink; + ple->Blink->Flink = ple->Flink; + + DmFreePool(CONTAINING_RECORD(ple, DM_WALK_MODULES, Link)); + } + + return hr; +} + +DMHRAPI DmCloseLoadedModules(PDM_WALK_MODULES pdwm) +{ + PLIST_ENTRY ple; + PDM_WALK_MODULES pdwm2; + + if(!pdwm) + return E_INVALIDARG; + + ple = ((PLIST_ENTRY)pdwm)->Flink; + while(ple != (PLIST_ENTRY)pdwm) + { + pdwm2 = CONTAINING_RECORD(ple, DM_WALK_MODULES, Link); + + ple->Flink->Blink = ple->Blink; + ple->Blink->Flink = ple->Flink; + ple = ple->Flink; + + DmFreePool(pdwm2); + } + + DmFreePool(pdwm); + + return XBDM_NOERR; +} +typedef struct _DM_WALK_MODSECT +{ + LIST_ENTRY Link; + DMN_SECTIONLOAD pdml; +} DM_WALK_MODSECT; +DMHRAPI DmWalkModuleSections(PDM_WALK_MODSECT *ppWalkModSect, LPCSTR lzModName, PDMN_SECTIONLOAD pSecLoad) +{ + BYTE irql; + PLIST_ENTRY ple = (PLIST_ENTRY)*ppWalkModSect; + PLDR_DATA_TABLE_ENTRY pldte; + HRESULT hr = XBDM_NOERR; + PIMAGE_SECTION_HEADER pish; + DWORD dw; + int i; + + if(!ppWalkModSect || !pSecLoad) + return E_INVALIDARG; + + if(ple == NULL) + { + // Initialize the list entry + ple = (PLIST_ENTRY)DmAllocatePoolWithTag(sizeof(LIST_ENTRY), 'dmwm'); + + if(!ple) + return E_OUTOFMEMORY; + + InitializeListHead(ple); + + *ppWalkModSect = (PDM_WALK_MODSECT)ple; + + irql = KfAcquireSpinLock(g_dmDebug.XexLoadedModuleListLock); + + if(NT_SUCCESS(hr = FGetModuleHandle(lzModName, &pldte, FALSE))) + { + pish = (PIMAGE_SECTION_HEADER)(RtlImageNtHeader(pldte->ImageBase) + 1); + + for(i = 0;pish->Name[0];i++) + { + PDM_WALK_MODSECT pdmwm = (PDM_WALK_MODSECT)DmAllocatePoolWithTag(sizeof(DM_WALK_MODSECT), 'dmwm'); + if(!pdmwm) + { + hr = E_OUTOFMEMORY; + break; + } + + ZeroMemory(pdmwm, sizeof(DM_WALK_MODSECT)); + + InsertTailList(ple, &pdmwm->Link); + + pdmwm->pdml.Index = i + 1; + memcpy(pdmwm->pdml.Name, pish->Name, 8); + pdmwm->pdml.BaseAddress = (PVOID)(_byteswap_ulong(pish->VirtualAddress) + (DWORD)pldte->ImageBase); + pdmwm->pdml.Size = _byteswap_ulong(pish->Misc.VirtualSize); + pdmwm->pdml.Flags = 0; + dw = _byteswap_ulong(pish->Characteristics); + if(dw & 0x40000000) + pdmwm->pdml.Flags |= DMN_SECFLAG_READABLE; + if(dw & 0x80000000) + pdmwm->pdml.Flags |= DMN_SECFLAG_WRITEABLE; + if(dw & 0x20000000) + pdmwm->pdml.Flags |= DMN_SECFLAG_EXECUTABLE; + if(dw & 0x80) + pdmwm->pdml.Flags |= DMN_SECFLAG_UNINITIALIZED; + + pish++; + } + } + KfReleaseSpinLock(g_dmDebug.XexLoadedModuleListLock, irql); + + if(FAILED(hr)) + { + DmCloseModuleSections(*ppWalkModSect); + *ppWalkModSect = FALSE; + } + } + + if(NT_SUCCESS(hr)) + { + // Take an entry, copy the data, remove from list, free the memory + ple = ((PLIST_ENTRY)*ppWalkModSect)->Flink; + + if(ple->Flink == ple->Blink) + hr = XBDM_ENDOFLIST; + + memcpy(pSecLoad, &CONTAINING_RECORD(ple, DM_WALK_MODSECT, Link)->pdml, sizeof(DMN_SECTIONLOAD)); + + ple->Flink->Blink = ple->Blink; + ple->Blink->Flink = ple->Flink; + + DmFreePool(CONTAINING_RECORD(ple, DM_WALK_MODULES, Link)); + } + + return hr; +} + +DMHRAPI DmCloseModuleSections(PDM_WALK_MODSECT pWalkMod) +{ + PLIST_ENTRY ple; + PDM_WALK_MODSECT pdwm2; + + if(!pWalkMod) + return E_INVALIDARG; + + ple = ((PLIST_ENTRY)pWalkMod)->Flink; + while(ple != (PLIST_ENTRY)pWalkMod) + { + pdwm2 = CONTAINING_RECORD(ple, DM_WALK_MODSECT, Link); + + ple->Flink->Blink = ple->Blink; + ple->Blink->Flink = ple->Flink; + ple = ple->Flink; + + DmFreePool(pdwm2); + } + + DmFreePool(pWalkMod); + + return XBDM_NOERR; +} + +DMHRAPI DmReboot(DWORD dwFlags) +{ + return DmRebootEx(dwFlags, NULL, NULL, NULL); +} + +ULONG __stdcall DmBootThread(LPVOID param) +{ + XamLoaderLaunchTitleEx(g_dmGlobals.szBootTitle, g_dmGlobals.szBootPath, g_dmGlobals.szBootCmdLine, 0); + return 0; +} + +BOOL FWouldSystemCrash() +{ + BYTE irql; + PKTHREAD pthr; + PLIST_ENTRY ple; + BOOL fRet = FALSE; + DMTD *pdmtd; + int i; + + irql = KfAcquireSpinLock(g_dmDebug.KeSystemProcess); + + ple = g_dmDebug.KeSystemProcess->ThreadListHead.Flink; + + for(i = 0;i < 2;i++) + { + while(ple != &g_dmDebug.KeSystemProcess->ThreadListHead && ple != &g_dmDebug.KeTitleProcess->ThreadListHead) + { + pthr = CONTAINING_RECORD(ple, KTHREAD, ThreadListEntry); + ple = ple->Flink; + + pdmtd = (DMTD*)pthr->DebugMonitorData; + + if(pdmtd && + (pdmtd->StopReason == DM_EXCEPTION + || pdmtd->StopReason == DM_BREAK + || pdmtd->StopReason == DM_SINGLESTEP + || pdmtd->StopReason == DM_DATABREAK + || pdmtd->StopReason == DM_ASSERT + || pdmtd->StopReason == DM_RIP)) + { + fRet = TRUE; + } + } + + ple = g_dmDebug.KeTitleProcess->ThreadListHead.Flink; + } + + KfReleaseSpinLock(g_dmDebug.KeSystemProcess, irql); + + return fRet; +} + +DMHRAPI DmRebootEx(DWORD dwFlags, LPCSTR szImagePath, LPCSTR szMediaPath, LPCSTR szDbgCmdLine) +{ + char sz[MAX_PATH]; + char szM[MAX_PATH]; + int i, j; +#ifdef _DEBUG + HANDLE h; +#endif + + if((dwFlags & DMBOOT_WAIT) && (dwFlags & DMBOOT_STOP)) + return E_INVALIDARG; + + if(FWouldSystemCrash()) + { + DwChangeExecState(DMN_EXEC_REBOOT, FALSE, TRUE, FALSE); + FStopServ(); + if(KeGetCurrentIrql() >= DISPATCH_LEVEL) + { + HalReturnToFirmware(1); + } + HalReturnToFirmware(6); + } + + g_dmGlobals.dwBootFlags = dwFlags; + + if(szImagePath) + strcpy_s(g_dmGlobals.szBootTitle, sizeof(g_dmGlobals.szBootTitle), szImagePath); + if(szMediaPath) + strcpy_s(g_dmGlobals.szBootPath, sizeof(g_dmGlobals.szBootPath), szMediaPath); + if(szDbgCmdLine) + strcpy_s(g_dmGlobals.szBootCmdLine, sizeof(g_dmGlobals.szBootCmdLine), szDbgCmdLine); + + if(dwFlags & DMBOOT_COLD) + { + DwChangeExecState(DMN_EXEC_REBOOT, FALSE, TRUE, FALSE); + FStopServ(); + + FWriteGlobals(); + + if(KeGetCurrentIrql() >= DISPATCH_LEVEL) + HalReturnToFirmware(1); + + HalReturnToFirmware(6); + } + + if(dwFlags & DMBOOT_TITLE) + { + szImagePath = sz; + szMediaPath = szM; + + if(ExLoadedImageName) + { + strcpy_s(sz, sizeof(sz), ExLoadedImageName); + strcpy_s(szM, sizeof(szM), sz); + + // Parse out the directory + for(i = 0, j = 0;szM[i];i++) + if(szM[i] == '\\' || szM[i] == '//') + j = i; + szM[j] = 0; + } + else + return E_FAIL; + } + + // To make sure we can't get stuck + DwChangeExecState(DMN_EXEC_START, TRUE, FALSE, FALSE); + + DwChangeExecState(DMN_EXEC_REBOOT_TITLE, FALSE, TRUE, FALSE); + +#ifdef _DEBUG + // DEVKIT + ExCreateThread(&h, 0, 0, 0, DmBootThread, 0, 0x400); + SetThreadPriority(h, THREAD_PRIORITY_TIME_CRITICAL); + CloseHandle(h); + + Sleep(200); + +#else + XamLoaderLaunchTitleEx(szImagePath, szMediaPath, szDbgCmdLine, 0); +#endif + + if(KeGetCurrentProcessType() == 1) + ExTerminateThread(-1); // kill off this thread + + return XBDM_NOERR; +} + +LPCSTR ESysSymbolicLinkName = "\\system??\\E:"; +LPCSTR ESymbolicLinkName = "\\??\\E:"; +LPCSTR DEVKITSymbolicLinkName = "\\??\\DEVKIT:"; +LPCSTR DEVKITSysSymbolicLinkName = "\\system??\\DEVKIT:"; +LPCSTR DevkitDeviceName = "\\Device\\Harddisk0\\Partition1\\DEVKIT"; + +DMHRAPI DmMapDevkitDrive() +{ + ANSI_STRING symName, devName; + NTSTATUS st; + + DWORD b = KeGetCurrentProcessType(); + + if(b == 2) + RtlInitAnsiString(&symName, ESysSymbolicLinkName); + else + RtlInitAnsiString(&symName, ESymbolicLinkName); + + RtlInitAnsiString(&devName, DevkitDeviceName); + + st = ObCreateSymbolicLink(&symName, &devName); + + if(st < STATUS_OBJECT_NAME_COLLISION && st < 0) + return (RtlNtStatusToDosError(st) & 0xFFFF) | 0x80070000; + + if(b == 2) + RtlInitAnsiString(&symName, DEVKITSysSymbolicLinkName); + else + RtlInitAnsiString(&symName, DEVKITSymbolicLinkName); + + st = ObCreateSymbolicLink(&symName, &devName); + + if(st < STATUS_OBJECT_NAME_COLLISION && st < 0) + return (RtlNtStatusToDosError(st) & 0xFFFF) | 0x80070000; + + return S_OK; +} + +DMHRAPI DmSetDumpMode(DWORD dwDumpMode) +{ + if(dwDumpMode > DM_DUMPMODE_DISABLED) + return E_INVALIDARG; + + g_dmGlobals.dwDumpMode = dwDumpMode; + g_dmGlobals.bDirty = TRUE; + + return XBDM_NOERR; +} + +DMHRAPI DmGetDumpMode(DWORD * pdwDumpMode) +{ + if(!pdwDumpMode) + return E_INVALIDARG; + + *pdwDumpMode = g_dmGlobals.dwDumpMode; + + return XBDM_NOERR; +} + +HRESULT FGetModuleHandle(LPCSTR ModuleName, PLDR_DATA_TABLE_ENTRY *ppdte, BOOL bSpinLock) +{ + BYTE irql; + PLDR_DATA_TABLE_ENTRY pdte; + PLIST_ENTRY ple; + HRESULT hr = XBDM_NOSUCHFILE; + char sz[MAX_PATH]; + int i; + + if(!ppdte || !ModuleName) + return E_INVALIDARG; + + *ppdte = NULL; + + if(bSpinLock) + irql = KfAcquireSpinLock(g_dmDebug.XexLoadedModuleListLock); + + ple = g_dmDebug.PsLoadedModuleList->Flink; + while(ple != g_dmDebug.PsLoadedModuleList) + { + pdte = CONTAINING_RECORD(ple, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks); + ple = ple->Flink; + + sz[0] = 0; + wcstombs_s(&i, sz, sizeof(sz), pdte->BaseDllName.Buffer, pdte->BaseDllName.Length); + + if(!strnicmp(sz, ModuleName, sizeof(sz))) + { + *ppdte = pdte; + hr = XBDM_NOERR; + break; + } + } + + if(bSpinLock) + KfReleaseSpinLock(g_dmDebug.XexLoadedModuleListLock, irql); + + return hr; +} + +DMHRAPI DmGetThreadContext(DWORD dwThreadId, PXCONTEXT pdmcr) +{ + PKTHREAD pthr; + BYTE irql; + DMTD *pdmtd; + HRESULT hr; + char *stack; + DWORD flags; + + if(!pdmcr) + return E_INVALIDARG; + + if(FAILED(ObLookupAnyThreadByThreadId(dwThreadId, &pthr))) + return XBDM_NOTHREAD; + + irql = KfAcquireSpinLock(&pthr->Process->ThreadListLock); + + flags = pdmcr->ContextFlags; + ZeroMemory(pdmcr, sizeof(XCONTEXT)); + + pdmtd = (DMTD*)pthr->DebugMonitorData; + + if(pdmtd && !(pdmtd->DebugFlags & DMFLAG_DEBUGTHREAD)) + { + stack = (char*)pthr->KernelStack; + + if(pdmtd->Context) + { + if(flags & CONTEXT_INTEGER) + { + pdmcr->ContextFlags |= CONTEXT_INTEGER; + + memcpy(&pdmcr->Gpr0, &pdmtd->Context->Gpr0, ((char*)&pdmcr->Xer - (char*)&pdmcr->Gpr0)); + } + if(flags & CONTEXT_CONTROL) + { + pdmcr->ContextFlags |= CONTEXT_CONTROL; + + memcpy(&pdmcr->Msr, &pdmtd->Context->Msr, ((char*)&pdmcr->Ctr - (char*)&pdmcr->Msr)); + } + if(flags & CONTEXT_FLOATING_POINT) + { + pdmcr->ContextFlags |= CONTEXT_FLOATING_POINT; + + memcpy(&pdmcr->Fpscr, &pdmtd->Context->Fpscr, ((char*)&pdmcr->Fill - (char*)&pdmcr->Fpscr)); + } + if(flags & CONTEXT_VECTOR) + { + pdmcr->ContextFlags |= CONTEXT_VECTOR; + + memcpy(&pdmcr->Vscr[0], &pdmtd->Context->Vscr[0], ((char*)&pdmcr->Vr127[3] - (char*)&pdmcr->Vscr[0])); + } + } + else + { + if(flags & CONTEXT_INTEGER) + { + pdmcr->ContextFlags |= CONTEXT_INTEGER; + + memset(&pdmcr->Gpr0, 0xFF, 0x70); + memcpy(&pdmcr->Gpr14, stack + 0x50, 0x90); + pdmcr->Xer = -1; + pdmcr->Cr = ((LPDWORD)stack)[0x38]; + pdmcr->Gpr1 = (DWORD)stack; + } + if(flags & CONTEXT_CONTROL) + { + pdmcr->ContextFlags |= CONTEXT_CONTROL; + + pdmcr->Msr = -1; + pdmcr->Iar = ((LPDWORD)stack)[0x39]; + pdmcr->Ctr = -1; + pdmcr->Lr = ((LPDWORD)stack)[0x3A]; + } + } + + hr = XBDM_NOERR; + } + else + hr = XBDM_NOTHREAD; + + KfReleaseSpinLock(&pthr->Process->ThreadListLock, irql); + + ObDereferenceObject(pthr); + + return hr; +} + +DMHRAPI DmSetThreadContext(DWORD dwThreadId, PXCONTEXT pdmcr) +{ + BYTE irql; + PKTHREAD pthr; + DMTD *pdmtd; + HRESULT hr = XBDM_NOERR; + + if(!pdmcr) + return E_FAIL; + + if(FAILED(ObLookupAnyThreadByThreadId(dwThreadId, &pthr))) + return XBDM_NOTHREAD; + + irql = KfAcquireSpinLock(&pthr->Process->ThreadListLock); + + pdmtd = (DMTD*)pthr->DebugMonitorData; + + if(pdmtd && !(pdmtd->DebugFlags & DMFLAG_DEBUGTHREAD)) + { + if(pdmtd->Context) + { + if(pdmcr->ContextFlags & CONTEXT_INTEGER) + memcpy(&pdmtd->Context->Gpr0, &pdmcr->Gpr0, ((char*)&pdmcr->Xer - (char*)&pdmcr->Gpr0)); + if(pdmcr->ContextFlags & CONTEXT_CONTROL) + { + if(pdmcr->Msr & 0x400) // Just a quick fix + pdmtd->DebugFlags |= DMFLAG_SINGLESTEP; + + memcpy(&pdmtd->Context->Msr, &pdmcr->Msr, ((char*)&pdmcr->Ctr - (char*)&pdmcr->Msr)); + } + if(pdmcr->ContextFlags & CONTEXT_FLOATING_POINT) + memcpy(&pdmtd->Context->Fpscr, &pdmcr->Fpscr, ((char*)&pdmcr->Fill - (char*)&pdmcr->Fpscr)); + if(pdmcr->ContextFlags & CONTEXT_VECTOR) + memcpy(&pdmtd->Context->Vscr[0], &pdmcr->Vscr[0], ((char*)&pdmcr->Vr127[3] - (char*)&pdmcr->Vscr[0])); + } + else + hr = XBDM_NOTSTOPPED; + } + + KfReleaseSpinLock(&pthr->Process->ThreadListLock, irql); + ObDereferenceObject(pthr); + + return hr; +} + +DMHRAPI DmGetThreadList(LPDWORD rgdwThreads, LPDWORD pcThreads) +{ + BYTE irql; + PLIST_ENTRY ple; + PKTHREAD pthr; + HRESULT hr = XBDM_NOERR; + DWORD cchThreads = 0; + DMTD *pdmtd; + int i; + + if(!rgdwThreads || !pcThreads) + return E_FAIL; + + if(*pcThreads == 0) + return XBDM_BUFFER_TOO_SMALL; + + irql = KfAcquireSpinLock(&g_dmDebug.KeSystemProcess->ThreadListLock); + KeAcquireSpinLockAtRaisedIrql(&g_dmDebug.KeTitleProcess->ThreadListLock); + + ple = g_dmDebug.KeSystemProcess->ThreadListHead.Flink; + for(i = 0;i < 2;i++) + { + while(ple != &g_dmDebug.KeSystemProcess->ThreadListHead && ple != &g_dmDebug.KeTitleProcess->ThreadListHead) + { + pthr = CONTAINING_RECORD(ple, KTHREAD, ThreadListEntry); + ple = ple->Flink; + + if(!pthr->DebugMonitorData) + FInitThreadDebugData(pthr); + + pdmtd = (DMTD*)pthr->DebugMonitorData; + + if(pdmtd && !(pdmtd->DebugFlags & DMFLAG_DEBUGTHREAD)) + { + if(cchThreads++ < *pcThreads) + rgdwThreads[cchThreads - 1] = (DWORD)pthr->ThreadId; + else + hr = XBDM_BUFFER_TOO_SMALL; + } + } + + ple = g_dmDebug.KeTitleProcess->ThreadListHead.Flink; + } + + *pcThreads = cchThreads; + + KeReleaseSpinLockFromRaisedIrql(&g_dmDebug.KeTitleProcess->ThreadListLock); + KfReleaseSpinLock(&g_dmDebug.KeSystemProcess->ThreadListLock, irql); + + return hr; +} + +DMHRAPI DmContinueThread(DWORD dwThreadId, BOOL fException) +{ + PKTHREAD pthr; + BYTE irql; + HRESULT hr = XBDM_NOERR; + DMTD *pdmtd; + + if(dwExecState > 3) + return XBDM_NOTHREAD; + + if(FAILED(ObLookupAnyThreadByThreadId(dwThreadId, &pthr))) + return XBDM_NOTHREAD; + + irql = KfAcquireSpinLock(&pthr->Process->ThreadListLock); + + pdmtd = (DMTD*)pthr->DebugMonitorData; + + if(pdmtd && (pdmtd->DebugFlags & DMFLAG_CONTINUEABLE)) + { + if(fException) + pdmtd->DebugFlags |= DMFLAG_EXCEPTION; + + if(dwExecState != DMN_EXEC_START) + { + if(!(pdmtd->DebugFlags & DMFLAG_STOPPED)) + { + pdmtd->DebugFlags |= DMFLAG_STOPPED; + KeSuspendThread(pthr); + } + } + + pdmtd->DebugFlags &= ~DMFLAG_CONTINUEABLE; + + KeSetEvent(pdmtd->DebugEvent, TRUE, FALSE); + } + else + hr = XBDM_NOTSTOPPED; + + KfReleaseSpinLock(&pthr->Process->ThreadListLock, irql); + + ObDereferenceObject(pthr); + + return hr; +} + +DMHRAPI DmStopOn(DWORD dwStopFlags, BOOL fStop) +{ + // We should probably be synchronizing this for when titles feel like being dicks and not synchronizing + // Oh well :/ + + if(fStop) + g_dmGlobals.dwStopFlags |= dwStopFlags; + else + g_dmGlobals.dwStopFlags &= ~dwStopFlags; + + return XBDM_NOERR; +} + +DMHRAPI DmIsThreadStopped(DWORD dwThreadId, PDM_THREADSTOP pdmts) +{ + PKTHREAD pthr; + DMTD *pdmtd; + BYTE irql; + HRESULT hr = XBDM_NOERR; + + pdmts->NotifiedReason = DM_NONE; + + if(FAILED(ObLookupAnyThreadByThreadId(dwThreadId, &pthr))) + return XBDM_NOTHREAD; + + irql = KfAcquireSpinLock(&pthr->Process->ThreadListLock); + + pdmtd = (DMTD*)pthr->DebugMonitorData; + + if(pdmtd && !(pdmtd->DebugFlags & DMFLAG_DEBUGTHREAD)) + { + if(pdmtd->Exception && (pdmtd->DebugFlags & DMFLAG_CONTINUEABLE)) + { + // Time to play some FIGUREOUTWTFISWRONGWITHTHISTHREAD! + pdmts->NotifiedReason = pdmtd->StopReason; + switch(pdmtd->StopReason) + { + case DM_DEBUGSTR: + case DM_ASSERT: + pdmts->u.DebugStr.ThreadId = dwThreadId; + pdmts->u.DebugStr.String = (LPCSTR)pdmtd->Context->Gpr3; + pdmts->u.DebugStr.Length = (DWORD)pdmtd->Context->Gpr4; + break; + case DM_SINGLESTEP: + case DM_BREAK: + pdmts->u.Break.ThreadId = dwThreadId; + pdmts->u.Break.Address = (PVOID)pdmtd->Context->Iar; + break; + case DM_DATABREAK: + pdmts->u.DataBreak.ThreadId = dwThreadId; + pdmts->u.DataBreak.Address = (PVOID)pdmtd->Context->Iar; + pdmts->u.DataBreak.DataAddress = (PVOID)pdmtd->Exception->ExceptionInformation[1]; + // if FMatchDataBreak + break; + case DM_EXCEPTION: + pdmts->u.Exception.ThreadId = dwThreadId; + pdmts->u.Exception.Address = (PVOID)pdmtd->Context->Iar; + if(pdmtd->DebugFlags & DMFLAG_FIRSTCHANCE) + pdmts->u.Exception.Flags = DM_EXCEPT_FIRSTCHANCE; + else + pdmts->u.Exception.Flags = 0; + + pdmts->u.Exception.Information[0] = pdmtd->Exception->ExceptionInformation[0]; + pdmts->u.Exception.Information[1] = pdmtd->Exception->ExceptionInformation[1]; + break; + } + } + else + hr = XBDM_NOTSTOPPED; + } + else + hr = XBDM_NOTHREAD; + + KfReleaseSpinLock(&pthr->Process->ThreadListLock, irql); + ObDereferenceObject(pthr); + + return hr; +} + +DMHRAPI DmSuspendThread(DWORD dwThreadId) +{ + PKTHREAD pthr; + + if(FAILED(ObLookupAnyThreadByThreadId(dwThreadId, &pthr))) + return XBDM_NOTHREAD; + + KeSuspendThread(pthr); + ObDereferenceObject(pthr); + + return XBDM_NOERR; +} + +DMHRAPI DmResumeThread(DWORD dwThreadId) +{ + PKTHREAD pthr; + + if(FAILED(ObLookupAnyThreadByThreadId(dwThreadId, &pthr))) + return XBDM_NOTHREAD; + + KeResumeThread(pthr); + ObDereferenceObject(pthr); + + return XBDM_NOERR; +} + +DMHRAPI DmGetSystemInfo(PDM_SYSTEM_INFO pdmGetSystemInfo) +{ + if(!pdmGetSystemInfo) + return E_INVALIDARG; + + if(pdmGetSystemInfo->SizeOfStruct != sizeof(DM_SYSTEM_INFO)) + return E_INVALIDARG; + + memcpy(&pdmGetSystemInfo->BaseKernelVersion, &XboxKrnlBaseVersion, sizeof(DM_SYSTEM_INFO)); + memcpy(&pdmGetSystemInfo->KernelVersion, &XboxKrnlVersion, sizeof(DM_SYSTEM_INFO)); + + pdmGetSystemInfo->XDKVersion.Major = 2; + pdmGetSystemInfo->XDKVersion.Minor = 0; + pdmGetSystemInfo->XDKVersion.Build = 20353; + pdmGetSystemInfo->XDKVersion.Qfe = 0; + + pdmGetSystemInfo->dmSystemInfoFlags = (XboxHardwareInfo->Flags & 0x20) ? DM_XBOX_HW_FLAG_HDD : 0; + + return XBDM_NOERR; +} \ No newline at end of file diff --git a/xbdm/dmexports.h b/xbdm/dmexports.h new file mode 100644 index 0000000..b036c50 --- /dev/null +++ b/xbdm/dmexports.h @@ -0,0 +1,30 @@ +/* + Copyright (c) 2013 Nathan LeRoux + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#ifndef _DMEXPORTS_H +#define _DMEXPORTS_H + +// Private exports +PVOID DmAllocatePoolTypeWithTag(ULONG cb, ULONG tag, ULONG type); +HRESULT FGetModuleHandle(LPCSTR ModuleName, PLDR_DATA_TABLE_ENTRY *ppdte, BOOL bSpinLock); + +#endif \ No newline at end of file diff --git a/xbdm/dmglobals.h b/xbdm/dmglobals.h new file mode 100644 index 0000000..5954452 --- /dev/null +++ b/xbdm/dmglobals.h @@ -0,0 +1,145 @@ +/* + Copyright (c) 2013 Nathan LeRoux + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#ifndef _DMGLOBALS_H +#define _DMGLOBALS_H + +#define CONSOLE_COLOR_FLAG_NOSIDECAR 0 // JTAG +#define CONSOLE_COLOR_FLAG_BLACK 1 // DEVKIT +#define CONSOLE_COLOR_FLAG_BLUE 2 // 1GB +#define CONSOLE_COLOR_FLAG_WHITE 4 // TESTKIT + +typedef struct _KEXCEPTION_FRAME +{ + DWORD Status; // 0 + DWORD Unk; // 4 + DWORD Unk2; // 8 + DWORD Unk3; // C + BOOL Continuable; // If the exception can be continued // 10 + DWORD ExceptionInformation[32]; // 14 +} KEXCEPTION_FRAME, *PKEXCEPTION_FRAME; + +typedef BOOL (*pfnTrapHandler)(PKTRAP_FRAME ptf, PKEXCEPTION_FRAME pef, + PCONTEXT pcr, BOOL fSecondChance); + +typedef struct _ldata{ //This is the variable exported on ordinal 1 from dashlaunch + DWORD ID; + DWORD ltype; + char link[MAX_PATH]; + char dev[MAX_PATH]; + USHORT versionMaj; + USHORT versionMin; + USHORT targetKernel; + USHORT reserved; + DWORD options; // for external apps that want to know what dash launch has set/parsed + pfnTrapHandler *DebugRoutine; // for external apps that want to recursively hook and call the first/last chance exception trap on their own + LPDWORD DebugStepPatch; // address to patch single step exception to not be skipped (write 0x60000000/nop to this address to enable it) +} ldata, *pldata; + +// Debug Monitor Global Data +typedef struct _DMGD +{ + BOOL bDirty; // If true, the saved settings will be flushed soon + + BOOL bDashlaunch; // If true, dashlaunch is loaded with the version we want + + pldata pLaunchData; // This is the data taken from dashlaunch + + HMODULE hXam; // xam.xex + HMODULE hKernel; // xboxkrnl.exe + HMODULE hDashlaunch; // launch.xex + + pfnTrapHandler PreviousTrap; // The trap handler that used to be there + + HANDLE pthrServ; // The server thread handle + + BOOL fClockSet; // If the clock was set yet + + BOOL bHasIp; // If we have an ip address + + DWORD dwPid; // Process id + + BOOL bDebugging; // If a debugger is present + DWORD dwDebugPort; // The debugger port + char rgchDebuggerName[256]; // The debugger name + char rgchDebuggerUser[256]; // The debugger user + + DWORD dwStopFlags; // When we should stop + + BOOL bHypervisorEnabled; // If hypervisor expansions are enabled + + // BEGIN_SAVED_SETTINGS + + char rgchDbgName[256]; // The debug name of the xbox + BOOL bDriveMap; // If we map internal drives or not + + DWORD dwConsoleColor; + + BOOL bMagicBoot; // If we are to write the magicboot settings to disk + char szBootTitle[MAX_PATH]; // The path to the title that we want to boot + char szBootPath[MAX_PATH]; // The path that we want to use as game:\\ + char szBootCmdLine[MAX_PATH]; // The command line arguments to pass when we boot + DWORD dwBootFlags; // The flags for when we continue + DWORD dwDumpMode; // What we do if we crash without a debugger attached + + // END_SAVED_SETTINGS +} DMGD, *PDMGD; + +// Debug Monitor Debug Data +typedef struct _DMDD +{ + PKPROCESS KeSystemProcess; // A descriptor for all system threads (spinlock this!) + PKPROCESS KeTitleProcess; // A descriptor for all title threads (spinlock this!) + + PLIST_ENTRY PsLoadedModuleList; // A list of all loaded modules + DWORD *XexLoadedModuleListLock; // Spinlock this before using PsLoadedModuleList +} DMDD, *PDMDD; + +extern DMGD g_dmGlobals; +extern DMDD g_dmDebug; + +#ifdef _DEBUG +typedef struct +{ + DWORD MinVersion; + DWORD Unk; // i dont set this + DWORD XamXbdmRebootRequest; // run this to reboot + DWORD Unk1; + DWORD Unk2; + DWORD Unk3; + DWORD Unk4; + DWORD Unk5; + BYTE szTitle[0x100]; + BYTE szFolder[0x100]; + BYTE szCmdLine[0x100]; +} XAMGLOBALS; +extern XAMGLOBALS g_XamGlobals; +#endif + +// Exports + +// XAM.XEX +typedef NTSTATUS (*pfnXamLoaderLaunchTitleEx)(LPCSTR XexName, LPCSTR MountPath, + LPCSTR CmdLine, DWORD Flags); +pfnXamLoaderLaunchTitleEx XamLoaderLaunchTitleEx; + +#endif \ No newline at end of file diff --git a/xbdm/dmincludes.h b/xbdm/dmincludes.h new file mode 100644 index 0000000..741cb6a --- /dev/null +++ b/xbdm/dmincludes.h @@ -0,0 +1,46 @@ +/* + Copyright (c) 2013 Nathan LeRoux + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#ifndef _DMINCLUDES_H +#define _DMINCLUDES_H + +#include +#include +#include +#include +#include + +#include "ntstatus.h" +#include "file.h" +#include "ini.h" + +#include "hvx.h" + +#include "dmexports.h" +#include "dmglobals.h" +#include "dmnet.h" +#include "dmserv.h" +#include "dmbreak.h" +#include "dmnotify.h" +#include "coz.h" + +#endif \ No newline at end of file diff --git a/xbdm/dmmain.c b/xbdm/dmmain.c new file mode 100644 index 0000000..ef617e9 --- /dev/null +++ b/xbdm/dmmain.c @@ -0,0 +1,214 @@ +// Project started early 2011 +// If you want to get in touch, shoot me an email + +/* + Copyright (c) 2013 Nathan LeRoux + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#include "dmincludes.h" + +DMGD g_dmGlobals; +DMDD g_dmDebug; + +EX_TITLE_TERMINATE_REGISTRATION titleRegistration = { LpTitleTerminateRoutine, 0 }; +EX_THREAD_REGISTRATION threadRegistration = { LpThreadNotificationRoutine, 0 }; + +DWORD _resolve(HMODULE Module, DWORD Export, DWORD off1, DWORD off2) +{ + SHORT t1, t2; + DWORD *f; + + if(FAILED(XexGetProcedureAddress(Module, Export, &f))) + return 0; + + t1 = f[off1] & 0xFFFF; + t2 = f[off2] & 0xFFFF; + + return (t1 << 16) + t2; +} + +VOID ResolveData() +{ + DbgPrint("[xbdm] resolving kernel stuff\n"); + + if(!(g_dmDebug.KeSystemProcess = (PKPROCESS)_resolve(g_dmGlobals.hKernel, 13, 16, 18))) + DbgPrint("[xbdm] unable to resolve KeSystemProcess!\n"); + if(!(g_dmDebug.KeTitleProcess = (PKPROCESS)_resolve(g_dmGlobals.hKernel, 13, 20, 22))) + DbgPrint("[xbdm] unable to resolve KeTitleProcess!\n"); + if(!(g_dmDebug.PsLoadedModuleList = (PLIST_ENTRY)_resolve(g_dmGlobals.hKernel, 412, 9, 11))) + DbgPrint("[xbdm] unable to resolve PsLoadedModuleList!\n"); + if(!(g_dmDebug.XexLoadedModuleListLock = (LPDWORD)_resolve(g_dmGlobals.hKernel, 412, 3, 5))) + DbgPrint("[xbdm] unable to resolve XexLoadedModuleListLock!\n"); + + DbgPrint("[xbdm] resolving xam exports\n"); + XexGetProcedureAddress(g_dmGlobals.hXam, 421, &XamLoaderLaunchTitleEx); +} + +BOOL DmDllMain() +{ +#ifdef _DEBUG + DWORD nop = 0x60000000; +#endif + +#ifdef _DEBUG + DbgPrint("[xbdm] please attach windbg\n"); + DebugBreak(); +#endif + + DbgPrint("[xbdm] hi cOz!\n"); + + DbgPrint("[xbdm] zeroing out initial global state\n"); + ZeroMemory(&g_dmGlobals, sizeof(g_dmGlobals)); + + DbgPrint("[xbdm] initializing breakpoint data\n"); + DmpBreakSpinLock = 0; + InitializeListHead(&leBreaks); + ZeroMemory(&HardwareBreakpoint, sizeof(DMHB)); + +#ifdef _DEBUG + DbgPrint("[xbdm] patching MmIsAddressValid (DEVKIT)\n"); + DmSetMemory((LPVOID)0x80096B58, 4, &nop, NULL); + DmSetMemory((LPVOID)0x80096B08, 4, &nop, NULL); + DmSetMemory((LPVOID)0x80096C04, 4, &nop, NULL); + DmSetMemory((LPVOID)0x80096BB0, 4, &nop, NULL); + DmSetMemory((LPVOID)0x80096A88, 4, &nop, NULL); + DmSetMemory((LPVOID)0x80096B7C, 4, &nop, NULL); +#endif + + // Setup the exception data + DbgPrint("[xbdm] initializing exception data\n"); + ExceptionStack = MmCreateKernelStack(0x8000, 2); // 8kb stack for exceptions + ExceptionStackTitle = MmCreateKernelStack(0x8000, 2); + InitializeCriticalSection(&csExceptionStack); + InitializeCriticalSection(&csExceptionStackTitle); + InitializeCriticalSection(&csExecState); + + DbgPrint("[xbdm] initializing debug monitor thread data\n"); +#if 0 + InitializeCriticalSection(&csDebugMonitorData); + leDebugMonitorData.Flink = leDebugMonitorData.Blink = &leDebugMonitorData; +#endif + FInitThreadDebugData(PsGetCurrentThread()); + + DbgPrint("[xbdm] initializing notifications\n"); + InitializeCriticalSection(&csNotify); + InitializeListHead(¬ifyList); + InitializeListHead(¬ifySockList); + InitializeListHead(¬ifyQueue); + dwNotifyQueue = 0; + notifyQueueLock = 0; + + DbgPrint("[xbdm] registering notifications\n"); + ExRegisterThreadNotification(&threadRegistration, TRUE); + ExRegisterTitleTerminateNotification(&titleRegistration, TRUE); + + if(FAILED(XexGetModuleHandle("xboxkrnl.exe", &g_dmGlobals.hKernel))) + { + DbgPrint("[xbdm] Failed to get kernel handle\n"); + DebugBreak(); + return FALSE; + } + if(FAILED(XexGetModuleHandle("xam.xex", &g_dmGlobals.hXam))) + { + DbgPrint("[xbdm] Failed to get xam handle\n"); + DebugBreak(); + return FALSE; + } + if(FAILED(XexGetModuleHandle("launch.xex", &g_dmGlobals.hDashlaunch))) + { + DbgPrint("[xbdm] Failed to get dashlaunch handle\n"); + + // Only fail in jtag build +#ifndef _DEBUG + DebugBreak(); + return FALSE; +#else + DbgPrint("[xbdm] hooking the trap handler (DEVKIT)\n"); + + g_dmGlobals.PreviousTrap = *(pfnTrapHandler*)0x801C1B64; + *(pfnTrapHandler*)0x801C1B64 = DmTrapHandler; // DEVKIT 13599/20871.2 +#endif + } + else if(FAILED(XexGetProcedureAddress(g_dmGlobals.hDashlaunch, 1, &g_dmGlobals.pLaunchData))) + { + DbgPrint("[xbdm] Failed to get dashlaunch export\n"); + + // Only fail in jtag build +#ifndef _DEBUG + DebugBreak(); + return FALSE; +#endif + } + else if(*(DWORD*)(&g_dmGlobals.pLaunchData->versionMaj) < 0x00020018) + DbgPrint("[xbdm] dashlaunch version %i.%i is not supported\n", g_dmGlobals.pLaunchData->versionMaj, g_dmGlobals.pLaunchData->versionMin); + else + { + DbgPrint("[xbdm] dashlaunch version %i.%i supported\n", g_dmGlobals.pLaunchData->versionMaj, g_dmGlobals.pLaunchData->versionMin); + + g_dmGlobals.bDashlaunch = TRUE; + + // Enable single step exceptions + DbgPrint("[xbdm] enabling single step exceptions\n"); + *g_dmGlobals.pLaunchData->DebugStepPatch = 0x60000000; + + DbgPrint("[xbdm] hooking the trap handler\n"); + g_dmGlobals.PreviousTrap = *g_dmGlobals.pLaunchData->DebugRoutine; + *g_dmGlobals.pLaunchData->DebugRoutine = DmTrapHandler; + DbgPrint("[xbdm] handler is hooked\n"); + } + +#ifdef _DEBUG + strcpy(g_dmGlobals.rgchDbgName, "XeDevkit"); // XeDevkit is default name for debug (aka devkit testing) +#else + strcpy(g_dmGlobals.rgchDbgName, "Jtag"); // Jtag is default name for release (aka jtag) +#endif + + FLoadGlobals(); + FWriteGlobals(); // Force ini creation + + ResolveData(); + + DbgPrint("[xbdm] installing hypervisor expansion\n"); + if(NT_SUCCESS(HvInitialize())) + g_dmGlobals.bHypervisorEnabled = TRUE; + + DbgPrint("[xbdm] starting server\n"); + + // lets just pull 16kb of stack for fun or something + if(FAILED(ExCreateThread(&g_dmGlobals.pthrServ, 0x10000, NULL, NULL, ServerThread, NULL, 0x040004A6))) + { + DbgPrint("[xbdm] Failed to startup server\n"); +#ifdef _DEBUG + DebugBreak(); + return FALSE; +#endif + } + + return TRUE; +} + +BOOL APIENTRY DllMain(HANDLE hModule, DWORD dwReason, LPVOID lpReserved) +{ + if(dwReason == DLL_PROCESS_ATTACH) + return DmDllMain(); + + return TRUE; +} \ No newline at end of file diff --git a/xbdm/dmnet.h b/xbdm/dmnet.h new file mode 100644 index 0000000..8543754 --- /dev/null +++ b/xbdm/dmnet.h @@ -0,0 +1,69 @@ +/* + Copyright (c) 2013 Nathan LeRoux + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#ifndef _DMNET_H +#define _DMNET_H + +#define SO_DECRYPTSOCK 0x5801 // Decrypt the socket + +#define DMNETWORK 2 // System (Title IP, supports WIFI) + +// Some xam exports +SOCKET NetDll_accept(int Network, SOCKET s, struct sockaddr FAR *addr, int FAR *addrlen); +int NetDll_bind(int Network, SOCKET s, const struct sockaddr FAR *name, int namelen); +int NetDll_connect(int Network, SOCKET s, const struct sockaddr FAR *name, int namelen); +int NetDll_closesocket(int Network, SOCKET s); +int NetDll_getpeername(int Network, SOCKET s, struct sockaddr FAR *name, int FAR *namelen); +int NetDll_getsockname(int Network, SOCKET s, struct sockaddr FAR *name, int FAR *namelen); +int NetDll_getsockopt(int Network, SOCKET s, int level, int optname, char FAR *optval, int FAR *optlen); +int NetDll_listen(int Network, SOCKET s, int backlog); +int NetDll_recv(int Network, SOCKET s, char FAR *buf, int len, int flags); +int NetDll_recvfrom(int Network, SOCKET s, char FAR *buf, int len, int flags, struct sockaddr FAR *from, int FAR *fromlen); +int NetDll_select(int Network, int nfds, fd_set FAR *readfds, fd_set FAR *writefds, fd_set FAR *exceptfds, const struct timeval FAR *timeout); +int NetDll_send(int Network, SOCKET s, const char FAR *buf, int len, int flags); +int NetDll_sendto(int Network, SOCKET s, const char FAR *buf, int len, int flags, const struct sockaddr FAR *to, int tolen); +int NetDll_setsockopt(int Network, SOCKET s, int level, int optname, char FAR *optval, int optlen); +int NetDll_shutdown(int Network, SOCKET s, int how); +SOCKET NetDll_socket(int Network, int af, int type, int protocol); +void NetDll_XnpNoteSystemTime(int Network); + +int NetDll_WSASend(int Network, SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, LPDWORD lpNumberOfBytesSent, DWORD dwFlags, + LPWSAOVERLAPPED lpOverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine); + +#define accept(s, addr, addrlen) NetDll_accept(DMNETWORK, s, addr, addrlen) +#define bind(s, name, namelen) NetDll_bind(DMNETWORK, s, name, namelen) +#define connect(s, name, namelen) NetDll_connect(DMNETWORK, s, name, namelen) +#define closesocket(s) NetDll_closesocket(DMNETWORK, s) +#define getpeername(s, name, namelen) NetDll_getpeername(DMNETWORK, s, name, namelen) +#define getsockname(s, name, namelen) NetDll_getsockname(DMNETWORK, s, name, namelen) +#define listen(s, backlog) NetDll_listen(DMNETWORK, s, backlog) +#define recv(s, buf, len, flags) NetDll_recv(DMNETWORK, s, buf, len, flags) +#define recvfrom(s, buf, len, flags, from, fromlen) NetDll_recvfrom(DMNETWORK, s, buf, len, flags, from, fromlen) +#define select(nfds, readfds, writefds, exceptfds, timeout) NetDll_select(DMNETWORK, nfds, readfds, writefds, exceptfds, timeout) +#define send(s, buf, len, flags) NetDll_send(DMNETWORK, s, buf, len, flags) +#define sendto(s, buf, len, flags, to, tolen) NetDll_sendto(DMNETWORK, s, buf, len, flags, to, tolen) +#define setsockopt(s, level, optname, optval, optlen) NetDll_setsockopt(DMNETWORK, s, level, optname, optval, optlen) +#define shutdown(s, how) NetDll_shutdown(DMNETWORK, s, how) +#define socket(af, type, protocol) NetDll_socket(DMNETWORK, af, type, protocol) +#define XnpNoteSystemTime() NetDll_XnpNoteSystemTime(DMNETWORK) + +#endif \ No newline at end of file diff --git a/xbdm/dmnotify.c b/xbdm/dmnotify.c new file mode 100644 index 0000000..fb16b49 --- /dev/null +++ b/xbdm/dmnotify.c @@ -0,0 +1,493 @@ +/* + Copyright (c) 2013 Nathan LeRoux + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#include "dmincludes.h" + +CRITICAL_SECTION csNotify; +LIST_ENTRY notifyList, notifySockList, notifyQueue; +DWORD dwNotifyQueue, notifyQueueLock; +BOOL bProcessingNotifications = FALSE; + +#define DM_TITLESESSION 1 + +DMHRAPI DmOpenNotificationSession(DWORD dwFlags, PDMN_SESSION *pSession) +{ + if(!pSession) + return E_INVALIDARG; + + ASSERT(KeGetCurrentIrql() == PASSIVE_LEVEL); + + if(KeGetCurrentProcessType() == 1) + dwFlags |= DM_TITLESESSION; + + *pSession = (PDMN_SESSION)DmAllocatePoolWithTag(sizeof(DMN_SESSION), 'dmns'); + + if(!*pSession) + return E_OUTOFMEMORY; + + EnterCriticalSection(&csNotify); + + ZeroMemory(*pSession, sizeof(DMN_SESSION)); + + InsertHeadList(¬ifyList, &(*pSession)->Link); + + LeaveCriticalSection(&csNotify); + + return XBDM_NOERR; +} + +DMHRAPI DmCloseNotificationSession(PDMN_SESSION Session) +{ + if(Session == NULL) + return E_INVALIDARG; + + EnterCriticalSection(&csNotify); + + RemoveEntryList(&Session->Link); + + DmFreePool(Session); + + LeaveCriticalSection(&csNotify); + + return XBDM_NOERR; +} + +BOOL FGetNotifySz(ULONG dwNotification, ULONG_PTR ulpParam, CHAR *sz, int cch) +{ + int i, j, k, l; + char *str; + BOOL fRet = TRUE; + + ZeroMemory(sz, cch); + +#define pdmct ((PDMN_CREATETHREAD)ulpParam) +#define pdmds ((PDMN_DEBUGSTR)ulpParam) +#define pdme ((PDMN_EXCEPTION)ulpParam) +#define pdmb ((PDMN_BREAK)ulpParam) +#define pdmdb ((PDMN_DATABREAK)ulpParam) +#define pdmm ((PDMN_MODLOAD_EX)ulpParam) + + switch(dwNotification & DM_NOTIFICATIONMASK) + { + case DM_CREATETHREAD: + RtlSprintf(sz, "create thread=0x%08x start=0x%08x", pdmct->ThreadId, pdmct->StartAddress); + break; + case DM_DESTROYTHREAD: + RtlSprintf(sz, "terminate thread=0x%08x", ulpParam); + break; + case DM_DEBUGSTR: + for(i = 0,j = 0,k = 0,l = 0;i < (int)pdmds->Length;i++) + { + BOOL lf = FALSE; + + if(pdmds->String[i] == '\n') + lf = TRUE; + + if((i == pdmds->Length - 1) || lf) + { + if(k == 0) + k = RtlSnprintf(sz, cch, "debugstr thread=0x%08x %sstring=", + pdmds->ThreadId, lf ? "lf " : ""); + else + k += RtlSnprintf(sz + k, cch - k, "\r\ndebugstr thread=0x%08x %sstring=", + pdmds->ThreadId, lf ? "lf " : ""); + + for(j = k;l <= i && j < cch;l++) + { + if(pdmds->String[l] != '\r' + && pdmds->String[l] != '\n') + { + sz[j] = pdmds->String[l]; + j++; + } + } + + j = i + 1; + l = j; + } + } + break; + case DM_EXEC: + switch(ulpParam) + { + case DMN_EXEC_PENDING: + strcpy(sz, "execution pending"); + break; + case DMN_EXEC_STOP: + strcpy(sz, "execution stopped"); + break; + case DMN_EXEC_START: + strcpy(sz, "execution started"); + break; + case DMN_EXEC_PENDING_TITLE: + strcpy(sz, "execution pending_title"); + break; + case DMN_EXEC_REBOOT_TITLE: + strcpy(sz, "execution reboot_title"); + break; + case DMN_EXEC_REBOOT: + strcpy(sz, "execution rebooting"); + break; + default: + strcpy(sz, "null"); + break; + } + break; + case DM_EXCEPTION: + RtlSprintf(sz, "exception code=0x%08x thread=0x%08x address=0x%08x", + pdme->Code, pdme->ThreadId, pdme->Address); + if(pdme->Code == STATUS_ACCESS_VIOLATION) + RtlSprintf(sz + strlen(sz), " %s=0x%08x", pdme->Information[0] == 0 ? "read" : "write", pdme->Information[1]); + else + RtlSprintf(sz + strlen(sz), " nparam=%lu params=0x%08x", pdme->Information[0], pdme->Information[1]); + + if(pdme->Flags & DM_EXCEPT_FIRSTCHANCE) + strcat(sz, " first"); + if(pdme->Flags & DM_EXCEPT_NONCONTINUABLE) + strcat(sz, " noncont"); + + break; + case DM_BREAK: + RtlSprintf(sz, "break addr=0x%08x thread=0x%08x", pdmb->Address, pdmb->ThreadId); + break; + case DM_DATABREAK: + if(pdmdb->BreakType == DMBREAK_READ) + str = "read"; + else if(pdmdb->BreakType == DMBREAK_WRITE || pdmdb->BreakType == DMBREAK_READWRITE) + str = "readwrite"; + else + str = "execute"; + RtlSprintf(sz, "data %s=0x%08x addr=0x%08x thread=0x%08x", str, pdmdb->DataAddress, pdmdb->ThreadId); + break; + case DM_SINGLESTEP: + RtlSprintf(sz, "singlestep addr=0x%08x thread=0x%08x", pdmb->Address, pdmb->ThreadId); + break; + case DM_MODLOAD: + RtlSprintf(sz, "modload name=\"%s\" base=0x%08x size=0x%08x check=0x%08x timestamp=0x%08x pdata=0x%08x psize=0x%08x thread=0x%08x osize=0x%08x", + pdmm->Name, pdmm->BaseAddress, pdmm->Size, pdmm->CheckSum, pdmm->TimeStamp, pdmm->PDataAddress, pdmm->PDataSize, pdmm->ThreadId, pdmm->OriginalSize); + break; + case DM_MODUNLOAD: + RtlSprintf(sz, "modunload name=\"%s\" base=0x%08x size=0x%08x", pdmm->Name, pdmm->BaseAddress, pdmm->Size); + break; + default: + strcpy(sz, "null"); + fRet = FALSE; + } + + if(dwNotification & DM_STOPTHREAD) + strcat(sz, " stop"); + + return fRet; + +#undef pdmct +#undef pdmds +#undef pdme +#undef pdmb +#undef pdmdb +#undef pdmm +} + +VOID NotifyRemoteComponents(ULONG dwNotification, ULONG_PTR ulpParam) +{ + PDMN_NOTIFYSOCK sock; + PLIST_ENTRY ple; + char sz[0x200]; + + FGetNotifySz(dwNotification, ulpParam, sz, sizeof(sz)); + + KeEnterCriticalRegion(); + EnterCriticalSection(&csNotify); + + ple = notifySockList.Flink; + while(ple != ¬ifySockList) + { + sock = CONTAINING_RECORD(ple, DMN_NOTIFYSOCK, Link); + ple = ple->Flink; + + if(FSendLine(sock->s, sz) <= 0) + { + shutdown(sock->s, SD_BOTH); + closesocket(sock->s); + RemoveEntryList(&sock->Link); + } + } + + LeaveCriticalSection(&csNotify); + KeLeaveCriticalRegion(); +} + +VOID NotifyLocalComponents(ULONG dwNotification, ULONG_PTR ulpParam) +{ + PDMN_SESSION Session; + PLIST_ENTRY ple; + BOOL term = FALSE; + + EnterCriticalSection(&csNotify); + + ple = notifyList.Flink; + while(ple != ¬ifyList) + { + Session = CONTAINING_RECORD(ple, DMN_SESSION, Link); + ple = ple->Flink; + + if(Session->pNotifyFuncs[dwNotification - 1]) + Session->pNotifyFuncs[dwNotification - 1](dwNotification, ulpParam); + } + + LeaveCriticalSection(&csNotify); +} + +VOID ProcessQueuedNotifications() +{ + PLIST_ENTRY ple; + PDMN_NOTIFYQUEUE pdmq; + + while(InterlockedCompareExchangeAcquire((PLONG)¬ifyQueueLock, (LONG)PsGetCurrentThread(), 0) == 0); + + ple = notifyQueue.Flink; + while(ple != ¬ifyQueue) + { + pdmq = CONTAINING_RECORD(ple, DMN_NOTIFYQUEUE, Link); + ple = ple->Flink; + dwNotifyQueue--; + RemoveEntryList(&pdmq->Link); + + NotifyRemoteComponents(pdmq->dwNotification, pdmq->ulpParam); + + switch(pdmq->dwNotification) + { + case DM_DEBUGSTR: + if(((PDMN_DEBUGSTR)pdmq->ulpParam)->String) + DmFreePool((PVOID)((PDMN_DEBUGSTR)pdmq->ulpParam)->String); + break; + } + + DmFreePool(pdmq); + } + + bProcessingNotifications = FALSE; + + InterlockedCompareExchangeRelease((PLONG)¬ifyQueueLock, 0, (LONG)PsGetCurrentThread()); +} + +VOID FQueueNotification(ULONG dwNotification, ULONG_PTR ulpParam) +{ + BOOL bError = FALSE; + PDMN_DEBUGSTR pdmds; + PDMN_MODLOAD pdml; + PDMN_CREATETHREAD pdmct; + PDMN_THREADSWITCH pdmts; + PDMN_NOTIFYQUEUE pdmq; + + // We will only pass along information stuff + if(dwNotification == DM_EXCEPTION) + return; + + pdmq = (PDMN_NOTIFYQUEUE)DmAllocatePoolTypeWithTag(sizeof(DMN_NOTIFYQUEUE), 'dmns', 2); + + if(!pdmq) + return; + + pdmq->dwNotification = dwNotification; + + switch(dwNotification) + { + case DM_EXEC: + case DM_DESTROYTHREAD: + pdmq->ulpParam = ulpParam; + break; + case DM_DEBUGSTR: + pdmds = (PDMN_DEBUGSTR)DmAllocatePoolTypeWithTag(sizeof(DMN_DEBUGSTR), 'dmns', 2); + pdmq->ulpParam = (ULONG_PTR)pdmds; + + if(!pdmds) + bError = TRUE; + else + { + pdmds->Length = ((PDMN_DEBUGSTR)ulpParam)->Length; + pdmds->ThreadId = ((PDMN_DEBUGSTR)ulpParam)->ThreadId; + + pdmds->String = (LPCSTR)DmAllocatePoolTypeWithTag(pdmds->Length, 'dmns', 2); + + if(!pdmds->String) + { + bError = TRUE; + DmFreePool(pdmds); + } + else + memcpy((char*)pdmds->String, ((PDMN_DEBUGSTR)ulpParam)->String, pdmds->Length); + } + break; + case DM_MODLOAD: + case DM_MODUNLOAD: + pdml = (PDMN_MODLOAD)DmAllocatePoolTypeWithTag(sizeof(DMN_MODLOAD), 'dmns', 2); + pdmq->ulpParam = (ULONG_PTR)pdml; + + if(!pdml) + bError = TRUE; + else + memcpy(pdml, (PVOID)ulpParam, sizeof(DMN_MODLOAD)); + + break; + case DM_CREATETHREAD: + pdmct = (PDMN_CREATETHREAD)DmAllocatePoolTypeWithTag(sizeof(DMN_CREATETHREAD), 'dmns', 2); + pdmq->ulpParam = (ULONG_PTR)pdmct; + + if(!pdmct) + bError = TRUE; + else + memcpy(pdmct, (PVOID)ulpParam, sizeof(DMN_CREATETHREAD)); + + break; + case DM_THREADSWITCH: + pdmts = (PDMN_THREADSWITCH)DmAllocatePoolTypeWithTag(sizeof(DMN_THREADSWITCH), 'dmns', 2); + pdmq->ulpParam = (ULONG_PTR)pdmts; + + if(!pdmts) + bError = TRUE; + else + memcpy(pdmts, (PVOID)ulpParam, sizeof(DMN_THREADSWITCH)); + + break; + default: + bError = TRUE; + } + + if(bError) + { + DmFreePool(pdmq); + } + else + { + while(InterlockedCompareExchangeAcquire((PLONG)¬ifyQueueLock, (LONG)PsGetCurrentThread(), 0) == 0); + + InsertHeadList(¬ifyQueue, &pdmq->Link); + dwNotifyQueue++; + + InterlockedCompareExchangeRelease((PLONG)¬ifyQueueLock, 0, (LONG)PsGetCurrentThread()); + } +} + +DMHRAPI FNotify(ULONG dwNotification, ULONG_PTR ulpParam) +{ + if(((dwNotification & DM_NOTIFICATIONMASK) == 0) || ((dwNotification & DM_NOTIFICATIONMASK) > DM_NOTIFYMAX)) + return E_INVALIDARG; + + if(KeGetCurrentIrql() <= DISPATCH_LEVEL) + NotifyLocalComponents(dwNotification, ulpParam); + + if(KeGetCurrentIrql() == PASSIVE_LEVEL) + NotifyRemoteComponents(dwNotification, ulpParam); + else if(KeGetCurrentIrql() <= DISPATCH_LEVEL) + FQueueNotification(dwNotification, ulpParam); + + return XBDM_NOERR; +} + +DMHRAPI DmNotify(PDMN_SESSION Session, DWORD dwNotification, PDM_NOTIFY_FUNCTION pfnHandler) +{ + int i; + + if(Session == NULL || dwNotification > DM_NOTIFYMAX) + return E_INVALIDARG; + + EnterCriticalSection(&csNotify); + + if(dwNotification == DM_NONE) + { + // We want to unregister something + if(pfnHandler) + { + for(i = 0;i < DM_NOTIFYMAX - 1;i++) + if(Session->pNotifyFuncs[i] == pfnHandler) + Session->pNotifyFuncs[i] = NULL; + } + else + { + // Unregister ALL the functions! + for(i = 0;i < DM_NOTIFYMAX - 1;i++) + Session->pNotifyFuncs[i] = NULL; + } + } + else // We want to register something + Session->pNotifyFuncs[dwNotification - 1] = pfnHandler; + + LeaveCriticalSection(&csNotify); + + return XBDM_NOERR; +} + +DMHRAPI FDropNotifySock(DWORD Port) +{ + PDMN_NOTIFYSOCK sock; + PLIST_ENTRY ple; + + EnterCriticalSection(&csNotify); + + ple = notifySockList.Flink; + while(ple != ¬ifySockList) + { + sock = CONTAINING_RECORD(ple, DMN_NOTIFYSOCK, Link); + ple = ple->Flink; + + if(sock->port == Port) + { + shutdown(sock->s, SD_BOTH); + closesocket(sock->s); + + RemoveEntryList(&sock->Link); + + DmFreePool(sock); + } + } + + LeaveCriticalSection(&csNotify); + + return XBDM_NOERR; +} + +DMHRAPI FConvertToNotifySock(PDMCONN Connection, DWORD Port) +{ + PDMN_NOTIFYSOCK sock; + char sz[0x200]; + + sock = (PDMN_NOTIFYSOCK)DmAllocatePoolWithTag(sizeof(DMN_NOTIFYSOCK), 'dmdb'); + + if(!sock) + return E_OUTOFMEMORY; + + sock->s = Connection->s; + sock->port = Port; + Connection->bKeepAlive = TRUE; + Connection->bShutdown = TRUE; + + EnterCriticalSection(&csNotify); + InsertHeadList(¬ifySockList, &sock->Link); + LeaveCriticalSection(&csNotify); + + FGetNotifySz(DM_EXEC, dwExecState, sz, sizeof(sz)); + + FSendLine(sock->s, "205- now a notification channel"); + FSendLine(sock->s, sz); + + return XBDM_NOERR; +} \ No newline at end of file diff --git a/xbdm/dmnotify.h b/xbdm/dmnotify.h new file mode 100644 index 0000000..5797d04 --- /dev/null +++ b/xbdm/dmnotify.h @@ -0,0 +1,58 @@ +/* + Copyright (c) 2013 Nathan LeRoux + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#ifndef _DMNOTIFY_H +#define _DMNOTIFY_H + +typedef struct _DMN_SESSION +{ + DWORD dwFlags; + LIST_ENTRY Link; + PDM_NOTIFY_FUNCTION pNotifyFuncs[DM_NOTIFYMAX - 1]; +} DMN_SESSION, *PDMN_SESSION; + +typedef struct _DMN_NOTIFYSOCK +{ + SOCKET s; + LIST_ENTRY Link; + DWORD port; +} DMN_NOTIFYSOCK, *PDMN_NOTIFYSOCK; + +typedef struct _DMN_NOTIFYQUEUE +{ + DWORD dwNotification; + ULONG_PTR ulpParam; + LIST_ENTRY Link; +} DMN_NOTIFYQUEUE, *PDMN_NOTIFYQUEUE; + +DMHRAPI FNotify(ULONG dwNotification, ULONG_PTR ulpParam); + +DMHRAPI FConvertToNotifySock(PDMCONN Connection, DWORD Port); +DMHRAPI FDropNotifySock(DWORD Port); +VOID ProcessQueuedNotifications(); +BOOL FGetNotifySz(ULONG dwNotification, ULONG_PTR ulpParam, CHAR *sz, int cch); + +extern CRITICAL_SECTION csNotify; +extern LIST_ENTRY notifyList, notifySockList, notifyQueue; +extern DWORD dwNotifyQueue, notifyQueueLock; + +#endif \ No newline at end of file diff --git a/xbdm/dmserv.c b/xbdm/dmserv.c new file mode 100644 index 0000000..5ed3ded --- /dev/null +++ b/xbdm/dmserv.c @@ -0,0 +1,3630 @@ +/* + Copyright (c) 2013 Nathan LeRoux + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#include "dmincludes.h" + +DMCONN rgdmc[CONNECTION_MAX]; +SOCKET sockServ, sockName; + +const char rgchHex[] = "0123456789ABCDEF"; +char *rgszDumpMode[] = { "smart", "enabled", "disabled" }; + +/* BEGIN MICROSOFT CODE */ + +int SgnCompareRgch(const char *sz1, const char *sz2, int cch) +{ + while(cch-- && *sz1) { + char ch1 = *sz1++; + char ch2 = *sz2++; + if(ch1 >= 'a' && ch2 <= 'z') + ch1 -= 32; + if(ch2 >= 'a' && ch2 <= 'z') + ch2 -= 32; + if(ch1 != ch2) + return ch1 - ch2; + } + if(*sz1) + return *sz1; + return cch < 0 ? 0 : -*sz2; +} + +BOOL FEqualRgch(const char *sz1, const char *sz2, int cch) +{ + return SgnCompareRgch(sz1, sz2, cch) == 0; +} + +DWORD DwHexFromSz(LPCSTR sz, LPCSTR *szOut) +{ + DWORD dw = 0; + + for(;;) { + if(*sz >= '0' && *sz <= '9') + dw = dw * 16 + (*sz - '0'); + else if(*sz >= 'A' && *sz <= 'F') + dw = dw * 16 + (*sz - 'A' + 10); + else if(*sz >= 'a' && *sz <= 'f') + dw = dw * 16 + (*sz - 'a' + 10); + else + break; + ++sz; + } + if(szOut) + *szOut = sz; + return dw; +} + +DWORD DwFromSz(LPCSTR sz, int *pcchUsed) +{ + DWORD dw = 0; + LPCSTR szStart = sz; + + /* Process decimal, octal, or hex */ + if(*sz == '0') { + ++sz; + if(*sz == 'x') + dw = DwHexFromSz(++sz, &sz); + else + while(*sz >= '0' && *sz <= '7') + dw = dw * 8 + (*sz++ - '0'); + } else + while(*sz >= '0' && *sz <= '9') + dw = dw * 10 + (*sz++ - '0'); + if(pcchUsed) + *pcchUsed = sz - szStart; + return dw; +} + +__inline BOOL FIsSpace(char ch) +{ + return ch == ' ' || ch == '\015' || ch == 0; +} + +const char *PchGetParam(LPCSTR szCmd, LPCSTR szKey, BOOL fNeedValue) +{ + const char *pchTok; + int cchTok; + BOOL fQuote = FALSE; + + /* Skip the command */ + for(pchTok = szCmd; !FIsSpace(*pchTok); ++pchTok); + + while(*pchTok) { + /* Skip leading spaces */ + while(*pchTok && FIsSpace(*pchTok)) + ++pchTok; + if(!*pchTok) + return NULL; + for(cchTok = 0; !FIsSpace(pchTok[cchTok]); ++cchTok) { + if(pchTok[cchTok] == '=') { + if(FEqualRgch(szKey, pchTok, cchTok)) + return pchTok + cchTok + 1; /* Skip the '=' */ + break; + } + } + /* If we didn't see the '=' we need to check anyway */ + if(!fNeedValue && pchTok[cchTok] != '=' && FEqualRgch(szKey, pchTok, + cchTok)) + return pchTok + cchTok; + /* No match, so we need to skip past the value */ + pchTok += cchTok; + while(*pchTok && (!FIsSpace(*pchTok) || fQuote)) + if(*pchTok++ == '"') + fQuote = !fQuote; + } + return NULL; +} + +void GetParam(LPCSTR szLine, LPSTR szBuf, int cchBuf) +{ + int cch = 0; + BOOL fQuote = FALSE; + + while(cch < cchBuf-1 && *szLine && (!FIsSpace(*szLine) || fQuote)) { + if(*szLine == '"') { + if(fQuote && szLine[1] == '"') { + /* Double quote inside a string gets copied as a single + * quote */ + szBuf[cch++] = '"'; + szLine += 2; + } else { + fQuote = !fQuote; + ++szLine; + } + } else + szBuf[cch++] = *szLine++; + } + szBuf[cch] = 0; +} + +BOOL FGetSzParam(LPCSTR szLine, LPCSTR szKey, LPSTR szBuf, int cchBuf) +{ + LPCSTR pch = PchGetParam(szLine, szKey, TRUE); + if(!pch) + return FALSE; + GetParam(pch, szBuf, cchBuf); + return TRUE; +} + +BOOL FGetDwParam(LPCSTR szLine, LPCSTR szKey, DWORD *pdw) +{ + int cch; + char sz[32]; + LPCSTR pch = PchGetParam(szLine, szKey, TRUE); + if(!pch) + return FALSE; + GetParam(pch, sz, sizeof sz); + *pdw = DwFromSz(sz, &cch); + return FIsSpace(sz[cch]); +} + +/* END MICROSOFT CODE */ + +BOOL FGetVectorParam(LPCSTR szLine, LPCSTR szKey, float *pvr) +{ + char sz[63]; + int j = 0, i; + + LPCSTR pch = PchGetParam(szLine, szKey, TRUE); + if(!pch) + return FALSE; + GetParam(pch, sz, sizeof sz); + + for(i = 0;i < 4;i++) + { + ((DWORD*)pvr)[i] = DwFromSz(sz + j, NULL); + + do{ j++; } while(sz[j] != ','); + + if(i < 3 && (sz[j] != ',') && !FIsSpace(sz[j])) + return FALSE; + + j++; + } + + return TRUE; +} + +BOOL FGetQwordParam(LPCSTR szLine, LPCSTR szKey, ULARGE_INTEGER *plu) +{ + int cch; + char sz[32]; + LPCSTR pch; + + pch = PchGetParam(szLine, szKey, TRUE); + if(!pch) + return FALSE; + GetParam(pch, sz, sizeof sz - 1); + sz[sizeof sz - 1] = 0; + + /* Verify the 0q prefix */ + if(sz[0] != '0' || sz[1] != 'q') + return FALSE; + /* Make sure we have a bunch of hex characters */ + for(cch = 2; cch < sizeof sz && !FIsSpace(sz[cch]); ++cch) { + if(!(sz[cch] >= '0' && sz[cch] <= '9' || + sz[cch] >= 'A' && sz[cch] <= 'F' || + sz[cch] >= 'a' && sz[cch] <= 'f')) + return FALSE; + } + cch -= 2; + if(cch <= 0) + return FALSE; + + /* Move the text out to the end of the string and fill the preceding + * characters with zeroes */ + memmove(&sz[sizeof sz - 1 - cch], &sz[2], cch); + memset(sz, '0', sizeof sz - 1 - cch); + + /* Now parse out the two dwords */ + plu->LowPart = DwHexFromSz(&sz[sizeof sz - 9], NULL); + sz[sizeof sz - 9] = 0; + plu->HighPart = DwHexFromSz(&sz[sizeof sz - 17], NULL); + return TRUE; +} + +BOOL FGetNamedDwParam(LPCSTR szLine, LPCSTR szKey, DWORD *pdw, LPSTR szResp) +{ + if(!FGetDwParam(szLine, szKey, pdw)) { + RtlSprintf(szResp, "missing %s", szKey); + return FALSE; + } + return TRUE; +} + +ULONG UlAddrFromSz(LPCSTR sz) +{ + ULONG ul; + int ib; + int ich; + + for(ib = 0; ib < 4; ++ib) { + BYTE b = 0; + + for(ich = 0; ich < 3; ++ich) { + if(sz[ich] < '0' || sz[ich] > '9') + break; + b = 10 * b + (sz[ich] - '0'); + } + if(ich == 0 || sz[ich] != (ib == 3 ? 0 : '.')) + return 0; + sz += ich + 1; + ((BYTE *)&ul)[ib ^ 3] = b; + } + return ul; +} + +void GetFileAttrSz(LPSTR sz, ULONG dwAttributes, PLARGE_INTEGER pliChange, + PLARGE_INTEGER pliCreate, PLARGE_INTEGER pliSize) +{ + RtlSprintf(sz, "sizehi=0x%x sizelo=0x%x createhi=0x%08x createlo=0x%08x " + "changehi=0x%08x changelo=0x%08x%s%s%s", pliSize->HighPart, + pliSize->LowPart, pliCreate->HighPart, pliCreate->LowPart, + pliChange->HighPart, pliChange->LowPart, + dwAttributes & FILE_ATTRIBUTE_DIRECTORY ? " directory" : "", + dwAttributes & FILE_ATTRIBUTE_READONLY ? " readonly" : "", + dwAttributes & FILE_ATTRIBUTE_HIDDEN ? " hidden" : ""); +} + +VOID FStopServ() +{ + int i; + + closesocket(sockServ); + closesocket(sockName); + + for(i = 0;i < CONNECTION_MAX;i++) + if(rgdmc[i].bActive) + closesocket(rgdmc[i].s); +} + +int FSend(SOCKET s, LPCSTR fmt, ...) +{ + char buf[0x200]; + + va_list list; + va_start(list, fmt); + RtlVsnprintf(buf, sizeof(buf), fmt, list); + va_end(list); + + return send(s, buf, strlen(buf), 0); +} + +int FSendLine(SOCKET s, LPCSTR fmt, ...) +{ + char buf[0x202]; + int i; + + va_list list; + va_start(list, fmt); + i = RtlVsnprintf(buf, sizeof(buf) - 2, fmt, list); + va_end(list); + + strcat(buf, "\r\n"); + + return send(s, buf, i + 2, 0); +} + +LPCSTR SzStdResponse(HRESULT hr) +{ + LPCSTR pszResp; + + switch(hr) { + case XBDM_LINE_TOO_LONG: + pszResp = "line too long"; + break; + case XBDM_NOSUCHFILE: + pszResp = "file not found"; + break; + case XBDM_NOMODULE: + pszResp = "no such module"; + break; + case XBDM_MEMUNMAPPED: + pszResp = "memory not mapped"; + break; + case XBDM_NOTHREAD: + pszResp = "no such thread"; + break; + case XBDM_INVALIDCMD: + pszResp = "unknown command"; + break; + case XBDM_NOTSTOPPED: + pszResp = "not stopped"; + break; + case XBDM_ALREADYSTOPPED: + pszResp = "already stopped"; + break; + case XBDM_MUSTCOPY: + pszResp = "file must be copied"; + break; + case XBDM_ALREADYEXISTS: + pszResp = "file already exists"; + break; + case XBDM_DIRNOTEMPTY: + pszResp = "directory not empty"; + break; + case XBDM_BADFILENAME: + pszResp = "filename is invalid"; + break; + case XBDM_CANNOTCREATE: + pszResp = "file cannot be created"; + break; + case XBDM_DEVICEFULL: + pszResp = "no room on device"; + break; + case XBDM_MULTIRESPONSE: + pszResp = "multiline response follows"; + break; + case XBDM_BINRESPONSE: + pszResp = "binary response follows"; + break; + case XBDM_READYFORBIN: + pszResp = "send binary data"; + break; + case XBDM_CANNOTACCESS: + pszResp = "access denied"; + break; + case XBDM_NOTDEBUGGABLE: + pszResp = "not debuggable"; + break; + case XBDM_BADCOUNTTYPE: + pszResp = "type invalid"; + break; + case XBDM_COUNTUNAVAILABLE: + pszResp = "data not available"; + break; + case XBDM_NOTLOCKED: + pszResp = "box is not locked"; + break; + case XBDM_KEYXCHG: + pszResp = "key exchange required"; + break; + case XBDM_MUSTBEDEDICATED: + pszResp = "dedicated connection required"; + break; + case E_OUTOFMEMORY: + pszResp = "out of memory"; + break; + case E_UNEXPECTED: + pszResp = "unexpected error"; + break; + case E_INVALIDARG: + pszResp = "bad parameter"; + break; + case XBDM_NOERR: + pszResp = "OK"; + break; + default: + pszResp = ""; + break; + } + return pszResp; +} + +int SendHrSzResp(SOCKET s, HRESULT hr, LPCSTR szResp, LPSTR szBuf) +{ + /* Make sure we have an error code we like */ + if(((hr >> 16) & 0x7fff) != FACILITY_XBDM) { + hr = SUCCEEDED(hr) ? XBDM_NOERR : XBDM_UNDEFINED; + if(!szResp) + szResp = SzStdResponse(E_UNEXPECTED); + } else if((hr & 0xffff) > 0xff) + hr = XBDM_UNDEFINED; + + if(FAILED(hr)) + szBuf[0] = '4'; + else + szBuf[0] = '2'; + szBuf[1] = (char) ('0' + (hr & 0xffff) / 10); // overflow? + szBuf[2] = (char) ('0' + (hr & 0xffff) % 10); + szBuf[3] = '-'; + szBuf[4] = ' '; + if(szResp != szBuf) { + if(szResp) + strcpy(szBuf + 5, szResp); + else + szBuf[5] = 0; + } + return FSendLine(s, "%s", szBuf); +} + +VOID DoReadWrite(PDMCONN pdmc, BOOL bCanRead) +{ + int i, j; + DWORD dw; + char sz[0x200]; + char resp[0x200]; + HRESULT hr; + + if(!pdmc->bConversation) + { + // We are not currently in a handling function + + // Check for shutdown + if(pdmc->bShutdown) + { + if(!pdmc->bKeepAlive) + closesocket(pdmc->s); + + ZeroMemory(pdmc, sizeof(DMCONN)); + + return; + } + + // First, scan the buffer to search for newlines + for(dw = 0;dw < pdmc->dwRecv && (pdmc->szRecv[dw] != '\n');dw++); + + // If i == pdmc->dwRecv then there are no commands in the buffer + if(dw == pdmc->dwRecv) + { + // Recieve into the buffer + if(bCanRead) + { + i = recv(pdmc->s, (char*)pdmc->szRecv + pdmc->dwRecv, sizeof(pdmc->szRecv) - pdmc->dwRecv, 0); + if(i <= 0) + { + pdmc->bShutdown = TRUE; + return; + } + + pdmc->dwRecv += i; + } + } + + // Scan the buffer for a newline + for(dw = 0;dw < pdmc->dwRecv && (pdmc->szRecv[dw] != '\n');dw++); + + if(dw != pdmc->dwRecv) + { + // We found a command + if(pdmc->bTooLong) + { + SendHrSzResp(pdmc->s, XBDM_LINE_TOO_LONG, "", sz); + pdmc->bTooLong = FALSE; + pdmc->dwRecv = 0; + + return; + } + + // Find the command name + for(i = 0;(pdmc->szRecv[i]) && (pdmc->szRecv[i] != '\r') && (pdmc->szRecv[i] != '\n') && (pdmc->szRecv[i] != ' ');i++) + sz[i] = pdmc->szRecv[i]; + sz[i] = 0; + + // Now we just walk the list with our super inefficient algo of BRUTE FORCE SEARCHING + for(j = 0;j < cchcmd && stricmp(sz, rgbcmd[j].szName);j++); + + if(j == cchcmd) // Command not found + { + SendHrSzResp(pdmc->s, XBDM_INVALIDCMD, SzStdResponse(XBDM_INVALIDCMD), sz); + + memcpy(sz, pdmc->szRecv, dw - 1); + sz[dw - 1] = 0; + + DbgPrint("[xbdm] unknown command \"%s\"\n", sz); + } + else if((rgbcmd[j].dwPriv & pdmc->dwPriv) != rgbcmd[j].dwPriv) + { + // Not enough permissions + SendHrSzResp(pdmc->s, XBDM_CANNOTACCESS, SzStdResponse(XBDM_CANNOTACCESS), sz); + } + else + { + // Command foundzorz + + // Copy the whole string over + for(i = 0;(pdmc->szRecv[i] != '\r') && (pdmc->szRecv[i] != '\n');i++) + sz[i] = pdmc->szRecv[i]; + + sz[i] = 0; + resp[0] = 0; + + // Setup some final state information + pdmc->dmcc.Buffer = NULL; + pdmc->dmcc.BufferSize = 0; + pdmc->dmcc.BytesRemaining = 0; + pdmc->dmcc.CustomData = &pdmc->dmcd; + pdmc->dmcc.DataSize = -1; + pdmc->dmcc.HandlingFunction = NULL; + + pdmc->hr = hr = rgbcmd[j].pdmcp(sz, resp, sizeof(resp), &pdmc->dmcc); + + if(hr == XBDM_MULTIRESPONSE + || hr == XBDM_BINRESPONSE + || hr == XBDM_READYFORBIN) + pdmc->bConversation = TRUE; + + if(!pdmc->bKeepAlive) + { + if(resp[0]) + { + if(SendHrSzResp(pdmc->s, hr, resp, sz) <= 0) + pdmc->bShutdown = TRUE; + } + else if(SendHrSzResp(pdmc->s, hr, SzStdResponse(hr), sz) <= 0) + pdmc->bShutdown = TRUE; + } + } + + // Fetch the index of the \n + for(i = 0;pdmc->szRecv[i] != '\n';i++); + + // Move the memory + memmove(pdmc->szRecv, pdmc->szRecv + (i + 1), sizeof(pdmc->szRecv) - (i + 1)); + + // Adjust the vars + pdmc->dwRecv -= i + 1; + } + else if(pdmc->dwRecv == sizeof(pdmc->szRecv)) + pdmc->bTooLong = TRUE; // Overflow.... + + // On overflow, just ignore the rest of the data until newline + if(pdmc->bTooLong) + pdmc->dwRecv = 0; + } + else + { + // We are currently in a handling function + + ASSERT(pdmc->dmcc.HandlingFunction); + + if(pdmc->dmcc.Buffer == NULL) + { + pdmc->dmcc.Buffer = pdmc->szBuf; + pdmc->dmcc.BufferSize = sizeof(pdmc->szBuf); + } + + // Check for shutdown + if(pdmc->bShutdown) + { + if(pdmc->hr == XBDM_READYFORBIN) + { + // Multiline responses are free to continue, but they wont go anywhere + pdmc->dmcc.DataSize = 0; + pdmc->bConversation = FALSE; + } + } + + if(pdmc->hr == XBDM_READYFORBIN) + { + if(bCanRead) + { + if(!pdmc->bShutdown) + { + i = recv(pdmc->s, (char*)pdmc->dmcc.Buffer, + pdmc->dmcc.BytesRemaining > pdmc->dmcc.BufferSize ? pdmc->dmcc.BufferSize : pdmc->dmcc.BytesRemaining, + 0); + + if(i <= 0) + { + pdmc->dmcc.DataSize = 0; + pdmc->bShutdown = TRUE; + } + else + pdmc->dmcc.DataSize = i; + } + + hr = pdmc->dmcc.HandlingFunction(&pdmc->dmcc, resp, sizeof(resp)); + + if(!pdmc->bShutdown) + { + if(pdmc->dmcc.BytesRemaining == 0) + { + if(hr == XBDM_MULTIRESPONSE + || hr == XBDM_BINRESPONSE + || hr == XBDM_READYFORBIN) + { + pdmc->hr = hr; + pdmc->bConversation = TRUE; + pdmc->dmcc.DataSize = 0; + } + else + { + pdmc->bConversation = FALSE; + pdmc->dmcc.HandlingFunction = NULL; + } + + SendHrSzResp(pdmc->s, hr, SzStdResponse(hr), sz); + } + } + + if(pdmc->bShutdown) + pdmc->bConversation = FALSE; + } + } + else + { + if(pdmc->bShutdown || pdmc->dmcc.DataSize == 0 || pdmc->dmcc.DataSize == -1) + { + // Multiline/binary + pdmc->dmcc.DataSize = -1; +#ifdef _DEBUG + hr = pdmc->dmcc.HandlingFunction(&pdmc->dmcc, NULL, 0x100); // This way i can catch those annoying errors +#else + hr = pdmc->dmcc.HandlingFunction(&pdmc->dmcc, NULL, 0); +#endif + + pdmc->Buffer = pdmc->dmcc.Buffer; + } + + if(pdmc->bShutdown) + { + if(FAILED(hr) + || hr == XBDM_MULTIRESPONSE + || hr == XBDM_BINRESPONSE + || hr == XBDM_READYFORBIN) // Just let them keep talking + pdmc->bConversation = FALSE; + } + else + { + if(hr == XBDM_ENDOFLIST + || hr == XBDM_MULTIRESPONSE + || hr == XBDM_BINRESPONSE + || hr == XBDM_READYFORBIN) + { + if(pdmc->hr == XBDM_MULTIRESPONSE) + FSend(pdmc->s, ".\r\n"); + + pdmc->bConversation = FALSE; + + if(hr == XBDM_MULTIRESPONSE + || hr == XBDM_BINRESPONSE + || hr == XBDM_READYFORBIN) + { + pdmc->hr = hr; + pdmc->bConversation = TRUE; + } + else + pdmc->dmcc.HandlingFunction = NULL; + } + else if(NT_SUCCESS(hr)) + { + if(pdmc->dmcc.DataSize == -1) + { + // Null terminated string with a newline + if(FSend(pdmc->s, "%s\r\n", pdmc->dmcc.Buffer) <= 0) + pdmc->bShutdown = TRUE; + } + else if(pdmc->dmcc.DataSize != 0) + { + // Binary data + if((i = send(pdmc->s, (char*)pdmc->Buffer, pdmc->dmcc.DataSize, 0)) <= 0) + pdmc->bShutdown = TRUE; + + pdmc->dmcc.DataSize -= i; + pdmc->Buffer = (PVOID)((DWORD)pdmc->Buffer + i); + } + } + else + { + if(pdmc->dmcc.DataSize == -1) + FSend(pdmc->s, "%s\r\n", pdmc->dmcc.Buffer); + + // Forcefully terminate the connection + pdmc->bShutdown = TRUE; + pdmc->bConversation = FALSE; + } + } + } + } +} + +VOID AnswerName(SOCKET s) +{ + struct { + BYTE bRequest; + BYTE cchName; + char szName[256]; + } nm; + + SOCKADDR_IN sin; + int cbAddr = sizeof(sin); + int cbPkt; + + cbPkt = recvfrom(s, (char*)&nm, sizeof(nm), 0, (SOCKADDR*)&sin, &cbAddr); + switch(nm.bRequest) + { + case 1: + case 3: + if(nm.bRequest == 1) + { + nm.bRequest = 0; + + if(cbPkt < 2 || cbPkt < (2 + nm.cchName)) + break; + + if(!nm.cchName || strcmpi(nm.szName, g_dmGlobals.rgchDbgName)) + break; + } + + nm.bRequest = 2; + break; + default: + nm.bRequest = 0; + break; + } + + if(nm.bRequest) + sendto(s, (char*)&nm, cbPkt, 0, (SOCKADDR*)&sin, cbAddr); +} + +ULONG __stdcall ServerThread(LPVOID lpParam) +{ + SOCKET sock; + BOOL bReuse; + SOCKADDR_IN sin; + FD_SET readfds, writefds; + struct timeval timeout; + XNADDR xna; + DMTD *pdmtd; + int i; + + KeSetBasePriorityThread(PsGetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL); + pdmtd = DmGetCurrentDmtd(); + + pdmtd->DebugFlags |= DMFLAG_DEBUGTHREAD; + + VSetThreadName(-1, "Debugger Command Thread"); + + ZeroMemory(rgdmc, sizeof(rgdmc)); + + do + { + // Well, this IS the server thread, so if we can't start a server then screw you + Sleep(5000); + sockServ = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + } while(sockServ == INVALID_SOCKET); + + bReuse = TRUE; + if(setsockopt(sockServ, SOL_SOCKET, SO_DECRYPTSOCK, (char*)&bReuse, sizeof(bReuse))) + { + DbgPrint("[xbdm] failed %i\n", WSAGetLastError()); + DebugBreak(); + } + if(setsockopt(sockServ, SOL_SOCKET, SO_REUSEADDR, (char*)&bReuse, sizeof(bReuse))) + { + DbgPrint("[xbdm] failed %i\n", WSAGetLastError()); + DebugBreak(); + } + + sin.sin_family = AF_INET; + sin.sin_port = 730; + sin.sin_addr.s_addr = INADDR_ANY; + if(bind(sockServ, (SOCKADDR*)&sin, sizeof(sin)) + || listen(sockServ, 8)) + { + DbgPrint("[xbdm] failed %i\n", WSAGetLastError()); + DebugBreak(); + goto abortsocket; + } + + sockName = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + if(setsockopt(sockName, SOL_SOCKET, SO_DECRYPTSOCK, (char*)&bReuse, sizeof(bReuse))) + { + DbgPrint("[xbdm] failed %i\n", WSAGetLastError()); + DebugBreak(); + } + if(setsockopt(sockName, SOL_SOCKET, SO_REUSEADDR, (char*)&bReuse, sizeof(bReuse))) + { + DbgPrint("[xbdm] failed %i\n", WSAGetLastError()); + DebugBreak(); + } + if(setsockopt(sockName, SOL_SOCKET, SO_BROADCAST, (char*)&bReuse, sizeof(bReuse))) + { + DbgPrint("[xbdm] failed %i\n", WSAGetLastError()); + DebugBreak(); + } + if(bind(sockName, (SOCKADDR*)&sin, sizeof(sin))) + { + DbgPrint("[xbdm] failed %i\n", WSAGetLastError()); + DebugBreak(); + } + + DbgPrint("[xbdm] server started\n"); + + for(;;) + { + readfds.fd_count = 0; + writefds.fd_count = 0; + + FD_SET(sockServ, &readfds); + FD_SET(sockName, &readfds); + + for(i = 0;i < CONNECTION_MAX;i++) + { + if(rgdmc[i].bActive) + FD_SET(rgdmc[i].s, &readfds); + } + + timeout.tv_sec = 0; + timeout.tv_usec = 0; + + if(g_dmGlobals.bDirty) + { + FWriteGlobals(); + + g_dmGlobals.bDirty = FALSE; + } + + if(!g_dmGlobals.bHasIp) + { + i = XNetGetTitleXnAddr(&xna); + if(i != XNET_GET_XNADDR_PENDING) + { + DbgPrint("[xbdm] IP Address Acquired [%i.%i.%i.%i] (0x%08x)\n", + xna.ina.S_un.S_un_b.s_b1, xna.ina.S_un.S_un_b.s_b2, + xna.ina.S_un.S_un_b.s_b3, xna.ina.S_un.S_un_b.s_b4, + i); + + g_dmGlobals.bHasIp = TRUE; + } + } + + // Yield to others (its the right thing to do) + Sleep(0); + + ProcessQueuedNotifications(); + + select(0, &readfds, &writefds, NULL, &timeout); + + if(FD_ISSET(sockName, &readfds)) + AnswerName(sockName); + + if(FD_ISSET(sockServ, &readfds)) + { + i = sizeof(sin); + sock = accept(sockServ, (SOCKADDR*)&sin, &i); + + for(i = 0;i < CONNECTION_MAX;i++) + { + if(!rgdmc[i].bActive) + { + rgdmc[i].bActive = TRUE; + rgdmc[i].s = sock; + memcpy(&rgdmc[i].sin, &sin, sizeof(sin)); + break; + } + } + + if(i == CONNECTION_MAX) + { + // No more connection slots + FSendLine(sock, "401- max number of connections exceeded"); + closesocket(sock); + } + else + { + // Some quick init + + // Give all permissions, as we don't have locking yet + rgdmc[i].dwPriv = DMPL_PRIV_READ | DMPL_PRIV_WRITE | DMPL_PRIV_CONFIGURE | DMPL_PRIV_CONTROL; + + // Only give hypervisor access if its enabled + if(g_dmGlobals.bHypervisorEnabled) + rgdmc[i].dwPriv |= DMPL_PRIV_HVX_MASK; + + // Say hello! + FSendLine(rgdmc[i].s, "201- connected"); + } + } + + for(i = 0;i < CONNECTION_MAX;i++) + { + if(rgdmc[i].bActive) + DoReadWrite(&rgdmc[i], FD_ISSET(rgdmc[i].s, &readfds)); + } + } + +abortsocket: + closesocket(sockServ); + + DebugBreak(); + return 0; +} + +DMHRAPI HrGetAltAddr(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + XNADDR xna; + DWORD dw; + + if(!pdmcc) + return E_FAIL; + + dw = XNetGetTitleXnAddr(&xna); + + if(dw == XNET_GET_XNADDR_PENDING || dw == XNET_GET_XNADDR_NONE) + return E_FAIL; + + RtlSnprintf(szResponse, cchResponse, "addr=0x%08x", xna.ina.s_addr); + + return XBDM_NOERR; +} + +DMHRAPI HrEndConversation(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + PDMCONN pdmc; + + if(!pdmcc) + return E_FAIL; + + // Snag the structure + pdmc = CONTAINING_RECORD(pdmcc, DMCONN, dmcc); + + // Say goodbye + strcpy(szResponse, "bye"); + + // Signal shutdown + pdmc->bShutdown = TRUE; + + return XBDM_NOERR; +} + +DMHRAPI HrMagicReboot(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + PDMCONN pdmc; + + char szTmp[MAX_PATH]; + char szLaunchPath[MAX_PATH]; + char szMountPath[MAX_PATH]; + char szCmdLine[MAX_PATH]; + + DWORD dwMask = 0; + HRESULT hr = XBDM_NOERR; + + szCmdLine[0] = 0; + szMountPath[0] = 0; + szLaunchPath[0] = 0; + + if(PchGetParam(szCommand, "wait", FALSE)) + dwMask = DMBOOT_WAIT; + else if(PchGetParam(szCommand, "stop", FALSE)) + dwMask = DMBOOT_STOP; + if(PchGetParam(szCommand, "cold", FALSE)) + dwMask |= DMBOOT_COLD; + + // TODO: if(stopped and exception) flag |= cold + if(FGetSzParam(szCommand, "title", szTmp, sizeof(szTmp))) + { + if(szTmp[0] == '\\') + strcpy_s(szLaunchPath, sizeof(szLaunchPath), szTmp); + else if(FAILED(FFileNameToObName(szTmp, szLaunchPath, sizeof(szLaunchPath)))) + hr = XBDM_NOSUCHFILE; + } + if(FGetSzParam(szCommand, "directory", szTmp, sizeof(szTmp))) + { + if(szTmp[0] == '\\') + strcpy_s(szMountPath, sizeof(szMountPath), szTmp); + else if(FAILED(FFileNameToObName(szTmp, szMountPath, sizeof(szMountPath)))) + hr = XBDM_NOSUCHFILE; + } + + FGetSzParam(szCommand, "cmdline", szCmdLine, sizeof(szCmdLine)); + + if(NT_SUCCESS(hr)) + { + if(dwMask & DMBOOT_COLD) + { + pdmc = CONTAINING_RECORD(pdmcc, DMCONN, dmcc); + FSendLine(pdmc->s, "200- OK"); + + Sleep(200); + FStopServ(); + } + + DmRebootEx(dwMask, szLaunchPath, szMountPath, szCmdLine); + } + + return XBDM_NOERR; +} + +DMHRAPI HrGetConsoleFeatures(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + if(!pdmcc) + return E_FAIL; + + strcpy_s(szResponse, cchResponse, "DEBUGGING"); + + if(g_dmGlobals.dwConsoleColor & CONSOLE_COLOR_FLAG_BLUE) + strcat_s(szResponse, cchResponse, " 1GB_RAM"); + + return XBDM_NOERR; +} + +DMHRAPI HrGetConsoleType(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + if(!pdmcc) + return E_FAIL; + + if(g_dmGlobals.dwConsoleColor & CONSOLE_COLOR_FLAG_BLACK) + strcpy_s(szResponse, cchResponse, "devkit"); + else if(g_dmGlobals.dwConsoleColor & CONSOLE_COLOR_FLAG_WHITE) + strcpy_s(szResponse, cchResponse, "testkit"); + else + strcpy_s(szResponse, cchResponse, "reviewerkit"); + + + return XBDM_NOERR; +} + +DMHRAPI HrDbgName(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + char sz[256]; + + if(FGetSzParam(szCommand, "name", sz, sizeof(sz))) + { + strcpy_s(g_dmGlobals.rgchDbgName, 256, sz); + g_dmGlobals.bDirty = TRUE; + + return XBDM_NOERR; + } + + strcpy_s(szResponse, cchResponse, g_dmGlobals.rgchDbgName); + return XBDM_NOERR; +} + +DMHRAPI HrDrivemap(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + if(PchGetParam(szCommand, "internal", FALSE)) + g_dmGlobals.bDriveMap = TRUE; + else + g_dmGlobals.bDriveMap = FALSE; + + g_dmGlobals.bDirty = TRUE; + + return XBDM_NOERR; +} + +DMHRAPI HrReportHelpInfo(PDM_CMDCONT pdmcc, LPSTR szResponse, DWORD cchResponse) +{ + if((int)pdmcd->cch >= cchcmd) + return XBDM_ENDOFLIST; + + strcpy_s((char*)pdmcc->Buffer, pdmcc->BufferSize, rgbcmd[pdmcd->cch].szName); + pdmcd->cch++; + + return XBDM_NOERR; +} + +DMHRAPI HrHelp(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + if(!pdmcc) + return E_FAIL; + + pdmcc->HandlingFunction = HrReportHelpInfo; + pdmcc->BufferSize = 1; + pdmcd->cch = 0; + + strcpy_s(szResponse, cchResponse, "command names follow"); + + return XBDM_MULTIRESPONSE; +} + +DMHRAPI HrReboot(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + if(!pdmcc) + return E_FAIL; + + FStopServ(); + + HalReturnToFirmware(6); + return XBDM_NOERR; +} + +DMHRAPI HrSetSystemTime(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + ULARGE_INTEGER lu, luUnused; + + if(!pdmcc) + return E_FAIL; + + if(!FGetDwParam(szCommand, "clockhi", &lu.HighPart) || !FGetDwParam(szCommand, "clocklo", &lu.LowPart)) + return XBDM_CLOCKNOTSET; + + NtSetSystemTime(&lu, &luUnused); + XnpNoteSystemTime(); + + g_dmGlobals.fClockSet = TRUE; + + return XBDM_NOERR; +} + +DMHRAPI HrGetSystemTime(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + ULARGE_INTEGER lu; + + if(!pdmcc) + return E_FAIL; + + if(!g_dmGlobals.fClockSet) + return XBDM_CLOCKNOTSET; + + KeQuerySystemTime(&lu); + + RtlSnprintf(szResponse, cchResponse, "high=0x%x low=0x%x", lu.HighPart, lu.LowPart); + + return XBDM_NOERR; +} + +DMHRAPI HrShutdown(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + if(!pdmcc) + return E_FAIL; + + FStopServ(); + + HalReturnToFirmware(5); + return XBDM_NOERR; +} + +DMHRAPI HrSpew(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + DbgPrint("SPEW: %s\n", szCommand); + return XBDM_NOERR; +} + +DMHRAPI HrReportXbeInfo(PDM_CMDCONT pdmcc, LPSTR szResponse, DWORD cchResponse) +{ + PDM_XBE pdxbe = (PDM_XBE)pdmcc->CustomData; + int i; + + if(pdmcc->BytesRemaining == 3) + { + DmFreePool(pdmcc->CustomData); + return XBDM_ENDOFLIST; + } + else if(pdmcc->BytesRemaining == 2) + { + i = strlen(pdxbe->LaunchPath); + + pdxbe->LaunchPath[i++] = '"'; + pdxbe->LaunchPath[i + 1] = 0; + memmove(pdxbe->LaunchPath + 6, pdxbe->LaunchPath, i++); + memcpy(pdxbe->LaunchPath, "name=\"", 6); + + pdmcc->Buffer = pdxbe->LaunchPath; + pdmcc->BytesRemaining++; + } + else if(pdmcc->BytesRemaining == 1) + { + RtlSnprintf((char*)pdmcc->Buffer, pdmcc->BufferSize, "timestamp=0x%08x checksum=0x%08x", pdxbe->TimeStamp, pdxbe->CheckSum); + + pdmcc->BytesRemaining++; + } + + return XBDM_NOERR; +} + +DMHRAPI HrGetXbeInfo(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + PDM_XBE pdxbe; + DWORD dwFlags = 0; + char sz[0x200]; + LPCSTR szName; + HRESULT hr; + + if(!pdmcc) + return E_FAIL; + + if(PchGetParam(szCommand, "running", FALSE)) + szName = NULL; + else if(FGetSzParam(szCommand, "name", sz, sizeof(sz))) + { + szName = sz; + + if(PchGetParam(szCommand, "ondiskonly", FALSE)) + dwFlags = DM_XBEONDISKONLY; + } + else + { + strcpy_s(szResponse, cchResponse, "missing name"); + return E_FAIL; + } + + pdxbe = (PDM_XBE)DmAllocatePoolWithTag(sizeof(DM_XBE), 'Xbdm'); + pdmcc->CustomData = pdxbe; + + if(!pdxbe) + return E_OUTOFMEMORY; + + hr = DmGetXbeInfoEx(szName, pdxbe, dwFlags); + + if(NT_SUCCESS(hr)) + { + pdmcc->HandlingFunction = HrReportXbeInfo; + pdmcc->BytesRemaining = 1; + + hr = XBDM_MULTIRESPONSE; + } + else + DmFreePool(pdxbe); + + return hr; +} + +DMHRAPI HrReportDriveList(PDM_CMDCONT pdmcc, LPSTR szResponse, DWORD cchResponse) +{ + CHAR sz[MAX_PATH]; + NTSTATUS st; + ANSI_STRING as; + OBJECT_ATTRIBUTES oa; + BOOL bExists = FALSE; + OBJECT_DIRECTORY_INFORMATION odi; + HANDLE h; + int i; + +start: + if(pdmcd->cch == 0) + { + // List from our interal list + + i = Drives[pdmcd->DriveList.CurrentDrive].Visibility; + + // Check verbosity + if(i != 0 && !(i == 1 && !g_dmGlobals.bDriveMap)) + { + // Get name + strcpy(sz, Drives[pdmcd->DriveList.CurrentDrive].DriveName); + i = strlen(sz); + strcat(sz, ":\\"); + + st = FCreateFile(&h, SYNCHRONIZE, sz, NULL, 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, + FILE_OPEN, FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT); + if(NT_SUCCESS(st)) + { + sz[i] = 0; + bExists = TRUE; + NtClose(h); + } + } + + pdmcd->DriveList.CurrentDrive++; + + if(pdmcd->DriveList.CurrentDrive >= cchDrives) + { + // Move on to the actual object enumeration + pdmcd->cch = 1; + + RtlInitAnsiString(&as, "\\??"); + oa.Attributes = OBJ_CASE_INSENSITIVE; + oa.ObjectName = &as; + oa.RootDirectory = NULL; + + pdmcd->DriveList.CurrentDrive = 0; + + st = NtOpenDirectoryObject(&pdmcd->h, &oa); + + if(FAILED(st)) + { + pdmcd->h = INVALID_HANDLE_VALUE; + pdmcd->cch = 2; + } + } + } + else if(pdmcd->cch == 1) + { + // List the objects + st = NtQueryDirectoryObject(pdmcd->h, &odi, sizeof(odi), (pdmcd->DriveList.CurrentDrive == 0), (PULONG)&pdmcd->DriveList.CurrentDrive, NULL); + if(NT_SUCCESS(st)) + { + // Attempt to open the device that we found + memcpy(sz, odi.Name.Buffer, odi.Name.Length); + + // But first, check the drive list + sz[odi.Name.Length - 1] = 0; + for(i = 0;i < cchDrives;i++) + { + if(!strcmpi(Drives[i].DriveName, sz)) + { + bExists = TRUE; + break; + } + } + + if(bExists) + bExists = FALSE; + else + { + strcat(sz, ":\\"); + + st = FCreateFile(&h, SYNCHRONIZE, sz, NULL, 0, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, + FILE_OPEN, FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT); + if(NT_SUCCESS(st)) + { + NtClose(h); + sz[odi.Name.Length - 1] = 0; + bExists = TRUE; + } + } + } + else + { + NtClose(pdmcd->h); + pdmcd->cch = 2; + } + } + else + return XBDM_ENDOFLIST; + + if(bExists) + RtlSnprintf((char*)pdmcc->Buffer, pdmcc->BufferSize, "drivename=\"%s\"", sz); + else + goto start; + + return XBDM_NOERR; +} + +DMHRAPI HrGetDriveList(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + if(!pdmcc) + return E_FAIL; + + pdmcd->cch = 0; + pdmcd->DriveList.CurrentDrive = 0; + pdmcd->h = INVALID_HANDLE_VALUE; + + pdmcc->BytesRemaining = 1; + pdmcc->HandlingFunction = HrReportDriveList; + + return XBDM_MULTIRESPONSE; +} + +DMHRAPI HrReportDriveFreeSpace(PDM_CMDCONT pdmcc, LPSTR szResponse, DWORD cchResponse) +{ + FILE_FS_SIZE_INFORMATION fsi; + IO_STATUS_BLOCK iosb; + DWORD dwBPU; + ULARGE_INTEGER ulFree, ulTotal; + NTSTATUS st; + + if(pdmcd->cch) + return XBDM_ENDOFLIST; + + pdmcd->cch = 1; + + st = NtQueryVolumeInformationFile(pdmcd->h, &iosb, &fsi, sizeof(fsi), FileFsSizeInformation); + + if(FAILED(st)) + { + RtlSnprintf((char*)pdmcc->Buffer, pdmcc->BufferSize, "unknown error (%d)", st); + return E_FAIL; + } + + dwBPU = fsi.SectorsPerAllocationUnit * fsi.BytesPerSector; + + ulFree.QuadPart = fsi.AvailableAllocationUnits.QuadPart * dwBPU; + ulTotal.QuadPart = fsi.TotalAllocationUnits.QuadPart * dwBPU; + + RtlSnprintf((char*)pdmcc->Buffer, pdmcc->BufferSize, "freetocallerlo=0x%08x freetocallerhi=0x%08x totalbyteslo=0x%08x totalbyteshi=0x%08x totalfreebyteslo=0x%08x totalfreebyteshi=0x%08x", + ulFree.LowPart, ulFree.HighPart, ulTotal.LowPart, ulTotal.HighPart, ulFree.LowPart, ulFree.HighPart); + + return XBDM_NOERR; +} + +DMHRAPI HrGetDriveFreeSpace(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + NTSTATUS st; + char sz[MAX_PATH]; + + if(!pdmcc) + return E_FAIL; + + if(!FGetSzParam(szCommand, "name", sz, sizeof(sz))) + { + strcpy(szResponse, "missing name"); + return E_FAIL; + } + + st = FCreateFile(&pdmcd->h, FILE_READ_ATTRIBUTES, sz, NULL, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_OPEN, + FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT); + + if(FAILED(st)) + return XBDM_CANNOTACCESS; + + pdmcd->cch = 0; + pdmcc->HandlingFunction = HrReportDriveFreeSpace; + + return XBDM_MULTIRESPONSE; +} + +DMHRAPI HrReportDirList(PDM_CMDCONT pdmcc, LPSTR szResponse, DWORD cchResponse) +{ + NTSTATUS st; + IO_STATUS_BLOCK iosb; + FILE_DIRECTORY_INFORMATION fna; + HRESULT hr = XBDM_NOERR; + + ZeroMemory(&fna, sizeof(fna)); + st = NtQueryDirectoryFile(pdmcd->h, NULL, NULL, NULL, &iosb, + &fna, sizeof(fna), NULL, NULL); + + if(NT_SUCCESS(st)) + { + RtlSnprintf((char*)pdmcc->Buffer, pdmcc->BufferSize, "name=\"%s\" ", fna.FileName); + GetFileAttrSz((char*)pdmcc->Buffer + strlen((char*)pdmcc->Buffer), fna.FileAttributes, + &fna.LastWriteTime, &fna.CreationTime, &fna.EndOfFile); + } + else + { + NtClose(pdmcd->h); + hr = XBDM_ENDOFLIST; + } + + return hr; +} + +DMHRAPI HrGetDirList(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + NTSTATUS st; + CHAR sz[MAX_PATH]; + + if(!pdmcc) + return E_FAIL; + + if(!FGetSzParam(szCommand, "name", sz, sizeof(sz))) + { + strcpy(szResponse, "missing name"); + return E_FAIL; + } + + pdmcc->BytesRemaining = 1; + pdmcc->HandlingFunction = HrReportDirList; + + st = FCreateFile(&pdmcd->h, FILE_LIST_DIRECTORY | SYNCHRONIZE, sz, NULL, 0, + FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_OPEN, + FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT); + + return NT_SUCCESS(st) ? XBDM_MULTIRESPONSE : XBDM_CANNOTACCESS; +} + +DMHRAPI HrDvdEject(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + DWORD dwEject = 1; + + if(!pdmcc) + return E_FAIL; + + FGetDwParam(szCommand, "eject", &dwEject); + + HalOpenCloseODDTray(dwEject); + + return XBDM_NOERR; +} + +DMHRAPI HrDelete(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + FILE_DISPOSITION_INFORMATION fdi; + IO_STATUS_BLOCK iosb; + char sz[MAX_PATH]; + NTSTATUS st; + HANDLE h; + BOOL b; + + if(!pdmcc) + return E_FAIL; + + if(!FGetSzParam(szCommand, "name", sz, sizeof(sz))) + { + strcpy_s(szResponse, cchResponse, "missing name"); + return E_FAIL; + } + + b = (BOOL)PchGetParam(szCommand, "dir", FALSE); + + st = FCreateFile(&h, DELETE | SYNCHRONIZE, sz, NULL, 0, 0, + FILE_OPEN, (b ? FILE_DIRECTORY_FILE : FILE_NON_DIRECTORY_FILE) + | FILE_SYNCHRONOUS_IO_NONALERT); + + if(FAILED(st)) + return XBDM_CANNOTACCESS; + + ZeroMemory(&fdi, sizeof(fdi)); + fdi.DeleteFile = TRUE; + + st = NtSetInformationFile(h, &iosb, &fdi, sizeof(fdi), FileDispositionInformation); + NtClose(h); + + if(FAILED(st)) + return XBDM_CANNOTACCESS; + + return XBDM_NOERR; +} + +DMHRAPI HrCreateDirectory(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + char sz[MAX_PATH]; + NTSTATUS st; + HANDLE h; + + if(!pdmcc) + return E_FAIL; + + if(!FGetSzParam(szCommand, "name", sz, sizeof(sz))) + { + strcpy_s(szResponse, cchResponse, "missing name"); + return E_FAIL; + } + + st = FCreateFile(&h, FILE_LIST_DIRECTORY | SYNCHRONIZE, sz, + NULL, FILE_ATTRIBUTE_NORMAL, 0, FILE_CREATE, FILE_DIRECTORY_FILE | + FILE_SYNCHRONOUS_IO_NONALERT); + + if(FAILED(st)) + { + if(st == STATUS_OBJECT_NAME_COLLISION) + return XBDM_ALREADYEXISTS; + return XBDM_CANNOTCREATE; + } + + NtClose(h); + return XBDM_NOERR; +} + +DMHRAPI HrRenameFile(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + char sz[MAX_PATH]; + char szNew[MAX_PATH]; + IO_STATUS_BLOCK iosb; + NTSTATUS st; + HANDLE h; + FILE_RENAME_INFORMATION fri; + + if(!pdmcc) + return E_FAIL; + + if(!FGetSzParam(szCommand, "newname", sz, sizeof(sz))) + { + strcpy_s(szResponse, cchResponse, "missing newname"); + return E_FAIL; + } + if(FAILED(FFileNameToObName(sz, szNew, sizeof(szNew)))) + { + strcpy_s(szResponse, cchResponse, "new name does not exist"); + return XBDM_NOSUCHFILE; + } + if(!FGetSzParam(szCommand, "name", sz, sizeof(sz))) + { + strcpy_s(szResponse, cchResponse, "missing name"); + return E_FAIL; + } + + st = FCreateFile(&h, GENERIC_WRITE | SYNCHRONIZE, sz, NULL, 0, 0, + FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT); + + if(FAILED(st)) + return XBDM_CANNOTACCESS; + + ZeroMemory(&fri, sizeof(fri)); + + RtlInitAnsiString(&fri.FileName, szNew); + fri.ReplaceIfExists = FALSE; + fri.RootDirectory = NULL; + + st = NtSetInformationFile(h, &iosb, &fri, sizeof(fri), FileRenameInformation); + NtClose(h); + + if(st == STATUS_NOT_SAME_DEVICE) + return XBDM_MUSTCOPY; + + if(FAILED(st)) + return XBDM_CANNOTCREATE; + + return XBDM_NOERR; +} + +DMHRAPI HrReportFileAttributes(PDM_CMDCONT pdmcc, LPSTR szResponse, DWORD cchResponse) +{ + if(pdmcd->cch) + return XBDM_ENDOFLIST; + + pdmcd->cch = 1; + + GetFileAttrSz((LPSTR)pdmcc->Buffer, pdmcd->fni.fni.FileAttributes, + &pdmcd->fni.fni.LastWriteTime, &pdmcd->fni.fni.CreationTime, + &pdmcd->fni.fni.EndOfFile); + + return XBDM_NOERR; +} + +DMHRAPI HrGetFileAttr(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + char sz[MAX_PATH]; + char osz[MAX_PATH]; + ANSI_STRING as; + NTSTATUS st; + OBJECT_ATTRIBUTES oa; + + if(!pdmcc) + return E_FAIL; + + if(!FGetSzParam(szCommand, "name", sz, sizeof(sz))) + { + strcpy_s(szResponse, cchResponse, "missing name"); + return E_FAIL; + } + + if(FAILED(FFileNameToObName(sz, osz, sizeof(osz)))) + return XBDM_NOSUCHFILE; + + RtlInitAnsiString(&as, osz); + oa.Attributes = OBJ_CASE_INSENSITIVE; + oa.RootDirectory = NULL; + oa.ObjectName = &as; + + pdmcc->HandlingFunction = HrReportFileAttributes; + pdmcc->BytesRemaining = 1; + pdmcd->cch = 0; + + st = NtQueryFullAttributesFile(&oa, &pdmcd->fni.fni); + return NT_SUCCESS(st) ? XBDM_MULTIRESPONSE : XBDM_NOSUCHFILE; +} + +DMHRAPI HrSetFileAttr(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + NTSTATUS st; + HANDLE h; + IO_STATUS_BLOCK iosb; + char sz[MAX_PATH]; + FILE_NETWORK_OPEN_INFORMATION fna; + FILE_BASIC_INFORMATION fba; + DWORD dwAttrMask = 0; + DWORD dwAttrNew = 0; + DWORD dwT = 0; + + if(!pdmcc) + return E_FAIL; + + if(!FGetSzParam(szCommand, "name", sz, sizeof(sz))) + { + strcpy_s(szResponse, cchResponse, "missing name"); + return E_FAIL; + } + + st = FCreateFile(&h, SYNCHRONIZE, sz, NULL, 0, + FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_OPEN, + FILE_SYNCHRONOUS_IO_NONALERT); + + if(FAILED(st)) + return XBDM_CANNOTACCESS; + + st = NtQueryInformationFile(h, &iosb, &fna, sizeof(fna), FileNetworkOpenInformation); + + if(FAILED(st)) + { + NtClose(h); + return XBDM_CANNOTACCESS; + } + + ZeroMemory(&fba, sizeof(fba)); + if(FGetDwParam(szCommand, "readonly", &dwT)) + { + dwAttrMask |= FILE_ATTRIBUTE_READONLY; + if(dwT) + dwAttrNew |= FILE_ATTRIBUTE_READONLY; + } + if(FGetDwParam(szCommand, "hidden", &dwT)) + { + dwAttrMask |= FILE_ATTRIBUTE_HIDDEN; + if(dwT) + dwAttrNew |= FILE_ATTRIBUTE_HIDDEN; + } + + FGetDwParam(szCommand, "createhi", (DWORD*)&fba.CreationTime.HighPart); + FGetDwParam(szCommand, "createlo", (DWORD*)&fba.ChangeTime.LowPart); + FGetDwParam(szCommand, "changehi", (DWORD*)&fba.LastWriteTime.HighPart); + FGetDwParam(szCommand, "changelo", (DWORD*)&fba.LastWriteTime.LowPart); + + fba.FileAttributes = fna.FileAttributes ^ ((fna.FileAttributes ^ dwAttrNew) & dwAttrMask); + + if(!fba.FileAttributes) + fba.FileAttributes = FILE_ATTRIBUTE_NORMAL; + + st = NtSetInformationFile(h, &iosb, &fba, sizeof(fba), FileBasicInformation); + + NtClose(h); + + return NT_SUCCESS(st) ? XBDM_NOERR : XBDM_CANNOTACCESS; +} + +DMHRAPI HrReportMemoryEx(PDM_CMDCONT pdmcc, LPSTR szResponse, DWORD cchResponse) +{ + DWORD chars, addr, read = 0; + BYTE mem; + + if(!pdmcd->cch) + { + pdmcc->BytesRemaining = 0; + DmFreePool(pdmcc->Buffer); + + return XBDM_ENDOFLIST; + } + + chars = pdmcd->cch; + if(chars > 0x400) + { + chars = 0x400; + ((PBYTE)pdmcc->Buffer)[1] = 0x00; + } + else + ((PBYTE)pdmcc->Buffer)[1] = 0x80; + + ((PBYTE)pdmcc->Buffer)[0] = 0; + + for(addr = pdmcd->mem.Address;addr < pdmcd->mem.Address + chars;addr++) + { + if(FGetMemory(addr, &mem)) + { + ((PBYTE)pdmcc->Buffer)[addr - pdmcd->mem.Address + 2] = mem; + read++; + } + else + { + pdmcd->cch = 0; + ((PBYTE)pdmcc->Buffer)[1] = 0x80; + break; + } + } + + *(PWORD)pdmcc->Buffer |= _byteswap_ushort((WORD)read); + + if(pdmcd->cch) + pdmcd->cch -= read; + + pdmcd->mem.Address += read; + + pdmcc->BytesRemaining = 1; + pdmcc->DataSize = read + 2; + + return XBDM_NOERR; +} + +DMHRAPI HrGetMemoryEx(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + DWORD dwAddr, dwLength; + + if(!pdmcc) + return E_FAIL; + + if(!FGetNamedDwParam(szCommand, "addr", &dwAddr, szResponse) + || !FGetNamedDwParam(szCommand, "length", &dwLength, szResponse)) + return E_FAIL; + + pdmcc->BufferSize = 0x402; + if(!(pdmcc->Buffer = DmAllocatePoolWithTag(pdmcc->BufferSize, 'xbdm'))) + return E_OUTOFMEMORY; + + pdmcc->BytesRemaining = 1; + pdmcc->HandlingFunction = HrReportMemoryEx; + pdmcd->cch = dwLength; + pdmcd->mem.Address = dwAddr; + + return XBDM_BINRESPONSE; +} + +DMHRAPI HrReportMemory(PDM_CMDCONT pdmcc, LPSTR szResponse, DWORD cchResponse) +{ + DWORD chars; + DWORD addr; + BYTE b; + + if(!pdmcd->cch) + return XBDM_ENDOFLIST; + + chars = pdmcd->cch; + if(chars > 64) + chars = 64; + + for(addr = pdmcd->mem.Address;addr < pdmcd->mem.Address + chars;addr++) + { + if(FGetMemory(addr, &b)) + { + ((PBYTE)pdmcc->Buffer)[(addr - pdmcd->mem.Address) * 2] = rgchHex[(b >> 4) & 0xf]; + ((PBYTE)pdmcc->Buffer)[(addr - pdmcd->mem.Address) * 2 + 1] = rgchHex[b & 0xf]; + } + else + ((PBYTE)pdmcc->Buffer)[(addr - pdmcd->mem.Address) * 2] = ((PBYTE)pdmcc->Buffer)[(addr - pdmcd->mem.Address) * 2 + 1] = '?'; + } + + ((PBYTE)pdmcc->Buffer)[(addr - pdmcd->mem.Address) * 2] = 0; + + pdmcd->cch -= chars; + pdmcd->mem.Address += chars; + + return XBDM_NOERR; +} + +DMHRAPI HrGetMemory(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + DWORD dwAddr, dwLength; + + if(!pdmcc) + return E_FAIL; + + if(!FGetNamedDwParam(szCommand, "addr", &dwAddr, szResponse) + || !FGetNamedDwParam(szCommand, "length", &dwLength, szResponse)) + return E_FAIL; + + strcpy_s(szResponse, cchResponse, "memory data follows"); + + pdmcc->BytesRemaining = 1; + pdmcc->HandlingFunction = HrReportMemory; + pdmcd->cch = dwLength; + pdmcd->mem.Address = dwAddr; + + return XBDM_MULTIRESPONSE; +} + +DMHRAPI HrSetMemory(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + int i; + DWORD addr; + LPCSTR data; + char rgch[5]; + DWORD page; + BOOL pageValid; + BYTE b; + int count = 0; + + if(!pdmcc) + return E_FAIL; + + if(!FGetNamedDwParam(szCommand, "addr", &addr, szResponse)) + return E_FAIL; + + data = PchGetParam(szCommand, "data", FALSE); + page = addr + 0x1000; + + rgch[0] = '0'; + rgch[1] = 'x'; + rgch[4] = 0; + + if(data) + { + for(;;count++, addr++) + { + if(FIsSpace(*data)) + break; + for(i = 0;i < 2;i++) + { + if(!(*data >= '0' && *data <= '9' || + *data >= 'a' && *data <= 'f' || + *data >= 'A' && *data <= 'F')) + { + strcpy(szResponse, "syntax error in data"); + return E_FAIL; + } + rgch[i + 2] = *data++; + } + b = (BYTE)DwFromSz(rgch, NULL); + if((addr ^ page) & 0xFFFFF000) + { + page = addr & 0xFFFFF000; + pageValid = MmIsAddressValid((LPVOID)addr); + } + if(pageValid) + DmSetMemory((PVOID)addr, 1, &b, NULL); + else + { + RtlSnprintf(szResponse, cchResponse, "set %d bytes", count); + return XBDM_MEMUNMAPPED; + } + } + } + + RtlSnprintf(szResponse, cchResponse, "set %d bytes", count); + return XBDM_NOERR; +} + +DMHRAPI HrReportModules(PDM_CMDCONT pdmcc, LPSTR szResponse, DWORD cchResponse) +{ + DMN_MODLOAD_EX dmnex; + + if(pdmcc->BytesRemaining == 2) + return XBDM_ENDOFLIST; + + if(FAILED(DmWalkLoadedModulesEx((PDM_WALK_MODULES*)&pdmcd->rgb, &dmnex))) + { + DmCloseLoadedModules((PDM_WALK_MODULES)pdmcd->rgb); + pdmcc->BytesRemaining++; + } + + RtlSnprintf((LPSTR)pdmcc->Buffer, pdmcc->BufferSize, + "name=\"%s\" base=0x%08x size=0x%08x check=0x%08x timestamp=0x%08x pdata=0x%08x psize=0x%08x %sthread=0x%08x osize=0x%08x", + dmnex.Name, dmnex.BaseAddress, dmnex.Size, dmnex.CheckSum, dmnex.TimeStamp, dmnex.PDataAddress, dmnex.PDataSize, + dmnex.Flags & DMN_MODFLAG_TLS ? "" : "dll", dmnex.ThreadId, dmnex.OriginalSize); + + return XBDM_NOERR; +} + +DMHRAPI HrGetModules(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + if(!pdmcc) + return E_FAIL; + + pdmcd->rgb = NULL; + pdmcc->HandlingFunction = HrReportModules; + pdmcc->BytesRemaining = 1; + + return XBDM_MULTIRESPONSE; +} + +DMHRAPI HrStop(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + if(!pdmcc) + return E_FAIL; + + return DwChangeExecState(DMN_EXEC_STOP, TRUE, TRUE, FALSE); +} + +DMHRAPI HrGo(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + if(!pdmcc) + return E_FAIL; + + return DwChangeExecState(DMN_EXEC_START, TRUE, TRUE, FALSE); +} + +DMHRAPI HrReportScreenshot(PDM_CMDCONT pdmcc, LPSTR szResponse, DWORD cchResponse) +{ + if(pdmcd->cch == 0) + { + RtlSnprintf((LPSTR)pdmcc->Buffer, pdmcc->BufferSize, + "pitch=0x%08x width=0x%08x height=0x%08x format=0x%08x offsetx=0x%08x offsety=0x%08x, framebuffersize=0x%08x sw=0x%08x sh=0x%08x colorspace=0x%x\r\n", + pdmcd->screen.p, pdmcd->screen.w, pdmcd->screen.h, pdmcd->screen.fmt, 0, 0, pdmcd->screen.size, pdmcd->screen.sw, pdmcd->screen.sh, 0); + + pdmcd->cch = 1; + pdmcc->DataSize = strlen((char*)pdmcc->Buffer); + } + else if(pdmcd->cch == 1) + { + pdmcc->Buffer = (PVOID)pdmcd->screen.szFrame; + pdmcc->DataSize = pdmcc->BytesRemaining; + pdmcd->cch = 2; + } + else + { + if(NT_SUCCESS(pdmcd->hr)) + DwChangeExecState(DMN_EXEC_START, TRUE, FALSE, FALSE); + + return XBDM_ENDOFLIST; + } + + return XBDM_NOERR; +} + +DMHRAPI HrScreenshot(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + DWORD dwStart, ptrOffset; + char *frameBuffer; + LPDWORD lpgpu = (LPDWORD)0x7FC81740; + DISPLAY_INFORMATION display; + DWORD w, h, p, size; + DWORD vw, vh, vp, vs; + + if(!pdmcc) + return E_FAIL; + + pdmcd->hr = DwChangeExecState(DMN_EXEC_STOP, TRUE, FALSE, FALSE); + + dwStart = *KeTimeStampBundle; + while((*lpgpu & 0x80000000) && (*KeTimeStampBundle - dwStart < 5000)) + Sleep(100); + + if(*lpgpu & 0x80000000) + { + if(NT_SUCCESS(pdmcd->hr)) + DwChangeExecState(DMN_EXEC_START, TRUE, FALSE, FALSE); + strcpy_s(szResponse, cchResponse, "can't lock GPU"); + return E_FAIL; + } + + ptrOffset = *((DWORD*)0x7FC86110); + frameBuffer = (char*)(0xC0000000 + ptrOffset); + if(!MmIsAddressValid(frameBuffer)) { + frameBuffer = (char*)(0xA0000000 + ptrOffset); + if(!MmIsAddressValid(frameBuffer)) { + frameBuffer = (char*)(0xDFFFF000 + ptrOffset); + } + } + + VdGetCurrentDisplayInformation(&display); + w = display.FrontBufferWidth; + h = display.FrontBufferHeight; + p = w * 4; + size = h * p; + + vw = w;vh = h; + if(vw % 128) + vw += (128 - vw % 128); + if(vh % 128) + vh += (128 - vh % 128); + vp = vw * 4; + vs = vh * vp; + + pdmcc->HandlingFunction = HrReportScreenshot; + pdmcc->BytesRemaining = vs; + pdmcd->cch = 0; + + pdmcd->screen.fmt = (((*((UINT*)0x7FC86104) >> 24) & 7) == 0) ? D3DFMT_A8R8G8B8 : D3DFMT_A2R10G10B10; + + pdmcd->screen.w = w; + pdmcd->screen.h = h; + pdmcd->screen.sw = display.DisplayWidth; + pdmcd->screen.sh = display.DisplayHeight; + pdmcd->screen.p = p; + pdmcd->screen.size = vs; + pdmcd->screen.szFrame = frameBuffer; + + return XBDM_BINRESPONSE; +} + +DMHRAPI HrReportWalkMemory(PDM_CMDCONT pdmcc, LPSTR szResponse, DWORD cchResponse) +{ + DWORD dwAddr, dwLength, dwProtect, dwPhys; + + dwAddr = pdmcd->cch; + + if(dwAddr == 0xFFFFFFFF) + return XBDM_ENDOFLIST; + + while(!MmIsAddressValid((PVOID)dwAddr)) + { + if(dwAddr == 0xFFFFF000) + return XBDM_ENDOFLIST; + dwAddr += 0x1000; + } + + // dwAddr now contains a valid page start + + dwProtect = XQueryMemoryProtect((LPVOID)dwAddr); + + // Calc the length of the page + dwLength = 0x1000; + + while(MmIsAddressValid((PVOID)(dwAddr + dwLength)) && (XQueryMemoryProtect((LPVOID)(dwAddr + dwLength)) == dwProtect)) + { + if((dwAddr + dwLength) == 0) + break; + dwLength += 0x1000; + } + + // Now dwLength contains the page length + if((dwAddr + dwLength) == 0) + pdmcd->cch = 0xFFFFFFFF; + else + pdmcd->cch = dwAddr + dwLength; + + dwPhys = MmGetPhysicalAddress((PVOID)dwAddr); + + RtlSnprintf((LPSTR)pdmcc->Buffer, pdmcc->BufferSize, "base=0x%0.8x size=0x%0.8x protect=0x%0.8x phys=0x%0.8x", + dwAddr, dwLength, dwProtect, dwPhys); + return XBDM_NOERR; +} + +DMHRAPI HrWalkMemory(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + if(!pdmcc) + return E_FAIL; + + pdmcd->cch = 0; + pdmcc->BytesRemaining = 1; + pdmcc->HandlingFunction = HrReportWalkMemory; + + strcpy_s(szResponse, cchResponse, "Valid Virtual Address Ranges Follow"); + return XBDM_MULTIRESPONSE; +} + +DMHRAPI HrSetColor(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + char sz[0x10]; + + sz[0] = 0; + FGetSzParam(szCommand, "name", sz, sizeof(sz)); + + g_dmGlobals.dwConsoleColor = 0; + + if(!stricmp(sz, "black")) + g_dmGlobals.dwConsoleColor = CONSOLE_COLOR_FLAG_BLACK; + else if(!stricmp(sz, "blue")) + g_dmGlobals.dwConsoleColor = CONSOLE_COLOR_FLAG_BLACK | CONSOLE_COLOR_FLAG_BLUE; + else if(!stricmp(sz, "bluegray")) + g_dmGlobals.dwConsoleColor = CONSOLE_COLOR_FLAG_WHITE | CONSOLE_COLOR_FLAG_BLUE; + else if(!stricmp(sz, "nosidecar")) + g_dmGlobals.dwConsoleColor = CONSOLE_COLOR_FLAG_NOSIDECAR; + else if(!stricmp(sz, "white")) + g_dmGlobals.dwConsoleColor = CONSOLE_COLOR_FLAG_WHITE; + + g_dmGlobals.bDirty = TRUE; + + return XBDM_NOERR; +} + +DMHRAPI HrSendFileData(PDM_CMDCONT pdmcc, LPSTR szResponse, DWORD cchResponse) +{ + NTSTATUS st; + DWORD cb; + + if(pdmcc->BytesRemaining == 1) + { + // Send the length + *(LPDWORD)pdmcc->Buffer = _byteswap_ulong(pdmcd->cch); + pdmcc->DataSize = 4; + pdmcc->BytesRemaining = 2; + } + else if(pdmcc->BytesRemaining == 2) + { + // Send the file data + cb = pdmcc->BufferSize; + if(cb > pdmcd->cch) + cb = pdmcd->cch; + st = FReadFile(pdmcd->h, pdmcc->Buffer, cb); + if(FAILED(st)) + ZeroMemory(pdmcc->Buffer, cb); + pdmcd->cch -= cb; + pdmcc->DataSize = cb; + + if(pdmcd->cch == 0) + pdmcc->BytesRemaining = 3; + } + else + { + // Close and exit + NtClose(pdmcd->h); + DmFreePool(pdmcc->Buffer); + + return XBDM_ENDOFLIST; + } + + return XBDM_NOERR; +} + +DMHRAPI HrGetFile(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + NTSTATUS st; + IO_STATUS_BLOCK iosb; + char sz[MAX_PATH]; + FILE_NETWORK_OPEN_INFORMATION fni; + + if(!pdmcc) + return E_FAIL; + + if(!FGetSzParam(szCommand, "name", sz, sizeof(sz))) + { + strcpy_s(szResponse, cchResponse, "missing name"); + return E_FAIL; + } + + st = FCreateFile(&pdmcd->h, GENERIC_READ | SYNCHRONIZE, sz, + NULL, 0, 0, FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT); + + if(FAILED(st)) + return XBDM_CANNOTACCESS; + + st = NtQueryInformationFile(pdmcd->h, &iosb, &fni, sizeof(fni), FileNetworkOpenInformation); + + if(FAILED(st)) + { + NtClose(pdmcd->h); + return E_UNEXPECTED; + } + + if(fni.EndOfFile.HighPart) + { + NtClose(pdmcd->h); + + strcpy_s(szResponse, cchResponse, "file is too big"); + return E_FAIL; + } + + pdmcc->BufferSize = 0x3000; + pdmcc->Buffer = DmAllocatePoolWithTag(pdmcc->BufferSize, 'bdbd'); + + if(pdmcc->Buffer == NULL) + { + NtClose(pdmcd->h); + return E_OUTOFMEMORY; + } + + pdmcd->cch = fni.EndOfFile.LowPart; + pdmcc->BytesRemaining = 1; + pdmcc->HandlingFunction = HrSendFileData; + + return XBDM_BINRESPONSE; +} + +DMHRAPI HrRecieveFileData(PDM_CMDCONT pdmcc, LPSTR szResponse, DWORD cchResponse) +{ + FILE_DISPOSITION_INFORMATION fdi; + IO_STATUS_BLOCK iosb; + NTSTATUS st; + + if(pdmcc->DataSize) + { + pdmcd->ib += pdmcc->DataSize; + pdmcc->BytesRemaining -= pdmcc->DataSize; + } + else if(pdmcc->BytesRemaining) + { + pdmcc->BytesRemaining = 0; + fdi.DeleteFile = TRUE; + NtSetInformationFile(pdmcd->h, &iosb, &fdi, sizeof(fdi), FileDispositionInformation); + pdmcd->fError = TRUE; + } + + if(!pdmcc->BytesRemaining || pdmcd->ib == pdmcd->cchBuf) + { + if(pdmcd->h != INVALID_HANDLE_VALUE) + { + st = NtWriteFile(pdmcd->h, NULL, NULL, NULL, &iosb, + pdmcd->rgb, pdmcd->ib, NULL); + + if(FAILED(st)) + { + fdi.DeleteFile = TRUE; + NtSetInformationFile(pdmcd->h, &iosb, &fdi, sizeof(fdi), FileDispositionInformation); + NtClose(pdmcd->h); + pdmcd->fError = TRUE; + pdmcd->h = INVALID_HANDLE_VALUE; + } + else if(!pdmcc->BytesRemaining) + { + NtClose(pdmcd->h); + pdmcd->h = INVALID_HANDLE_VALUE; + } + } + + pdmcc->Buffer = (char*)pdmcc->Buffer - pdmcd->ib; + pdmcd->ib = 0; + + if(!pdmcc->BytesRemaining && pdmcc->Buffer) + DmFreePool(pdmcd->rgb); + } + + if(pdmcd->rgb) + { + pdmcc->Buffer = pdmcd->rgb + pdmcd->ib; + pdmcc->BufferSize = pdmcd->cchBuf - pdmcd->ib; + } + + if(pdmcd->fError) + { + DmFreePool(pdmcd->rgb); + NtClose(pdmcd->h); + pdmcd->h = INVALID_HANDLE_VALUE; + } + + return pdmcd->fError ? E_UNEXPECTED : XBDM_NOERR; +} + +DMHRAPI HrSendFile(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + NTSTATUS st; + char sz[MAX_PATH]; + IO_STATUS_BLOCK iosb; + FILE_DISPOSITION_INFORMATION fdi; + LARGE_INTEGER liSize; + + if(!pdmcc) + return E_FAIL; + + if(!FGetSzParam(szCommand, "name", sz, sizeof(sz))) + { + strcpy_s(szResponse, cchResponse, "missing name"); + return E_FAIL; + } + + if(!FGetNamedDwParam(szCommand, "length", &pdmcd->cch, szResponse)) + return E_FAIL; + + liSize.HighPart = 0; + liSize.LowPart = pdmcd->cch; + + st = FCreateFile(&pdmcd->h, GENERIC_WRITE | DELETE | SYNCHRONIZE, + sz, &liSize, 0, 0, FILE_OVERWRITE_IF, + FILE_SYNCHRONOUS_IO_NONALERT); + + if(FAILED(st)) + return XBDM_CANNOTCREATE; + + st = NtSetInformationFile(pdmcd->h, &iosb, &liSize, sizeof(liSize), FileEndOfFileInformation); + + if(FAILED(st)) + { + fdi.DeleteFile = TRUE; + NtSetInformationFile(pdmcd->h, &iosb, &fdi, sizeof(fdi), FileDispositionInformation); + NtClose(pdmcd->h); + + return XBDM_DEVICEFULL; + } + + pdmcc->BufferSize = 0x4000; + pdmcc->Buffer = DmAllocatePoolWithTag(pdmcc->BufferSize, 'bdbd'); + + if(pdmcc->Buffer == NULL) + { + fdi.DeleteFile = TRUE; + NtSetInformationFile(pdmcd->h, &iosb, &fdi, sizeof(fdi), FileDispositionInformation); + NtClose(pdmcd->h); + + return E_OUTOFMEMORY; + } + + pdmcd->cchBuf = pdmcc->BufferSize; + pdmcd->cch = 0; + pdmcc->HandlingFunction = HrRecieveFileData; + pdmcd->ib = 0; + pdmcd->rgb = (LPSTR)pdmcc->Buffer; + pdmcd->fError = FALSE; + + pdmcc->BytesRemaining = liSize.LowPart; + + return XBDM_READYFORBIN; +} + +DMHRAPI HrRecieveVolumeFileData(PDM_CMDCONT pdmcc, LPSTR szResponse, DWORD cchResponse) +{ + // We act under the assumption that if the buffer is big enough, we get exactly however + // many bytes we asked for in BytesRemaining, otherwise we just get a full buffer + + FILE_DISPOSITION_INFORMATION fdi; + IO_STATUS_BLOCK iosb; + +#define st ((DWORD*)(pdmcd->rgb + 0x4000))[pdmcd->vfile.remain] + + if(pdmcd->vfile.step != 3 && !pdmcc->DataSize) + { + // We lost the connection... + if(pdmcd->h != INVALID_HANDLE_VALUE) + { + fdi.DeleteFile = TRUE; + NtSetInformationFile(pdmcd->h, &iosb, &fdi, sizeof(fdi), FileDispositionInformation); + + NtClose(pdmcd->h); + pdmcd->h = INVALID_HANDLE_VALUE; + } + + DmFreePool(pdmcd->rgb); + pdmcc->BytesRemaining = 0; + + return XBDM_ENDOFLIST; + } + else if(pdmcd->vfile.step == 0) + { + // Recieved file info block +#pragma pack(1) + typedef struct + { + DWORD dwSize; + ULONGLONG CreateTime; + ULONGLONG ChangeTime; + ULONGLONG FileSize; + DWORD FileAttributes; + } *__info; + + __info fInfo = (__info)pdmcc->Buffer; + + pdmcd->vfile.ChangeTime.QuadPart = fInfo->ChangeTime; + pdmcd->vfile.CreationTime.QuadPart = fInfo->CreateTime; + pdmcd->vfile.FileAttributes = fInfo->FileAttributes; + pdmcd->vfile.FileSize = (DWORD)fInfo->FileSize; + + if(fInfo->FileSize > 0xFFFFFFFF) + st = E_FAIL; // File too big + else + st = STATUS_SUCCESS; + + pdmcc->BytesRemaining = fInfo->dwSize - 0x20; + pdmcd->ib = 0; + + pdmcd->vfile.step++; + } + else if(pdmcd->vfile.step == 1) + { + // Recieved file name + LARGE_INTEGER li; + + if(NT_SUCCESS(st)) + { + li.HighPart = 0; + li.LowPart = pdmcd->vfile.FileSize; + + st = FCreateFile(&pdmcd->h, GENERIC_WRITE | DELETE | SYNCHRONIZE, + (char*)pdmcc->Buffer, &li, 0, 0, FILE_OVERWRITE_IF, + FILE_SYNCHRONOUS_IO_NONALERT); + } + + pdmcc->BytesRemaining = pdmcd->vfile.FileSize; + pdmcd->vfile.step++; + } + else if(pdmcd->vfile.step == 2) + { + // Recieved file data + pdmcd->ib += pdmcc->DataSize; + pdmcc->BytesRemaining -= pdmcc->DataSize; + + if((pdmcc->BytesRemaining == 0) || (pdmcd->ib == 0x4000)) + { + // Write to file + if((pdmcd->h != INVALID_HANDLE_VALUE) && NT_SUCCESS(st)) + { + st = NtWriteFile(pdmcd->h, NULL, NULL, NULL, &iosb, pdmcd->rgb, pdmcd->ib, NULL); + if(FAILED(st)) + { + fdi.DeleteFile = TRUE; + NtSetInformationFile(pdmcd->h, &iosb, &fdi, sizeof(fdi), FileDispositionInformation); + NtClose(pdmcd->h); + pdmcd->h = INVALID_HANDLE_VALUE; + } + + // Reset back to the start + pdmcd->ib = 0; + } + } + + if(pdmcc->BytesRemaining == 0) + { + pdmcd->vfile.remain++; + + if(pdmcd->h != INVALID_HANDLE_VALUE) + { + NtClose(pdmcd->h); + pdmcd->h = INVALID_HANDLE_VALUE; + } + + if(pdmcd->vfile.remain == pdmcd->cch) + { + pdmcd->vfile.step++; + return XBDM_BINRESPONSE; + } + else + { + pdmcd->vfile.step = 0; + pdmcc->BytesRemaining = 0x20; + + pdmcd->ib = 0; + } + } + } + else if(pdmcd->vfile.step == 3) + { + // Send back status codes + pdmcc->Buffer = pdmcd->rgb + 0x4000; + pdmcc->BytesRemaining = 1; + pdmcc->DataSize = pdmcd->cchBuf - 0x4000; + + pdmcd->vfile.step++; + } + else if(pdmcd->vfile.step == 4) + { + DmFreePool(pdmcd->rgb); + + return XBDM_ENDOFLIST; // Signal completion + } + + // Fix up the values + if(pdmcd->vfile.step != 4) + { + pdmcc->Buffer = pdmcd->rgb + pdmcd->ib; + pdmcc->BufferSize = 0x4000 - pdmcd->ib; + } + +#undef st + + return XBDM_NOERR; +} + +DMHRAPI HrSendVolumeFile(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + if(!pdmcc) + return E_FAIL; + + if(!FGetNamedDwParam(szCommand, "count", &pdmcd->cch, szResponse)) + return E_FAIL; + + pdmcc->BufferSize = 0x4000 + pdmcd->cch * 4; + pdmcc->Buffer = DmAllocatePoolWithTag(pdmcc->BufferSize, 'bdbd'); + + if(!pdmcc->Buffer) + return E_OUTOFMEMORY; + + ZeroMemory(pdmcc->Buffer, pdmcc->BufferSize); + + pdmcd->rgb = (char*)pdmcc->Buffer; + + pdmcc->HandlingFunction = HrRecieveVolumeFileData; + pdmcc->BytesRemaining = 0x20; + + pdmcd->cchBuf = pdmcc->BufferSize; + pdmcd->vfile.remain = 0; + pdmcd->vfile.step = 0; + pdmcd->h = INVALID_HANDLE_VALUE; + + return XBDM_READYFORBIN; +} + +DMHRAPI HrHwInfo(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + if(!pdmcc) + return E_FAIL; + + RtlSnprintf(szResponse, cchResponse, + "Hardware Info Follows\r\n" + "Flags : 0x%08x\r\n" + "NumberOfProcessors : 0x%02x\r\n" + "PCIBridgeRevisionID: 0x%02x\r\n" + "Reserved Bytes : 0x %02x %02x %02x %02x %02x %02x\r\n" + "BldrMagic : 0x%04x\r\n" + "BldrFlags : 0x%04x\r\n" + ".", + XboxHardwareInfo->Flags, XboxHardwareInfo->NumberOfProcessors, + XboxHardwareInfo->PCIBridgeRevisionID, + XboxHardwareInfo->Reserved[0], XboxHardwareInfo->Reserved[1], + XboxHardwareInfo->Reserved[2], XboxHardwareInfo->Reserved[3], + XboxHardwareInfo->Reserved[4], XboxHardwareInfo->Reserved[5], + XboxHardwareInfo->BldrMagic, XboxHardwareInfo->BldrFlags); + + return XBDM_NOERR; +} + +DMHRAPI HrObjList(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + PDMCONN pdmc; + + if(!pdmcc) + return E_FAIL; + + pdmc = CONTAINING_RECORD(pdmcc, DMCONN, dmcc); + + DumpAllObjects("\\", pdmc->s); + + return XBDM_NOERR; +} + +DMHRAPI HrSetDumpMode(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + int i; + + for(i = 0;i <= DM_DUMPMODE_DISABLED;i++) + { + if(PchGetParam(szCommand, rgszDumpMode[i], FALSE)) + break; + } + + if(i > DM_DUMPMODE_DISABLED) + return XBDM_NOERR; + + DmSetDumpMode(i); + + strcpy_s(szResponse, cchResponse, rgszDumpMode[i]); + return XBDM_NOERR; +} + +DMHRAPI HrNotify(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + DWORD dwPort; + PDMCONN conn; + + if(!FGetNamedDwParam(szCommand, "reconnectport", &dwPort, szResponse)) + return E_FAIL; + + conn = CONTAINING_RECORD(pdmcc, DMCONN, dmcc); + + FConvertToNotifySock(conn, dwPort); + + return XBDM_NOERR; +} + +DMHRAPI HrNotifyAt(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + DWORD dw; + + if(!FGetNamedDwParam(szCommand, "port", &dw, szResponse)) + return E_FAIL; + if(!PchGetParam(szCommand, "drop", FALSE)) + return E_FAIL; + + return FDropNotifySock(dw); +} + +DMHRAPI HrAttachDebugger(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + DWORD dwPort; + BOOL fOverride; + + fOverride = (BOOL)PchGetParam(szCommand, "override", FALSE); + + if(PchGetParam(szCommand, "connect", FALSE)) + { + if(g_dmGlobals.bDebugging && !fOverride) + return XBDM_ALREADYEXISTS; + + g_dmGlobals.dwDebugPort = 0; + ZeroMemory(g_dmGlobals.rgchDebuggerName, sizeof(g_dmGlobals.rgchDebuggerName)); + ZeroMemory(g_dmGlobals.rgchDebuggerUser, sizeof(g_dmGlobals.rgchDebuggerUser)); + + FGetDwParam(szCommand, "port", &g_dmGlobals.dwDebugPort); + FGetSzParam(szCommand, "name", g_dmGlobals.rgchDebuggerName, sizeof(g_dmGlobals.rgchDebuggerName)); + FGetSzParam(szCommand, "user", g_dmGlobals.rgchDebuggerUser, sizeof(g_dmGlobals.rgchDebuggerUser)); + + g_dmGlobals.bDebugging = TRUE; + } + else if(PchGetParam(szCommand, "disconnect", FALSE)) + { + if((g_dmGlobals.dwDebugPort == 0) + || (FGetDwParam(szCommand, "port", &dwPort) && dwPort == g_dmGlobals.dwDebugPort) + || fOverride) + { + ZeroMemory(g_dmGlobals.rgchDebuggerName, sizeof(g_dmGlobals.rgchDebuggerName)); + ZeroMemory(g_dmGlobals.rgchDebuggerUser, sizeof(g_dmGlobals.rgchDebuggerUser)); + g_dmGlobals.bDebugging = FALSE; + } + else + return XBDM_CANNOTACCESS; + } + else + { + strcpy_s(szResponse, cchResponse, "no command"); + return E_FAIL; + } + + return XBDM_NOERR; +} + +DMHRAPI HrIsDebuggerAttached(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + const char *sz1, *sz2, *sz3, *sz4, *sz5, *sz6; + + if(!pdmcc) + return E_FAIL; + + if(!g_dmGlobals.bDebugging) + return XBDM_NOERR; + + if(g_dmGlobals.rgchDebuggerUser[0]) + { + sz1 = "user=\""; + sz2 = g_dmGlobals.rgchDebuggerUser; + sz3 = "\""; + } + else + { + sz1 = ""; + sz2 = ""; + sz3 = ""; + } + + if(g_dmGlobals.rgchDebuggerName[0]) + { + sz4 = "name=\""; + sz5 = g_dmGlobals.rgchDebuggerName; + sz6 = "\""; + } + else + { + sz4 = ""; + sz5 = ""; + sz6 = ""; + } + + RtlSnprintf(szResponse, cchResponse, "%s%s%s%s%s%s%s", + sz1, sz2, sz3, + (sz1[0] && sz4[0]) ? " " : "", + sz4, sz5, sz6); + + return XBDM_ALREADYEXISTS; +} + +DMHRAPI HrReportSystemInfo(PDM_CMDCONT pdmcc, LPSTR szResponse, DWORD cchResponse) +{ + char *sz; + + switch(pdmcc->BytesRemaining) + { + case 1: + strcpy_s((char*)pdmcc->Buffer, pdmcc->BufferSize, "HDD="); + if(XboxHardwareInfo->Flags & 0x20) + strcat_s((char*)pdmcc->Buffer, pdmcc->BufferSize, "Enabled"); + else + strcat_s((char*)pdmcc->Buffer, pdmcc->BufferSize, "Disabled"); + break; + case 2: + strcpy_s((char*)pdmcc->Buffer, pdmcc->BufferSize, "Type="); + if(XboxHardwareInfo->Flags & 0x02000000) + sz = "TestKit"; + else + sz = "DevKit"; + strcat_s((char*)pdmcc->Buffer, pdmcc->BufferSize, sz); + break; + case 3: + strcpy_s((char*)pdmcc->Buffer, pdmcc->BufferSize, "Platform="); + switch(XboxHardwareInfo->Flags & 3) + { + case 0: + sz = "Alpha"; + break; + case 1: + sz = "Mongrel"; + break; + case 2: + sz = "Shiva"; + break; + case 3: + sz = "Waternoose"; + break; + default: + sz = "Unknown"; + break; + } + strcat_s((char*)pdmcc->Buffer, pdmcc->BufferSize, sz); + strcat_s((char*)pdmcc->Buffer, pdmcc->BufferSize, " System="); + switch((XboxHardwareInfo->Flags >> 28) & 0xF) + { + case 0: + sz = "Xenon"; + break; + case 1: + sz = "Zephyr"; + break; + case 2: + sz = "Falcon"; + break; + case 3: + sz = "Jasper"; + break; + case 4: + sz = "Trinity"; + break; + case 5: + sz = "Corona"; + break; + case 6: + sz = "Winchester"; + break; + default: + sz = "Unknown"; + break; + } + strcat_s((char*)pdmcc->Buffer, pdmcc->BufferSize, sz); + break; + case 4: + RtlSnprintf((char*)pdmcc->Buffer, pdmcc->BufferSize, "BaseKrnl=%d.%d.%d.%d Krnl=%d.%d.%d.%d XDK=2.0.20353.0", + XboxKrnlBaseVersion->Major, XboxKrnlBaseVersion->Minor, XboxKrnlBaseVersion->Build, + (XboxKrnlBaseVersion->ApprovalType << 8) + XboxKrnlBaseVersion->QFE, + XboxKrnlVersion->Major, XboxKrnlVersion->Minor, XboxKrnlVersion->Build, + (XboxKrnlVersion->ApprovalType << 8) + XboxKrnlVersion->QFE); + break; + case 5: + return XBDM_ENDOFLIST; + } + + pdmcc->BytesRemaining++; + + return XBDM_NOERR; +} + +DMHRAPI HrGetSystemInfo(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + if(!pdmcc) + return E_FAIL; + + pdmcc->HandlingFunction = HrReportSystemInfo; + pdmcc->BytesRemaining = 1; + + return XBDM_MULTIRESPONSE; +} + +VOID PcregNext(DMCR* Context) +{ + for(;;) + { + if(Context->CurrentRegister == cchregs) + { + Context->CurrentRegister = 0; + Context->Register = NULL; + return; + } + + Context->Register = &rgbregs[Context->CurrentRegister]; + Context->CurrentRegister++; + + if(Context->Context.ContextFlags & Context->Register->Context) + break; + } +} + +DMHRAPI HrReportContext(PDM_CMDCONT pdmcc, LPSTR szResponse, DWORD cchResponse) +{ + int i; + DMCR *context = ((DMCR*)pdmcc->CustomData); + + if(!context->Register) + { + DmFreePool(pdmcc->CustomData); + return XBDM_ENDOFLIST; + } + + pdmcc->DataSize = 0; + for(i = 0;i < 4;i++) + { + if(context->Register->Size == 4) + { + pdmcc->DataSize += RtlSprintf((char*)pdmcc->Buffer + pdmcc->DataSize, "%s=0x%08x\r\n", + context->Register->Name, *(LPDWORD)((char*)&context->Context + context->Register->Offset)); + } + else if(context->Register->Size == 8) + { + pdmcc->DataSize += RtlSprintf((char*)pdmcc->Buffer + pdmcc->DataSize, "%s=0q%016I64x\r\n", + context->Register->Name, *(QWORD*)((char*)&context->Context + context->Register->Offset)); + } + else if(context->Register->Size == 16) + { + pdmcc->DataSize += RtlSprintf((char*)pdmcc->Buffer + pdmcc->DataSize, "%s=0x%08x,0x%08x,0x%08x,0x%08x\r\n", + context->Register->Name, + (LPDWORD)((char*)&context->Context + context->Register->Offset)[0], + (LPDWORD)((char*)&context->Context + context->Register->Offset)[1], + (LPDWORD)((char*)&context->Context + context->Register->Offset)[2], + (LPDWORD)((char*)&context->Context + context->Register->Offset)[3]); + } + + PcregNext(context); + + if(!context->Register) + break; + } + + return XBDM_NOERR; +} + +DMHRAPI HrGetContext(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + XCONTEXT context; + DWORD dwThreadId; + HRESULT hr; + + if(!pdmcc) + return E_FAIL; + + if(!FGetNamedDwParam(szCommand, "thread", &dwThreadId, szResponse)) + return E_FAIL; + + context.ContextFlags = 0; + if(PchGetParam(szCommand, "control", FALSE)) + context.ContextFlags |= CONTEXT_CONTROL; + if(PchGetParam(szCommand, "int", FALSE)) + context.ContextFlags |= CONTEXT_INTEGER; + if(PchGetParam(szCommand, "fp", FALSE)) + context.ContextFlags |= CONTEXT_FLOATING_POINT; + if(PchGetParam(szCommand, "vr", FALSE)) + context.ContextFlags |= CONTEXT_VECTOR; + if(PchGetParam(szCommand, "full", FALSE)) + context.ContextFlags |= CONTEXT_FULL; + + hr = DmGetThreadContext(dwThreadId, &context); + + if(FAILED(hr)) + return hr; + + pdmcc->CustomData = DmAllocatePoolWithTag(sizeof(DMCR), 'dmcr'); + + if(!pdmcc->CustomData) + return E_OUTOFMEMORY; + + ((DMCR*)pdmcc->CustomData)->CurrentRegister = 0; + ((DMCR*)pdmcc->CustomData)->Register = NULL; + memcpy(pdmcc->CustomData, &context, sizeof(XCONTEXT)); + + PcregNext(((DMCR*)pdmcc->CustomData)); + pdmcc->HandlingFunction = HrReportContext; + + return XBDM_MULTIRESPONSE; +} + +DMHRAPI HrSetContext(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + DMCR dmcr; + DWORD dwThreadId; + HRESULT hr; + BOOL bCopy; + + char sz[0x10]; + + if(!pdmcc) + return E_FAIL; + + if(!FGetNamedDwParam(szCommand, "thread", &dwThreadId, szResponse)) + return E_FAIL; + + ZeroMemory(&dmcr, sizeof(DMCR)); + + dmcr.Context.ContextFlags = CONTEXT_FULL; + dmcr.CurrentRegister = 0; + dmcr.Register = NULL; + + hr = DmGetThreadContext(dwThreadId, &dmcr.Context); + + if(FAILED(hr)) + return hr; + + for(;;) + { + PcregNext(&dmcr); + + if(dmcr.Register == NULL) + break; + + if(dmcr.Register->Size == 4) + bCopy = FGetDwParam(szCommand, dmcr.Register->Name, (DWORD*)sz); + else if(dmcr.Register->Size == 8) + bCopy = FGetQwordParam(szCommand, dmcr.Register->Name, (ULARGE_INTEGER*)sz); + else if(dmcr.Register->Size == 0x10) + bCopy = FGetVectorParam(szCommand, dmcr.Register->Name, (float*)sz); + else + bCopy = FALSE; + + if(bCopy) + memcpy((char*)&dmcr.Context + dmcr.Register->Offset, sz, dmcr.Register->Size); + } + + hr = DmSetThreadContext(dwThreadId, &dmcr.Context); + + return hr; +} + +DMHRAPI HrReportThreadList(PDM_CMDCONT pdmcc, LPSTR szResponse, DWORD cchResponse) +{ + if(pdmcd->cch == pdmcd->ib) + { + DmFreePool(pdmcd->rgb); + return XBDM_ENDOFLIST; + } + + pdmcc->DataSize = 0; + + while((pdmcc->DataSize + 0x10 < pdmcc->BufferSize) + && (pdmcd->cch != pdmcd->ib)) + { + pdmcc->DataSize += RtlSprintf((char*)pdmcc->Buffer + pdmcc->DataSize, "%d\r\n", ((LPDWORD)pdmcd->rgb)[pdmcd->ib]); + pdmcd->ib++; + } + return XBDM_NOERR; +} + +DMHRAPI HrListThreads(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + HRESULT hr; + + if(!pdmcc) + return E_FAIL; + + pdmcd->rgb = (char*)DmAllocatePoolWithTag(0x400, 'xbdm'); + pdmcd->cch = 0x100; + + if(!pdmcd->rgb) + return E_OUTOFMEMORY; + + hr = DmGetThreadList((LPDWORD)pdmcd->rgb, &pdmcd->cch); + + if(FAILED(hr)) + { + if(hr == XBDM_BUFFER_TOO_SMALL) + hr = E_UNEXPECTED; + + DmFreePool(pdmcd->rgb); + } + else + { + hr = XBDM_MULTIRESPONSE; + strcpy_s(szResponse, cchResponse, "thread list follows"); + + pdmcc->HandlingFunction = HrReportThreadList; + pdmcd->ib = 0; + } + + return hr; +} + +DMHRAPI HrReportThreadListEx(PDM_CMDCONT pdmcc, LPSTR szResponse, DWORD cchResponse) +{ + if(pdmcd->cch == pdmcd->ib) + { + DmFreePool(pdmcd->rgb); + return XBDM_ENDOFLIST; + } + + pdmcc->DataSize = 0; + + while((pdmcc->DataSize + 0x10 < pdmcc->BufferSize) + && (pdmcd->cch != pdmcd->ib)) + { + pdmcc->DataSize += RtlSprintf((char*)pdmcc->Buffer + pdmcc->DataSize, "%08X\r\n", ((LPDWORD)pdmcd->rgb)[pdmcd->ib]); + pdmcd->ib++; + } + return XBDM_NOERR; +} + +DMHRAPI HrListThreadsEx(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + HRESULT hr; + + if(!pdmcc) + return E_FAIL; + + pdmcd->rgb = (char*)DmAllocatePoolWithTag(0x400, 'xbdm'); + pdmcd->cch = 0x100; + + if(!pdmcd->rgb) + return E_OUTOFMEMORY; + + hr = DmGetThreadList((LPDWORD)pdmcd->rgb, &pdmcd->cch); + + if(FAILED(hr)) + { + if(hr == XBDM_BUFFER_TOO_SMALL) + hr = E_UNEXPECTED; + + DmFreePool(pdmcd->rgb); + } + else + { + hr = XBDM_MULTIRESPONSE; + strcpy_s(szResponse, cchResponse, "thread list follows"); + + pdmcc->HandlingFunction = HrReportThreadListEx; + pdmcd->ib = 0; + } + + return hr; +} + +DMHRAPI HrGetCpuKey(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + QWORD fuses[12]; + + HvGetFuses(fuses); + + RtlSnprintf(szResponse, cchResponse, "%016I64X%016I64X", fuses[3], fuses[5]); + return XBDM_NOERR; +} + +DMHRAPI HrContinueThread(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + DWORD dwThreadId; + + if(!FGetNamedDwParam(szCommand, "thread", &dwThreadId, szResponse)) + return E_FAIL; + + return DmContinueThread(dwThreadId, (BOOL)PchGetParam(szCommand, "exception", FALSE)); +} + +DMHRAPI HrDoStopOn(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, BOOL fStop) +{ + DWORD dw = 0; + + if(PchGetParam(szCommand, "all", FALSE)) + dw = -1; + else + { + if(PchGetParam(szCommand, "fce", FALSE)) + dw |= DMSTOP_FCE; + if(PchGetParam(szCommand, "debugstr", FALSE)) + dw |= DMSTOP_DEBUGSTR; + if(PchGetParam(szCommand, "createthread", FALSE)) + dw |= DMSTOP_CREATETHREAD; + if(PchGetParam(szCommand, "stacktrace", FALSE)) + dw |= DMSTOP_STACKTRACE; + if(PchGetParam(szCommand, "modload", FALSE)) + dw |= DMSTOP_MODLOAD; + } + + return DmStopOn(dw, fStop); +} + +DMHRAPI HrStopOn(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + return HrDoStopOn(szCommand, szResponse, cchResponse, TRUE); +} + +DMHRAPI HrNoStopOn(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + return HrDoStopOn(szCommand, szResponse, cchResponse, FALSE); +} + +DMHRAPI HrIsThreadStopped(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + DM_THREADSTOP dmts; + DWORD dwThreadId; + HRESULT hr; + + if(!pdmcc) + return E_FAIL; + + if(!FGetNamedDwParam(szCommand, "thread", &dwThreadId, szResponse)) + return E_FAIL; + + hr = DmIsThreadStopped(dwThreadId, &dmts); + + if(FAILED(hr)) + return hr; + + if(dmts.NotifiedReason == DM_ASSERT) + RtlSnprintf(szResponse, cchResponse, "assert thread=0x%08x straddr=0x%08x strlen=0x%08x", + dmts.u.DebugStr.ThreadId, dmts.u.DebugStr.String, dmts.u.DebugStr.Length); + else if(dmts.NotifiedReason == DM_DEBUGSTR) + RtlSnprintf(szResponse, cchResponse, "debugstr thread=0x%08x stop", dmts.u.DebugStr.ThreadId); + else if(!FGetNotifySz(dmts.NotifiedReason, (ULONG_PTR)&dmts.u, szResponse, cchResponse)) + strcpy_s(szResponse, cchResponse, "stopped"); + + return XBDM_NOERR; +} + +DMHRAPI HrSuspendThread(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + DWORD dwThreadId; + + if(!pdmcc) + return E_FAIL; + + if(!FGetNamedDwParam(szCommand, "thread", &dwThreadId, szResponse)) + return FALSE; + + return DmSuspendThread(dwThreadId); +} + +DMHRAPI HrResumeThread(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + DWORD dwThreadId; + + if(!pdmcc) + return E_FAIL; + + if(!FGetNamedDwParam(szCommand, "thread", &dwThreadId, szResponse)) + return FALSE; + + return DmResumeThread(dwThreadId); +} + +DMHRAPI HrReportThreadInfo(PDM_CMDCONT pdmcc, LPSTR szResponse, DWORD cchResponse) +{ + if(pdmcc->BytesRemaining == 2) + return XBDM_ENDOFLIST; + + pdmcc->BytesRemaining++; + + RtlSnprintf((char*)pdmcc->Buffer, pdmcc->BufferSize, + "suspend=%d priority=%d tlsbase=0x%08x start=0x%08x base=0x%08x limit=0x%08x slack=0x%08x createhi=0x%08x createlo=0x%08x nameaddr=0x%08x namelen=0x%08x proc=0x%02X lasterr=0x%08x", + pdmcd->dmti.SuspendCount, pdmcd->dmti.Priority, pdmcd->dmti.TlsBase, pdmcd->dmti.StartAddress, + pdmcd->dmti.StackBase, pdmcd->dmti.StackLimit, pdmcd->dmti.StackSlackSpace, pdmcd->dmti.CreateTime.dwHighDateTime, + pdmcd->dmti.CreateTime.dwLowDateTime, pdmcd->dmti.ThreadNameAddress, + pdmcd->dmti.ThreadNameLength, pdmcd->dmti.CurrentProcessor, pdmcd->dmti.LastError); + + return XBDM_NOERR; +} + +DMHRAPI HrGetThreadInfo(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + DWORD dwThreadId; + HRESULT hr; + + if(!pdmcc) + return E_FAIL; + + if(!FGetNamedDwParam(szCommand, "thread", &dwThreadId, szResponse)) + return FALSE; + + pdmcd->dmti.Size = sizeof(DM_THREADINFOEX); + hr = DmGetThreadInfoEx(dwThreadId, &pdmcd->dmti); + + if(FAILED(hr)) + return hr; + + pdmcc->HandlingFunction = HrReportThreadInfo; + pdmcc->BytesRemaining = 1; + + strcpy_s(szResponse, cchResponse, "thread info follows"); + + return XBDM_MULTIRESPONSE; +} + +DMHRAPI HrReportModuleSections(PDM_CMDCONT pdmcc, LPSTR szResponse, DWORD cchResponse) +{ + if(pdmcc->BytesRemaining == 3) + return XBDM_ENDOFLIST; + + RtlSnprintf((char*)pdmcc->Buffer, pdmcc->BufferSize, "name=\"%s\" base=0x%08x size=0x%08x index=%d flags=%d", + pdmcd->dmsl.Name, pdmcd->dmsl.BaseAddress, pdmcd->dmsl.Size, pdmcd->dmsl.Index, pdmcd->dmsl.Flags); + + if(pdmcc->BytesRemaining == 2) + pdmcc->BytesRemaining++; + else if(FAILED(DmWalkModuleSections((PDM_WALK_MODSECT*)&pdmcd->rgb, pdmcd->sz, &pdmcd->dmsl))) + { + pdmcc->BytesRemaining++; + DmCloseModuleSections((PDM_WALK_MODSECT)pdmcd->rgb); + } + + return XBDM_NOERR; +} + +DMHRAPI HrListModuleSections(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + if(!pdmcc) + return E_FAIL; + + if(!FGetSzParam(szCommand, "name", pdmcd->sz, sizeof(pdmcd->sz))) + { + strcpy_s(szResponse, cchResponse, "missing name"); + return E_FAIL; + } + + pdmcd->rgb = NULL; + pdmcc->HandlingFunction = HrReportModuleSections; + pdmcc->BytesRemaining = 1; + + if(NT_SUCCESS(DmWalkModuleSections((PDM_WALK_MODSECT*)&pdmcd->rgb, pdmcd->sz, &pdmcd->dmsl))) + return XBDM_MULTIRESPONSE; + + return XBDM_NOSUCHFILE; +} + +DMHRAPI HrGetProcessId(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + ULARGE_INTEGER time; + + if(dwExecState == DMN_EXEC_PENDING) + return XBDM_NOTHREAD; + + while(g_dmGlobals.dwPid == 0) + { + KeQuerySystemTime(&time); + g_dmGlobals.dwPid = time.LowPart + __mftb32(); + } + + RtlSnprintf(szResponse, cchResponse, "pid=0x%08x", g_dmGlobals.dwPid); + + return XBDM_NOERR; +} + +DMHRAPI HrReportXexField(PDM_CMDCONT pdmcc, LPSTR szResponse, DWORD cchResponse) +{ + if(pdmcc->BytesRemaining == 3) + return XBDM_ENDOFLIST; + + if(pdmcc->BytesRemaining == 1) + { + pdmcc->BytesRemaining++; + RtlSnprintf((char*)pdmcc->Buffer, pdmcc->BufferSize, "fieldsize=0x%08x", 4); + } + else if(pdmcc->BytesRemaining == 2) + { + pdmcc->BytesRemaining++; + RtlSnprintf((char*)pdmcc->Buffer, pdmcc->BufferSize, "%08X", (DWORD)pdmcd->rgb); + } + + return XBDM_NOERR; +} + +DMHRAPI HrGetXexField(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + PLDR_DATA_TABLE_ENTRY pldte; + char sz[MAX_PATH]; + DWORD dw; + HRESULT hr; + + if(!pdmcc) + return E_FAIL; + + if(!FGetSzParam(szCommand, "module", sz, sizeof(sz))) + { + strcpy_s(szResponse, cchResponse, "missing module"); + return E_FAIL; + } + + if(!FGetNamedDwParam(szCommand, "field", &dw, szResponse)) + return E_FAIL; + + if(dw != 0x00010100) + { + DbgPrint("[xbdm] unknown command \"%s\"\n", szCommand); + return XBDM_INVALIDCMD; + } + + hr = FGetModuleHandle(sz, &pldte, TRUE); + + if(!pldte) + return XBDM_NOSUCHFILE; + + pdmcd->rgb = (char*)RtlImageXexHeaderField(pldte->XexHeaderBase, dw); + pdmcc->HandlingFunction = HrReportXexField; + pdmcc->BytesRemaining = 1; + + if(pdmcd->rgb) + return XBDM_MULTIRESPONSE; + else + return XBDM_FIELDNOTPRESENT; +} + +DMHRAPI HrGetExecState(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + char *sz; + + switch(dwExecState) + { + case DMN_EXEC_START: + sz = "start"; + break; + case DMN_EXEC_STOP: + sz = "stop"; + break; + case DMN_EXEC_PENDING: + sz = "pending"; + break; + case DMN_EXEC_REBOOT: + sz = "reboot"; + break; + case DMN_EXEC_PENDING_TITLE: + sz = "pending_title"; + break; + case DMN_EXEC_REBOOT_TITLE: + sz = "reboot_title"; + break; + } + + RtlSnprintf(szResponse, cchResponse, "%s", sz); + + return XBDM_NOERR; +} + +DMHRAPI HrGetConsoleId(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + char sz[0xD]; + NTSTATUS st; + + ZeroMemory(sz, sizeof(sz)); + st = XeKeysGetConsoleID(NULL, sz); + + if(FAILED(st)) + return (HRESULT)(st | 0x10000000); + + RtlSnprintf(szResponse, cchResponse, "consoleid=%s", sz); + return XBDM_NOERR; +} + +DMHRAPI HrBreak(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + HRESULT hr = XBDM_NOERR; + BOOL bClear; + DWORD dwAddr; + DWORD dwFlags; + DWORD dwSize; + + if(PchGetParam(szCommand, "now", FALSE)) + { + Sleep(250); + __emit(BREAKPOINT_BREAK); + } + else if(PchGetParam(szCommand, "start", FALSE)) + { + if(FAILED(hr = DmSetInitialBreakpoint())) + strcpy_s(szResponse, cchResponse, "execution not pending"); + } + else if(PchGetParam(szCommand, "clearall", FALSE)) + DmRemoveAllBreakpoints(); + else + { + bClear = (BOOL)PchGetParam(szCommand, "clear", FALSE); + if(FGetNamedDwParam(szCommand, "addr", &dwAddr, szResponse)) + { + if(bClear) + DmRemoveBreakpoint((PVOID)dwAddr); + else + DmSetBreakpoint((PVOID)dwAddr); + } + else + { + if(FGetDwParam(szCommand, "read", &dwAddr)) + dwFlags = DMBREAK_READ; + else if(FGetDwParam(szCommand, "write", &dwAddr)) + dwFlags = DMBREAK_WRITE; + else if(FGetDwParam(szCommand, "readwrite", &dwAddr)) + dwFlags = DMBREAK_READWRITE; + else if(FGetDwParam(szCommand, "execute", &dwAddr)) + dwFlags = DMBREAK_EXECUTE; + else + hr = E_FAIL; + + if(NT_SUCCESS(hr)) + { + if(bClear) + dwFlags = DMBREAK_NONE; + else if(!FGetNamedDwParam(szCommand, "size", &dwSize, szResponse)) + hr = E_FAIL; + + if(NT_SUCCESS(hr)) + DmSetDataBreakpoint((PVOID)dwAddr, dwFlags, dwSize); + } + } + } + + if(NT_SUCCESS(hr)) + szResponse[0] = 0; + + return hr; +} + +DMHRAPI HrGetDebuggerVersion(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + strcpy_s(szResponse, cchResponse, "2.0.20353.0"); + return XBDM_NOERR; +} + +DMHRAPI HrKhoungDm(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + VdDisplayFatalError(69); + return XBDM_NOERR; +} + +DMHRAPI HrWhoMadeThis(LPCSTR szCommand, LPSTR szResponse, + DWORD cchResponse, PDM_CMDCONT pdmcc) +{ + strcpy_s(szResponse, cchResponse, "Xoro did, of course ;)"); + return XBDM_NOERR; +} + +// Please keep in alphabetical order! +// And use these permission defines when adding commands! +/* +#define DMPL_PRIV_READ For reading from the console +#define DMPL_PRIV_WRITE For writing to the console (files) +#define DMPL_PRIV_CONTROL For controlling the console (must have this to do ANYTHING debug related!!!) +#define DMPL_PRIV_CONFIGURE For configuring the console +#define DMPL_PRIV_MANAGE For managing the console (must have this to edit accounts!!!) +#define DMPL_PRIV_HVX For ANYTHING that has to do with the hypervisor expansion(s) +*/ +DMCMD rgbcmd[] = +{ + { "altaddr", DMPL_PRIV_READ, HrGetAltAddr }, // Gets the title ip address + { "break", DMPL_PRIV_CONTROL, HrBreak }, // Manages breakpoints + { "bye", 0, HrEndConversation }, // Ends the connection + { "consolefeatures", DMPL_PRIV_READ, HrGetConsoleFeatures }, // Gets the console features (debug, ram) + { "consoletype", DMPL_PRIV_READ, HrGetConsoleType }, // Gets the console type (test, dev) + { "continue", DMPL_PRIV_CONTROL, HrContinueThread }, // Continues a thread + { "dbgname", DMPL_PRIV_READ, HrDbgName }, // Gets the console name + { "debugger", DMPL_PRIV_CONTROL, HrAttachDebugger }, // Signals that a debugger has been attached or deattached + { "delete", DMPL_PRIV_WRITE, HrDelete }, // Deletes a file or directory + { "dirlist", DMPL_PRIV_READ, HrGetDirList }, // Gets a list of items in a folder + { "dmversion", DMPL_PRIV_CONTROL, HrGetDebuggerVersion }, // Gets the debugger version + { "drivefreespace", DMPL_PRIV_READ, HrGetDriveFreeSpace }, // Gets some stats about the drive's volume size + { "drivelist", DMPL_PRIV_READ, HrGetDriveList }, // Gets the list of connected drives + { "drivemap", DMPL_PRIV_CONTROL, HrDrivemap }, // Sets if FLASH:\\ is visible in the drive browser + { "dumpmode", DMPL_PRIV_CONFIGURE, HrSetDumpMode }, // Configures the crash dump mode + { "dvdeject", DMPL_PRIV_CONTROL, HrDvdEject }, // Opens or closes the dvd tray + { "getconsoleid", DMPL_PRIV_CONTROL, HrGetConsoleId }, // Gets the console id + { "getcontext", DMPL_PRIV_CONTROL, HrGetContext }, // Gets a thread context + { "getcpukey", DMPL_PRIV_HVX, HrGetCpuKey }, // Gets the cpu key + { "getexecstate", DMPL_PRIV_CONTROL, HrGetExecState }, // Displays the execution state + { "getfile", DMPL_PRIV_READ, HrGetFile }, // Xbox->PC transfer + { "getfileattributes", DMPL_PRIV_READ, HrGetFileAttr }, // Gets file attributes + { "getmem", DMPL_PRIV_CONTROL, HrGetMemory }, // Gets memory + { "getmemex", DMPL_PRIV_CONTROL, HrGetMemoryEx }, // Gets memory in data + { "getpid", DMPL_PRIV_CONTROL, HrGetProcessId }, // Gets the process id + { "go", DMPL_PRIV_CONTROL, HrGo }, // Continues all threads + { "help", 0, HrHelp }, // Gets info on every command + { "hwinfo", 0, HrHwInfo }, // Does some listing of stuff for cOz + { "khoungdm", DMPL_PRIV_CONTROL, HrKhoungDm }, // E69 + { "isdebugger", DMPL_PRIV_CONTROL, HrIsDebuggerAttached }, // Gets info on the current debugger + { "isstopped", DMPL_PRIV_CONTROL, HrIsThreadStopped }, // Returns information on a stopped thread + { "magicboot", DMPL_PRIV_CONTROL, HrMagicReboot }, // Changes the currently running title, and/or reboots the console + { "mkdir", DMPL_PRIV_WRITE, HrCreateDirectory }, // Creates a folder + { "modsections", DMPL_PRIV_WRITE, HrListModuleSections }, // Lists the module sections + { "modules", DMPL_PRIV_CONTROL, HrGetModules }, // Returns a list of all the loaded modules (exe, dll) + { "nostopon", DMPL_PRIV_CONTROL, HrNoStopOn }, // Changes what we stop on + { "notify", DMPL_PRIV_CONTROL, HrNotify }, // Creates a notification channel + { "notifyat", DMPL_PRIV_CONTROL, HrNotifyAt }, // Manages a notification channel + { "objlist", 0, HrObjList }, // Lists objects for cOz + { "rename", DMPL_PRIV_WRITE, HrRenameFile }, // Renames a file or directory + { "resume", DMPL_PRIV_CONTROL, HrResumeThread }, // Resumes a thread + { "screenshot", DMPL_PRIV_CONTROL, HrScreenshot }, // Takes a screenshot + { "sendfile", DMPL_PRIV_WRITE, HrSendFile }, // PC->Xbox transfer + { "sendvfile", DMPL_PRIV_WRITE, HrSendVolumeFile }, // PC->Xbox transfer with several files + { "setcolor", DMPL_PRIV_CONTROL, HrSetColor }, // Sets the color of the console in neighborhood + { "setcontext", DMPL_PRIV_CONTROL, HrSetContext }, // Sets a thread context + { "setfileattributes", DMPL_PRIV_WRITE, HrSetFileAttr }, // Sets file attributes + { "setmem", DMPL_PRIV_CONTROL, HrSetMemory }, // Sets memory + { "setsystime", DMPL_PRIV_CONFIGURE, HrSetSystemTime }, // Sets the system time + { "shutdown", DMPL_PRIV_CONTROL, HrShutdown }, // Shuts down the console + { "stop", DMPL_PRIV_CONTROL, HrStop }, // Stops all threads + { "stopon", DMPL_PRIV_CONTROL, HrStopOn }, // Changes what we stop on + { "spew", DMPL_PRIV_CONTROL, HrSpew }, // Spews debug output + { "suspend", DMPL_PRIV_CONTROL, HrSuspendThread }, // Suspends a thread + { "systeminfo", DMPL_PRIV_READ, HrGetSystemInfo }, // Gets system info + { "systime", DMPL_PRIV_CONFIGURE, HrGetSystemTime }, // Sets the system time + { "threadex", DMPL_PRIV_CONTROL, HrListThreadsEx }, // Lists threads in a different format + { "threadinfo", DMPL_PRIV_CONTROL, HrGetThreadInfo }, // Returns info on a thread + { "threads", DMPL_PRIV_CONTROL, HrListThreads }, // Gets a list of threads + { "xbeinfo", DMPL_PRIV_READ, HrGetXbeInfo }, // Gets information on the running executable + { "xexfield", DMPL_PRIV_CONTROL, HrGetXexField }, // Gets an xex field + { "walkmem", DMPL_PRIV_CONTROL, HrWalkMemory }, // Lists memory and protection pages + { "whomadethis", DMPL_PRIV_CONTROL, HrWhoMadeThis }, // Guess who +}; +int cchcmd = (sizeof(rgbcmd) / sizeof(DMCMD)); diff --git a/xbdm/dmserv.h b/xbdm/dmserv.h new file mode 100644 index 0000000..9fcf13a --- /dev/null +++ b/xbdm/dmserv.h @@ -0,0 +1,160 @@ +/* + Copyright (c) 2013 Nathan LeRoux + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#ifndef _DMSERV_H +#define _DMSERV_H + +#define CONNECTION_MAX 8 + +#define DMPL_PRIV_HVX (DMPL_PRIV_CONTROL | 0x0020) // Hypervisor expansion is required +#define DMPL_PRIV_HVX_MASK 0x0020 + +// Default custom data, contains useful stuffs +typedef struct _DMCD +{ + DWORD cch, ib, cchBuf; + BOOL fError; + HANDLE h; + HRESULT hr; + LPSTR rgb; + union + { + struct + { + int CurrentDrive; + } DriveList; + struct + { + FILE_NETWORK_OPEN_INFORMATION fni; + } fni; + struct + { + DWORD Address; + } mem; + struct + { + DWORD fmt; + DWORD w, h, p, sw, sh, size; + LPCSTR szFrame; + } screen; + struct + { + DWORD step; + DWORD remain; + + // Current file info + LARGE_INTEGER CreationTime; + LARGE_INTEGER ChangeTime; + DWORD FileSize; + DWORD FileAttributes; + } vfile; + DMN_SECTIONLOAD dmsl; + DM_THREADINFOEX dmti; + char sz[0x100]; + }; +} DMCD, *PDMCD; + +// Just a helpful macro to avoid having to type that EVERY TIME >.< +#define pdmcd ((PDMCD)pdmcc->CustomData) + +// Connection structure +typedef struct _DMCONN +{ + // TRUE if used, FALSE if standby + BOOL bActive; + + // TRUE if we should shutdown soon + BOOL bShutdown; + + BOOL bKeepAlive; // TRUE if we should keep the socket alive + + DWORD dwPriv; // The connection privilege + + // TRUE if the command is too long + BOOL bTooLong; + + // Connection socket + SOCKET s; + + // The client endpoint + SOCKADDR_IN sin; + + // Continue structure + DM_CMDCONT dmcc; + + // Custom data + DMCD dmcd; + + // Temp buffer storage + LPVOID Buffer; + + // If TRUE, we are in an extended handler + BOOL bConversation; + + // The last return value + HRESULT hr; + + // The position in the buffer + DWORD dwRecv; + + // Command receive buffer + BYTE szRecv[0x200]; + + // Extended buffer + BYTE szBuf[256]; +} DMCONN, *PDMCONN; + +// Command structure +typedef struct _DMCMD +{ + LPCSTR szName; + DWORD dwPriv; + PDM_CMDPROC pdmcp; +} DMCMD, *PDMCMD; + +// Used in PcregNext +typedef struct _DMREG +{ + LPCSTR Name; + DWORD Context; + DWORD Offset; + DWORD Size; +} DMREG; +// Used in HrGet/SetContext +typedef struct _DMCR +{ + XCONTEXT Context; + DMREG *Register; + DWORD CurrentRegister; +} DMCR; + +extern char *rgszDumpMode[]; +extern DMCMD rgbcmd[]; +extern int cchcmd; +extern DMREG rgbregs[]; +extern int cchregs; + +ULONG __stdcall ServerThread(LPVOID lpParam); +int FSendLine(SOCKET s, LPCSTR fmt, ...); +VOID FStopServ(); + +#endif \ No newline at end of file diff --git a/xbdm/file.c b/xbdm/file.c new file mode 100644 index 0000000..3c884e2 --- /dev/null +++ b/xbdm/file.c @@ -0,0 +1,213 @@ +/* + Copyright (c) 2013 Nathan LeRoux + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#include "dmincludes.h" + +HRESULT FFileNameToObName(LPCSTR szFileName, CHAR *szObName, DWORD cchObName) +{ + HRESULT hr = S_OK; + char szName[MAX_PATH], oszName[MAX_PATH]; + int cchName, i; + ANSI_STRING as, as2; + TRANSLATE_SYMLINK obName; + + if(!cchObName) + { + DbgPrint("[xbdm] cchObName invalid\n"); + return E_INVALIDARG; + } + if(!szFileName) + { + DbgPrint("[xbdm] szFileName invalid\n"); + return E_INVALIDARG; + } + if(!szObName) + { + DbgPrint("[xbdm] szObName invalid\n"); + return E_INVALIDARG; + } + + strcpy_s(szName, sizeof(szName), szFileName); + + for(cchName = 0;szName[cchName];cchName++) + { + if(szName[cchName] == ':') + { + szName[cchName] = 0; + + break; + } + } + + if(!strcmpi(szName, "F") || !strcmpi(szName, "SMB")) + { + DbgPrint("[xbdm] SMB not supported yet!\n"); + DebugBreak(); + } + + oszName[0] = 0; + + for(i = 0;i < cchDrives;i++) + if(!strcmpi(Drives[i].DriveName, szName)) + { + strcpy(oszName, Drives[i].DevicePath); + } + + if(!oszName[0]) + { + obName.reserved = 0; + obName.name = &as; + + strcat(szName, ":\\"); + + RtlSnprintf(szObName, cchObName, "\\??\\%s", szName); + + RtlInitAnsiString(&as, szObName); + + as2.Buffer = oszName; + as2.Length = 0; + as2.MaximumLength = sizeof(oszName); + + if(NT_SUCCESS(ObTranslateSymbolicLink(&obName, &as2))) + oszName[as2.Length] = 0; + else + hr = E_FAIL; + } + + if(!FAILED(hr)) + RtlSnprintf(szObName, cchObName, "%s%s", oszName, szFileName + cchName + 1); + else + szObName[0] = 0; + + return hr; +} + +NTSTATUS FCreateFile(PHANDLE FileHandle, ACCESS_MASK DesiredAccess, LPCSTR FileName, PLARGE_INTEGER AllocationSize, + ULONG FileAttributes, ULONG ShareAccess, ULONG CreateDisposition, ULONG CreateOptions) +{ + char oszName[MAX_PATH]; + ANSI_STRING as; + IO_STATUS_BLOCK iosb; + OBJECT_ATTRIBUTES attr; + + if(FileName[0] == '\\') + strcpy_s(oszName, sizeof(oszName), FileName); + else if(FAILED(FFileNameToObName(FileName, oszName, sizeof(oszName)))) + return STATUS_ACCESS_DENIED; + + RtlInitAnsiString(&as, oszName); + attr.Attributes = OBJ_CASE_INSENSITIVE; + attr.ObjectName = &as; + attr.RootDirectory = NULL; + + return NtCreateFile(FileHandle, DesiredAccess, &attr, &iosb, AllocationSize, FileAttributes, ShareAccess, CreateDisposition, CreateOptions); +} + +NTSTATUS FReadFile(HANDLE FileHandle, PVOID Buffer, ULONG Length) +{ + IO_STATUS_BLOCK io; + + return NtReadFile(FileHandle, NULL, NULL, NULL, &io, Buffer, Length, NULL); +} + +NTSTATUS FWriteText(HANDLE FileHandle, PINF pinf, LPCSTR fmt, ...) +{ + char szBuf[0x200]; + va_list va; + + va_start(va, fmt); + RtlVsnprintf(szBuf, sizeof(szBuf), fmt, va); + va_end(va); + + return FWriteFile(FileHandle, szBuf, (ULONG)strlen(szBuf), pinf); +} + +NTSTATUS FWriteFile(HANDLE FileHandle, PVOID Buffer, ULONG Length, PINF pinf) +{ + IO_STATUS_BLOCK iosb; + NTSTATUS st = STATUS_SUCCESS; + DWORD cbT; + PCHAR pb = (PCHAR)Buffer; + + if(pb) + { + while(Length) + { + cbT = pinf->cbBuf - pinf->cbUsed; + if(Length >= cbT) + { + memcpy((char*)pinf->pbBuf + pinf->cbUsed, pb, cbT); + st = NtWriteFile(FileHandle, NULL, NULL, NULL, &iosb, pinf->pbBuf, + pinf->cbBuf, NULL); + pb += cbT; + Length -= cbT; + pinf->cbUsed = 0; + } + else + { + memcpy((char*)pinf->pbBuf + pinf->cbUsed, pb, Length); + pb += Length; + pinf->cbUsed += Length; + Length = 0; + } + } + } + + return st; +} + +NTSTATUS FCloseFile(HANDLE FileHandle, PINF pinf) +{ + IO_STATUS_BLOCK iosb; + + if(pinf && pinf->cbUsed) + { + NtWriteFile(FileHandle, NULL, NULL, NULL, &iosb, pinf->pbBuf, pinf->cbUsed, NULL); + pinf->cbUsed = 0; + } + + return NtClose(FileHandle); +} + +DRIVE Drives[] = +{ + { "FLASH", "\\Device\\Flash", 1 }, + + { "INTUSB", "\\Device\\BuiltInMuUsb\\Storage", 2 }, + { "MUINT", "\\Device\\BuiltInMuSfc", 2 }, + + { "HDD", "\\Device\\Harddisk0\\Partition1", 2 }, + { "DEVKIT", "\\Device\\Harddisk0\\Partition1\\DEVKIT", 2 }, + + { "MU0", "\\Device\\Mu0", 2 }, + { "MU1", "\\Device\\Mu1", 2 }, + + { "USB0", "\\Device\\Mass0", 2 }, + { "USB1", "\\Device\\Mass1", 2 }, + { "USB2", "\\Device\\Mass2", 2 }, + { "USBMU0", "\\Device\\Mass0PartitionFile\\Storage", 2 }, + { "USBMU1", "\\Device\\Mass1PartitionFile\\Storage", 2 }, + { "USBMU2", "\\Device\\Mass2PartitionFile\\Storage", 2 }, + + { "DVD", "\\Device\\CdRom0", 2 }, +}; +extern int cchDrives = sizeof(Drives) / sizeof(DRIVE); \ No newline at end of file diff --git a/xbdm/file.h b/xbdm/file.h new file mode 100644 index 0000000..92f89e5 --- /dev/null +++ b/xbdm/file.h @@ -0,0 +1,53 @@ +/* + Copyright (c) 2013 Nathan LeRoux + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#ifndef _FILE_H +#define _FILE_H + +// Handly little thing that makes it easier to do file io +typedef struct _INF { + int cbBuf; + void *pbBuf; // 0x1000 = a pretty good amount + + int cbUsed; +} INF, *PINF; + +typedef struct _DRIVE +{ + LPCSTR DriveName; + LPCSTR DevicePath; + DWORD Visibility; // 0 = Not visible, 1 = internal, 2 = visible +} DRIVE; + +NTSTATUS FCreateFile(PHANDLE FileHandle, ACCESS_MASK DesiredAccess, LPCSTR FileName, PLARGE_INTEGER AllocationSize, + ULONG FileAttributes, ULONG ShareAccess, ULONG CreateDisposition, ULONG CreateOptions); +NTSTATUS FReadFile(HANDLE FileHandle, PVOID Buffer, ULONG Length); +NTSTATUS FWriteText(HANDLE FileHandle, PINF pinf, LPCSTR fmt, ...); +NTSTATUS FWriteFile(HANDLE FileHandle, PVOID Buffer, ULONG Length, PINF pinf); +NTSTATUS FCloseFile(HANDLE FileHandle, PINF pinf); + +HRESULT FFileNameToObName(LPCSTR szFileName, CHAR *szObName, DWORD cchObName); + +extern DRIVE Drives[]; +extern int cchDrives; + +#endif \ No newline at end of file diff --git a/xbdm/hvx.c b/xbdm/hvx.c new file mode 100644 index 0000000..59568d7 --- /dev/null +++ b/xbdm/hvx.c @@ -0,0 +1,214 @@ +// This wasn't written by me +// You know who you are + +#include "dmincludes.h" + +// I need to clean this up ;_; + +// Sorry +const BYTE HvPeekPokeExp[] = { + 0x00, 0x00, 0x00, 0x00 +}; + +// Sorry +const BYTE HvPeekPokeExp2[] = { // Encrypted + 0x00, 0x00, 0x00, 0x00 +}; + +#define HvxCall QWORD _declspec(naked) +static HvxCall HvxExpansionInstall(DWORD PhysicalAddress, DWORD CodeSize) { + + if(XboxKrnlVersion->Build == 9199) { + __asm { li r0, 0x76 } + } else if(XboxKrnlVersion->Build == 12611 || XboxKrnlVersion->Build == 12625) { + __asm { li r0, 0x70 } + } else if(XboxKrnlVersion->Build >= 13110) { + __asm { li r0, 0x6F } + } + + __asm { + sc + blr + } +} + +static HvxCall HvxExpansionCall(DWORD ExpansionId, QWORD Param1, QWORD Param2, QWORD Param3, QWORD Param4) { + + if(XboxKrnlVersion->Build == 9199) { + __asm { li r0, 0x77 } + } else if(XboxKrnlVersion->Build == 12611 || XboxKrnlVersion->Build == 12625) { + __asm { li r0, 0x71 } + } else if(XboxKrnlVersion->Build >= 13110) { + __asm { li r0, 0x70 } + } + + __asm { + sc + blr + } +} + +HRESULT HvInitialize() { + + // Allocate physcial memory for this expansion + VOID* pPhysExp = XPhysicalAlloc(0x1000, MAXULONG_PTR, 0, PAGE_READWRITE); + DWORD physExpAdd = MmGetPhysicalAddress(pPhysExp); + HRESULT result; + + // Copy over our expansion data + ZeroMemory(pPhysExp, 0x1000); + + memcpy(pPhysExp, HvPeekPokeExp, sizeof(HvPeekPokeExp)); + if(XboxKrnlVersion->Build >= 13110) + *(LPDWORD)pPhysExp = 'HXPR'; + + // Now we can install our expansion + result = (HRESULT)HvxExpansionInstall(physExpAdd, 0x1000); + + // Free our allocated data + XPhysicalFree(pPhysExp); + + if(FAILED(result)) + DbgPrint("[hvx] failed to install (0x%08x)\n", result); + + // Return our install result + return result; +} + +BYTE HvPeekBYTE(QWORD Address) { + return (BYTE)HvxExpansionCall(HvPeekPokeExpID, PEEK_BYTE, Address, 0, 0); +} +WORD HvPeekWORD(QWORD Address) { + return (WORD)HvxExpansionCall(HvPeekPokeExpID, PEEK_WORD, Address, 0, 0); +} +DWORD HvPeekDWORD(QWORD Address) { + return (DWORD)HvxExpansionCall(HvPeekPokeExpID, PEEK_DWORD, Address, 0, 0); +} +QWORD HvPeekQWORD(QWORD Address) { + return HvxExpansionCall(HvPeekPokeExpID, PEEK_QWORD, Address, 0, 0); +} + +HRESULT HvPeekBytes(QWORD Address, PVOID Buffer, DWORD Size) { + + // Create a physical buffer to peek into + VOID* data = XPhysicalAlloc(Size, MAXULONG_PTR, 0, PAGE_READWRITE); + HRESULT result; + ZeroMemory(data, Size); + + result = (HRESULT)HvxExpansionCall(HvPeekPokeExpID, + PEEK_BYTES, Address, MmGetPhysicalAddress(data), Size); + + // If its successful copy it bacl + if(result == S_OK) memcpy(Buffer, data, Size); + + // Free our physical data and return our result + XPhysicalFree(data); + return result; +} + +HRESULT HvPokeBYTE(QWORD Address, BYTE Value) { + return (HRESULT)HvxExpansionCall(HvPeekPokeExpID, POKE_BYTE, Address, Value, 0); +} +HRESULT HvPokeWORD(QWORD Address, WORD Value) { + return (HRESULT)HvxExpansionCall(HvPeekPokeExpID, POKE_WORD, Address, Value, 0); +} +HRESULT HvPokeDWORD(QWORD Address, DWORD Value) { + return (HRESULT)HvxExpansionCall(HvPeekPokeExpID, POKE_DWORD, Address, Value, 0); +} +HRESULT HvPokeQWORD(QWORD Address, QWORD Value) { + return (HRESULT)HvxExpansionCall(HvPeekPokeExpID, POKE_QWORD, Address, Value, 0); +} +HRESULT HvPokeBytes(QWORD Address, const void* Buffer, DWORD Size) { + + // Create a physical buffer to poke from + VOID* data = XPhysicalAlloc(Size, MAXULONG_PTR, 0, PAGE_READWRITE); + HRESULT result; + memcpy(data, Buffer, Size); + + result = (HRESULT)HvxExpansionCall(HvPeekPokeExpID, + POKE_BYTES, Address, MmGetPhysicalAddress(data), Size); + + // Free our physical data and return our result + XPhysicalFree(data); + return result; +} + + +QWORD HvPeekSPR(SOC_SPRS SPR) { + return HvxExpansionCall(HvPeekPokeExpID, PEEK_SPR, SPR, 0, 0); +} +QWORD HvPokeSPR(SOC_SPRS SPR, QWORD Value) { + return HvxExpansionCall(HvPeekPokeExpID, POKE_SPR, SPR, Value, 0); +} + +VOID HvGetFuses(QWORD *Out) +{ + int x; + + for (x = 0; x < 12; x++) + { + Out[x] = HvPeekQWORD(0x8000020000020000 + (x * 0x200)); + + } +} + +VOID HvDumpFromMemory(CHAR* FilePath) { + + // Create our output file + HANDLE fHandle = CreateFile(FilePath, GENERIC_WRITE, FILE_SHARE_WRITE, + NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + + // Read our our HV from memory + BYTE hvPart[0x10000]; DWORD pageSize = 0x10000;DWORD x; + QWORD address = 0; + QWORD rtoc = 0x0000000200000000; + for(x = 0; x < 4; x++) { + DWORD bytesWritten = 0; + + // Read our section from our HV + ZeroMemory(hvPart, pageSize); + HvPeekBytes(address, hvPart, pageSize); + + // Write out the section + WriteFile(fHandle, hvPart, pageSize, &bytesWritten, NULL); + + // Now increase our address + address += (rtoc + pageSize); + } + + // Close our output file + CloseHandle(fHandle); +} + +VOID HvDumpFuses(CHAR* FilePath) { + + // Create our output file + HANDLE fHandle = CreateFile(FilePath, GENERIC_WRITE, FILE_SHARE_WRITE, + NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + + // Read each fuse set and dump it + QWORD fuseSet = 0; DWORD bytesWritten = 0;DWORD x; + for (x = 0; x < 12; x++) { + fuseSet = HvPeekQWORD(0x8000020000020000 + (x * 0x200)); + WriteFile(fHandle, &fuseSet, 8, &bytesWritten, NULL); + } + + // Close our output file + CloseHandle(fHandle); +} +VOID HvDump1Bl(CHAR* FilePath) { + + // Create our output file + HANDLE fHandle = CreateFile(FilePath, GENERIC_WRITE, FILE_SHARE_WRITE, + NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + + DWORD bytesWritten = 0; + BYTE bl1[0x8000]; + ZeroMemory(bl1, 0x8000); + + HvPeekBytes(0x8000020000000000, bl1, 0x8000); + WriteFile(fHandle, bl1, 0x8000, &bytesWritten, NULL); + + // Close our output file + CloseHandle(fHandle); +} \ No newline at end of file diff --git a/xbdm/hvx.h b/xbdm/hvx.h new file mode 100644 index 0000000..d1dd26f --- /dev/null +++ b/xbdm/hvx.h @@ -0,0 +1,122 @@ +// This stuff wasn't written by me +// You know who you are + +#pragma once + +#ifndef _HVX_H +#define _HVX_H + +typedef unsigned __int64 QWORD; + +typedef enum _PEEK_POKE_TYPE { + PEEK_BYTE = 0, + PEEK_WORD = 1, + PEEK_DWORD = 2, + PEEK_QWORD = 3, + PEEK_BYTES = 4, + POKE_BYTE = 5, + POKE_WORD = 6, + POKE_DWORD = 7, + POKE_QWORD = 8, + POKE_BYTES = 9, + PEEK_SPR = 10, + POKE_SPR = 11 +} PEEK_POKE_TYPE; + +typedef enum _SOC_SPRS { + SPR_XER = 0x1, + SPR_LR = 0x8, + SPR_CTR = 0x9, + SPR_DSISR = 0x12, + SPR_DAR = 0x13, + SPR_DEC = 0x16, + SPR_SDR1 = 0x19, + SPR_SRR0 = 0x1A, + SPR_SRR1 = 0x1B, + SPR_ACCR = 0x1D, + SPR_CTRL_R = 0x88, + SPR_CTRL_W = 0x98, + SPR_VRSAVE = 0x100, + SPR_SPRG3_R = 0x103, + SPR_TB_R = 0x10C, + SPR_TBU_R = 0x10D, + SPR_SPRG0 = 0x110, + SPR_SPRG1 = 0x111, + SPR_SPRG2 = 0x112, + SPR_SPRG3 = 0x113, + SPR_TBL_W = 0x11C, + SPR_TBU_W = 0x11D, + SPR_PVR = 0x11F, + SPR_HSPRG0 = 0x130, + SPR_HSPRG1 = 0x131, + SPR_HDEC = 0x136, + SPR_HIOR = 0x137, + SPR_RMOR = 0x138, + SPR_HRMOR = 0x139, + SPR_HSRR0 = 0x13A, + SPR_HSRR1 = 0x13B, + SPR_LPCR = 0x13E, + SPR_LPIDR = 0x13F, + SPR_TSRL = 0x380, + SPR_TSRR = 0x381, + SPR_TSCR = 0x399, + SPR_TTR = 0x39A, + SPR_TLB_HINT = 0x3B2, + SPR_TLB_INDEX = 0x3B3, + SPR_TLB_VPN = 0x3B4, + SPR_TLB_RPN = 0x3B5, + SPR_TLB_RMT = 0x3B7, + SPR_DRSR0 = 0x3B8, + SPR_DRMR0 = 0x3B9, + SPR_DCIDR0 = 0x3BA, + SPR_DRSR1 = 0x3BB, + SPR_DRMR1 = 0x3BC, + SPR_DCIDR1 = 0x3BD, + SPR_IRSR0 = 0x3D0, + SPR_IRMR0 = 0x3D1, + SPR_ICIDR0 = 0x3D2, + SPR_IRSR1 = 0x3D3, + SPR_IRMR1 = 0x3D4, + SPR_ICIDR1 = 0x3D5, + SPR_HID0 = 0x3F0, + SPR_HID1 = 0x3F1, + SPR_IABR = 0x3F2, + SPR_HID4 = 0x3F4, + SPR_DABR = 0x3F5, + SPR_HID5 = 0x3F6, + SPR_DABRX = 0x3F7, + SPR_TDABRX = 0x3F8, + SPR_HID6 = 0x3F9, + SPR_HID7 = 0x3FA, + SPR_TIABR = 0x3FB, + SPR_BKMK = 0x3FC, + SPR_TDABR = 0x3FD, + SPR_PIR = 0x3FF +} SOC_SPRS; + +#define HvPeekPokeExpID 0x48565050 + +HRESULT HvInitialize(); + +BYTE HvPeekBYTE(QWORD Address); +WORD HvPeekWORD(QWORD Address); +DWORD HvPeekDWORD(QWORD Address); +QWORD HvPeekQWORD(QWORD Address); +HRESULT HvPeekBytes(QWORD Address, PVOID Buffer, DWORD Size); + +HRESULT HvPokeBYTE(QWORD Address, BYTE Value); +HRESULT HvPokeWORD(QWORD Address, WORD Value); +HRESULT HvPokeDWORD(QWORD Address, DWORD Value); +HRESULT HvPokeQWORD(QWORD Address, QWORD Value); +HRESULT HvPokeBytes(QWORD Address, const void* Buffer, DWORD Size); + +QWORD HvPeekSPR(SOC_SPRS SPR); +QWORD HvPokeSPR(SOC_SPRS SPR, QWORD Value); + +VOID HvGetFuses(QWORD *Out); + +VOID HvDumpFromMemory(CHAR* FilePath); +VOID HvDumpFuses(CHAR* FilePath); +VOID HvDump1Bl(CHAR* FilePath); + +#endif // _HVX_H \ No newline at end of file diff --git a/xbdm/imp/KernelExports.h b/xbdm/imp/KernelExports.h new file mode 100644 index 0000000..a166502 --- /dev/null +++ b/xbdm/imp/KernelExports.h @@ -0,0 +1,721 @@ +#pragma once +#include "XeCrypt.h" +#include "kernelp.h" + +typedef unsigned long long QWORD; +typedef long NTSTATUS; +#define NT_EXTRACT_ST(Status) ((((ULONG)(Status)) >> 30)& 0x3) +#define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0) +#define NT_INFORMATION(Status) (NT_EXTRACT_ST(Status) == 1) +#define NT_WARNING(Status) (NT_EXTRACT_ST(Status) == 2) +#define NT_ERROR(Status) (NT_EXTRACT_ST(Status) == 3) + +// IRQL values +#define PASSIVE_LEVEL 0 +#define LOW_LEVEL 0 +#define APC_LEVEL 1 +#define DISPATCH_LEVEL 2 + +// Create disposition values. +#define FILE_SUPERSEDE 0x00000000 +#define FILE_OPEN 0x00000001 +#define FILE_CREATE 0x00000002 +#define FILE_OPEN_IF 0x00000003 +#define FILE_OVERWRITE 0x00000004 +#define FILE_OVERWRITE_IF 0x00000005 +#define FILE_MAXIMUM_DISPOSITION 0x00000005 + +// Create/open option flags. + +#define FILE_DIRECTORY_FILE 0x00000001 +#define FILE_WRITE_THROUGH 0x00000002 +#define FILE_SEQUENTIAL_ONLY 0x00000004 +#define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008 + +#define FILE_SYNCHRONOUS_IO_ALERT 0x00000010 +#define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020 +#define FILE_NON_DIRECTORY_FILE 0x00000040 +#define FILE_CREATE_TREE_CONNECTION 0x00000080 + +#define FILE_COMPLETE_IF_OPLOCKED 0x00000100 +#define FILE_NO_EA_KNOWLEDGE 0x00000200 +#define FILE_OPEN_REMOTE_INSTANCE 0x00000400 +#define FILE_RANDOM_ACCESS 0x00000800 + +#define FILE_DELETE_ON_CLOSE 0x00001000 +#define FILE_OPEN_BY_FILE_ID 0x00002000 +#define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000 +#define FILE_NO_COMPRESSION 0x00008000 + +#define FILE_RESERVE_OPFILTER 0x00100000 +#define FILE_OPEN_REPARSE_POINT 0x00200000 +#define FILE_OPEN_NO_RECALL 0x00400000 +#define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000 + +typedef enum _FS_INFORMATION_CLASS { + FileFsVolumeInformation=1, + FileFsLabelInformation, + FileFsSizeInformation, + FileFsDeviceInformation, + FileFsAttributeInformation, + FileFsControlInformation, + FileFsFullSizeInformation, + FileFsObjectIdInformation, + FileFsMaximumInformation +} FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS; + +typedef enum _FILE_INFORMATION_CLASS { + FileDirectoryInformation = 1, + FileFullDirectoryInformation, + FileBothDirectoryInformation, + FileBasicInformation, + FileStandardInformation, + FileInternalInformation, + FileEaInformation, + FileAccessInformation, + FileNameInformation, + FileRenameInformation, + FileLinkInformation, + FileNamesInformation, + FileDispositionInformation, + FilePositionInformation, + FileFullEaInformation, + FileModeInformation, + FileAlignmentInformation, + FileAllInformation, + FileAllocationInformation, + FileEndOfFileInformation, + FileAlternateNameInformation, + FileStreamInformation, + FilePipeInformation, + FilePipeLocalInformation, + FilePipeRemoteInformation, + FileMailslotQueryInformation, + FileMailslotSetInformation, + FileCompressionInformation, + FileObjectIdInformation, + FileCompletionInformation, + FileMoveClusterInformation, + FileQuotaInformation, + FileReparsePointInformation, + FileNetworkOpenInformation, + FileAttributeTagInformation, + FileTrackingInformation, + FileIdBothDirectoryInformation, + FileIdFullDirectoryInformation, + FileValidDataLengthInformation, + FileShortNameInformation, + FileIoCompletionNotificationInformation, + FileIoStatusBlockRangeInformation, + FileIoPriorityHintInformation, + FileSfioReserveInformation, + FileSfioVolumeInformation, + FileHardLinkInformation, + FileProcessIdsUsingFileInformation, + FileNormalizedNameInformation, + FileNetworkPhysicalNameInformation, + FileIdGlobalTxDirectoryInformation, + FileIsRemoteDeviceInformation, + FileAttributeCacheInformation, + FileNumaNodeInformation, + FileStandardLinkInformation, + FileRemoteProtocolInformation, + FileMaximumInformation + } FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS; + +typedef struct _FILE_FS_SIZE_INFORMATION { + LARGE_INTEGER TotalAllocationUnits; + LARGE_INTEGER AvailableAllocationUnits; + ULONG SectorsPerAllocationUnit; + ULONG BytesPerSector; +} FILE_FS_SIZE_INFORMATION, *PFILE_FS_SIZE_INFORMATION; + +typedef struct _FILE_NETWORK_OPEN_INFORMATION { + LARGE_INTEGER CreationTime; + LARGE_INTEGER LastAccessTime; + LARGE_INTEGER LastWriteTime; + LARGE_INTEGER ChangeTime; + LARGE_INTEGER AllocationSize; + LARGE_INTEGER EndOfFile; + ULONG FileAttributes; + ULONG Unknown; +} FILE_NETWORK_OPEN_INFORMATION, *PFILE_NETWORK_OPEN_INFORMATION; + +typedef struct _ANSI_STRING { + USHORT Length; + USHORT MaximumLength; + PCHAR Buffer; +} ANSI_STRING, *PANSI_STRING; + +typedef struct _FILE_DISPOSITION_INFORMATION { + BOOLEAN DeleteFile; +} FILE_DISPOSITION_INFORMATION; + +typedef struct _FILE_RENAME_INFORMATION { + BOOLEAN ReplaceIfExists; + HANDLE RootDirectory; + ANSI_STRING FileName; +} FILE_RENAME_INFORMATION, *PFILE_RENAME_INFORMATION; + +typedef struct _XEX_HEADER_STRING { + ULONG Size; + UCHAR Data[1]; +} XEX_HEADER_STRING, *PXEX_HEADER_STRING; + +typedef struct _UNICODE_STRING { + USHORT Length; + USHORT MaximumLength; + PWCHAR Buffer; +} UNICODE_STRING, *PUNICODE_STRING; + +typedef void (*pfnTitleTerminateRoutine)(); +typedef struct _EX_TITLE_TERMINATE_REGISTRATION { + pfnTitleTerminateRoutine NotificationRoutine; + DWORD Priority; + LIST_ENTRY ListEntry; +} EX_TITLE_TERMINATE_REGISTRATION, *PEX_TITLE_TERMINATE_REGISTRATION; + +typedef struct _EX_THREAD_REGISTRATION *PEX_THREAD_REGISTRATION; +typedef void (*pfnThreadNotificationRoutine)(PEX_THREAD_REGISTRATION ThisRegistration, PKTHREAD Thread, BOOL Creating); +typedef struct _EX_THREAD_REGISTRATION { + pfnThreadNotificationRoutine NotificationRoutine; + DWORD Priority; + LIST_ENTRY ListEntry; +} EX_THREAD_REGISTRATION; + +typedef struct _XEX_IMPORT_DESCRIPTOR { + DWORD Size; + DWORD NameTableSize; + DWORD ModuleCount; +} XEX_IMPORT_DESCRIPTOR, *PXEX_IMPORT_DESCRIPTOR; + +typedef struct _HV_IMAGE_IMPORT_TABLE { + BYTE NextImportDigest[0x14]; + DWORD ModuleNumber; + DWORD Version[0x02]; + BYTE Unused; + BYTE ModuleIndex; + WORD ImportCount; +} HV_IMAGE_IMPORT_TABLE, *PHV_IMAGE_IMPORT_TABLE; + +typedef struct _XEX_IMPORT_TABLE { + DWORD TableSize; + HV_IMAGE_IMPORT_TABLE ImportTable; +} XEX_IMPORT_TABLE, *PXEX_IMPORT_TABLE; + +typedef struct _LDR_DATA_TABLE_ENTRY { + LIST_ENTRY InLoadOrderLinks; + LIST_ENTRY InClosureOrderLinks; + LIST_ENTRY InInitializationOrderLinks; + VOID* NtHeadersBase; + VOID* ImageBase; + DWORD SizeOfNtImage; + UNICODE_STRING FullDllName; + UNICODE_STRING BaseDllName; + DWORD Flags; + DWORD SizeOfFullImage; + VOID* EntryPoint; + WORD LoadCount; + WORD ModuleIndex; + VOID* DllBaseOriginal; + DWORD CheckSum; + DWORD ModuleLoadFlags; + DWORD TimeDateStamp; + VOID* LoadedImports; + VOID* XexHeaderBase; + union { + ANSI_STRING LoadFileName; + struct { + struct _LDR_DATA_TABLE_ENTRY* ClosureRoot; + struct _LDR_DATA_TABLE_ENTRY* TraversalParent; + } asEntry; + }; +} LDR_DATA_TABLE_ENTRY, *PLDR_DATA_TABLE_ENTRY; + +typedef struct _XBOX_HARDWARE_INFO { + DWORD Flags; + BYTE NumberOfProcessors; + BYTE PCIBridgeRevisionID; + BYTE Reserved[6]; + WORD BldrMagic; + WORD BldrFlags; +} XBOX_HARDWARE_INFO, *PXBOX_HARDWARE_INFO; + +typedef struct _KERNEL_VERSION { + WORD Major; + WORD Minor; + WORD Build; + BYTE ApprovalType; + BYTE QFE; +} KERNEL_VERSION, *PKERNEL_VERSION; + +typedef struct _D3DPRIVATE_RECT { + LONG x1, y1; + LONG x2, y2; +} D3DPRIVATE_RECT, *PD3DPRIVATE_RECT; + +typedef struct _D3DFILTER_PARAMETERS { + FLOAT Nyquist; + FLOAT FlickerFilter; + FLOAT Beta; +} D3DFILTER_PARAMETERS, *PD3DFILTER_PARAMETERS; + +typedef struct _D3DPRIVATE_SCALER_PARAMETERS { + D3DPRIVATE_RECT ScalerSourceRect; + LONG ScaledOutputWidth; + LONG ScaledOutputHeight; + DWORD VerticalFilterType; + D3DFILTER_PARAMETERS VerticalFilterParameters; + DWORD HorizontalFilterType; + D3DFILTER_PARAMETERS HorizontalFilterParameters; +} D3DPRIVATE_SCALER_PARAMETERS, *PD3DPRIVATE_SCALER_PARAMETERS; + +typedef struct _DISPLAY_INFORMATION { + USHORT FrontBufferWidth; + USHORT FrontBufferHeight; + CHAR FrontBufferColorFormat; + CHAR FrontBufferPixelFormat; + D3DPRIVATE_SCALER_PARAMETERS ScalerParameters; + USHORT DisplayWindowOverscanLeft; + USHORT DisplayWindowOverscanTop; + USHORT DisplayWindowOverscanRight; + USHORT DisplayWindowOverscanBottom; + USHORT DisplayWidth; + USHORT DisplayHeight; + FLOAT DisplayRefreshRate; + UINT DisplayInterlaced; + CHAR DisplayColorFormat; + USHORT ActualDisplayWidth; +} DISPLAY_INFORMATION, *PDISPLAY_INFORMATION; + +typedef struct _XEX_EXECUTION_ID { + DWORD MediaID; + DWORD Version; + DWORD BaseVersion; + union { + struct { + WORD PublisherID; + WORD GameID; + }; + DWORD TitleID; + }; + BYTE Platform; + BYTE ExecutableType; + BYTE DiscNum; + BYTE DiscsInSet; + DWORD SaveGameID; +} XEX_EXECUTION_ID, *PXEX_EXECUTION_ID; + +// Valid values for the Attributes field +#define OBJ_INHERIT 0x00000002L +#define OBJ_PERMANENT 0x00000010L +#define OBJ_EXCLUSIVE 0x00000020L +#define OBJ_CASE_INSENSITIVE 0x00000040L +#define OBJ_OPENIF 0x00000080L +#define OBJ_OPENLINK 0x00000100L +#define OBJ_VALID_ATTRIBUTES 0x000001F2L + +typedef struct _OBJECT_ATTRIBUTES { + HANDLE RootDirectory; + PANSI_STRING ObjectName; + ULONG Attributes; +} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES; + +// object type strings +#define OBJ_TYP_SYMBLINK 0x626d7953 +#define OBJ_TYP_DIRECTORY 0x65726944 +#define OBJ_TYP_DEVICE 0x69766544 +#define OBJ_TYP_EVENT 0x76657645 +#define OBJ_TYP_DEBUG 0x63706d64 + +typedef struct _OBJECT_DIRECTORY_INFORMATION { + ANSI_STRING Name; + DWORD Type; + CHAR NameEx[MAX_PATH]; +} OBJECT_DIRECTORY_INFORMATION, *POBJECT_DIRECTORY_INFORMATION; + +typedef struct _IO_STATUS_BLOCK { + union { + NTSTATUS Status; + PVOID Pointer; + } st; + ULONG_PTR Information; +} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK; + +typedef VOID (NTAPI *PIO_APC_ROUTINE) ( + IN PVOID ApcContext, + IN PIO_STATUS_BLOCK IoStatusBlock, + IN ULONG Reserved +); + +typedef struct _FILE_DIRECTORY_INFORMATION { + ULONG NextEntryOffset; + ULONG FileIndex; + LARGE_INTEGER CreationTime; + LARGE_INTEGER LastAccessTime; + LARGE_INTEGER LastWriteTime; + LARGE_INTEGER ChangeTime; + LARGE_INTEGER EndOfFile; + LARGE_INTEGER AllocationSize; + ULONG FileAttributes; + ULONG FileNameLength; + CHAR FileName[MAX_PATH]; +} FILE_DIRECTORY_INFORMATION, *PFILE_DIRECTORY_INFORMATION; + +typedef struct FILE_BASIC_INFORMATION { + LARGE_INTEGER CreationTime; + LARGE_INTEGER LastAccessTime; + LARGE_INTEGER LastWriteTime; + LARGE_INTEGER ChangeTime; + ULONG FileAttributes; +} FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION; + +typedef struct _TRANSLATE_SYMLINK +{ + DWORD reserved; + PANSI_STRING name; +} TRANSLATE_SYMLINK, *PTRANSLATE_SYMLINK; + +typedef struct _DRIVER_OBJECT +{ + DWORD Unk[3]; + LPVOID Create; + LPVOID Close; // This appears to be when files are closed? + LPVOID Read; + LPVOID Write; + LPVOID QueryInformation; + LPVOID SetInformation; + LPVOID FlushBuffers; + LPVOID QueryVolumeInformation; + LPVOID DirectoryControl; + LPVOID Unk2; + LPVOID CloseHandle; // This appears to be when handles are closed +} DRIVER_OBJECT, *PDRIVER_OBJECT; + +#define InitializeObjectAttributes( p, n, a, r){ \ + (p)->RootDirectory = r; \ + (p)->Attributes = a; \ + (p)->ObjectName = n; \ +} + +NTSTATUS ExGetXConfigSetting(USHORT Category, USHORT Entry, LPVOID Buffer, DWORD cchBuffer, LPDWORD cchOutBuffer); +NTSTATUS ExSetXConfigSetting(USHORT Category, USHORT Entry, LPVOID Buffer, DWORD cchBuffer); + +extern XBOX_HARDWARE_INFO* XboxHardwareInfo; +extern KERNEL_VERSION* XboxKrnlVersion; +extern KERNEL_VERSION* XboxKrnlBaseVersion; +extern PLDR_DATA_TABLE_ENTRY* XexExecutableModuleHandle; +extern CONST LPCSTR ExLoadedImageName; +extern DWORD ObDirectoryObjectType; +extern DWORD ObSymbolicLinkObjectType; +extern DWORD IoDeviceObjectType; +extern DWORD* KeDebugMonitorData; + +extern DWORD *KeTimeStampBundle; + +void KeQuerySystemTime(PULARGE_INTEGER Time); +VOID VdGetCurrentDisplayInformation(PDISPLAY_INFORMATION DisplayInfo); +DWORD KeGetCurrentProcessType(); + +void ExRegisterTitleTerminateNotification(PEX_TITLE_TERMINATE_REGISTRATION pRegistration, BOOL Register); +void ExRegisterThreadNotification(PEX_THREAD_REGISTRATION pRegistration, BOOL Register); + +void RtlInitAnsiString(PANSI_STRING DestinationString, const char* SourceString); + +PIMAGE_NT_HEADERS RtlImageNtHeader(PVOID ModuleAddress); +PVOID RtlImageDirectoryEntryToData(PVOID BaseAddress, BOOL MappedAsImage, USHORT Directory, PULONG Size); + +void* RtlImageXexHeaderField(void* XexHeaderBase, DWORD Key); +HRESULT XexStartExecutable(FARPROC TitleProcessInitThreadProc); +BOOL XexCheckExecutablePrivilege(DWORD Privilege); + +NTSTATUS XexGetModuleHandle(LPCSTR XexName, HMODULE *ModuleHandle); +NTSTATUS XexGetProcedureAddress(HMODULE ModuleHandle, DWORD dwOrdinal, PVOID OutAddress); +NTSTATUS ObCreateSymbolicLink(PANSI_STRING, PANSI_STRING); +NTSTATUS ObDeleteSymbolicLink(PANSI_STRING); +NTSTATUS ObTranslateSymbolicLink(IN PVOID, OUT PANSI_STRING); +NTSTATUS ObOpenObjectByPointer(PVOID Object, PHANDLE Handle); +NTSTATUS NtOpenSymbolicLinkObject(PHANDLE LinkHandle, POBJECT_ATTRIBUTES ObjectAttributes); +NTSTATUS NtQuerySymbolicLinkObject(HANDLE LinkHandle, PANSI_STRING LinkTarget, PULONG ReturnedLength); +NTSTATUS NtQueryVolumeInformationFile(HANDLE FileHandle, PIO_STATUS_BLOCK IoStatusBlock, PVOID FileSystemInformation, ULONG Length, FS_INFORMATION_CLASS FileSystemInformationClass); //FILE_FS_SIZE_INFORMATION NormalSizeInfo); +NTSTATUS NtClose(HANDLE Handle); + +NTSTATUS NtQueryInformationFile(HANDLE FileHandle, PIO_STATUS_BLOCK IoStatusBlock, + PVOID FileInformation, ULONG Length, FILE_INFORMATION_CLASS FileInformationClass); + +NTSTATUS XeKeysGetKey(DWORD KeyNum, void* KeyBuffer, DWORD* KeySize); +NTSTATUS XeKeysSetKey(DWORD KeyNum, void* KeyBuffer, DWORD* KeySize); +NTSTATUS XeKeysGetConsoleID(void* KeyBuffer, char* KeyString); + +BOOL MmIsAddressValid(VOID* Address); +PVOID MmCreateKernelStack(DWORD Size, DWORD Type); +DWORD MmGetPhysicalAddress(VOID* Address); + +void HalReturnToFirmware(DWORD); + +void XapiThreadStartup(void (__cdecl *StartRoutine)(void*), void* StartContext); +DWORD ExCreateThread(PHANDLE pHandle, DWORD dwStackSize, + LPDWORD lpThreadId, VOID* apiThreadStartup , + LPTHREAD_START_ROUTINE lpStartAddress, + LPVOID lpParameter, DWORD dwCreationFlagsMod); + +HRESULT HalOpenCloseODDTray(BOOL Open); + +NTSTATUS NtSetSystemTime(IN PULARGE_INTEGER SystemTime, OUT PULARGE_INTEGER PreviousTime OPTIONAL); + +NTSTATUS NtCreateFile(HANDLE* FileHandle, ACCESS_MASK DesiredAccess, POBJECT_ATTRIBUTES ObjectAttributes, + PIO_STATUS_BLOCK IoStatusBlock, PLARGE_INTEGER AllocationSize, ULONG FileAttributes, + ULONG ShareAccess, ULONG CreateDisposition, ULONG CreateOptions); + +NTSTATUS NtOpenFile(PHANDLE FileHandle, ACCESS_MASK DesiredAccess, POBJECT_ATTRIBUTES ObjectAttributes, + PIO_STATUS_BLOCK IoStatusBlock, ULONG ShareAccess, ULONG OpenOptions); + +NTSTATUS NtQueryDirectoryFile(HANDLE FileHandle, HANDLE Event, PIO_APC_ROUTINE ApcRoutine, PVOID ApcContext, + PIO_STATUS_BLOCK IoStatusBlock, PVOID FileInformation, ULONG Length, PANSI_STRING FileMask, PVOID Unk); + +NTSTATUS NtQueryFullAttributesFile(POBJECT_ATTRIBUTES ObjectAttributes, PFILE_NETWORK_OPEN_INFORMATION Attributes ); + +NTSTATUS NtReadFile(HANDLE FileHandle, HANDLE Event, PIO_APC_ROUTINE ApcRoutine, PVOID ApcContext, + PIO_STATUS_BLOCK IoStatusBlock, PVOID Buffer, ULONG Length, PLARGE_INTEGER ByteOffset); +NTSTATUS NtWriteFile(HANDLE FileHandle, IN HANDLE Event OPTIONAL, IN PIO_APC_ROUTINE ApcRoutine OPTIONAL, IN PVOID ApcContext OPTIONAL, + OUT PIO_STATUS_BLOCK IoStatusBlock, IN PVOID Buffer, IN ULONG Length, IN PLARGE_INTEGER ByteOffset OPTIONAL); + +NTSTATUS NtOpenDirectoryObject(PHANDLE DirectoryHandle, POBJECT_ATTRIBUTES ObjectAttributes); + +NTSTATUS NtQueryDirectoryObject(HANDLE DirectoryHandle, PVOID Buffer, ULONG Length, + BOOLEAN ReturnSingleEntry, PULONG Context, PULONG ReturnLength); + +NTSTATUS NtSetInformationFile(HANDLE FileHandle, PIO_STATUS_BLOCK IoStatusBlock, + PVOID FileInformation, ULONG Length, DWORD FileInformationClass); + +NTSTATUS NtClose(HANDLE Handle); + +NTSTATUS IoCreateDevice(PDRIVER_OBJECT DriverObject, ULONG DeviceExtensionSize, PANSI_STRING DeviceName, + DWORD DeviceType, ULONG DeviceCharacteristics, LPDWORD *DeviceObject); +NTSTATUS IoInvalidDeviceRequest(); + +UINT32 __stdcall XexLoadExecutable(char* xexName, PHANDLE handle, UINT32 typeInfo, UINT32 ver); +UINT32 __stdcall XexLoadImageFromMemory(char* XexBuffer, DWORD Size, char* xexName, DWORD Flags, DWORD MinVersion, HMODULE* Module); + +DWORD KeSuspendThread(HANDLE hThread); + +PVOID ExAllocatePoolWithTag(SIZE_T NumberOfBytes, ULONG Tag); +PVOID ExAllocatePoolTypeWithTag(SIZE_T NumberOfBytes, ULONG Tag, ULONG Type); +VOID ExFreePool(PVOID P); + +DWORD KeResumeThread(HANDLE hThread); + +HRESULT ObLookupAnyThreadByThreadId(DWORD dwThreadId, PKTHREAD *pthr); + +VOID ObDereferenceObject(PVOID Object); +NTSTATUS ObReferenceObjectByHandle(HANDLE Handle, DWORD ObjectType, PVOID *Object); + +BYTE KfRaiseIrql(BYTE irql); +BYTE KeRaiseIrqlToDpcLevel(); +VOID KfLowerIrql(BYTE Irql); +VOID KeEnterCriticalRegion(); +VOID KeLeaveCriticalRegion(); +BYTE KfAcquireSpinLock(LPVOID Object); +VOID KfReleaseSpinLock(LPVOID Object, BYTE Irql); +VOID KeAcquireSpinLockAtRaisedIrql(LPVOID Object); +VOID KeReleaseSpinLockFromRaisedIrql(LPVOID Object); +NTSTATUS ObCreateObject(PVOID ObjectType, POBJECT_ATTRIBUTES ObjectAttributes, DWORD Unknown, PVOID *Object); +NTSTATUS ObInsertObject(PVOID Object, POBJECT_ATTRIBUTES ObjectAttributes, DWORD Unk, PHANDLE Handle); +VOID IoDeleteDevice(PVOID Object); + +NTSTATUS NtCreateDirectoryObject(PHANDLE DirectoryHandle, POBJECT_ATTRIBUTES ObjectAttributes); + +BOOL ExTerminateThread(DWORD ReturnCode); + +BOOL KeSetEvent(HANDLE Event, DWORD Increment, BOOL Wait); +VOID KeResetEvent(HANDLE Event); +VOID KeSetBasePriorityThread(PKTHREAD Thread, DWORD Priority); + +VOID KeSweepIcacheRange(PVOID Address, DWORD cbBytes); + +INT KeQueryBasePriorityThread(PVOID pThread); + +NTSTATUS ObReferenceObjectByName(PANSI_STRING ObjectName, ULONG Attributes, DWORD ObjectType, DWORD Unk, PVOID *Object); +NTSTATUS IoCompleteRequest(PVOID IoRequest, DWORD Unk); + +VOID IoSetShareAccess(ACCESS_MASK DesiredAccess, ULONG DesiredShareAccess, PVOID FileObject, PVOID ShareAccess); + +PVOID MmDbgReadCheck(PVOID pAddress); +PVOID MmDbgWriteCheck(PVOID pAddress, PHANDLE pHandle); + +VOID MmDbgReleaseAddress(PVOID pAddress, PHANDLE pHandle); + +VOID KeSetSpecialPurposeRegister(DWORD dwRegister, ULONGLONG ulValue); + +ULONG_PTR KeIpiGenericCall(LPVOID BroadcastFunction, ULONG_PTR Context); + +VOID KeStallExecutionProcessor(DWORD); + +NTSTATUS KeWaitForSingleObject(PVOID Object, DWORD WaitReason, DWORD WaitMode, BOOL Alertable, PLARGE_INTEGER Timeout); + +PVOID XexPcToFileHeader(PVOID address, PLDR_DATA_TABLE_ENTRY* ldatOut); + +VOID KeInitializeEvent(PKEVENT Event, DWORD Type, BOOL State); + +HRESULT RtlNtStatusToDosError(NTSTATUS Status); + +VOID VdDisplayFatalError(DWORD Error); + +typedef struct _FILE_OBJECT +{ + WORD Type; // 00 + WORD Size; // 02 + PVOID DeviceObject; // 04 + PVOID CustomData; // 08 +} FILE_OBJECT, *PFILE_OBJECT; + +typedef struct _PARAMS_EVERYWHERE +{ + DWORD Unk[18]; // 00 - 44 + PANSI_STRING FileName; // 48 +} PARAMS_EVERYWHERE, *PPARAMS_EVERYWHERE; + +typedef struct _MORE_DRIVER_PARAMS +{ + DWORD Unk; // 00 + union { + struct { + DWORD dwDesiredAccess; // 04 + BYTE bCreationDisposition; // 08 + BYTE Unk2; // 09 + WORD wCreateOptions; // 0A + DWORD Unk3; // 0C + } CreateFile; + struct { + DWORD dwBytesRequested; + } ReadFile; + }; + PANSI_STRING FileName; // 10 + DWORD Unk4; // 14 + PFILE_OBJECT FileObject; // 18 + // 1c +} MORE_DRIVER_PARAMS, *PMORE_DRIVER_PARAMS; + +typedef struct _DRIVER_PARAMS +{ + DWORD Unk[4]; // 00 + // 04 + // 08 + // 0C + NTSTATUS Status; // 10 + DWORD BytesRead; // 14 + DWORD Unk2; // 18 + PVOID DataBuffer; // 1C + DWORD Unk3[12]; // 20 + // 24 + // 28 + // 2c + // 30 + // 34 + // 38 + // 3c + // 40 + // 44 + // 48 + // 4c + PMORE_DRIVER_PARAMS MoreParams; // 50 +} DRIVER_PARAMS, *PDRIVER_PARAMS; + +#ifndef InitializeListHead +// +// VOID +// InitializeListHead( +// PLIST_ENTRY ListHead +// ); +// + +#define InitializeListHead(ListHead) (\ + (ListHead)->Flink = (ListHead)->Blink = (ListHead)) + +// +// BOOLEAN +// IsListEmpty( +// PLIST_ENTRY ListHead +// ); +// + +#define IsListEmpty(ListHead) \ + ((ListHead)->Flink == (ListHead)) + +// +// PLIST_ENTRY +// RemoveHeadList( +// PLIST_ENTRY ListHead +// ); +// + +#define RemoveHeadList(ListHead) \ + (ListHead)->Flink;\ + {RemoveEntryList((ListHead)->Flink)} + +// +// PLIST_ENTRY +// RemoveTailList( +// PLIST_ENTRY ListHead +// ); +// + +#define RemoveTailList(ListHead) \ + (ListHead)->Blink;\ + {RemoveEntryList((ListHead)->Blink)} + +// +// VOID +// RemoveEntryList( +// PLIST_ENTRY Entry +// ); +// + +#define RemoveEntryList(Entry) {\ + PLIST_ENTRY _EX_Blink;\ + PLIST_ENTRY _EX_Flink;\ + _EX_Flink = (Entry)->Flink;\ + _EX_Blink = (Entry)->Blink;\ + _EX_Blink->Flink = _EX_Flink;\ + _EX_Flink->Blink = _EX_Blink;\ + } + +// +// VOID +// InsertTailList( +// PLIST_ENTRY ListHead, +// PLIST_ENTRY Entry +// ); +// + +#define InsertTailList(ListHead,Entry) {\ + PLIST_ENTRY _EX_Blink;\ + PLIST_ENTRY _EX_ListHead;\ + _EX_ListHead = (ListHead);\ + _EX_Blink = _EX_ListHead->Blink;\ + (Entry)->Flink = _EX_ListHead;\ + (Entry)->Blink = _EX_Blink;\ + _EX_Blink->Flink = (Entry);\ + _EX_ListHead->Blink = (Entry);\ + } + +// +// VOID +// InsertHeadList( +// PLIST_ENTRY ListHead, +// PLIST_ENTRY Entry +// ); +// + +#define InsertHeadList(ListHead,Entry) {\ + PLIST_ENTRY _EX_Flink;\ + PLIST_ENTRY _EX_ListHead;\ + _EX_ListHead = (ListHead);\ + _EX_Flink = _EX_ListHead->Flink;\ + (Entry)->Flink = _EX_Flink;\ + (Entry)->Blink = _EX_ListHead;\ + _EX_Flink->Blink = (Entry);\ + _EX_ListHead->Flink = (Entry);\ + } + +#endif // InitializeListHead \ No newline at end of file diff --git a/xbdm/imp/XeCrypt.h b/xbdm/imp/XeCrypt.h new file mode 100644 index 0000000..39c619e --- /dev/null +++ b/xbdm/imp/XeCrypt.h @@ -0,0 +1,809 @@ +// --------------------------------------------------------------------------------------- +// xecrypt.h +// +// Copyright (C) Microsoft Corporation +// --------------------------------------------------------------------------------------- + +#ifndef _XECRYPT_H_ +#define _XECRYPT_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef unsigned __int64 QWORD; +#define XECRYPTAPI __stdcall + +// --------------------------------------------------------------------------------------- +// DES Cipher +// +// These functions implement symmetric encryption and decryption with the DES cipher. +// +// The DES block size is 8 bytes and the DES key size is 8 bytes. +// +// XeCryptDesKey initializes an XECRYPT_DES_STATE structure from a DES key. +// +// XeCryptDesEcb encrypts or decrypts a single DES block. +// +// XeCryptDesCbc encrypts or decrypts a contiguous series of blocks using cipher block +// chaining. On input the pbFeed parameter is the initialization vector. On output the +// pbFeed parameter is filled with the final ciphertext block. +// --------------------------------------------------------------------------------------- + +typedef struct { + unsigned long keytab[16][2]; +} XECRYPT_DES_STATE; + +#define XECRYPT_DES_BLOCK_SIZE (8) +#define XECRYPT_DES_KEY_SIZE (8) + +void XECRYPTAPI XeCryptDesParity(const BYTE * pbInp, DWORD cbInp, BYTE * pbOut); + +void XECRYPTAPI XeCryptDesKey(XECRYPT_DES_STATE * pDesState, const BYTE * pbKey); +void XECRYPTAPI XeCryptDesEcb(const XECRYPT_DES_STATE * pDesState, const BYTE * pbInp, BYTE * pbOut, BOOL fEncrypt); +void XECRYPTAPI XeCryptDesCbc(const XECRYPT_DES_STATE * pDesState, const BYTE * pbInp, DWORD cbInp, BYTE * pbOut, BYTE * pbFeed, BOOL fEncrypt); + +// --------------------------------------------------------------------------------------- +// DES3 Cipher +// +// These functions implement symmetric encryption and decryption with the DES3 cipher. +// +// The DES3 block size is 8 bytes and the DES3 key size is 24 bytes. +// +// XeCryptDes3Key initializes an XECRYPT_DES3_STATE structure from a DES3 key. +// +// XeCryptDes3Ecb encrypts or decrypts a single DES block. +// +// XeCryptDes3Cbc encrypts or decrypts a contiguous series of blocks using cipher block +// chaining. On input the pbFeed parameter is the initialization vector. On output the +// pbFeed parameter is filled with the final ciphertext block. +// --------------------------------------------------------------------------------------- + +typedef struct { + XECRYPT_DES_STATE aDesState[3]; +} XECRYPT_DES3_STATE; + +#define XECRYPT_DES3_KEY_SIZE (24) + +void XECRYPTAPI XeCryptDes3Key(XECRYPT_DES3_STATE * pDes3State, const BYTE * pbKey); +void XECRYPTAPI XeCryptDes3Ecb(const XECRYPT_DES3_STATE * pDes3State, const BYTE * pbInp, BYTE * pbOut, BOOL fEncrypt); +void XECRYPTAPI XeCryptDes3Cbc(const XECRYPT_DES3_STATE * pDes3State, const BYTE * pbInp, DWORD cbInp, BYTE * pbOut, BYTE * pbFeed, BOOL fEncrypt); + +// --------------------------------------------------------------------------------------- +// AES Cipher +// +// These functions implement symmetric encryption and decryption with the AES cipher. +// +// The AES block size is 16 bytes and the AES key size is 16 bytes. +// +// XeCryptAesKey initializes an XECRYPT_AES_STATE structure from an AES key. +// +// XeCryptAesEcb encrypts or decrypts a single AES block. +// +// XeCryptAesCbc encrypts or decrypts a contiguous series of blocks using cipher block +// chaining. On input the pbFeed parameter is the initialization vector. On output the +// pbFeed parameter is filled with the final ciphertext block. +// --------------------------------------------------------------------------------------- + +typedef struct { + BYTE keytabenc[11][4][4]; + BYTE keytabdec[11][4][4]; +} XECRYPT_AES_STATE; + +#define XECRYPT_AES_BLOCK_SIZE (16) +#define XECRYPT_AES_KEY_SIZE (16) + +void XECRYPTAPI XeCryptAesKey(XECRYPT_AES_STATE * pAesState, const BYTE * pbKey); +void XECRYPTAPI XeCryptAesEcb(const XECRYPT_AES_STATE * pAesState, const BYTE * pbInp, BYTE * pbOut, BOOL fEncrypt); +void XECRYPTAPI XeCryptAesCbc(const XECRYPT_AES_STATE * pAesState, const BYTE * pbInp, DWORD cbInp, BYTE * pbOut, BYTE * pbFeed, BOOL fEncrypt); + +// --------------------------------------------------------------------------------------- +// RC4 Stream Cipher +// +// These functions implement the RC4 stream cipher. +// +// The RC4 key size can be anywhere from zero to 256 bytes long. +// +// XeCryptRc4Key initializes an XECRYPT_RC4_STATE from an RC4 key. +// +// XeCryptRc4Ecb encrypts or decrypts a stream of bytes. +// +// XeCryptRc4 combines both of the previous functions for convenience. +// --------------------------------------------------------------------------------------- + +typedef struct { + BYTE S[256]; + BYTE i,j; +} XECRYPT_RC4_STATE; + +void XECRYPTAPI XeCryptRc4Key(XECRYPT_RC4_STATE * pRc4State, const BYTE * pbKey, DWORD cbKey); +void XECRYPTAPI XeCryptRc4Ecb(XECRYPT_RC4_STATE * pRc4State, BYTE * pbInpOut, DWORD cbInpOut); +void XECRYPTAPI XeCryptRc4(const BYTE * pbKey, DWORD cbKey, BYTE * pbInpOut, DWORD cbInpOut); + +// --------------------------------------------------------------------------------------- +// SHA +// +// These functions implement the SHA-1 one-way hash algorithm. The result of the hash of +// any number of bytes is a digest of 20 bytes. +// +// XeCryptShaInit initializes an XECRYPT_SHA_STATE structure. +// +// Next, for each block of bytes that are to be hashed, call XeCryptShaUpdate. There is +// no limit to the size of the block, and it doesn't matter how the blocks are divided. +// +// Finally, call XeCryptShaFinal to compute the digest. Note that after calling this +// function the digest is available in the "state". The cbOut parameter can be less +// than 20 if only a prefix of the resulting digest is needed. It can be zero if the +// resulting digest will be read directly from the state structure. +// +// For convenience, all of these operations are combined by a single call to XeCryptSha. +// --------------------------------------------------------------------------------------- + +typedef struct { + DWORD count; + DWORD state[5]; + BYTE buffer[64]; +} XECRYPT_SHA_STATE; + +#define XECRYPT_SHA_DIGEST_SIZE (20) + +void XECRYPTAPI XeCryptShaInit(XECRYPT_SHA_STATE * pShaState); +void XECRYPTAPI XeCryptShaUpdate(XECRYPT_SHA_STATE * pShaState, const BYTE * pbInp, DWORD cbInp); +void XECRYPTAPI XeCryptShaFinal(XECRYPT_SHA_STATE * pShaState, BYTE * pbOut, DWORD cbOut); +void XECRYPTAPI XeCryptSha(const BYTE * pbInp1, DWORD cbInp1, const BYTE * pbInp2, DWORD cbInp2, const BYTE * pbInp3, DWORD cbInp3, BYTE * pbOut, DWORD cbOut); +void XECRYPTAPI XeCryptRotSumSha(const BYTE * pbInp1, DWORD cbInp1, const BYTE * pbInp2, DWORD cbInp2, BYTE * pbOut, DWORD cbOut); + +// --------------------------------------------------------------------------------------- +// HMAC-SHA +// +// These functions implement the keyed HMAC-SHA-1 algorithm. The result is a digest of +// 20 bytes. +// +// First, initialize an XECRYPT_HMACSHA_STATE structure by calling XeCryptHmacShaInit with +// a key of up to 64 bytes. +// +// Next, for each block of bytes that are to be hashed, call XeCryptHmacShaUpdate. There +// is no limit to the size of the block, and it doesn't matter how the blocks are divided. +// +// Finally, call XeCryptHmacShaFinal to compute the digest. The cbOut parameter can be +// less than 20 if only a prefix of the resulting digest is needed. +// +// For convenience, all of these operations are combined by a single call to XeCryptSha. +// +// The XeCryptHmacShaVerify function computes the digest just like a single call to +// XeCryptHmacSha, then compares the resulting digest to the expected digest passed in +// through the pbVer/cbVer arguments. Note that cbVer can be less than 20 if only a +// prefix of the resulting digest should be compared. The result is TRUE if the +// computed and expected digests match, and FALSE otherwise. +// --------------------------------------------------------------------------------------- + +typedef struct { + XECRYPT_SHA_STATE ShaState[2]; +} XECRYPT_HMACSHA_STATE; + +void XECRYPTAPI XeCryptHmacShaInit(XECRYPT_HMACSHA_STATE * pHmacShaState, const BYTE * pbKey, DWORD cbKey); +void XECRYPTAPI XeCryptHmacShaUpdate(XECRYPT_HMACSHA_STATE * pHmacShaState, const BYTE * pbInp, DWORD cbInp); +void XECRYPTAPI XeCryptHmacShaFinal(XECRYPT_HMACSHA_STATE * pHmacShaState, BYTE * pbOut, DWORD cbOut); +void XECRYPTAPI XeCryptHmacSha(const BYTE * pbKey, DWORD cbKey, const BYTE * pbInp1, DWORD cbInp1, const BYTE * pbInp2, DWORD cbInp2, const BYTE * pbInp3, DWORD cbInp3, BYTE * pbOut, DWORD cbOut); +BOOL XECRYPTAPI XeCryptHmacShaVerify(const BYTE * pbKey, DWORD cbKey, const BYTE * pbInp1, DWORD cbInp1, const BYTE * pbInp2, DWORD cbInp2, const BYTE * pbInp3, DWORD cbInp3, const BYTE * pbVer, DWORD cbVer); + +// --------------------------------------------------------------------------------------- +// MD5 +// +// These functions implement the MD5 one-way hash algorithm. The result of the hash of +// any number of bytes is a digest of 16 bytes. +// +// First, initialize an XECRYPT_MD5_STATE structure by calling XeCryptMd5Init. +// +// Next, for each block of bytes that are to be hashed, call XeCryptMd5Update. There is +// no limit to the size of the block, and it doesn't matter how the blocks are divided. +// +// Finally, call XeCryptMd5Final to compute the digest. Note that after calling this +// function the digest is available in the "state". The cbOut parameter can be less +// than 16 if only a prefix of the resulting digest is needed. It can be zero if the +// resulting digest will be read directly from the state structure. +// +// For convenience, all of these operations are combined by a single call to XeCryptMd5. +// --------------------------------------------------------------------------------------- + +typedef struct { + DWORD count; + DWORD buf[4]; + BYTE in[64]; +} XECRYPT_MD5_STATE; + +#define XECRYPT_MD5_DIGEST_SIZE (16) + +void XECRYPTAPI XeCryptMd5Init(XECRYPT_MD5_STATE * pMd5State); +void XECRYPTAPI XeCryptMd5Update(XECRYPT_MD5_STATE * pMd5State, const BYTE * pbInp, DWORD cbInp); +void XECRYPTAPI XeCryptMd5Final(XECRYPT_MD5_STATE * pMd5State, BYTE * pbOut, DWORD cbOut); +void XECRYPTAPI XeCryptMd5(const BYTE * pbInp1, DWORD cbInp1, const BYTE * pbInp2, DWORD cbInp2, const BYTE * pbInp3, DWORD cbInp3, BYTE * pbOut, DWORD cbOut); + +// --------------------------------------------------------------------------------------- +// HMAC-MD5 +// +// These functions implement the keyed HMAC-MD5 algorithm. The result is a digest of +// 16 bytes. +// +// First, initialize an XECRYPT_HMACMD5_STATE structure by calling XeCryptHmacMd5Init with +// a key of up to 64 bytes. +// +// Next, for each block of bytes that are to be hashed, call XeCryptHmacMd5Update. There +// is no limit to the size of the block, and it doesn't matter how the blocks are divided. +// +// Finally, call XeCryptHmacMd5Final to compute the digest. The cbOut parameter can be +// less than 20 if only a prefix of the resulting digest is needed. +// +// For convenience, all of these operations are combined by a single call to XeCryptMd5. +// --------------------------------------------------------------------------------------- + +typedef struct { + XECRYPT_MD5_STATE Md5State[2]; +} XECRYPT_HMACMD5_STATE; + +void XECRYPTAPI XeCryptHmacMd5Init(XECRYPT_HMACMD5_STATE * pHmacMd5State, const BYTE * pbKey, DWORD cbKey); +void XECRYPTAPI XeCryptHmacMd5Update(XECRYPT_HMACMD5_STATE * pHmacMd5State, const BYTE * pbInp, DWORD cbInp); +void XECRYPTAPI XeCryptHmacMd5Final(XECRYPT_HMACMD5_STATE * pHmacMd5State, BYTE * pbOut, DWORD cbOut); +void XECRYPTAPI XeCryptHmacMd5(const BYTE * pbKey, DWORD cbKey, const BYTE * pbInp1, DWORD cbInp1, const BYTE * pbInp2, DWORD cbInp2, const BYTE * pbInp3, DWORD cbInp3, BYTE * pbOut, DWORD cbOut); + +// --------------------------------------------------------------------------------------- +// Big Number Representations +// +// Multiple precision numbers are arranged as an array of digits, with the least +// significant digit coming first ("little-endian digit ordering"), regardless +// of the word size or byte ordering of the digit itself. +// +// A single digit is either a DWORD (4 bytes) or a QWORD (8 bytes). A bignum that +// consists of a series of DWORD digits is tagged "BnDw", whereas a bignum that +// consists of a series of QWORD digits is tagged "BnQw". A bignum function +// is tagged with one of these two to specify the digit size it expects, and it +// takes a length parameter that specifies the number of digits in the number. +// +// Consider a 8-byte number written in radix 256 notation. Here R=256. +// +// b7*(R^7)+b6*(R^6)+b5*(R^5)+b4*(R^5)+b3*(R^3)+b2*(R^2)+b1*(R^1)+b0*(R^0) +// +// A BnDw bignum consists of a series of DWORD digits. The DWORD can be encoded +// in either little-endian or big-endian byte ordering. Thus there are two +// possible formats for these digits. +// +// DwLe [b0 b1 b2 b3][b4 b5 b6 b7] +// DwBe [b3 b2 b1 b0][b7 b6 b5 b4] +// +// A BnQw bignum consists of a series of QWORD digits. The QWORD can be encoded +// in either little-endian or big-endian byte ordering. Thus there are two +// possible formats for these digits. +// +// QwLe [b0 b1 b2 b3 b4 b5 b6 b7] +// QwBe [b7 b6 b5 b4 b3 b2 b1 b0] +// +// A particular platform has a natural byte order (Le or Be). We use the tag Ne +// to mean the natural byte order. +// +// Most low level bignum routines require inputs that are in QwNe format. That +// is, QWORD digits in natural byte order for the platform. They take an array +// of QWORD digits and a count of digits. The caller is responsible for converting +// the bignum into the expected format. +// +// A full complement of conversion functions is available. The BnDw functions +// will convert a bignum made up of a series of DWORD digits between DwLe, DwBe, +// and DwNe formats. The BnQw functions will convert a bignum made up of a series +// of QWORD digits between QwLe, QwBe, and QwNe formats. The BnQw functions can +// also convert between BnDw and BnQw bignum formats, but since the length parameter +// specifies the number of QWORD digits, the BnDw bignum must contain an even number +// of DWORD digits. +// +// When a bignum is to be stored or used on multiple platforms, the application +// must choose a concrete representation for the number. In the case of digital +// signatures, we choose to store them in QwBe format. This was chosen to match +// the natural word size and byte ordering of the Xenon console, so that the +// signature checking code would be as small and fast as possible on that platform. +// --------------------------------------------------------------------------------------- + +void XECRYPTAPI XeCryptBnDw_Zero(DWORD * pdw, DWORD cdw); +void XECRYPTAPI XeCryptBnDw_Copy(const DWORD * pdwInp, DWORD * pdwOut, DWORD cdw); +void XECRYPTAPI XeCryptBnDw_SwapLeBe(const DWORD * pdwInp, DWORD * pdwOut, DWORD cdw); + +void XECRYPTAPI XeCryptBnQw_Zero(QWORD * pqw, DWORD cqw); +void XECRYPTAPI XeCryptBnQw_Copy(const QWORD * pqwInp, QWORD * pqwOut, DWORD cqw); +void XECRYPTAPI XeCryptBnQw_SwapLeBe(const QWORD * pqwInp, QWORD * pqwOut, DWORD cqw); +void XECRYPTAPI XeCryptBnQw_SwapDwQw(const QWORD * pqwInp, QWORD * pqwOut, DWORD cqw); +void XECRYPTAPI XeCryptBnQw_SwapDwQwLeBe(const QWORD * pqwInp, QWORD * pqwOut, DWORD cqw); + +#define XeCryptBnDw_DwLeToDwLe XeCryptBnDw_Copy +#define XeCryptBnDw_DwLeToDwBe XeCryptBnDw_SwapLeBe +#define XeCryptBnDw_DwBeToDwLe XeCryptBnDw_SwapLeBe +#define XeCryptBnDw_DwBeToDwBe XeCryptBnDw_Copy + +#define XeCryptBnQw_DwLeToDwLe XeCryptBnQw_Copy +#define XeCryptBnQw_DwLeToDwBe XeCryptBnQw_SwapLeBe +#define XeCryptBnQw_DwLeToQwLe XeCryptBnQw_Copy +#define XeCryptBnQw_DwLeToQwBe XeCryptBnQw_SwapDwQwLeBe + +#define XeCryptBnQw_DwBeToDwLe XeCryptBnQw_SwapLeBe +#define XeCryptBnQw_DwBeToDwBe XeCryptBnQw_Copy +#define XeCryptBnQw_DwBeToQwLe XeCryptBnQw_SwapLeBe +#define XeCryptBnQw_DwBeToQwBe XeCryptBnQw_SwapDwQw + +#define XeCryptBnQw_QwLeToDwLe XeCryptBnQw_Copy +#define XeCryptBnQw_QwLeToDwBe XeCryptBnQw_SwapLeBe +#define XeCryptBnQw_QwLeToQwLe XeCryptBnQw_Copy +#define XeCryptBnQw_QwLeToQwBe XeCryptBnQw_SwapDwQwLeBe + +#define XeCryptBnQw_QwBeToDwLe XeCryptBnQw_SwapDwQwLeBe +#define XeCryptBnQw_QwBeToDwBe XeCryptBnQw_SwapDwQw +#define XeCryptBnQw_QwBeToQwLe XeCryptBnQw_SwapDwQwLeBe +#define XeCryptBnQw_QwBeToQwBe XeCryptBnQw_Copy + +#ifdef _M_PPCBE + +#define XeCryptBnDw_DwLeToDwNe XeCryptBnDw_DwLeToDwBe +#define XeCryptBnDw_DwBeToDwNe XeCryptBnDw_DwBeToDwBe +#define XeCryptBnDw_DwNeToDwLe XeCryptBnDw_DwBeToDwLe +#define XeCryptBnDw_DwNeToDwBe XeCryptBnDw_DwBeToDwBe + +#define XeCryptBnQw_DwLeToDwNe XeCryptBnQw_DwLeToDwBe +#define XeCryptBnQw_DwLeToQwNe XeCryptBnQw_DwLeToQwBe +#define XeCryptBnQw_DwBeToDwNe XeCryptBnQw_DwBeToDwBe +#define XeCryptBnQw_DwBeToQwNe XeCryptBnQw_DwBeToQwBe + +#define XeCryptBnQw_QwLeToDwNe XeCryptBnQw_QwLeToDwBe +#define XeCryptBnQw_QwLeToQwNe XeCryptBnQw_QwLeToQwBe +#define XeCryptBnQw_QwBeToDwNe XeCryptBnQw_QwBeToDwBe +#define XeCryptBnQw_QwBeToQwNe XeCryptBnQw_QwBeToQwBe + +#define XeCryptBnQw_DwNeToDwLe XeCryptBnQw_DwBeToDwLe +#define XeCryptBnQw_DwNeToDwBe XeCryptBnQw_DwBeToDwBe +#define XeCryptBnQw_DwNeToQwLe XeCryptBnQw_DwBeToQwLe +#define XeCryptBnQw_DwNeToQwBe XeCryptBnQw_DwBeToQwBe + +#define XeCryptBnQw_QwNeToDwLe XeCryptBnQw_QwBeToDwLe +#define XeCryptBnQw_QwNeToDwBe XeCryptBnQw_QwBeToDwBe +#define XeCryptBnQw_QwNeToQwLe XeCryptBnQw_QwBeToQwLe +#define XeCryptBnQw_QwNeToQwBe XeCryptBnQw_QwBeToQwBe + +#else + +#define XeCryptBnDw_DwLeToDwNe XeCryptBnDw_DwLeToDwLe +#define XeCryptBnDw_DwBeToDwNe XeCryptBnDw_DwBeToDwLe +#define XeCryptBnDw_DwNeToDwLe XeCryptBnDw_DwLeToDwLe +#define XeCryptBnDw_DwNeToDwBe XeCryptBnDw_DwLeToDwBe + +#define XeCryptBnQw_DwLeToDwNe XeCryptBnQw_DwLeToDwLe +#define XeCryptBnQw_DwLeToQwNe XeCryptBnQw_DwLeToQwLe +#define XeCryptBnQw_DwBeToDwNe XeCryptBnQw_DwBeToDwLe +#define XeCryptBnQw_DwBeToQwNe XeCryptBnQw_DwBeToQwLe + +#define XeCryptBnQw_QwLeToDwNe XeCryptBnQw_QwLeToDwLe +#define XeCryptBnQw_QwLeToQwNe XeCryptBnQw_QwLeToQwLe +#define XeCryptBnQw_QwBeToDwNe XeCryptBnQw_QwBeToDwLe +#define XeCryptBnQw_QwBeToQwNe XeCryptBnQw_QwBeToQwLe + +#define XeCryptBnQw_DwNeToDwLe XeCryptBnQw_DwLeToDwLe +#define XeCryptBnQw_DwNeToDwBe XeCryptBnQw_DwLeToDwBe +#define XeCryptBnQw_DwNeToQwLe XeCryptBnQw_DwLeToQwLe +#define XeCryptBnQw_DwNeToQwBe XeCryptBnQw_DwLeToQwBe + +#define XeCryptBnQw_QwNeToDwLe XeCryptBnQw_QwLeToDwLe +#define XeCryptBnQw_QwNeToDwBe XeCryptBnQw_QwLeToDwBe +#define XeCryptBnQw_QwNeToQwLe XeCryptBnQw_QwLeToQwLe +#define XeCryptBnQw_QwNeToQwBe XeCryptBnQw_QwLeToQwBe + +#endif + +// --------------------------------------------------------------------------------------- +// XeCryptBnQwNeCompare +// +// This function compares two multiple precision numbers in BnQwNe format and returns: +// +// -1 if aqwA[] < aqwB[] +// 0 if aqwA[] = aqwB[] +// +1 if aqwA[] > aqwB[] +// --------------------------------------------------------------------------------------- + +int XECRYPTAPI XeCryptBnQwNeCompare(const QWORD * pqwA, const QWORD * pqwB, DWORD cqw); + +// --------------------------------------------------------------------------------------- +// XeCryptBnQwNeModInv +// +// This function computes the 2-adic inverse of a QWORD (mod 2^64). +// --------------------------------------------------------------------------------------- + +QWORD XECRYPTAPI XeCryptBnQwNeModInv(QWORD qw); + +// --------------------------------------------------------------------------------------- +// XeCryptBnQwNeModMul +// +// This function performs Montgomery multiplication. +// +// All numbers must be in BnQwNe format and have cqw digits. +// +// The result of this function is: +// +// aqwA[] * aqwB[] +// aqwC[] = --------------- MOD aqwM[] +// 2^(cqw*64) +// --------------------------------------------------------------------------------------- + +void XECRYPTAPI XeCryptBnQwNeModMul(const QWORD * pqwA, const QWORD * pqwB, QWORD * pqwC, QWORD qwMI, const QWORD * pqwM, DWORD cqw); + +// --------------------------------------------------------------------------------------- +// XeCryptBnQwNeModExp +// +// This function performs modular exponentiation. +// +// All numbers must be in BnQwNe format and have cqw digits. +// +// The result of this function is: +// +// aqwA[] = (aqwB[] ^ aqwC[]) MOD aqwM[] +// +// This function returns FALSE if there was not enough memory to allocate storage for +// intermediate results, or if one or more of the inputs is invalid (such as zero modulus), +// otherwise TRUE is returned. +// --------------------------------------------------------------------------------------- + +BOOL XECRYPTAPI XeCryptBnQwNeModExp(QWORD * pqwA, const QWORD * pqwB, const QWORD * pqwC, const QWORD * pqwM, DWORD cqw); + +// --------------------------------------------------------------------------------------- +// XeCryptBnQwNeModExpRoot +// +// This function performs modular exponentiation to an exponent and modulus given by its +// prime factors and coefficients. This is a support routine for exponentiating to a +// private RSA key. It is more efficient than exponentiating to the private exponent +// directly, but the result is otherwise the same. +// +// All numbers must be in BnQwNe format. The pqwA and pqwB numbers have cqw * 2 digits. +// All of the other numbers have cqw digits. +// +// The result of this function is: +// +// aqwA[] = (aqwB[] ^ aqwC[]) MOD aqwM[] +// +// where aqwC[] and aqwM[] are implicitly provided by their constituent parts. +// +// This function returns FALSE if there was not enough memory to allocate storage for +// intermediate results, or if one or more of the inputs is invalid (such as a zero modulus), +// otherwise TRUE is returned. +// --------------------------------------------------------------------------------------- + +BOOL XECRYPTAPI XeCryptBnQwNeModExpRoot(QWORD * pqwA, const QWORD * pqwB, const QWORD * pqwPP, const QWORD * pqwQQ, const QWORD * pqwDP, const QWORD * pqwDQ, const QWORD * pqwCR, DWORD cqw); + +// --------------------------------------------------------------------------------------- +// XeCryptBnQwNeRsaPubCrypt +// XeCryptBnQwNeRsaPrvCrypt +// +// These functions performs modular exponentiation of a message to the public or private +// exponent of the given RSA key. +// +// The aqwA[] parameter must be in BnQwNe format and have cqw digits. It's value must +// be less than the modulus. +// +// The result of this function is: +// +// aqwB[] = (aqwA[] ^ dwPubExp) MOD aqwM[] (XeCryptBnQwNeRsaPubCrypt) +// aqwB[] = (aqwA[] ^ aqwPrvExp[]) MOD aqwM[] (XeCryptBnQwNeRsaPrvCrypt) +// --------------------------------------------------------------------------------------- + +typedef struct { + DWORD cqw; // Number of QWORD digits in modulus + DWORD dwPubExp; // Public exponent + QWORD qwReserved; // Reserved (was qwMI) +// QWORD aqwM[cqw]; // [BnQwNe] Modulus +// QWORD aqwP[cqw/2]; // [BnQwNe] Private prime P +// QWORD aqwQ[cqw/2]; // [BnQwNe] Private prime Q +// QWORD aqwDP[cqw/2]; // [BnQwNe] Private exponent P +// QWORD aqwDQ[cqw/2]; // [BnQwNe] Private exponent Q +// QWORD aqwCR[cqw/2]; // [BnQwNe] Private coefficient +} XECRYPT_RSA; + +typedef struct { + XECRYPT_RSA Rsa; // Common header + QWORD aqwM[16]; // [BnQwNe] Modulus +} XECRYPT_RSAPUB_1024; + +typedef struct { + XECRYPT_RSA Rsa; // Common header + QWORD aqwM[24]; // [BnQwNe] Modulus +} XECRYPT_RSAPUB_1536; + +typedef struct { + XECRYPT_RSA Rsa; // Common header + QWORD aqwM[32]; // [BnQwNe] Modulus +} XECRYPT_RSAPUB_2048; + +typedef struct { + XECRYPT_RSA Rsa; // Common header + QWORD aqwM[64]; // [BnQwNe] Modulus +} XECRYPT_RSAPUB_4096; + +typedef struct { + XECRYPT_RSA Rsa; // Common header + QWORD aqwM[16]; // [BnQwNe] Modulus + QWORD aqwP[8]; // [BnQwNe] Private prime P + QWORD aqwQ[8]; // [BnQwNe] Private prime Q + QWORD aqwDP[8]; // [BnQwNe] Private exponent P + QWORD aqwDQ[8]; // [BnQwNe] Private exponent Q + QWORD aqwCR[8]; // [BnQwNe] Private coefficient +} XECRYPT_RSAPRV_1024; + +typedef struct { + XECRYPT_RSA Rsa; // Common header + QWORD aqwM[24]; // [BnQwNe] Modulus + QWORD aqwP[12]; // [BnQwNe] Private prime P + QWORD aqwQ[12]; // [BnQwNe] Private prime Q + QWORD aqwDP[12]; // [BnQwNe] Private exponent P + QWORD aqwDQ[12]; // [BnQwNe] Private exponent Q + QWORD aqwCR[12]; // [BnQwNe] Private coefficient +} XECRYPT_RSAPRV_1536; + +typedef struct { + XECRYPT_RSA Rsa; // Common header + QWORD aqwM[32]; // [BnQwNe] Modulus + QWORD aqwP[16]; // [BnQwNe] Private prime P + QWORD aqwQ[16]; // [BnQwNe] Private prime Q + QWORD aqwDP[16]; // [BnQwNe] Private exponent P + QWORD aqwDQ[16]; // [BnQwNe] Private exponent Q + QWORD aqwCR[16]; // [BnQwNe] Private coefficient +} XECRYPT_RSAPRV_2048; + +typedef struct { + XECRYPT_RSA Rsa; // Common header + QWORD aqwM[64]; // [BnQwNe] Modulus + QWORD aqwP[32]; // [BnQwNe] Private prime P + QWORD aqwQ[32]; // [BnQwNe] Private prime Q + QWORD aqwDP[32]; // [BnQwNe] Private exponent P + QWORD aqwDQ[32]; // [BnQwNe] Private exponent Q + QWORD aqwCR[32]; // [BnQwNe] Private coefficient +} XECRYPT_RSAPRV_4096; + +BOOL XECRYPTAPI XeCryptBnQwNeRsaPubCrypt(const QWORD * pqwA, QWORD * pqwB, const XECRYPT_RSA * pRsa); +BOOL XECRYPTAPI XeCryptBnQwNeRsaPrvCrypt(const QWORD * pqwA, QWORD * pqwB, const XECRYPT_RSA * pRsa); + +// --------------------------------------------------------------------------------------- +// XeCryptBnQwNeRsaKeyGen +// +// This function generates a random RSA key pair. +// +// The cbits parameter specifies the number of bits in the modulus. It must be a multiple +// of 128, and must be between 512 and 4096. +// +// The dwPubExp parameter specifies the public exponent. +// +// The pRsaPub and pRsaPrv parameters must point to XECRYPT_RSA structures that are large +// enough to hold the public and private keys requested. The public key structure needs +// to be at least sizeof(XECRYPT_RSA) + (cbits / 8) bytes big. The private key structure +// needs to be at least sizeof(XECRYPT_RSA) + (((cbits / 2) * 7) / 8) bytes big. +// --------------------------------------------------------------------------------------- + +BOOL XECRYPTAPI XeCryptBnQwNeRsaKeyGen(DWORD cbits, DWORD dwPubExp, XECRYPT_RSA * pRsaPub, XECRYPT_RSA * pRsaPrv); + +// --------------------------------------------------------------------------------------- +// XeCryptBnQwBeSigFormat +// XeCryptBnQwBeSigCreate +// XeCryptBnQwBeSigVerify +// +// These functions format, create, and verify digital signatures using an RSA key pair. +// +// The size of the RSA key must be 2048 bits and the public exponent must be 3 or 65537. +// The size of a digital signature is 256 bytes. The signature is represented as a bignum +// in BnQwBe format. This allows for processing digital signatures on platforms with +// different byte orders. +// +// The XeCryptBnQwBeSigFormat function takes a 20 byte hash and a 10 byte fixed salt value +// and generates a digital signature using the PKCS #1 v2.1 RSASSA-PSS algorithm. The +// hash function is SHA and the MGF function is RC4. The resulting digital signature +// is stored in the XECRYPT_SIG structure. +// +// The XeCryptBnQwBeSigCreate function takes a 20 byte hash and a 10 byte fixed salt +// value, generates a digital signature, and then pre-compensates it by multiplying the +// signature by a scale factor derived from the modulus in the public key. This +// pre-compensation is used to simplify verification later. +// +// The XeCryptQwBeSigVerify function takes an encrypted digital signature, a 20 byte hash +// a 10 byte fixed salt value, and an RSA public key. It returns TRUE if the digital +// signature, when decrypted with the RSA public key, matches the result of formatting +// a digital signature with the 20 byte hash and 10 byte salt value, and FALSE otherwise. +// --------------------------------------------------------------------------------------- + +typedef struct { // [BnQwBe] + QWORD aqwPad[28]; // Padding + BYTE bOne; // 0x01 + BYTE abSalt[10]; // Salt + BYTE abHash[20]; // Hash + BYTE bEnd; // 0xBC +} XECRYPT_SIG; + +void XECRYPTAPI XeCryptBnQwBeSigFormat(XECRYPT_SIG * pSig, const BYTE * pbHash, const BYTE * pbSalt); +BOOL XECRYPTAPI XeCryptBnQwBeSigCreate(XECRYPT_SIG * pSig, const BYTE * pbHash, const BYTE * pbSalt, const XECRYPT_RSA * pRsa); +BOOL XECRYPTAPI XeCryptBnQwBeSigVerify(XECRYPT_SIG * pSig, const BYTE * pbHash, const BYTE * pbSalt, const XECRYPT_RSA * pRsa); + +// --------------------------------------------------------------------------------------- +// XeCryptBnDwLePkcs1Format +// XeCryptBnDwLePkcs1Verify +// +// These functions format and verify a SHA digest in PKCS#1 format and BnDwLe bignum +// representation. This format matches what was used on Xbox 1 and what is normally +// produced by nCipher devices. +// +// The pbHash argument specifies the digest to format or verify. +// +// When formatting, the dwType argument selects one of three encoding formats, as follows. +// +// 0: [HashReversed][140400051A02030E2B05060930213000][FF ... FF][0100] +// 1: [HashReversed][14041A02030E2B050607301F3000][FF ... FF][0100] +// >1: [HashReversed][00][FF ... FF][0100] +// +// On Xbox 1, signatures would always be encoded using format 0, but any of these formats +// were accepted by the verification routine. We follow the same rules when calling +// XeCryptBnDwLePkcs1Verify. +// +// The pbSig argument specifies the buffer to place the formatted signature, or the buffer +// containing the signature to verify. +// +// The cbSig argument specifies the size of the signature buffer. It should be equal to +// the number of bytes in the RSA key modulus. For example, if this siguature is used +// with an RSA key whose modulus is 1024 bits, you would specify 128 for this argument. +// --------------------------------------------------------------------------------------- + +void XECRYPTAPI XeCryptBnDwLePkcs1Format(const BYTE * pbHash, DWORD dwType, BYTE * pbSig, DWORD cbSig); +BOOL XECRYPTAPI XeCryptBnDwLePkcs1Verify(const BYTE * pbHash, const BYTE * pbSig, DWORD cbSig); + +// --------------------------------------------------------------------------------------- +// XeCryptBnDwLeDhModExp +// +// These functions perform Diffie-Hellman modular exponentiation. +// +// The inputs and outputs are in BnDwLe format for compatibility with legacy applications. +// Note, however, that the XECRYPT_DH structure is always BnQwNe format. +// +// The pDh argument can be NULL in any of these functions, in which case the standard +// 768-bit Oakley Group 1 constants will be used. +// +// The XeCryptBnDwLeDhModExp function performs modular exponentiation. The pdwA argument +// specifies the base to be exponentiated. If it is NULL, then the generator in the +// XECRYPT_DH structure is used as the base. +// +// The pdwB argument specifies the exponent. +// +// The result is stored in the pdwC argument. +// +// aqwC[] = ((pqwA ? pqwA[] : pDh->aqwG[]) ^ aqwB[]) MOD pDh->aqwM[] +// +// The XeCryptBnDwLeDhInvalBase function returns TRUE if the pdwA argument is an invalid +// base for exponentiation. A valid base is 1 < aqwA[] < (aqwM[]-1). +// +// The XeCryptBnDwLeDhEqualBase function returns TRUE if the pdwA argument is equal to +// the pDh->aqwG[]. +// --------------------------------------------------------------------------------------- + +typedef struct { + DWORD cqw; // Number of QWORD digits in modulus + DWORD dwReserved; // Reserved +// QWORD aqwM[cqw]; // [BnQwNe] Modulus +// QWORD aqwG[cqw]; // [BnQwNe] Generator +} XECRYPT_DH; + +typedef struct { + XECRYPT_DH Dh; // Common header + QWORD aqwM[12]; // [BnQwNe] Modulus + QWORD aqwG[12]; // [BnQwNe] Generator +} XECRYPT_DH_768; + +typedef struct { + XECRYPT_DH Dh; // Common header + QWORD aqwM[16]; // [BnQwNe] Modulus + QWORD aqwB[16]; // [BnQwNe] Generator +} XECRYPT_DH_1024; + +BOOL XECRYPTAPI XeCryptBnDwLeDhModExp(const DWORD * pdwA, const DWORD * pdwB, DWORD * pdwC, const XECRYPT_DH * pDh); +BOOL XECRYPTAPI XeCryptBnDwLeDhInvalBase(const DWORD * pdwA, const XECRYPT_DH * pDh); +BOOL XECRYPTAPI XeCryptBnDwLeDhEqualBase(const DWORD * pdwA, const XECRYPT_DH * pDh); + +// --------------------------------------------------------------------------------------- +// XeCryptBnQwNeEcSigVerify +// +// This function uses eliptic curve exponentiation to verify a digital signature. +// +// The pEcPub argument specifies the public key to use when verifying the signature. +// +// The pbMsg argument is the same sequence of bytes that was used when the signature +// was generated. +// +// The cbMsg argument specifies the number of byte in pbMsg. +// +// The pbSig argument is the sequence of bytes that make up the signature. The size of +// this signature is defined by the sum of the cbitR, cbitS, and cbitA fields of the +// public key, rounded up to the next byte. +// +// If the public key fails to verify the supplied signature, FALSE is returned. If the +// public key successfully verifies the signature, then the sequence number that was +// encoded in the signature is returned in the pqwSeq out argument. The number of bits +// in the sequence number is given by the cbitN field of the public key. +// --------------------------------------------------------------------------------------- + +typedef struct { + DWORD cqw; // Number of QWORD digits in modulus + BYTE cbitR; // This many bits of signature form R + BYTE cbitS; // This many bits of signature form S (after R) + BYTE cbitA; // This many bits of signature form A (after S) + BYTE cbitN; // This many bits of sequence number are returned +// QWORD aqwM[cqw]; // [BnQwNe] Modulus +// QWORD aqwC[cqw*2]; // [BnQwNe] Curve +// QWORD aqwG[cqw*2]; // [BnQwNe] Generator +// QWORD aqwGX[cqw*2]; // [BnQwNe] Generator ^ X (private exponent) +} XECRYPT_ECPUB; + +typedef struct { + XECRYPT_ECPUB EcPub; // Common header + QWORD aqwM[8]; // [BnQwNe] Modulus + QWORD aqwC[16]; // [BnQwNe] Curve + QWORD aqwG[16]; // [BnQwNe] Generator + QWORD aqwGP[16]; // [BnQwNe] Generator ^ X (private exponent) +} XECRYPT_ECPUB_512; + +BOOL XECRYPTAPI XeCryptBnQwNeEcSigVerify(const XECRYPT_ECPUB * pEcPub, const BYTE * pbMsg, DWORD cbMsg, const BYTE * pbSig, QWORD * pqwSeq); + +// --------------------------------------------------------------------------------------- +// XeCryptRandom +// +// This function generates a series of cryptographically strong random bits. +// --------------------------------------------------------------------------------------- + +void XECRYPTAPI XeCryptRandom(BYTE * pb, DWORD cb); + +// --------------------------------------------------------------------------------------- +// Parve Cipher +// +// These functions implement symmetric encryption and CBC MAC generation using the Parve +// cipher. There is no support for symmetric decryption. +// +// The Parve block size is 8 bytes and the key size is 8 bytes. +// +// XeCryptParveEcb encrypts a single Parve block with the given key and the given Sbox. +// The pbKey parameter points to an 8 byte key. The pbSbox parameter points to a 256 +// "private key" array. The pbInp parameter points to the 8 bytes to be encrypted. The +// pbOut parameter points to a location to store the encrypted 8 bytes. The pbInp and +// pbOut parameters can point to the same location. +// +// XeCryptParveCbcMac computes an 8 byte MAC from a contiguous series of Parve blocks +// using cipher block chaining. The pbKey parameter specifies the key to use. The +// pbSbox parameter points to a 256 "private key" array. The pbIv argument specifies the +// 8 byte initialization vector to use. The pbOut parameter specifies the location to +// store the 8 byte MAC result. +// --------------------------------------------------------------------------------------- + +#define XECRYPT_PARVE_BLOCK_SIZE (8) +#define XECRYPT_PARVE_KEY_SIZE (8) +#define XECRYPT_PARVE_SBOX_SIZE (256) +#define XECRYPT_PARVE_MAC_SIZE (8) + +void XECRYPTAPI XeCryptParveEcb(const BYTE * pbKey, const BYTE * pbSbox, const BYTE * pbInp, BYTE * pbOut); +void XECRYPTAPI XeCryptParveCbcMac(const BYTE * pbKey, const BYTE * pbSbox, const BYTE * pbIv, const BYTE * pbInp, DWORD cbInp, BYTE * pbOut); + +// --------------------------------------------------------------------------------------- +// XeCryptChainAndSumMac +// +// This function implements the Chain & Sum MAC algorithm. +// +// The pdwCD parameter points to a pair of DWORD values that will be used as the C and D +// constants of the algorithm. +// +// The pdwAB parameter points to a pair of DWORD values that will be used as the A and B +// constants of the algorithm. +// +// The pdwInp parameter points to a series of DWORD values to be consumed as input to +// the algorithm. The cdwInp parameter specifies the number of DWORD values in this +// array. It must be a multiple of two, as the input is consumed in pairs. If it is +// an odd number, it will be truncated. +// +// The pdwOut parameter points to a location in which a pair of DWORD results are stored. +// --------------------------------------------------------------------------------------- + +void XECRYPTAPI XeCryptChainAndSumMac(const DWORD * pdwCD, const DWORD * pdwAB, const DWORD * pdwInp, DWORD cdwInp, DWORD * pdwOut); + +#ifdef __cplusplus +}; +#endif + +#endif diff --git a/xbdm/imp/automation.h b/xbdm/imp/automation.h new file mode 100644 index 0000000..36d4453 --- /dev/null +++ b/xbdm/imp/automation.h @@ -0,0 +1,119 @@ +#pragma once + +/*++ + +Copyright (c) Microsoft Corporation + +Module Name: + + Automation.h + +Abstract: + + This module contains the code to interact with the test automation + framework. This consists of providing the hooks into the system for + recording the interaction between the title and the system for future + playback and the spoofing of function calls for unit testing UI or + to unit test functions by directly altering input parameters. + + The majority of the work is accomplished by coordinating with the + TestXex application for manipulating the message. This coordination + is done synchronously and should not be too expensive. Unfortunately + making it asynchronous (even for async messaging) isn't an option if + we need to spoof the hr or other parameters. +--*/ + +// More useful and descriptive definitions to work with for code readers. +#define AUTO_PROCEED false // Corresponds to a result of S_FALSE +#define AUTO_SKIP true // Corresponds to a result of S_OK + +#define AUTO_PRESEND true +#define AUTO_POSTSEND false + +#if TESTAUTOMATION + +/* There are three states of interest to automation: + 1. I didn't do anything, proceed as normal + 2. I altered the parameters proceed as normal + 3. I altered the results skip the remaining operations + From a behaviour point of view the 1st and 2nd can be rolled into + each other. +*/ + +typedef HRESULT (WINAPI *SetupOverlappedFunction)( + PXOVERLAPPED pOverlapped, + PXASYNCMESSAGE pMsg + ); + +bool +WINAPI +AutomationSetNotification( + DWORD *pdwMessage, + ULONG_PTR *ppParam, + DWORD *pdwUser, + HRESULT *phr + ); + +bool +WINAPI +AutomationSendAsyncMessage( + HXAMAPP hxamapp, + PXASYNCMESSAGE pMsg, + HRESULT *phr + ); + +bool +WINAPI +AutomationSendMessage( + bool fIsPresend, + HXAMAPP hxamapp, + DWORD dwMessage, + UINT_PTR *ppParam1, + UINT_PTR *ppParam2, + HRESULT *phr + ); + +bool +WINAPI +AutomationSendAppLoadMessage( + LPCSTR pszSysApp + ); + +VOID +WINAPI +AutomationInitialize(); + +VOID +WINAPI +AutomationCleanup(); + +VOID +WINAPI +AutomationTitleShutdown(); + +BOOL +WINAPI +AutomationAsyncMessageInProgress( + PXASYNCMESSAGE pMsg + ); + +BOOL +WINAPI +AutomationInputGetState( + IN DWORD dwUserIndex, + IN OUT XINPUT_STATE *pXInputState + ); + +#else // !TESTAUTOMATION +#define g_fAutomation FALSE +#define AutomationInitialize() +#define AutomationCleanup() +#define AutomationTitleShutdown() + +#define AutomationSetNotification(A, B, C, D) AUTO_PROCEED +#define AutomationSendAsyncMessage(A, B, C) FALSE +#define AutomationSendMessage(A, B, C, D, E, F) AUTO_PROCEED +#define AutomationAsyncMessageInProgress(A) FALSE +#define AutomationInputGetState(A, B) FALSE +#define AutomationSendAppLoadMessage(A) AUTO_PROCEED +#endif // TESTAUTOMATION \ No newline at end of file diff --git a/xbdm/imp/cabinet.h b/xbdm/imp/cabinet.h new file mode 100644 index 0000000..53db9c3 --- /dev/null +++ b/xbdm/imp/cabinet.h @@ -0,0 +1,383 @@ +/*** cabinet.h - Definitions for Cabinet File structure + * + * Author: + * Benjamin W. Slivka + * + * History: + * 15-Aug-1993 bens Initial version + * 05-Sep-1993 bens Added Overview section + * 29-Nov-1993 chuckst Added disk names to folder first & next + * Used "CF" consistently + * Eliminated redundant cch fields + * 09-Feb-1994 chuckst merged in some related global constants + * 09-Mar-1994 bens Add RESERVE defintions (for encryption) + * 17-Mar-1994 bens Improve comments about split CFDATA structures + * 25-Mar-1994 bens Add cabinet set ID + * 13-May-1994 bens Define bad value for iCabinet + * + * Overview: + * This file contains definitions for the Diamond Cabinet File format. + * A Cabinet File exists to store one or more files. Usually these + * files have been compressed, but that is not required. It is also + * possible for a cabinet file to contain only a portion of a larger + * file. + * + * In designing this format, the following goals where achieved: + * 1) Minimize overhead in the CF format + * ==> Where ever possible BYTEs or USHORTs were used, rather + * than using LONGs, even though the latter would be easier + * to manipulate on certain RISC platforms. + * 2) Support little-endian and big-endian byte ordering. + * ==> For simplicity on x86 systems, multi-byte numbers are + * stored in a little-endian form, but the code to read and + * write these numbers operates correctly on either type of + * computer. + * + * A cabinet file contains the following structures in the following + * order: + * Name Description + * ----------- ------------------- + * CFHEADER Cabinet description + * [CFRESERVE] Optional RESERVED control information in CFHEADER + * CFFOLDER(s) Folder descriptions + * [reserved] Optional RESERVED data per folder + * CFFILE(s) File descriptions + * CFDATA(s) Data blocks + * [reserved] Optional RESERVED data per data block + * + * Data Integrity Strategy: + * The Cabinet File has built-in data integrity checks, since it is + * possible for customers to have damaged diskettes, or for accidental + * or malicious damage to occur. Rather than doing an individual + * checksum for the entire cabinet file (which would have a dramatic + * impact on the speed of installation from floppy disk, since the + * entire file would need to be read), we have per-component + * checksums, and compute and check them as we read the various + * components of the file. + * + * 1) Checksum CFHEADER + * 2) Store cabinet file length in CFHEADER (to detect file truncation) + * 3) Checksum entire set of CFFOLDER structures + * 4) Checksum entire set of CFFILE structures + * 5) Checksum each (compressed) data block independantly + * + * This approach allows us to avoid reading unnecessary parts of the + * file cabinet (though reading all of CFFOLDER and CFFILE structures + * would otherwise not be required in all cases), while still providing + * adequate integrity checking. + */ + +#ifndef INCLUDED_CABINET +#define INCLUDED_CABINET 1 + +//** Pack structures tightly in cabinet files! +#pragma pack(1) + + +/*** verCF - Cabinet File format version + * + * The low-order byte is interpreted as a decimal number for the minor + * (1/100ths) portion of the version number. + * The high-order byte is interpreted as a decimal number for the major + * portion of the version number. + * + * Examples: + * 0x0000 0.00 + * 0x010A 1.10 + * 0x0410 4.16 + * + * History: + * 1.01 Original + * 1.02 Added flags field, changed signature + * 1.03 Added setId,iCabinet so FDI can ensure correct cabinet + * on continuation. + */ +#define verCF 0x0103 // CF version 1.03 + + +/*** Various cabinet file limits + * + */ +#define cMAX_FOLDERS_PER_CABINET (ifoldMASK-1) +#define cMAX_FILES_PER_CABINET 65535 + + +/*** cbRESERVE_XXX_MAX - Maximum size of RESERVE sections + * + * NOTE: cbRESERVE_HEADER_MAX is a fair bit less than 64K because in + * the 16-bit version of this code, we want to have a USHORT + * variable that holds the size of the CFHEADER structure + + * the size of the CFRESERVE structure + the size of the per-header + * reserved data. + */ +//BUGBUG 16-Mar-1994 bens Define better bound for cbRESERVE_HEADER_MAX +#define cbRESERVE_HEADER_MAX 60000 // Fits in a USHORT +#define cbRESERVE_FOLDER_MAX 255 // Fits in a BYTE +#define cbRESERVE_DATA_MAX 255 // Fits in a BYTE + + +/*** ifoldXXXX - Special values for CFFILE.iFolder + * + */ +#define ifoldMASK 0xFFFC // Low two bits zero +#define ifoldCONTINUED_FROM_PREV 0xFFFD +#define ifoldCONTINUED_TO_NEXT 0xFFFE +#define ifoldCONTINUED_PREV_AND_NEXT 0xFFFF + +#define IS_CONTD_FORWARD(ifold) ((ifold & 0xfffe) == ifoldCONTINUED_TO_NEXT) +#define IS_CONTD_BACK(ifold) ((ifold & 0xfffd) == ifoldCONTINUED_FROM_PREV) + + +#ifndef MAKESIG +/*** MAKESIG - Construct a 4 byte signature + * + * Entry: + * ch1,ch2,ch3,ch4 - four characters + * + * Exit: + * returns unsigned long + */ +#define MAKESIG(ch1,ch2,ch3,ch4) \ + ( ((unsigned long)ch1) + \ + (((unsigned long)ch2)<< 8) + \ + (((unsigned long)ch3)<<16) + \ + (((unsigned long)ch4)<<24) ) +#endif // !MAKESIG + + +#define sigCFHEADER MAKESIG('M','S','C','F') // CFHEADER signature + + +/*** cfhdrXXX - bit flags for cfheader.flags field + * + */ +#define cfhdrPREV_CABINET 0x0001 // Set if previous cab/disk present +#define cfhdrNEXT_CABINET 0x0002 // Set if next cab/disk present +#define cfhdrRESERVE_PRESENT 0x0004 // Set if RESERVE_CONTROL is present + +typedef unsigned long CHECKSUM; /* checksum */ +typedef unsigned long UOFF; /* uoff - uncompressed offset */ +typedef unsigned long COFF; /* coff - cabinet file offset */ + +/*** CFHEADER - Cabinet File Header + * + */ +typedef struct { +//** LONGs are first, to ensure alignment + long sig; // Cabinet File identification string + CHECKSUM csumHeader; // Structure checksum (excluding csumHeader!) + long cbCabinet; // Total length of file (consistency check) + CHECKSUM csumFolders; // Checksum of CFFOLDER list + COFF coffFiles; // Location in cabinet file of CFFILE list + CHECKSUM csumFiles; // Checksum of CFFILE list + +//** SHORTs are next, to ensure alignment + USHORT version; // Cabinet File version (verCF) + USHORT cFolders; // Count of folders (CFIFOLDERs) in cabinet + USHORT cFiles; // Count of files (CFIFILEs) in cabinet + USHORT flags; // Flags to indicate optional data presence + USHORT setID; // Cabinet set ID (identifies set of cabinets) + USHORT iCabinet; // Cabinet number in set (0 based) +#define iCABINET_BAD 0xFFFF // Illegal number for iCabinet + +//** If flags has the cfhdrRESERVE_PRESENT bit set, then a CFRESERVE +// structure appears here, followed possibly by some CFHEADER reserved +// space. The CFRESERVE structure has fields to define how much reserved +// space is present in the CFHEADER, CFFOLDER, and CFDATA structures. +// If CFRESERVE.cbCFHeader is non-zero, then abReserve[] immediately +// follows the CFRESERVE structure. Note that all of these sizes are +// multiples of 4 bytes, to ensure structure alignment! +// +// CFRESERVE cfres; // Reserve information +// BYTE abReserve[]; // Reserved data space +// + +//** The following fields presence depends upon the settings in the flags +// field above. If cfhdrPREV_CABINET is set, then there are two ASCIIZ +// strings to describe the previous disk and cabinet. +// +// NOTE: This "previous" cabinet is not necessarily the immediately +// preceding cabinet! While it usually will be, if a file is +// continued into the current cabinet, then the "previous" +// cabinet identifies the cabinet where the folder that contains +// this file *starts*! For example, if EXCEL.EXE starts in +// cabinet excel.1 and is continued through excel.2 to excel.3, +// then cabinet excel.3 will point back to *cabinet.1*, since +// that is where you have to start in order to extract EXCEL.EXE. +// +// char szCabinetPrev[]; // Prev Cabinet filespec +// char szDiskPrev[]; // Prev descriptive disk name +// +// Similarly, If cfhdrNEXT_CABINET is set, then there are two ASCIIZ +// strings to describe the next disk and cabinet: +// +// char szCabinetNext[]; // Next Cabinet filespec +// char szDiskNext[]; // Next descriptive disk name +// +} CFHEADER; /* cfheader */ + + +/*** CFRESERVE - Cabinet File Reserved data information + * + * This structure is present in the middle of the CFHEADER structure if + * CFHEADER.flags has the cfhdrRESERVE_PRESENT bit set. This structure + * defines the sizes of all the reserved data sections in the CFHEADER, + * CFFOLDER, and CFDATA structures. + * + * These reserved sizes can be zero (although it would be silly to have + * all of them be zero), but otherwise must be a multiple of 4, to ensure + * structure alignment for RISC machines. + */ +typedef struct { + USHORT cbCFHeader; // Size of abReserve in CFHEADER structure + BYTE cbCFFolder; // Size of abReserve in CFFOLDER structure + BYTE cbCFData; // Size of abReserve in CFDATA structure +} CFRESERVE; /* cfreserve */ + +#define cbCF_HEADER_BAD 0xFFFF // Bad value for CFRESERVE.cbCFHeader + + +/*** CFFOLDER - Cabinet Folder + * + * This structure describes a partial or complete "compression unit". + * A folder is by definition a stream of compressed data. To retrieve + * an uncompressed data from a folder, you *must* start decompressing + * the data at the start of the folder, regardless of how far into the + * folder the data you want actually starts. + * + * Folders may start in one cabinet, and continue on to one or more + * succeeding cabinets. In general, if a folder has been continued over + * a cabinet boundary, Diamond/FCI will terminate that folder as soon as + * the current file has been completely compressed. Generally this means + * that a folder would span at most two cabinets, but if the file is really + * large, it could span more than two cabinets. + * + * Note: CFFOLDERs actually refer to folder *fragments*, not necessarily + * complete folders. You know that a CFFOLDER is the beginning of a + * folder (as opposed to a continuation in a subsequent cabinet file) + * if a file starts in it (i.e., the CFFILE.uoffFolderStart field is + * 0). + */ +typedef struct { + COFF coffCabStart; // Offset in cabinet file of first CFDATA + // block for this folder. + + USHORT cCFData; // Count of CFDATAs for this folder that + // are actually in this cabinet. Note that + // a folder can continue into another cabinet + // and have many more CFDATA blocks in that + // cabinet, *and* a folder may have started + // in a previous cabinet. This count is + // only of CFDATAs for this folder that are + // (at least partially) in this cabinet. + + short typeCompress; // Indicates compression type for all CFDATA + // blocks for this folder. The valid values + // are defined in the types.h built into + // fci.h/fdi.h. + +//** If CFHEADER.flags has the cfhdrRESERVE_PRESENT bit set, and +// CFRESERVE.cbCFFolder is non-zero, then abReserve[] appears here. +// +// BYTE abReserve[]; // Reserved data space +// +} CFFOLDER; /* cffolder */ + + + +/*** CFFILE - Cabinet File structure describing a single file in the cabinet + * + * NOTE: iFolder is used to indicatate continuation cases, so we have to + * calculate the real iFolder by examining the cabinet files: + * + * ifoldCONTINUED_FROM_PREV + * This file ends in this cabinet, but is continued from a + * previous cabinet. Therefore, the portion of the file contained + * in *this* cabinet *must* start in the first folder. + * + * NOTE: szCabinetPrev is the name of the cabinet where this file + * *starts*, which is not necessarily the immediately + * preceeding cabinet! Since it only makes sense to + * decompress a file from its start, the starting cabinet + * is what is important! + * + * ifoldCONTINUED_TO_NEXT + * This file starts in this cabinet, but is continued to the next + * cabinet. Therfore, this file must start in the *last* folder + * in this cabinet. + * + * ifoldCONTINUED_PREV_AND_NEXT + * This file is the *middle* portion of a file that started in a + * previous cabinet and is continued in the next cabinet. Since + * this cabinet only contain this piece of a single file, there + * is only a single folder fragment in this cabinet. + */ +typedef struct { + long cbFile; // Uncompressed size of file + + UOFF uoffFolderStart; // Offset in folder IN UNCOMPRESSED BYTES + // of the start of this file + + USHORT iFolder; // Index of folder containing this file; + // 0 is first folder in this cabinet. + // See ifoldCONTINUED_XXXX values above + // for treatment of continuation files. + + USHORT date; // Date stamp in FAT file system format + + USHORT time; // Time stamp in FAT file system format + + USHORT attribs; // Attribute in FAT file system format + +// char szName[]; // File name (may include path characters) +} CFFILE; /* cffile */ + + +/*** CFDATA - Cabinet File structure describing a data block + * + */ +typedef struct { + CHECKSUM csum; // Checksum (excluding this field itself!) + // of this structure and the data that + // follows. If this CFDATA structure is + // continued to the next cabinet, then + // the value of this field is ignored + // (and set to zero). + + USHORT cbData; // Size of ab[] data that resides in the + // current cabinet. A CFDATA may be split + // across a cabinet boundary, so this + // value indicates only the amount of data + // store in this cabinet. + + USHORT cbUncomp; // Uncompressed size of ab[] data; if this + // CFDATA block is continued to the next + // cabinet, then this value is zero! + // If this CFDATA block the remainder of + // of a CFDATA block that started in the + // previous cabinet, then this value is + // the total size of the uncompressed data + // represented by the two CFDATA blocks! + +//** If CFHEADER.flags has the cfhdrRESERVE_PRESENT bit set, and +// CFRESERVE.cbCFData is non-zero, then abReserve[] appears here. +// +// BYTE abReserve[]; // Reserved data space +// + +//** The actual data follows here, cbData bytes in length. +// +// BYTE ab[]; // Data +// +} CFDATA; /* cfdata */ + + + +//** Attribute Bit to use for Run after extract +#define RUNATTRIB 0x40 + + +//** Revert to default structure packing! +#pragma pack() + +#endif // !INCLUDED_CABINET diff --git a/xbdm/imp/consolecert.h b/xbdm/imp/consolecert.h new file mode 100644 index 0000000..ef9c8cf --- /dev/null +++ b/xbdm/imp/consolecert.h @@ -0,0 +1,58 @@ +/************************************************************************ +* * +* consolecert.h -- Xenon Console Certificate Definition * +* * +* Copyright (c) Microsoft Corp. All rights reserved. * +* * +************************************************************************/ + +#ifndef _CONSOLECERT_H_ +#define _CONSOLECERT_H_ + + +#define CONSOLE_PUBLIC_KEY_EXPONENT_SIZE 4 +#define CONSOLE_PUBLIC_KEY_MODULUS_SIZE 128 +#define CONSOLE_ID_SIZE 5 +#define CONSOLE_CERT_PART_NUMBER_SIZE 11 +#define CONSOLE_CERTIFICATE_RESERVED_SIZE 6 +#define CONSOLE_CERTIFICATE_HASH_SIZE 20 +#define CONSOLE_CERTIFICATE_SIGNATURE_SIZE 256 + +#pragma pack(push, 1) + +typedef struct _CONSOLE_PUBLIC_KEY +{ + BYTE PublicExponent[CONSOLE_PUBLIC_KEY_EXPONENT_SIZE]; // In Big endian + BYTE Modulus[CONSOLE_PUBLIC_KEY_MODULUS_SIZE]; // In QWORD Big endian +} CONSOLE_PUBLIC_KEY; + +typedef struct _XE_CONSOLE_CERTIFICATE +{ + USHORT CertSize; // Size of this sturcture (424) + BYTE ConsoleId[CONSOLE_ID_SIZE]; // Uniquely ids console + BYTE ConsolePartNumber[CONSOLE_CERT_PART_NUMBER_SIZE]; // Identifies mfg part number + BYTE Reserved[CONSOLE_CERTIFICATE_RESERVED_SIZE]; // Reserved for future use + ULONG ConsoleType; // States whether console is a retail or dev/test kit + UINT64 ManufacturingDate; // Date of mfg for console + CONSOLE_PUBLIC_KEY ConsolePublicKey; // Console's Public Key + BYTE Signature[CONSOLE_CERTIFICATE_SIGNATURE_SIZE]; // RsaSign(MasterKey.Private, CertSize thru ConsolePublicKey) +} XE_CONSOLE_CERTIFICATE; + +typedef struct _XE_CONSOLE_SIGNATURE +{ + XE_CONSOLE_CERTIFICATE Cert; + BYTE Signature[CONSOLE_PUBLIC_KEY_MODULUS_SIZE]; +} XE_CONSOLE_SIGNATURE; + +#define XE_CONSOLE_TYPE_MASK 0x00FFFFFF + +#define XE_CONSOLE_TYPE_DEVKIT 0x00000001 +#define XE_CONSOLE_TYPE_RETAIL 0x00000002 + +#define XE_CONSOLE_TYPE_TESTKIT 0x40000000 +#define XE_CONSOLE_TYPE_TEMPORARY_KEY 0x80000000 + +#pragma pack(pop) + + +#endif // _CONSOLECERT_H_ diff --git a/xbdm/imp/contentpkg.h b/xbdm/imp/contentpkg.h new file mode 100644 index 0000000..a28f63f --- /dev/null +++ b/xbdm/imp/contentpkg.h @@ -0,0 +1,368 @@ +/************************************************************************ +* * +* contentpkg.h -- Xenon Content Package Definition * +* * +* Copyright (c) Microsoft Corp. All rights reserved. * +* * +************************************************************************/ + +#ifndef _CONTENTPKG_H_ +#define _CONTENTPKG_H_ + +#include "consolecert.h" + +#pragma pack(push, 1) + +// +// Everything in the header is stored in big-endian format. +// + +//------------------------------------------------------------------------------ +typedef enum _XCONTENT_SIGNATURE_TYPE +{ + CONSOLE_SIGNED = 'CON ', + LIVE_SIGNED = 'LIVE', + PIRS_SIGNED = 'PIRS', +} XCONTENT_SIGNATURE_TYPE; + + +//------------------------------------------------------------------------------ +typedef struct _XCONTENT_SIGNATURE { + BYTE Signature[256]; + BYTE Reserved[296]; +} XCONTENT_SIGNATURE, *PXCONTENT_SIGNATURE; + + +C_ASSERT(sizeof(XE_CONSOLE_SIGNATURE) == sizeof(XCONTENT_SIGNATURE)); + + +//------------------------------------------------------------------------------ + +#define XCONTENT_UNRESTRICTED_LICENSEE ((ULONGLONG) 0xFFFFFFFFFFFFFFFF) + +#define XCONTENT_LICENSE_FLAG_REQUIRE_ONLINE 0x00000001 + +typedef struct _XCONTENT_LICENSE { + ULONGLONG LicenseeId; + DWORD LicenseBits; + DWORD LicenseFlags; +} XCONTENT_LICENSE, *PXCONTENT_LICENSE; + + +//------------------------------------------------------------------------------ +typedef struct _XCONTENT_HEADER { + + // + // Indicates how the content was signed. + // + XCONTENT_SIGNATURE_TYPE SignatureType; + + // + // Signature information. The signature covers the remainder of this + // XCONTENT_HEADER structure starting immediately after the signature + // field. + // + union { + XE_CONSOLE_SIGNATURE ConsoleSignature; + XCONTENT_SIGNATURE ContentSignature; + } Signature; + + // + // Licensing information a fixed array of 16 license descriptors. + // + XCONTENT_LICENSE LicenseDescriptors[16]; + + // + // ContentId is the SHA-1 digest of the XCONTENT_METADATA header and all + // subsequent headers. This digests everything up to the start of the + // package file system blob, including the alignment padding, even though + // the padding is not included in SizeOfHeaders below. In other words, + // round the SizeOfHeaders value up to the next alignment boundary, then + // subtract sizeof(XCONTENT_HEADER), and that's how many bytes to hash + // starting after immediately this XCONTENT_HEADER structure. + // + BYTE ContentId[XECRYPT_SHA_DIGEST_SIZE]; + + // + // Specifies the total size of useable header information, including this + // header, but not including any alignment padding (even though the + // padding is included in the ContentId digest). + // + ULONG SizeOfHeaders; +} XCONTENT_HEADER, *PXCONTENT_HEADER; + + +//------------------------------------------------------------------------------ +#define XCONTENT_THUMBNAIL_WIDTH 64 +#define XCONTENT_THUMBNAIL_HEIGHT 64 +#define XCONTENT_THUMBNAIL_BITDEPTH 32 +#define XCONTENT_THUMBNAIL_SIZE (XCONTENT_THUMBNAIL_WIDTH * XCONTENT_THUMBNAIL_HEIGHT * (XCONTENT_THUMBNAIL_BITDEPTH / 8)) + +typedef struct _XCONTENT_METADATA { + + // + // Type of content represented (XCONTENTTYPE_*). + // + DWORD ContentType; + + // + // Reserved value for future extensibility, must be zero. + // + DWORD Reserved1; + + // + // Size of file system blob after headers. Note that some helper routines + // choose to add in the size of the header block as well when passing this + // information around for convenience, but in storage/when hashed this + // should only include the file system blob. + // + LARGE_INTEGER ContentSize; + + // + // Execution ID of the title for which content package was generated. + // + XEX_EXECUTION_ID ExecutionId; + + // + // ID of console on which this content was created, or all zeros if not + // created by a console. + // + BYTE ConsoleId[CONSOLE_ID_SIZE]; + + // + // XUID of user that created this content package, or all zeros if not + // created by a user. + // + ULONGLONG Creator; + + // + // Root digest of files and other information generated by the embedded + // file system. + // + BYTE StfsVolumeDescriptor[36]; + + // + // Reserved bytes for future extensibility, must be zero. + // + BYTE Reserved2[96]; + + // + // ID of device on which content package was created. + // + BYTE DeviceId[20]; + + // + // Display name for content package. + // + WCHAR DisplayName[9][XCONTENT_MAX_DISPLAYNAME_LENGTH]; + + // + // Description of content package. + // + WCHAR Description[9][XCONTENT_MAX_DISPLAYNAME_LENGTH]; + + // + // Name of publisher of content package. + // + WCHAR Publisher[64]; + + // + // Title Name for content package. + // + WCHAR TitleName[64]; + + // + // Package flags. + // + union { + struct { + // + // Bit indicating whether this content package may be transferred + // to another profile. + // + BYTE ProfileTransfer : 1; + + // + // Bit indicating whether this content package may be transferred + // to another device. + // + BYTE DeviceTransfer : 1; + + // + // Reserved bits, must be 0. + // + BYTE Reserved : 6; + } Bits; + BYTE FlagsAsBYTE; + } Flags; + + // + // Embedded content package thumbnail size in bytes. + // + DWORD ThumbnailSize; + + // + // Embedded content package title thumbnail size in bytes. + // + DWORD TitleThumbnailSize; + + // + // Embedded content package thumbnail graphic icon. + // + BYTE Thumbnail[XCONTENT_THUMBNAIL_SIZE]; + + // + // Embedded content package title thumbnail graphic icon. + // + BYTE TitleThumbnail[XCONTENT_THUMBNAIL_SIZE]; + +} XCONTENT_METADATA, *PXCONTENT_METADATA; + + +//------------------------------------------------------------------------------ +typedef struct _XCONTENT_METADATA_TITLE_CONTENT { + + // + // Reserved, must be zero. This is used to make the structure the same + // size as XCONTENT_METADATA_INSTALLER_PROGRESS_CACHE (when part of the + // XCONTENT_METADATA_INSTALLER structure). + // + BYTE Reserved[5620]; +} XCONTENT_METADATA_TITLE_CONTENT; + + +//------------------------------------------------------------------------------ +typedef struct _XCONTENT_METADATA_INSTALLER_SYSTEM_UPDATE { + + // + // Current version for which update applies, or 0 for all derivatives of + // the base version. + // + DWORD CurrentVersion; + + // + // New version to which the update will upgrade. + // + DWORD NewVersion; + + // + // Reserved, must be zero. This is used to make the structure the same + // size as XCONTENT_METADATA_INSTALLER_PROGRESS_CACHE when combined with + // the XCONTENT_METADATA_INSTALLER structure. + // + BYTE Reserved[5608]; +} XCONTENT_METADATA_INSTALLER_SYSTEM_UPDATE; + + +//------------------------------------------------------------------------------ +typedef struct _XCONTENT_METADATA_INSTALLER_TITLE_UPDATE { + + // + // System version to which update is restricted, or 0 for all system + // versions. + // + DWORD SystemVersion; + + // + // New version to which the update will upgrade. + // + DWORD NewVersion; + + // + // Reserved, must be zero. This is used to make the structure the same + // size as XCONTENT_METADATA_INSTALLER_PROGRESS_CACHE when combined with + // the XCONTENT_METADATA_INSTALLER structure. + // + BYTE Reserved[5608]; +} XCONTENT_METADATA_INSTALLER_TITLE_UPDATE; + + +//------------------------------------------------------------------------------ +typedef struct _XCONTENT_METADATA_INSTALLER_PROGRESS_CACHE { + + // + // Download installer progress cache information. + // + XONLINECONTENT_RESUME_HEADER ResumeHeader; + + // + // Extra storage space for CAB resume information. + // + BYTE CabResumeData[XONLINECONTENT_MAX_SINGLE_FILE_RESUME_DATA_SIZE]; +} XCONTENT_METADATA_INSTALLER_PROGRESS_CACHE; + + +//------------------------------------------------------------------------------ +typedef enum _INSTALLER_METADATA_TYPE +{ + INSTALLER_METADATA_TYPE_SYSTEM_UPDATE = 'SUPD', + INSTALLER_METADATA_TYPE_TITLE_UPDATE = 'TUPD', + INSTALLER_METADATA_TYPE_PROGRESS_CACHE_SYSTEM_UPDATE = 'P$SU', + INSTALLER_METADATA_TYPE_PROGRESS_CACHE_TITLE_UPDATE = 'P$TU', + INSTALLER_METADATA_TYPE_PROGRESS_CACHE_TITLE_CONTENT = 'P$TC', +} INSTALLER_METADATA_TYPE; + + +//------------------------------------------------------------------------------ +typedef struct _XCONTENT_METADATA_INSTALLER { + + // + // Type of installer package. + // + INSTALLER_METADATA_TYPE MetaDataType; + + // + // Union of type specific metadata structures. + // + union { + XCONTENT_METADATA_INSTALLER_SYSTEM_UPDATE SystemUpdate; + XCONTENT_METADATA_INSTALLER_TITLE_UPDATE TitleUpdate; + XCONTENT_METADATA_INSTALLER_PROGRESS_CACHE InstallProgressCache; + } MetaData; +} XCONTENT_METADATA_INSTALLER; + +C_ASSERT(sizeof(XCONTENT_METADATA_TITLE_CONTENT) == sizeof(XCONTENT_METADATA_INSTALLER)); + + +//------------------------------------------------------------------------------ + +// +// Headers must be zero padded to meet this alignment requirement for the start +// of the embedded file system volume. +// +#define XCONTENT_FILE_SYSTEM_ALIGNMENT (4 * 1024) +#define XCONTENT_ROUND_UP_TO_ALIGNMENT(size) (((size) + (XCONTENT_FILE_SYSTEM_ALIGNMENT - 1)) & (~(XCONTENT_FILE_SYSTEM_ALIGNMENT - 1))) +#define XCONTENT_ALIGNMENT_PADDING_NEEDED(size) (XCONTENT_ROUND_UP_TO_ALIGNMENT(size) - (size)) + +// +// The file system blob/tools expect to deal with volumes that are marked as +// having sizes that are even multiples of a megabyte. +// +#define XCONTENT_FILE_SYSTEM_VOLUME_SIZE_UNITS (1024 * 1024) +#define XCONTENT_ROUND_UP_TO_VOLUME_SIZE(size) (((size) + (XCONTENT_FILE_SYSTEM_VOLUME_SIZE_UNITS - 1)) & (~(XCONTENT_FILE_SYSTEM_VOLUME_SIZE_UNITS - 1))) + + +// +// Define reasonable maximum values for content package header fields (or +// implied values). The constants are somewhat arbitrary, but chosen to be +// small enough so as to to avoid 32 bit integer overflow issues. This +// simplifies validation for the consumer to just needing to validate the +// individual pieces against their respective values. +// +#define XCONTENT_MIN_HEADERS_SIZE (sizeof(XCONTENT_HEADER) + sizeof(XCONTENT_METADATA)) +#define XCONTENT_MAX_OTHER_METADATA_SIZE 0x01000000 +#define XCONTENT_MAX_HEADERS_SIZE 0x10000000 + +C_ASSERT(((DWORD) XCONTENT_MAX_HEADERS_SIZE + (DWORD) sizeof(XCONTENT_HEADER)) > (DWORD) XCONTENT_MAX_HEADERS_SIZE); +C_ASSERT(((DWORD) XCONTENT_MAX_HEADERS_SIZE + (DWORD) sizeof(XCONTENT_HEADER) + (DWORD) sizeof(XCONTENT_METADATA)) > (DWORD) XCONTENT_MAX_HEADERS_SIZE); +C_ASSERT(((DWORD) XCONTENT_MAX_HEADERS_SIZE + (DWORD) sizeof(XCONTENT_HEADER) + (DWORD) sizeof(XCONTENT_METADATA) + (DWORD) XCONTENT_MAX_OTHER_METADATA_SIZE) > (DWORD) XCONTENT_MAX_HEADERS_SIZE); +C_ASSERT(((DWORD) XCONTENT_MAX_HEADERS_SIZE + (DWORD) sizeof(XCONTENT_HEADER) + (DWORD) sizeof(XCONTENT_METADATA) + (DWORD) XCONTENT_MAX_OTHER_METADATA_SIZE + (DWORD) XCONTENT_FILE_SYSTEM_ALIGNMENT) > (DWORD) XCONTENT_MAX_HEADERS_SIZE); + +#define XCONTENT_MIN_CONTENT_SIZE 256 +#define XCONTENT_MAX_CONTENT_SIZE 0x00000000FFFFFFFF + + +#pragma pack(pop) + + +#endif // _CONTENTPKG_H_ diff --git a/xbdm/imp/kernelp.h b/xbdm/imp/kernelp.h new file mode 100644 index 0000000..096726b --- /dev/null +++ b/xbdm/imp/kernelp.h @@ -0,0 +1,419 @@ +// kernelp.h +// THE ACCURACY OF THIS DATA IS UNDETERMINED!! +#ifndef _KERNELP_DEFINES_H +#define _KERNELP_DEFINES_H + + +// *********** PACKING STARTS HERE **************// +#pragma pack(push, 1) +// *********** PACKING STARTS HERE **************// +typedef struct _OBJECT_HANDLE_TABLE{ + LONG HandleCount; + DWORD FirstFreeTableOffset; + DWORD TableAllocation; + PVOID RootTable; // was VOID *** + PVOID BuiltinRootTable[8];// was VOID ** + DWORD SpinLock; + BYTE PoolType; + BYTE Discriminant; + BYTE Terminating; +} OBJECT_HANDLE_TABLE, *POBJECT_HANDLE_TABLE; + +typedef struct _KAPC{ + short Type; + BYTE ApcMode; + BYTE Inserted; + struct _KTHREAD * Thread; + LIST_ENTRY ApcListEntry; + void * KernelRoutine; // function ptr + void * RundownRoutine; // function ptr + void * NormalRoutine; // function ptr + void * NormalContext; + void * SystemArgument1; + void * SystemArgument2; +} KAPC, *PKAPC; // 40 + +typedef struct _DISPATCHER_HEADER{ + BYTE Type; + BYTE Absolute; + BYTE ProcessType; + BYTE Inserted; + long SignalState; + LIST_ENTRY WaitListHead; +} DISPATCHER_HEADER, *PDISPATCHER_HEADER; // 16 + +typedef struct _KEVENT{ + DISPATCHER_HEADER Header; +} KEVENT, *PKEVENT; // 16 + +typedef struct _KDPC{ + short Type; + BYTE InsertedNumber; + BYTE TargetNumber; + LIST_ENTRY DpcListEntry; + void * DeferredRoutine; // function * + void * DeferredContext; + void * SystemArgument1; + void * SystemArgument2; +} KDPC, *PKDPC; // 28 + +typedef struct _KWAIT_BLOCK{ + LIST_ENTRY WaitListEntry; + struct _KTHREAD* Thread; + void * Object; + struct _KWAIT_BLOCK * NextWaitBlock; + USHORT WaitKey; + USHORT WaitType; +} KWAIT_BLOCK, *PKWAIT_BLOCK; // 24 + +typedef struct _KTIMER{ + DISPATCHER_HEADER Header; + ULARGE_INTEGER DueTime; + LIST_ENTRY TimerListEntry; + PKDPC Dpc; + long Period; +} KTIMER, *PKTIMER; // 40 + +typedef struct _KPROCESS{ + DWORD ThreadListLock; + LIST_ENTRY ThreadListHead; + long ThreadQuantum; + DWORD DirectoryTableBase; + DWORD ThreadCount; + BYTE IdlePriorityClass; + BYTE NormalPriorityClass; + BYTE TimeCriticalPriorityClass; + BYTE DisableQuantum; + DWORD DefaultKernelStackSize; + void * TlsStaticDataImage; + DWORD SizeOfTlsStaticData; + DWORD SizeOfTlsStaticDataImage; + USHORT SizeOfTlsSlots; + BYTE Terminating; + BYTE ProcessType; + DWORD TlsSlotBitmap[8]; + DWORD FileObjectListLock; + LIST_ENTRY FileObjectListHead; + void * Win32DefaultHeapHandle; +} KPROCESS, *PKPROCESS; // 96 + +typedef struct _KSEMAPHORE{ + DISPATCHER_HEADER Header; + INT32 Limit; +} KSEMAPHORE, *PKSEMAPHORE; // 20 + +typedef struct _KQUEUE{ + DISPATCHER_HEADER Header; + LIST_ENTRY EntryListHead; + DWORD CurrentCount; + DWORD MaximumCount; + LIST_ENTRY ThreadListHead; +} KQUEUE, *PKQUEUE; // 40 + +typedef struct _KINTERRUPT{ + void * ServiceRoutine; // function * + void * ServiceContext; + DWORD SpinLock; + DWORD ServiceCount; + BYTE BusIrql; + BYTE Irql; + BYTE Connected : 1; // this bitfield may need swapping + BYTE Mode : 7; + BYTE TargetNumber; +} KINTERRUPT, *PKINTERRUPT; // 20 + +typedef struct _KTRAP_FRAME{ + STACK_FRAME_HEADER Header; + ULONGLONG Gpr0; + ULONGLONG Gpr1; + ULONGLONG Gpr2; + ULONGLONG Gpr3; + ULONGLONG Gpr4; + ULONGLONG Gpr5; + ULONGLONG Gpr6; + ULONGLONG Gpr7; + ULONGLONG Gpr8; + ULONGLONG Gpr9; + ULONGLONG Gpr10; + ULONGLONG Gpr11; + ULONGLONG Gpr12; + ULONGLONG Gpr13; + ULONGLONG Gpr14; + ULONGLONG Gpr15; + ULONGLONG Gpr16; + ULONGLONG Gpr17; + ULONGLONG Gpr18; + ULONGLONG Gpr19; + ULONGLONG Gpr20; + ULONGLONG Gpr21; + ULONGLONG Gpr22; + ULONGLONG Gpr23; + ULONGLONG Gpr24; + ULONGLONG Gpr25; + ULONGLONG Gpr26; + ULONGLONG Gpr27; + ULONGLONG Gpr28; + ULONGLONG Gpr29; + ULONGLONG Gpr30; + ULONGLONG Gpr31; + union{ + struct{ + BYTE OldIrql; + PKINTERRUPT InterruptObject; + BYTE InterruptIrql; + } asIrq; + BYTE ExceptionRecord[80]; + }; + ULONGLONG Ctr; + DWORD Lr; + DWORD Iar; + DWORD Cr; + DWORD Msr; + DWORD Xer; + DWORD UserModeControl; +} KTRAP_FRAME, *PKTRAP_FRAME; // 448 + +typedef struct _KTHREAD{ + DISPATCHER_HEADER Header; + LIST_ENTRY MutantListHead; + KTIMER Timer; + KWAIT_BLOCK TimerWaitBlock; + DWORD KernelTime; + void * StackBase; + void * StackLimit; + void * KernelStack; + void * TlsData; + BYTE State; + BYTE Alerted[2]; + BYTE Alertable; + BYTE Priority; + BYTE FpuExceptionEnable; + BYTE CreateProcessType; + BYTE CurrentProcessType; + LIST_ENTRY ApcListHead[2]; + PKPROCESS Process; + BYTE KernelApcInProgress; + BYTE KernelApcPending; + BYTE UserApcPending; + BYTE ApcQueueable; + DWORD ApcQueueLock; + DWORD ContextSwitches; + LIST_ENTRY ReadyListEntry; + union{ + struct{ + USHORT MsrEnableMaskHigh; + USHORT MsrEnableMaskLow; + }; + DWORD MsrEnableMask; + }; + long WaitStatus; + BYTE WaitIrql; + BYTE WaitMode; + BYTE WaitNext; + BYTE WaitReason; + PKWAIT_BLOCK WaitBlockList; + DWORD Padding1; + DWORD KernelApcDisable; + long Quantum; + char Saturation; + BYTE BasePriority; + BYTE PriorityDecrement; + BYTE DisableBoost; + char SuspendCount; + BYTE Preempted; + BYTE HasTerminated; + BYTE CurrentProcessor; + struct _KPRCB* CurrentPrcb; + struct _KPRCB* AffinityPrcb; + BYTE IdlePriorityClass; + BYTE NormalPriorityClass; + BYTE TimeCriticalPriorityClass; + BYTE HasAsyncTerminated; + DWORD ActiveTimerListLock; + void * StackAllocatedBase; + KAPC SuspendApc; + KSEMAPHORE SuspendSemaphore; + LIST_ENTRY ThreadListEntry; + DWORD Padding2; + PKQUEUE Queue; + LIST_ENTRY QueueListEntry; + void * UserModeDispatcher; // function * + PKTRAP_FRAME UserModeTrapFrame; + LARGE_INTEGER CreateTime; + LARGE_INTEGER ExitTime; + long ExitStatus; + LIST_ENTRY ActiveTimerListHead; + void * ThreadId; + void * StartAddress; // function * + LIST_ENTRY IrpList; + void * DebugMonitorData; + DWORD LastWin32ErrorCode; + void * Win32CurrentFiber; + DWORD Padding3; + DWORD CreateOptions; + float Vscr[4]; + float Vr[4][128]; + double Fpscr; + double Fpr[32]; + KAPC TerminateApc; +} KTHREAD, *PKTHREAD; // 2736 + +// *********** PACKING ENDS HERE **************// +#pragma pack(pop) +// *********** PACKING ENDS HERE **************// + +typedef struct _KPRCB{ + PKTHREAD CurrentThread; + PKTHREAD NextThread; + PKTHREAD IdleThread; + BYTE Number; + DWORD SetMember; + DWORD DpcTime; + DWORD InterruptTime; + DWORD InterruptCount; + volatile DWORD IpiFrozen; + volatile void * CurrentPacket[3]; + volatile DWORD TargetSet; + volatile void * WorkerRoutine; // function * + struct _KPRCB * SignalDone; + volatile DWORD RequestSummary; + DWORD DpcInterruptRequested; + DWORD DpcLock; + LIST_ENTRY DpcListHead; + DWORD DpcRoutineActive; + DWORD ReadyListLock; + DWORD IdleThreadActive; + SINGLE_LIST_ENTRY DeferredReadyListHead; + DWORD ReadySummary; + DWORD ReadySummaryMask; + LIST_ENTRY DispatcherReadyListHead[32]; + KDPC ThreadReaperDpc; + LIST_ENTRY ThreadReaperListHead; + KDPC SwitchProcessorThreadDpc; +} KPRCB, *PKPRCB; // 424 + + + +// *********** PACKING STARTS AGAIN HERE **************// +#pragma pack(push, 1) +// *********** PACKING STARTS AGAIN HERE **************// + + + +typedef struct _KPCR{ + PVOID TlsData; + union{ + struct{ + USHORT MsrEnableMaskHigh; + USHORT MsrEnableMaskLow; + }; + DWORD MsrEnableMask; + }; + union{ + struct{ + BYTE DispatchInterrupt; + BYTE ApcInterrupt; + } SIAsBytes; + USHORT SoftwareInterrupt; + }; + union{ + struct{ + BYTE DpcFpuStateSaved; + BYTE DpcVpuStateSaved; + } DpcAsBytes; + USHORT DpcFpuVpuStateSaved; + }; + BYTE DpcCurrentProcessType; + BYTE QuantumEnd; + BYTE TimerRequest; + BYTE HvCr0Save; + PKTHREAD FpuOwnerThread; + PKTHREAD VpuOwnerThread; + BYTE CurrentIrql; + BYTE BackgroundSchedulingActive; + union{ + struct{ + BYTE StartBackgroundScheduling; + BYTE StopBackgroundScheduling; + } StartStopAsBytes; + USHORT StartStopBackgroundScheduling; + }; + DWORD TimerHand; + union{ + struct{ + ULONGLONG LrIarSave; + ULONGLONG CrMsrSave; + ULONGLONG Gpr13Save; + } gpSave; + struct{ + DWORD Gpr1Restore; + DWORD IarRestore; + DWORD CrRestore; + DWORD MsrRestore; + } gpRest; + }; + ULONGLONG HvGpr1Save; + ULONGLONG HvGpr3Save; + ULONGLONG HvGpr4Save; + ULONGLONG HvGpr5Save; + DWORD UserModeControl; + void * PanicStack; + DWORD DarSave; + DWORD DsisrSave; + void * DbgLastDpcRoutine; + DWORD OnInterruptStack; + void * StackBase; + void * StackLimit; + void * InterruptStackBase; + void * InterruptStackLimit; + void * InterruptRoutine[32]; + KPRCB PrcbData; + PKPRCB Prcb; + DWORD Unused; + DWORD * PixCurrent; + DWORD * PixLimit; + DWORD * ProfilerCurrent; + DWORD * ProfilerLimit; + DWORD ProfilerFlags; + ULONGLONG Contention; + DWORD * MonitorProfileData; +}KPCR, *PKPCR; // 728? adds up to 724 + +typedef struct _KPCR_PAGE{ + union{ + struct{ + KPCR Pcr; + DWORD IdleThreadData[ANYSIZE_ARRAY]; // 4096 - 728 ? + } AsSeparate; + BYTE PcrAsUCHARs[4096]; + }; +} KPCR_PAGE, *PKPCR_PAGE; // 4096 + + +// *********** PACKING ENDS AGAIN HERE **************// +#pragma pack(pop) +// *********** PACKING ENDS AGAIN HERE **************// + + + +//C_ASSERT(sizeof(KPCR_PAGE) == 4096); +//C_ASSERT(sizeof(KSEMAPHORE) == 20); +//C_ASSERT(sizeof(KTIMER) == 40); +//C_ASSERT(sizeof(DISPATCHER_HEADER) == 16); +//C_ASSERT(sizeof(STACK_FRAME_HEADER) == 80); +//C_ASSERT(sizeof(KDPC) == 28); +//C_ASSERT(sizeof(KWAIT_BLOCK) == 24); +//C_ASSERT(sizeof(KPROCESS) == 96); +//C_ASSERT(sizeof(KQUEUE) == 40); +//C_ASSERT(sizeof(KPCR) == 724); // was 728??? +//C_ASSERT(sizeof(KPRCB) == 424); +//C_ASSERT(sizeof(KTRAP_FRAME) == 448); +//C_ASSERT(sizeof(KTHREAD) == 2736); +//C_ASSERT(sizeof(KINTERRUPT) == 20); +//C_ASSERT(sizeof(KEVENT) == 16); +//C_ASSERT(sizeof(DISPATCHER_HEADER) == 16); +//C_ASSERT(sizeof(KAPC) == 40); + + + +#endif //_KERNELP_DEFINES_H diff --git a/xbdm/imp/xamcache.h b/xbdm/imp/xamcache.h new file mode 100644 index 0000000..3cb1789 --- /dev/null +++ b/xbdm/imp/xamcache.h @@ -0,0 +1,169 @@ +/************************************************************************ +* * +* xamcache.h -- This module defines the XAM cache API * +* * +* Copyright (c) Microsoft Corp. All rights reserved. * +* * +************************************************************************/ + +#ifndef __XAMCACHE_H__ +#define __XAMCACHE_H__ + + +#ifdef __cplusplus +extern "C" { +#endif + + +typedef enum _XAM_CACHE_FILE_TYPE +{ + XAM_CACHE_ALL, // special invalid cache type used to signify all cache types + XAM_CACHE_GAME_TILE, // Single tile, dwIdentifier = dwTitleId, qwIdentifier = qwImageId + XAM_CACHE_ACHIEVEMENT_TILE, // Single tile, dwIdentifier = dwTitleId, qwIdentifier = qwImageId + XAM_CACHE_GAMER_TILE, // Single tile, dwIdentifier = dwTitleId, qwIdentifier = qwImageId + XAM_CACHE_GAMER_TILE_SMALL, // Single tile, dwIdentifier = dwTitleId, qwIdentifier = qwImageId + XAM_CACHE_CUSTOM_GAMER_TILE, // dwIdentifier = , qwIdentifier = qwUserId that owns tile + XAM_CACHE_CUSTOM_GAMER_TILE_SMALL, // dwIdentifier = , qwIdentifier = qwUserId that owns tile + XAM_CACHE_FRIEND_MUTE_LIST, // dwIdentifier = , qwIdentifier = qwUserId that owns list + XAM_CACHE_TICKETS, // dwIdentifier = , qwIdentifier = qwUserId that owns tickets + XAM_CACHE_TITLE_NAMES, // dwIdentifier = , qwIdentifier = + XAM_CACHE_RECENT_PLAYERS, // dwIdentifier = , qwIdentifier = qwUserId that owns list + XAM_CACHE_TITLE_UPDATE, // dwIdentifier = dwTitleId, qwIdentifier = dwTitleBaseVersion << 32 | dwCurrentSystemVersion + XAM_CACHE_SYSTEM_UPDATE, // dwIdentifier = dwTitleId, qwIdentifier = dwBaseVersion << 32 | dwCurrentSystemVersion + XAM_CACHE_DASHBOARD_APP, // dwIdentifier = dwTitleId of App + XAM_CACHE_SPA_FILE, // dwIdentifier = dwTitleId,qwIdentifier = edition + XAM_CACHE_GAME_INVITE, // dwIdentifier = , qwIdentifier = + XAM_CACHE_GAMER_TAG // dwIdentifier = , qwIdentifier = +} XAM_CACHE_FILE_TYPE; + +// XamCacheStoreFile and XamCacheFetchFile are APIs for +// simple synchronous access. + +XBOXAPI +DWORD +WINAPI +XamCacheStoreFile( + IN XAM_CACHE_FILE_TYPE FileType, + IN DWORD dwIdentifier, + IN ULONGLONG qwIdentifier, + IN ULONGLONG qwVersion, + IN PVOID pvBuffer, + IN DWORD cbBuffer + ); + +XBOXAPI +DWORD +WINAPI +XamCacheFetchFile( + IN XAM_CACHE_FILE_TYPE FileType, + IN DWORD dwIdentifier, + IN ULONGLONG qwIdentifier, + OUT ULONGLONG* pqwVersion, + OUT PVOID pvBuffer, + IN OUT PDWORD pcbBuffer + ); + +XBOXAPI +DWORD +WINAPI +XamCacheDeleteFile( + IN XAM_CACHE_FILE_TYPE FileType, + IN DWORD dwIdentifier, + IN ULONGLONG qwIdentifier + ); + + +#define XAM_COF_FETCH 0x0000 +#define XAM_COF_STORE 0x0001 +#define XAM_COF_STORE_RESUME 0x0003 // XAM_COF_STORE + supports resume +#define XAM_COF_GET_PATH_ONLY 0x1000 // XamCacheOpenFile does not open file - provides path +#define XAM_COF_NO_LOCK 0x2000 // valid only with XAM_COF_FETCH and XAM_COF_GET_PATH_ONLY + // does not lock file in cache + + +typedef struct _XAM_CACHE_OPEN_FILE *PXAM_CACHE_OPEN_FILE; + +typedef void (*PFNONCACHEDEVICEREMOVED)(PXAM_CACHE_OPEN_FILE CacheFile); + +typedef struct _XAM_CACHE_OPEN_FILE +{ + // + // Caller must fill out before calling XamCacheOpenFile + // + + DWORD Flags; + XAM_CACHE_FILE_TYPE FileType; + DWORD dwIdentifier; + ULONGLONG qwIdentifier; + + // + // XAM_COF_FETCH - caller must fill out before calling XamCacheOpenFile + // XAM_COF_STORE - filled out by XamCacheOpenFile + // + + ULONGLONG qwVersion; + DWORD cbSize; + + // + // Filled out by XamCacheOpenFile + // + + HANDLE hFile; + char FilePath[MAX_PATH]; + + // + // Notification + // + + PFNONCACHEDEVICEREMOVED OnCacheDeviceRemoved OPTIONAL; + ULONG_PTR Context; + + // + // Internal use only + // + + ULONG_PTR Reserved[2]; + PVOID pvMountedPackage; + CHAR PackageFilePath[MAX_PATH]; +} XAM_CACHE_OPEN_FILE; + +XBOXAPI +DWORD +WINAPI +XamCacheOpenFile( + IN OUT PXAM_CACHE_OPEN_FILE pCacheOpenFile + ); + +XBOXAPI +DWORD +WINAPI +XamCacheRenameFile( + IN PXAM_CACHE_OPEN_FILE pCacheOpenFile, + IN DWORD dwIdentifier, + IN ULONGLONG qwIdentifier, + IN ULONGLONG qwVersion + ); + +XBOXAPI +VOID +WINAPI +XamCacheCloseFile( + IN PXAM_CACHE_OPEN_FILE pCacheOpenFile, + IN BOOL fDelete + ); + +XBOXAPI +BOOL +WINAPI +XamCacheReset( + IN XAM_CACHE_FILE_TYPE FileType + ); + + +#ifdef __cplusplus +} +#endif + + +#endif // __XAMCACHE_H__ + diff --git a/xbdm/imp/xamdbg.h b/xbdm/imp/xamdbg.h new file mode 100644 index 0000000..e64044b --- /dev/null +++ b/xbdm/imp/xamdbg.h @@ -0,0 +1,240 @@ +/*++ + +Copyright (c) Microsoft Corporation + +Module Name: + + xamdbg.h + +Abstract: + + This module defines the debug and logging APIs used by XAM applications + +--*/ + +#include +#include + +#ifndef __XAMDBG_H__ +#define __XAMDBG_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#if DBG +#define XAM_FEATURE_ASSERT 1 +#define XAM_FEATURE_TRACE 1 +#else // DBG +#define XAM_FEATURE_ASSERT 0 +#define XAM_FEATURE_TRACE 0 +#endif // !DBG + +// +// XAM debug flags enable granular control over the debug output made by +// applications +// + +#define XAMDBG_PRINT_LEVEL_MASK 0x0000000F +#define XAMDBG_BREAK_LEVEL_MASK 0x000000F0 +#define XAMDBG_FLAG_ENABLED 0x00000100 + +#define XAMDBG_PRINT_LEVEL_SHIFT 0 +#define XAMDBG_BREAK_LEVEL_SHIFT 4 + +#define XAMDBG_LEVEL_TRACE XDBG_TRACE +#define XAMDBG_LEVEL_WARNING XDBG_WARNING +#define XAMDBG_LEVEL_ERROR XDBG_ERROR + +#define XAMDBG_TAG(P, B, F) ((P << XAMDBG_PRINT_LEVEL_SHIFT) | (B << XAMDBG_BREAK_LEVEL_SHIFT) | F) +#define XAMDBG_TAG_PRINT_LEVEL(X) ((X & XAMDBG_PRINT_LEVEL_MASK) >> XAMDBG_PRINT_LEVEL_SHIFT) +#define XAMDBG_TAG_BREAK_LEVEL(X) ((X & XAMDBG_BREAK_LEVEL_MASK) >> XAMDBG_BREAK_LEVEL_SHIFT) + +// +// Inline breakpoint +// + +#ifndef DbgBreak +#ifdef XAM_FEATURE_ASSERT +#define XamDbgBreak() __debugbreak() +#else +#define XamDbgBreak() +#endif +#endif + +// +// The print macro is used by other macros to wrap XamDbgPrint +// + +#if !defined(_PREFAST_) + +#if XAM_FEATURE_TRACE +#define XAMPRINT(b, lvl, sz, ...) do { BOOL f = XamDbgPrint(lvl, sz, ##__VA_ARGS__); if(f && b) { XamDbgBreak(); } } while (0); +#else // XAM_FEATURE_TRACE +#define XAMPRINT(b, lvl, sz, ...) +#endif // !XAM_FEATURE_TRACE + +#else // _PREFAST_ + +#define XAMPRINT(b, lvl, sz) +#define XAMPRINT(b, lvl, sz, a1) +#define XAMPRINT(b, lvl, sz, a1, a2) +#define XAMPRINT(b, lvl, sz, a1, a2, a3) +#define XAMPRINT(b, lvl, sz, a1, a2, a3, a4) +#define XAMPRINT(b, lvl, sz, a1, a2, a3, a4, a5) +#define XAMPRINT(b, lvl, sz, a1, a2, a3, a4, a5, a6) +#define XAMPRINT(b, lvl, sz, a1, a2, a3, a4, a5, a6, a7) +#define XAMPRINT(b, lvl, sz, a1, a2, a3, a4, a5, a6, a7, a8) +#define XAMPRINT(b, lvl, sz, a1, a2, a3, a4, a5, a6, a7, a8, a9) +#define XAMPRINT(b, lvl, sz, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) + +#endif // _PREFAST_ + +// +// Trace macros print out a debug message if the system app's debug level is +// sufficiently low +// + +#if !defined(_PREFAST_) + +#if XAM_FEATURE_TRACE +#define XAMTRCLINE() do { XAMPRINT(TRUE, XDBG_TRACE, __FILE__ " @ " __LINE__ "\n"); } while(0) +#define XAMTRC(tag, sz, ...) do { XAMPRINT(TRUE, XDBG_TRACE, sz, ##__VA_ARGS__); } while(0); +#define XAMWRN(tag, sz, ...) do { XAMPRINT(TRUE, XDBG_WARNING, sz, ##__VA_ARGS__); } while(0); +#define XAMERR(tag, sz, ...) do { XAMPRINT(TRUE, XDBG_ERROR, sz, ##__VA_ARGS__); } while(0); +#else // XAM_FEATURE_TRACE +#define XAMTRCLINE() +#define XAMTRC(tag, sz, ...) +#define XAMWRN(tag, sz, ...) +#define XAMERR(tag, sz, ...) +#endif // !XAM_FEATURE_TRACE + +#else // _PREFAST_ + +#define XAMTRC(tag, sz) +#define XAMTRC(tag, sz, a1) +#define XAMTRC(tag, sz, a1, a2) +#define XAMTRC(tag, sz, a1, a2, a3) +#define XAMTRC(tag, sz, a1, a2, a3, a4) +#define XAMTRC(tag, sz, a1, a2, a3, a4, a5) +#define XAMTRC(tag, sz, a1, a2, a3, a4, a5, a6) +#define XAMTRC(tag, sz, a1, a2, a3, a4, a5, a6, a7) +#define XAMTRC(tag, sz, a1, a2, a3, a4, a5, a6, a7, a8) +#define XAMTRC(tag, sz, a1, a2, a3, a4, a5, a6, a7, a8, a9) +#define XAMTRC(tag, sz, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) + +#define XAMWRN(tag, sz) +#define XAMWRN(tag, sz, a1) +#define XAMWRN(tag, sz, a1, a2) +#define XAMWRN(tag, sz, a1, a2, a3) +#define XAMWRN(tag, sz, a1, a2, a3, a4) +#define XAMWRN(tag, sz, a1, a2, a3, a4, a5) +#define XAMWRN(tag, sz, a1, a2, a3, a4, a5, a6) +#define XAMWRN(tag, sz, a1, a2, a3, a4, a5, a6, a7) +#define XAMWRN(tag, sz, a1, a2, a3, a4, a5, a6, a7, a8) +#define XAMWRN(tag, sz, a1, a2, a3, a4, a5, a6, a7, a8, a9) +#define XAMWRN(tag, sz, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) + +#define XAMERR(tag, sz) +#define XAMERR(tag, sz, a1) +#define XAMERR(tag, sz, a1, a2) +#define XAMERR(tag, sz, a1, a2, a3) +#define XAMERR(tag, sz, a1, a2, a3, a4) +#define XAMERR(tag, sz, a1, a2, a3, a4, a5) +#define XAMERR(tag, sz, a1, a2, a3, a4, a5, a6) +#define XAMERR(tag, sz, a1, a2, a3, a4, a5, a6, a7) +#define XAMERR(tag, sz, a1, a2, a3, a4, a5, a6, a7, a8) +#define XAMERR(tag, sz, a1, a2, a3, a4, a5, a6, a7, a8, a9) +#define XAMERR(tag, sz, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) + +#endif // _PREFAST_ + +// +// Traps causes a debugger to be broken into +// + +#if !defined(_PREFAST_) + +#if XAM_FEATURE_ASSERT +#define XAMTRAPLINE() do { XAMPRINT(FALSE, XDBG_TRACE, __FILE__ " @ " __LINE__ "\n"); DbgBreak(); } while(0); +#define XAMTRAP(sz, ...) do { XAMPRINT(FALSE, XDBG_TRACE, sz, ##__VA_ARGS__); } while(0); +#else // XAM_FEATURE_ASSERT +#define XAMTRAPLINE() +#define XAMTRAP(sz, ...) +#endif // !XAM_FEATURE_ASSERT + +#else // _PREFAST_ + +#define XAMTRAP(sz) +#define XAMTRAP(sz, a1) +#define XAMTRAP(sz, a1, a2) +#define XAMTRAP(sz, a1, a2, a3) +#define XAMTRAP(sz, a1, a2, a3, a4) +#define XAMTRAP(sz, a1, a2, a3, a4, a5) +#define XAMTRAP(sz, a1, a2, a3, a4, a5, a6) +#define XAMTRAP(sz, a1, a2, a3, a4, a5, a6, a7) +#define XAMTRAP(sz, a1, a2, a3, a4, a5, a6, a7, a8) +#define XAMTRAP(sz, a1, a2, a3, a4, a5, a6, a7, a8, a9) +#define XAMTRAP(sz, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) + +#endif // _PREFAST_ + +// +// Compatibility with prior XAM debug instrumentation +// + +#define TraceSz0 XAMTRC +#define TraceSz1 XAMTRC +#define TraceSz2 XAMTRC +#define TraceSz3 XAMTRC +#define TraceSz4 XAMTRC +#define TraceSz5 XAMTRC +#define TraceSz6 XAMTRC +#define TraceSz7 XAMTRC +#define TraceSz8 XAMTRC +#define TraceSz9 XAMTRC +#define TraceSz10 XAMTRC + +#define WarnSz0 XAMWRN +#define WarnSz1 XAMWRN +#define WarnSz2 XAMWRN +#define WarnSz3 XAMWRN +#define WarnSz4 XAMWRN +#define WarnSz5 XAMWRN +#define WarnSz6 XAMWRN +#define WarnSz7 XAMWRN +#define WarnSz8 XAMWRN +#define WarnSz9 XAMWRN +#define WarnSz10 XAMWRN + +#define ErrorSz0 XAMERR +#define ErrorSz1 XAMERR +#define ErrorSz2 XAMERR +#define ErrorSz3 XAMERR +#define ErrorSz4 XAMERR +#define ErrorSz5 XAMERR +#define ErrorSz6 XAMERR +#define ErrorSz7 XAMERR +#define ErrorSz8 XAMERR +#define ErrorSz9 XAMERR +#define ErrorSz10 XAMERR + +#define TrapSz0 XAMTRAP +#define TrapSz1 XAMTRAP +#define TrapSz2 XAMTRAP +#define TrapSz3 XAMTRAP +#define TrapSz4 XAMTRAP +#define TrapSz5 XAMTRAP +#define TrapSz6 XAMTRAP +#define TrapSz7 XAMTRAP +#define TrapSz8 XAMTRAP +#define TrapSz9 XAMTRAP +#define TrapSz10 XAMTRAP + +#define Assert NT_ASSERT + +#ifdef __cplusplus +}; +#endif + +#endif // __XAMDBG_H__ diff --git a/xbdm/imp/xamp.h b/xbdm/imp/xamp.h new file mode 100644 index 0000000..63e2110 --- /dev/null +++ b/xbdm/imp/xamp.h @@ -0,0 +1,3622 @@ + + +#ifndef __XAMP_H__ +#define __XAMP_H__ + +typedef ULONG XMSG_HANDLE; + +#include +#include +#include +#include +#include "xboxp.h" +#include "xdbg.h" +#include "xamdbg.h" + +#include "winsockx.h" +#include "xonlinep.h" +#include "xex.h" +#include "xecrypt.h" +#include "xcabinet.h" +#include "contentpkg.h" +#include "xamcache.h" + +// +// Define NTSTATUS if it's not already defined +// + +#if !defined(_NTDEF_) +typedef LONG NTSTATUS; +#endif + +// +// Force a reference to the kernel build number +// + +#pragma comment(linker, "/include:XboxKrnlBuildNumber") + +#pragma warning(push) +#pragma warning(disable: 4201) // unnamed struct/union + + +#ifdef __cplusplus +extern "C" { +#endif + +#define APPSZ_TESTXEX ("testxex.xex") +#define APPSZ_CERT ("cert.xex") +#define APPSZ_HUDUI ("hud.xex") + +// App IDs +// Apps that load UI resource should have a unique id +// that helps XUI cache resources across dll loads +#define XAM_APP_ID_NONE (~0u) +#define XAM_APP_ID_HUD 0 +#define XAM_APP_ID_FRIENDS 1 +#define XAM_APP_ID_DEVICESELECTOR 2 +#define XAM_APP_ID_SIGNIN 3 +#define XAM_APP_ID_TEMPAPP 4 +#define XAM_APP_ID_TESTXEX 5 +#define XAM_APP_ID_FEEDBACK 6 +#define XAM_APP_ID_MARKETPLACE 7 +#define XAM_APP_ID_MUSICPLAYER 8 +#define XAM_APP_ID_VOICEMAIL 9 +#define XAM_APP_ID_QUICKCHAT 10 +#define XAM_APP_ID_VK 11 +#define XAM_APP_ID_UPDATER 12 +#define XAM_APP_ID_GAMEPROFILE 13 +#define XAM_APP_ID_CREATEPROFILE 14 +#define XAM_APP_ID_MINIMUSICPLAYER 15 +#define XAM_APP_ID_CERT 16 +#define HXAMAPP_TESTXEX ((HXAMAPP)0x000000F9) +#define HXAMAPP_CERT ((HXAMAPP)0x000000F8) + +// Returns true if the xam app's xex image doesn't always have to be +// loaded in the xam. +#define XAMAPP_OPTIONAL(h) ( ((h) == HXAMAPP_TESTXEX) || ((h) == HXAMAPP_CERT) ) + +#define MSGAREA_TESTXEX (0x0006) +#define XM_SYS_STORAGEDEVICECHANGE MSGID(MSGAREA_SYSTEM, 0x000F) +#define IsLiveBaseCustomProcessingMsg(msg) (MSG_NUMBER(msg) & 0x8000) + +// +// NOTE: these are duplicated in \private\inc\xonp.h for codegen +// + +#define XM_LIVEBASE_LOGONCONNECT MSGID(MSGAREA_XLIVEBASE, 0x8001) +#define XM_LIVEBASE_LOGONGETSERVICEINFO MSGID(MSGAREA_XLIVEBASE, 0x8007) +#define XM_LIVEBASE_PRESENCEGETSEQNUM MSGID(MSGAREA_XLIVEBASE, 0x8017) +#define XM_LIVEBASE_PRESENCESET MSGID(MSGAREA_XLIVEBASE, 0x8018) +#define XM_LIVEBASE_PRESENCEENUMCREATE MSGID(MSGAREA_XLIVEBASE, 0x8019) +#define XM_LIVEBASE_PRESENCEENUM MSGID(MSGAREA_XLIVEBASE, 0x801A) +#define XM_LIVEBASE_PRESENCEENUMCLOSE MSGID(MSGAREA_XLIVEBASE, 0x801B) +#define XM_LIVEBASE_PRESENCEGETSTATE MSGID(MSGAREA_XLIVEBASE, 0x801C) +#define XM_LIVEBASE_PRESENCESETSTATE MSGID(MSGAREA_XLIVEBASE, 0x801D) +#define XM_LIVEBASE_PRESENCESUBSCRIBE MSGID(MSGAREA_XLIVEBASE, 0x801E) +#define XM_LIVEBASE_PRESENCEUNSUBSCRIBE MSGID(MSGAREA_XLIVEBASE, 0x801F) +#define XM_LIVEBASE_FRIENDSENUMCREATE MSGID(MSGAREA_XLIVEBASE, 0x8020) +#define XM_LIVEBASE_FRIENDSENUM MSGID(MSGAREA_XLIVEBASE, 0x8021) +#define XM_LIVEBASE_FRIENDSENUMCLOSE MSGID(MSGAREA_XLIVEBASE, 0x8022) +#define XM_LIVEBASE_INVITEGETINFO MSGID(MSGAREA_XLIVEBASE, 0x8023) +#define XM_LIVEBASE_MSGENUMERATE MSGID(MSGAREA_XLIVEBASE, 0x8024) +#define XM_LIVEBASE_MSGGETSUMMARY MSGID(MSGAREA_XLIVEBASE, 0x8025) +#define XM_LIVEBASE_MSGCREATE MSGID(MSGAREA_XLIVEBASE, 0x8026) +#define XM_LIVEBASE_MSGDESTROY MSGID(MSGAREA_XLIVEBASE, 0x8027) +#define XM_LIVEBASE_MSGSETPROP MSGID(MSGAREA_XLIVEBASE, 0x8028) +#define XM_LIVEBASE_MSGGETPROP MSGID(MSGAREA_XLIVEBASE, 0x8029) +#define XM_LIVEBASE_MSGGETDETAILS MSGID(MSGAREA_XLIVEBASE, 0x802A) +#define XM_LIVEBASE_MSGGETDETAILSSUMMARY MSGID(MSGAREA_XLIVEBASE, 0x802B) +#define XM_LIVEBASE_MSGGETDETAILSPROPERTY MSGID(MSGAREA_XLIVEBASE, 0x802C) +#define XM_LIVEBASE_MSGSETFLAGS MSGID(MSGAREA_XLIVEBASE, 0x802D) +#define XM_LIVEBASE_MSGDELETE MSGID(MSGAREA_XLIVEBASE, 0x802E) +#define XM_LIVEBASE_MSGINVITESEND MSGID(MSGAREA_XLIVEBASE, 0x802F) +#define XM_LIVEBASE_MSGINVITEANSWER MSGID(MSGAREA_XLIVEBASE, 0x8030) +#define XM_LIVEBASE_MSGINVITEREVOKE MSGID(MSGAREA_XLIVEBASE, 0x8031) +#define XM_LIVEBASE_GETTASKPROGRESS MSGID(MSGAREA_XLIVEBASE, 0x8032) +#define XM_LIVEBASE_GETREQUESTTHROTTLE MSGID(MSGAREA_XLIVEBASE, 0x8033) +#define XM_LIVEBASE_SETREQUESTTHROTTLE MSGID(MSGAREA_XLIVEBASE, 0x8034) +#define XM_LIVEBASE_STORAGEBUILDSERVERPATH MSGID(MSGAREA_XLIVEBASE, 0x8035) +#define XM_LIVEBASE_EXPIREMARKETPLACECOUNTSCACHE MSGID(MSGAREA_XLIVEBASE, 0x8036) +#define XM_LIVEBASE_PRESENCEINITIALIZE MSGID(MSGAREA_XLIVEBASE, 0x8037) +#define XM_LIVEBASE_CONTENTGETINPROGRESSMETADATA MSGID(MSGAREA_XLIVEBASE, 0x8038) +#define XM_BASE_DEVICEFORMAT MSGID(MSGAREA_XBASE, 0x000B) +#define XM_BASE_CONTENTCOPYMOVE MSGID(MSGAREA_XBASE, 0x000C) +#define XM_BASE_DEVICERENAME MSGID(MSGAREA_XBASE, 0x000D) +#define XM_BASE_CONTENTAGGREGATEENUMERATE MSGID(MSGAREA_XBASE, 0x000E) +#define XM_BASE_CONTENAGGREGATETCREATEENUM MSGID(MSGAREA_XBASE, 0x000F) +#define XM_BASE_CONTENTAGGREGATECLOSEENUM MSGID(MSGAREA_XBASE, 0x0010) +#define XM_BASE_CONTENTGETMETADATA MSGID(MSGAREA_XBASE, 0x0011) +#define XM_BASE_CONTENTSETTHUMBNAIL MSGID(MSGAREA_XBASE, 0x0012) +#define XM_BASE_CONTENTGETTHUMBNAIL MSGID(MSGAREA_XBASE, 0x0013) +#define XM_BASE_CONTENTGETCREATOR MSGID(MSGAREA_XBASE, 0x0014) +#define XM_BASE_DEVICEGETSTATE MSGID(MSGAREA_XBASE, 0x0015) +#define XM_BASE_CONTENTRESOLVE MSGID(MSGAREA_XBASE, 0x0016) +#define XM_BASE_CONTENTGETLICENSEMASK MSGID(MSGAREA_XBASE, 0x0017) +#define XM_BASE_CONTENTFLUSH MSGID(MSGAREA_XBASE, 0x0018) +#define XM_BASE_CONTENTINSTALL MSGID(MSGAREA_XBASE, 0x0019) +#define XM_BASE_CONTENTGETATTRIBUTES MSGID(MSGAREA_XBASE, 0x001A) +#define XM_BASE_PROFILEENUMERATE MSGID(MSGAREA_XBASE, 0x3001) +#define XM_BASE_PROFILECREATEENUM MSGID(MSGAREA_XBASE, 0x3002) +#define XM_BASE_PROFILECLOSEENUM MSGID(MSGAREA_XBASE, 0x3003) +#define XM_BASE_PROFILELOAD MSGID(MSGAREA_XBASE, 0x3004) +#define XM_BASE_PROFILESAVE MSGID(MSGAREA_XBASE, 0x3005) +#define XM_BASE_PROFILEDELETE MSGID(MSGAREA_XBASE, 0x3006) +#define XM_BASE_PROFILERENAME MSGID(MSGAREA_XBASE, 0x3007) + +// +// TestXEX Messages +// + +#define XM_TEST_PRESENDMESSAGE MSGID(MSGAREA_TESTXEX, 0x0001) +#define XM_TEST_POSTSENDMESSAGE MSGID(MSGAREA_TESTXEX, 0x0002) +#define XM_TEST_SENDASYNCMESSAGE MSGID(MSGAREA_TESTXEX, 0x0003) +#define XM_TEST_SENDNOTIFICATION MSGID(MSGAREA_TESTXEX, 0x0004) +#define XM_TEST_ASYNCMESSAGEINUSE MSGID(MSGAREA_TESTXEX, 0x0005) +#define XM_TEST_SETMEDIACODE MSGID(MSGAREA_TESTXEX, 0x0006) +#define XM_TEST_ENABLEUITIMING MSGID(MSGAREA_TESTXEX, 0x0007) +#define XM_TEST_DUMPUITIMING MSGID(MSGAREA_TESTXEX, 0x0008) +#define XM_TEST_UIAPPLOAD MSGID(MSGAREA_TESTXEX, 0x0009) + +#define XM_TEST_ENABLEAUTOMATION MSGID(MSGAREA_TESTXEX, 0x0011) +#define XM_TEST_DISABLEAUTOMATION MSGID(MSGAREA_TESTXEX, 0x0012) +#define XM_TEST_STARTSCRIPTENGINE MSGID(MSGAREA_TESTXEX, 0x0013) +#define XM_TEST_STOPSCRIPTENGINE MSGID(MSGAREA_TESTXEX, 0x0014) +#define XM_TEST_RUNSCRIPT MSGID(MSGAREA_TESTXEX, 0x0015) +#define XM_TEST_SETTITLESTARTUPSCRIPT MSGID(MSGAREA_TESTXEX, 0x0016) +#define XM_TEST_SETDLLENGINEPATH MSGID(MSGAREA_TESTXEX, 0x0017) +#define XM_TEST_UPDATETESTCOMMAND MSGID(MSGAREA_TESTXEX, 0x0018) + +#define XM_TEST_STARTMESSAGESPOOF MSGID(MSGAREA_TESTXEX, 0x0021) +#define XM_TEST_STOPMESSAGESPOOF MSGID(MSGAREA_TESTXEX, 0x0022) +#define XM_TEST_STARTASYNCMESSAGESPOOF MSGID(MSGAREA_TESTXEX, 0x0023) +#define XM_TEST_STOPASYNCMESSAGESPOOF MSGID(MSGAREA_TESTXEX, 0x0024) + +#define XM_TEST_STARTMESSAGETIMER MSGID(MSGAREA_TESTXEX, 0x0031) +#define XM_TEST_STOPMESSAGETIMER MSGID(MSGAREA_TESTXEX, 0x0032) +#define XM_TEST_STARTMESSAGELOG MSGID(MSGAREA_TESTXEX, 0x0033) +#define XM_TEST_STOPMESSAGELOG MSGID(MSGAREA_TESTXEX, 0x0034) + +#define XM_TEST_OCCLUSIONQUERYBEGIN MSGID(MSGAREA_TESTXEX, 0x0040) +#define XM_TEST_OCCLUSIONQUERYEND MSGID(MSGAREA_TESTXEX, 0x0041) +#define XM_TEST_OCCLUSIONQUERYGETDATA MSGID(MSGAREA_TESTXEX, 0x0042) + +#define XM_TEST_CHANGEXEXINFO MSGID(MSGAREA_TESTXEX, 0x0051) +#define XM_TEST_DELETESPAFILE MSGID(MSGAREA_TESTXEX, 0x0052) +#define XM_TEST_RESETFILECACHE MSGID(MSGAREA_TESTXEX, 0x0053) + +#define TEST_SPA_FILENAME_SIZE 64 + +typedef struct +{ + DWORD dwTitleID; + CHAR szSpaFilename[TEST_SPA_FILENAME_SIZE]; +} TEST_CHANGEXEXINFO_MSG, *PTEST_CHANGEXEXINFO_MSG; + + +// +// XGI +// + +#define XM_XGI_RECOVERTITLE MSGID(MSGAREA_XGI, 0x0003) +#define XM_XGI_SYNC MSGID(MSGAREA_XGI, 0x0004) +#define XM_XGI_CONTENTOPENED MSGID(MSGAREA_XGI, 0x0005) +#define XM_XGI_USERSETCONTEXT MSGID(MSGAREA_XGI, 0x0006) +#define XM_XGI_USERSETPROPERTY MSGID(MSGAREA_XGI, 0x0007) + +#define XM_XGI_WRITEACHIEVEMENT MSGID(MSGAREA_XGI, 0x0008) +#define XM_XGI_CREATEENUM MSGID(MSGAREA_XGI, 0x0009) +#define XM_XGI_ACHIEVEMENTENUMERATE MSGID(MSGAREA_XGI, 0x000A) +#define XM_XGI_CLOSEENUM MSGID(MSGAREA_XGI, 0x000B) +#define XM_XGI_READSETTINGS MSGID(MSGAREA_XGI, 0x000C) +#define XM_XGI_WRITESETTINGS MSGID(MSGAREA_XGI, 0x000D) + +#define XM_XGI_SESSIONCREATE MSGID(MSGAREA_XGI, 0x0010) +#define XM_XGI_SESSIONDELETE MSGID(MSGAREA_XGI, 0x0011) +#define XM_XGI_SESSIONJOIN MSGID(MSGAREA_XGI, 0x0012) +#define XM_XGI_SESSIONLEAVE MSGID(MSGAREA_XGI, 0x0013) +#define XM_XGI_SESSIONSTART MSGID(MSGAREA_XGI, 0x0014) +#define XM_XGI_SESSIONEND MSGID(MSGAREA_XGI, 0x0015) +#define XM_XGI_SESSIONSEARCH MSGID(MSGAREA_XGI, 0x0016) +#define XM_XGI_SESSIONCONFIG MSGID(MSGAREA_XGI, 0x0017) +#define XM_XGI_SESSIONMODIFY MSGID(MSGAREA_XGI, 0x0018) +#define XM_XGI_SESSIONINVITE MSGID(MSGAREA_XGI, 0x0019) +#define XM_XGI_SESSIONARBITRATE MSGID(MSGAREA_XGI, 0x001A) +#define XM_XGI_SESSIONSEARCHBYID MSGID(MSGAREA_XGI, 0x001B) +#define XM_XGI_SESSIONSEARCHEX MSGID(MSGAREA_XGI, 0x001C) + +#define XM_XGI_VIEWRESET MSGID(MSGAREA_XGI, 0x0020) +#define XM_XGI_STATSREAD MSGID(MSGAREA_XGI, 0x0021) +#define XM_XGI_STATSENUMCREATE MSGID(MSGAREA_XGI, 0x0022) +#define XM_XGI_STATSENUMERATE MSGID(MSGAREA_XGI, 0x0023) +#define XM_XGI_STATSCLOSEENUM MSGID(MSGAREA_XGI, 0x0024) +#define XM_XGI_STATSWRITE MSGID(MSGAREA_XGI, 0x0025) +#define XM_XGI_STATSFLUSH MSGID(MSGAREA_XGI, 0x0026) + +#define XM_XGI_READTILE MSGID(MSGAREA_XGI, 0x0030) +#define XM_XGI_WRITETILE MSGID(MSGAREA_XGI, 0x0031) +#define XM_XGI_READTILETOTEXTURE MSGID(MSGAREA_XGI, 0x0032) +#define XM_XGI_WRITEGAMERTILE MSGID(MSGAREA_XGI, 0x0033) +#define XM_XGI_PREPAREGAMERTILES MSGID(MSGAREA_XGI, 0x0034) +#define XM_XGI_INITFLASHTILES MSGID(MSGAREA_XGI, 0x0035) +#define XM_XGI_INVALIDATEGAMERTILECACHE MSGID(MSGAREA_XGI, 0x0036) + +#define XM_XGI_READSTRING MSGID(MSGAREA_XGI, 0x0038) + +#define XM_XGI_TITLEENUMERATE MSGID(MSGAREA_XGI, 0x0050) +#define XM_XMP_PLAYUSERCONTENT MSGID(MSGAREA_XMP, 0x0001) +#define XM_XMP_PLAYTITLEPLAYLIST MSGID(MSGAREA_XMP, 0x0002) +#define XM_XMP_CONTINUE MSGID(MSGAREA_XMP, 0x0003) +#define XM_XMP_STOP MSGID(MSGAREA_XMP, 0x0004) +#define XM_XMP_PAUSE MSGID(MSGAREA_XMP, 0x0005) +#define XM_XMP_NEXT MSGID(MSGAREA_XMP, 0x0006) +#define XM_XMP_PREVIOUS MSGID(MSGAREA_XMP, 0x0007) +#define XM_XMP_SETPLAYBACKBEHAVIOR MSGID(MSGAREA_XMP, 0x0008) +#define XM_XMP_GETSTATUS MSGID(MSGAREA_XMP, 0x0009) +#define XM_XMP_MOVESONG MSGID(MSGAREA_XMP, 0x000A) +#define XM_XMP_GETVOLUME MSGID(MSGAREA_XMP, 0x000B) +#define XM_XMP_SETVOLUME MSGID(MSGAREA_XMP, 0x000C) +#define XM_XMP_CREATETITLEPLAYLIST MSGID(MSGAREA_XMP, 0x000D) +#define XM_XMP_GETNOWPLAYING MSGID(MSGAREA_XMP, 0x000E) +#define XM_XMP_ADDSONGS MSGID(MSGAREA_XMP, 0x0011) +#define XM_XMP_REMOVESONGS MSGID(MSGAREA_XMP, 0x0012) +#define XM_XMP_DELETETITLEPLAYLIST MSGID(MSGAREA_XMP, 0x0013) +#define XM_XMP_CREATESONGENUMERATOR MSGID(MSGAREA_XMP, 0x0014) +#define XM_XMP_ENUMERATESONG MSGID(MSGAREA_XMP, 0x0015) +#define XM_XMP_CLOSESONGENUMERATOR MSGID(MSGAREA_XMP, 0x0016) +#define XM_XMP_CREATETITLEPLAYLISTENUMERATOR MSGID(MSGAREA_XMP, 0x0017) +#define XM_XMP_ENUMERATETITLEPLAYLIST MSGID(MSGAREA_XMP, 0x0018) +#define XM_XMP_CLOSETITLEPLAYLISTENUMERATOR MSGID(MSGAREA_XMP, 0x0019) +#define XM_XMP_SETPLAYBACKCONTROLLER MSGID(MSGAREA_XMP, 0x001A) +#define XM_XMP_GETPLAYBACKCONTROLLER MSGID(MSGAREA_XMP, 0x001B) +#define XM_XMP_CREATEMEDIACONTAINERENUMERATOR MSGID(MSGAREA_XMP, 0x001C) +#define XM_XMP_ENUMERATEMEDIACONTAINER MSGID(MSGAREA_XMP, 0x001D) +#define XM_XMP_CLOSEMEDIACONTAINERENUMERATOR MSGID(MSGAREA_XMP, 0x001E) +#define XM_XMP_CREATEPHOTOENUMERATOR MSGID(MSGAREA_XMP, 0x001F) +#define XM_XMP_ENUMERATEPHOTO MSGID(MSGAREA_XMP, 0x0020) +#define XM_XMP_CLOSEPHOTOENUMERATOR MSGID(MSGAREA_XMP, 0x0021) +#define XM_XMP_CREATEVIDEOENUMERATOR MSGID(MSGAREA_XMP, 0x0022) +#define XM_XMP_ENUMERATEVIDEO MSGID(MSGAREA_XMP, 0x0023) +#define XM_XMP_CLOSEVIDEOENUMERATOR MSGID(MSGAREA_XMP, 0x0024) +#define XM_XMP_CREATEUSERPLAYLISTENUMERATOR MSGID(MSGAREA_XMP, 0x0025) +#define XM_XMP_ENUMERATEUSERPLAYLIST MSGID(MSGAREA_XMP, 0x0026) +#define XM_XMP_CLOSEUSERPLAYLISTENUMERATOR MSGID(MSGAREA_XMP, 0x0027) +#define XM_XMP_EMPTYPLAYLIST MSGID(MSGAREA_XMP, 0x0028) +#define XM_XMP_GETPLAYBACKBEHAVIOR MSGID(MSGAREA_XMP, 0x0029) +#define XM_XMP_GETTOTALNUMBEROFITEMS MSGID(MSGAREA_XMP, 0x002A) +#define XM_XMP_GETMEDIASOURCES MSGID(MSGAREA_XMP, 0x002B) +#define XM_XMP_GETMEDIASTREAM MSGID(MSGAREA_XMP, 0x002C) +#define XM_XMP_GETPHOTOTHUMBNAILSTREAM MSGID(MSGAREA_XMP, 0x002D) +#define XM_XMP_GETTITLEPLAYLISTBUFFERSIZE MSGID(MSGAREA_XMP, 0x002E) +#define XM_XMP_DASHINIT MSGID(MSGAREA_XMP, 0x002F) +#define XM_XMP_GETTITLEINFO MSGID(MSGAREA_XMP, 0x0030) +#define XM_XMP_GETNUMSONGSINTITLEPLAYLIST MSGID(MSGAREA_XMP, 0x0031) +#define XM_XMP_IMPORTALBUM MSGID(MSGAREA_XMP, 0x0032) +#define XM_XMP_GETBEATEFFECTOUTPUT MSGID(MSGAREA_XMP, 0x0033) +#define XM_XMP_EDITALBUM MSGID(MSGAREA_XMP, 0x0034) +#define XM_XMP_EDITTRACK MSGID(MSGAREA_XMP, 0x0035) +#define XM_XMP_DELETEMEDIA MSGID(MSGAREA_XMP, 0x0036) +#define XM_XMP_DELETECONTAINER MSGID(MSGAREA_XMP, 0x0037) +#define XM_XMP_GETMEDIASOURCEINFO MSGID(MSGAREA_XMP, 0x0038) +#define XM_XMP_COMMITPLAYLIST MSGID(MSGAREA_XMP, 0x0039) +#define XM_XMP_CHANGEWMCSERVER MSGID(MSGAREA_XMP, 0x003A) +#define XM_XMP_PLAYMEDIACONTAINER MSGID(MSGAREA_XMP, 0x003B) +#define XM_XMP_RENAMECONTAINER MSGID(MSGAREA_XMP, 0x003C) +#define XM_XMP_CAPTUREOUTPUT MSGID(MSGAREA_XMP, 0x003D) +#define XM_XMP_CREATEMEDIAOBJECTENUMERATOR MSGID(MSGAREA_XMP, 0x003E) +#define XM_XMP_ENUMERATEMEDIAOBJECT MSGID(MSGAREA_XMP, 0x003F) +#define XM_XMP_CLOSEMEDIAOBJECTENUMERATOR MSGID(MSGAREA_XMP, 0x0040) +#define XM_XMP_CREATETITLEPLAYLISTSONGENUMERATOR MSGID(MSGAREA_XMP, 0x0041) +#define XM_XMP_ENUMERATETITLEPLAYLISTSONG MSGID(MSGAREA_XMP, 0x0042) +#define XM_XMP_CLOSETITLEPLAYLISTSONGENUMERATOR MSGID(MSGAREA_XMP, 0x0043) +#define XM_XMP_SETMEDIASOURCEWORKSPACE MSGID(MSGAREA_XMP, 0x0044) +#define XM_XMP_GETNUMTITLEPLAYLISTS MSGID(MSGAREA_XMP, 0x0045) +#define XM_XMP_GETMEDIASOURCE MSGID(MSGAREA_XMP, 0x0046) +#define XM_XMP_DELETEALLLOCALMUSIC MSGID(MSGAREA_XMP, 0x0047) +#define XM_XMP_REMOVESONGSWITHSOURCE MSGID(MSGAREA_XMP, 0x0048) +#define XM_XMP_RESTARTPLAYBACK MSGID(MSGAREA_XMP, 0x0049) +#define XM_XMP_SETDASHNOWPLAYINGQUEUEMODE MSGID(MSGAREA_XMP, 0x004A) +#define XM_XMP_GETDASHNOWPLAYINGQUEUEMODE MSGID(MSGAREA_XMP, 0x004B) +#define XM_XMP_ENTERCDRIPPINGMODE MSGID(MSGAREA_XMP, 0x004C) +#define XM_XMP_LEAVECDRIPPINGMODE MSGID(MSGAREA_XMP, 0x004D) + +// +// UVBase Messages +// + +#define XM_UVBASE_REQUESTVOICECHAT MSGID(MSGAREA_UVBASE, 0x0001) +#define XM_UVBASE_QUITVOICECHAT MSGID(MSGAREA_UVBASE, 0x0002) +#define XM_UVBASE_ENUMERATEVOICECHATS MSGID(MSGAREA_UVBASE, 0x0003) +#define XM_UVBASE_SWITCHTOVOICECHAT MSGID(MSGAREA_UVBASE, 0x0004) +#define XM_UVBASE_CONNECTTOVOICECHAT MSGID(MSGAREA_UVBASE, 0x0005) +#define XM_UVBASE_CALLBACKUSERTOVOICECHAT MSGID(MSGAREA_UVBASE, 0x0006) +#define XM_UVBASE_CREATEVOICEMAIL MSGID(MSGAREA_UVBASE, 0x0007) +#define XM_UVBASE_RECORDVOICEMAIL MSGID(MSGAREA_UVBASE, 0x0008) +#define XM_UVBASE_PLAYVOICEMAIL MSGID(MSGAREA_UVBASE, 0x0009) +#define XM_UVBASE_STOPVOICEMAIL MSGID(MSGAREA_UVBASE, 0x000A) +#define XM_UVBASE_CLOSEVOICEMAIL MSGID(MSGAREA_UVBASE, 0x000B) +#define XM_UVBASE_ENUMERATECHANNELS MSGID(MSGAREA_UVBASE, 0x000C) +// +// We reverse the RSHOULDER and LSHOULDER constants to be consistent with old +// Xbox1 input that had the order BLACK then WHITE. +// +#define VK_PAD_XE 0x5808 +#define VK_PAD_BINDING 0x5809 +// +// Combination codes reserved by XUI input processing. +// Do not define conflicting public values. +// +// #define VK_PAD_A_OR_START 0x5840 +// #define VK_PAD_B_OR_BACK 0x5841 +// #define VK_NONE 0x5842 +// ... +// Reserved through 0x584F +// + +//------------------------------------------------------------------------------ +// Debug instrumentation +// + +XBOXAPI +VOID +WINAPI +XamDbgSetOutputLevel( + IN HXAMAPP hxamapp OPTIONAL, + IN ULONG ulLevel + ); + +XBOXAPI +VOID +WINAPI +XamDbgSetBreakLevel( + IN HXAMAPP hxamapp OPTIONAL, + IN ULONG ulLevel + ); + +XBOXAPI +BOOL +WINAPI +XamDbgPrint( + IN ULONG ulLevel, + IN LPCSTR pszFormat, + ... + ); +typedef struct _TESTXEXMESSAGE +{ + HXAMAPP hxamapp; + DWORD dwMessage; + UINT_PTR pParam1; + UINT_PTR pParam2; + HRESULT hr; +} TESTXEXMESSAGE, *PTESTXEXMESSAGE; + +typedef struct _TESTXEXXUILOCK +{ + BOOL fWait; + DWORD dwTime; +} TESTXEXXUILOCK, *PTESTXEXXUILOCK; + +typedef struct _TESTXEXSYSINFO +{ + DWORD dwBuildVer; + DWORD dwBuildFlags; + DWORD dwHardwareVer; +} TESTXEXSYSINFO, *PTESTXEXSYSINFO; + +BOOL +WINAPI +XamSetAutomation( + IN BOOL fAutomation + ); + +#ifndef XUIElementPropVal +typedef struct XUIElementPropVal XUIElementPropVal; +#endif + +HRESULT +WINAPI +XamApplySkin( + IN DWORD dwUserIndex, + IN LPCSTR pszSkinModule, OPTIONAL + IN CONST XUIElementPropVal* pPropBkgnd OPTIONAL + ); + +HRESULT +WINAPI +XamGetBkgndDefault( + OUT XUIElementPropVal* pPropBkgnd + ); + +HRESULT +WINAPI +XamGetDefaultSystemImage( + OUT PBYTE* ppbImage, + OUT PDWORD pcbImage OPTIONAL + ); + +typedef enum +{ + XAM_DEFAULT_IMAGE_SYSTEM = 0, + XAM_DEFAULT_IMAGE_DASHICON = 1, + + XAM_DEFAULT_IMAGE_ID_COUNT = 2 +} XAM_DEFAULT_IMAGE_ID; + +HRESULT +WINAPI +XamGetDefaultImage( + IN XAM_DEFAULT_IMAGE_ID dwImageId, + OUT PBYTE* ppbImage, + OUT PDWORD pcbImage OPTIONAL + ); + +#ifndef HXUIBRUSH +typedef struct _XUIBRUSH* HXUIBRUSH; +#endif + +VOID +XamSendMessageToLoadedApps( + IN DWORD dwMessage, + IN UINT_PTR pParam1, + IN UINT_PTR pParam2 + ); + +DWORD +WINAPI +XamFormatMessage( + OUT LPWSTR pszOut, + IN DWORD cchOut, + IN LPCWSTR pszTemplate, + ... + ); + +typedef enum +{ + XAMDATEFORMAT_dMyyyy = 0, + XAMDATEFORMAT_dMMyyyy, + XAMDATEFORMAT_ddMMyyyy, + XAMDATEFORMAT_Mdyyyy, + XAMDATEFORMAT_yyyyMd, + XAMDATEFORMAT_yyyyMMdd, + XAMDATEFORMAT_MMyy, +} XAMDATEFORMAT; + +XAMDATEFORMAT XamGetLocaleDateFormat( + IN DWORD dwCountry + ); + +VOID +WINAPI +XamFormatTimeString( + IN DWORD dwUserIndex, + IN FILETIME ft, + OUT LPWSTR pszBuff, + IN ULONG cchBuff + ); + +VOID +WINAPI +XamFormatDateString( + IN DWORD dwUserIndex, + IN FILETIME ft, + OUT LPWSTR pszBuff, + IN ULONG cchBuff + ); + +INT +WINAPI +XamUniSortCmpString( + LPCWSTR pszString1, + LPCWSTR pszString2, + UINT nMaxLen + ); + +#ifndef HXUIOBJ +typedef struct _XUIOBJ* HXUIOBJ; +#endif + +HRESULT +WINAPI +XamGetRootObj( + OUT HXUIOBJ* phRootObj + ); + +typedef enum +{ + XHUDOPENSTATE_NONE = 0, + XHUDOPENSTATE_HALF, + XHUDOPENSTATE_FULL, + XHUDOPENSTATE_ERROR, + //----------------- + XHUDOPENSTATE_COUNT +} XHUDOPENSTATE, *PXHUDOPENSTATE; + +typedef VOID (CALLBACK *PFNMSGBOXRETURN)( + IN INT iButtonPressed, + OUT PXHUDOPENSTATE pHudRestoreState + ); + +HRESULT +WINAPI +XamShowMessageBox( + IN OPTIONAL HXUIOBJ hOwner, // HXUIOBJ to be notified on Completion. (optional) + IN LPCWSTR pszTitle, // Title text. + IN LPCWSTR pszText, // Message text. + IN DWORD cButtons, // Count of buttons in rgButtons. + IN LPCWSTR* rgButtons, // Array of text strings for buttons. + IN DWORD dwFocusButton, // Set focus to a button with this index, + IN OPTIONAL PFNMSGBOXRETURN pfnMsgBoxReturn, // Callback function called on Completion. (optional) + IN DWORD dwFlags // Flags + ); + +#define MAX_RESOURCE_PATH 128 + +HRESULT +WINAPI +XamBuildResourceLocator( + IN OPTIONAL HINSTANCE hInstance, // HINSTANCE of the module from which to load resources. + IN LPCWSTR pszContainer, // Resource container name (i.e. section name or package name) + IN OPTIONAL LPCWSTR pszResource, // Resource name + OUT LPWSTR pszResourceLocator, // Sting buffer to recieve the locator string. + IN DWORD cchResourceLocator // Count of characters in pszResourceLocator. + ); + + +HRESULT +WINAPI +XamBuildSharedSystemResourceLocator( + IN LPCWSTR pszResource, // Resource name + OUT LPWSTR pszResourceLocator, // Sting buffer to recieve the locator string. + IN DWORD cchResourceLocator // Count of characters in pszResourceLocator. + ); + +HRESULT +WINAPI +XamBuildGamercardResourceLocator( + IN LPCWSTR pszResource, // Resource name + OUT LPWSTR pszResourceLocator, // Sting buffer to recieve the locator string. + IN DWORD cchResourceLocator // Count of characters in pszResourceLocator. + ); + +HRESULT +WINAPI +XamBuildDynamicResourceLocator( + IN DWORD dwAppId, // Unique application id + IN OPTIONAL HINSTANCE hInstance, // HINSTANCE of the module from which to load resources. + IN LPCWSTR pszContainer, // Resource container name (i.e. section name or package name) + IN OPTIONAL LPCWSTR pszResource, // Resource name + OUT LPWSTR pszResourceLocator, // Sting buffer to recieve the locator string. + IN DWORD cchResourceLocator // Count of characters in pszResourceLocator. + ); + +DWORD +WINAPI +XamCustomSetBannerImage( + IN const VOID * pvTexture, + IN const VOID * pvBits, + IN DWORD dwFlags + ); + +BOOL +WINAPI +XAutomationpBindController( + IN DWORD dwUserIndex + ); + +BOOL +WINAPI +XAutomationpUnbindController( + IN DWORD dwUserIndex + ); + +BOOL +WINAPI +XAutomationpInputXenonButton( + IN DWORD dwUserIndex + ); + +BOOL +WINAPI +XAutomationpInputSetState( + IN DWORD dwUserIndex, + IN PXINPUT_GAMEPAD pXGamepad + ); + +BOOL +WINAPI +XAutomationpInputPress( + IN DWORD dwUserIndex, + IN DWORD dwVkey + ); + +BOOL +WINAPI +XamEnableOverdraw( + IN BOOL fEnable + ); + +#define XAMINLINE FORCEINLINE + +// +// Crt initialization for system apps +// +BOOL WINAPI _CrtInit(); +VOID WINAPI _CrtTerm(); +BOOL WINAPI _CrtThreadInit(); +VOID WINAPI _CrtThreadTerm(); + +// +// XamApp SPIs +// + +DWORD +WINAPI +XamNavigate( + IN DWORD dwUserIndex, + IN LPCSTR pszShortcut, + IN ULONGLONG qwParam1, + IN DWORD dwParam2 + ); + +BOOL +WINAPI +XamAppRequestLoad( + VOID + ); + +BOOL +WINAPI +XamAppRequestLoadEx( + XHUDOPENSTATE OpenState + ); + +VOID +WINAPI +XamAppUnrequestLoad( + VOID + ); + + +HRESULT +WINAPI +XamAppUnloadStack( + IN BOOL fWaitForCompletion // specified whether the call should block until the app stack is fully unloaded + ); + + +HRESULT +WINAPI +XamAppLoad( + IN LPCSTR pszSysApp, + IN DWORD dwUserIndex, // user index from which the app will accept input. + IN PVOID pvAppParams OPTIONAL, // params that will be passed to the app as the first param of XM_SET_PARAMS + IN DWORD cbAppParams OPTIONAL, // size of data pointed to by pvAppParams + IN PXOVERLAPPED pxoverlapped OPTIONAL, // xoverlapped struct to signal when the operation is completed + OUT PHXAMAPP phxamapp OPTIONAL + ); + +void +WINAPI +XamAppUnloadSelf(); + +#define XSYSLOADINPUT_NONE 0x00000000 +#define XSYSLOADINPUT_FIRSTLOAD 0x00000001 +#define XSYSLOADINPUT_RELOAD 0x00000002 + +typedef struct _XSYSLOADINPUT +{ + DWORD dwFlags; // See XSYSLOADINPUT_* + PVOID pvParam; + HINSTANCE hInstance; + DWORD dwUserIndex; +} XSYSLOADINPUT, *PXSYSLOADINPUT; + +typedef struct _XSYSLOADOUTPUT +{ + DWORD cbPersist; +} XSYSLOADOUTPUT; + +// +// XM_SYS_STORAGEDEVICECHANGE +// + +typedef enum +{ + DEVICESTATE_NONE = 0, + DEVICESTATE_ADD, + DEVICESTATE_REMOVE, + DEVICESTATE_IDLE, + DEVICESTATE_UNFORMATTED, + DEVICESTATE_IGNORE, + DEVICESTATE_FORCE_DWORD = 0xFFFFFFFF +} DEVICESTATE; + +typedef struct XSTORAGEDEVICECHANGE_PARAMS +{ + CHAR szDevicePath[MAX_PATH]; + BOOL fRemoved; + DWORD deviceType; + DWORD deviceId; + DEVICESTATE eState; +} XSTORAGEDEVICECHANGE_PARAMS, *PXSTORAGEDEVICECHANGE_PARAMS; + + +DWORD +WINAPI +XamRegisterSysApp( + IN HINSTANCE hInstance, + IN HXAMAPP hXamApp, + IN PMESSAGEPROC pfnMessageProc, + IN DWORD dwAppId + ); + + +DWORD +WINAPI +XamUnregisterSysApp( + IN HINSTANCE hInstance, + IN HXAMAPP hXamApp, + IN DWORD dwAppId + ); + + + +typedef enum +{ + XCODEC_TYPE_AAC = 0, + //----------------- + XCODEC_TYPE_COUNT +} XCODEC_TYPE, *PXCODEC_TYPE; + +#define XCODEC_TYPE_AAC_TITLE_ID 0xFFFE07DF +#define XCODEC_TYPE_AAC_CONTENTTYPE XCONTENTTYPE_MARKETPLACE + +typedef +PVOID +(*PFN_CREATE_CODEC_INSTANCE)(); + +VOID +WINAPI +XMPRegisterCodec( + IN XCODEC_TYPE xcodectype, + IN PFN_CREATE_CODEC_INSTANCE pfnCreateCodec + ); + +PFN_CREATE_CODEC_INSTANCE +XMPGetCodecCreationFunction( + IN XCODEC_TYPE xcodectype + ); + + + +DECLSPEC_NORETURN +VOID +XamTerminateTitle( + VOID + ); + + +//------------------------------------------------------------------------------ +// XAM Scheduler +//------------------------------------------------------------------------------ +typedef HRESULT (WINAPI *PXAMTASKPROC)( + IN PVOID pvParam + ); + +typedef PVOID HXAMTASK, *PHXAMTASK; +typedef PVOID HXAMTASKQUEUE, *PHXAMTASKQUEUE; +typedef PVOID HXAMTASKOBJ, *PHXAMTASKOBJ; // Generic handle, either XAMTASK or XAMTASKQUEUE + +// Type of task +#define XAMPROPERTY_TYPE_WAIT 0x00000001 // waits on a kernel handle and calls taskproc when signaled +#define XAMPROPERTY_TYPE_DEDICATED 0x00000002 // dedicated thread, will do work and exit +#define XAMPROPERTY_TYPE_POOLED 0x00000004 // reuse some kind of thread pool +#define XAMPROPERTY_TYPE_PERIODIC 0x00000008 // reuse some kind of thread pool, run at regular intervals +#define XAMPROPERTY_TYPE_UI 0x00000010 +#define _XAMPROPERTY_TYPE_MASK_ 0x0000001F + +// When this task wakes up and does processing +#define XAMPROPERTY_WAKEUP_IO 0x00000100 // burst of CPU usage but mostly waiting on I/O +#define XAMPROPERTY_WAKEUP_NETWORK 0x00000200 // burst of CPU usage but mostly waiting on N/W +#define XAMPROPERTY_WAKEUP_OFTENWAIT 0x00000400 // calling WaitFor*Object* often +#define _XAMPROPERTY_WAKEUP_MASK_ 0x00000700 + +// Task CPU usage +#define XAMPROPERTY_CPUUSAGE_LO 0x00001000 // e.g.: waiting and processing notifications +#define XAMPROPERTY_CPUUSAGE_HI 0x00002000 // e.g.: CODEC, encrypting, animations? +#define _XAMPROPERTY_CPUUSAGE_MASK_ 0x00003000 + +// Duration +#define XAMPROPERTY_DURATION_VERYSHORT 0x00010000 +#define XAMPROPERTY_DURATION_SHORT 0x00020000 +#define XAMPROPERTY_DURATION_LONG 0x00040000 +// 0x00080000 // Taken below +#define _XAMPROPERTY_DURATION_MASK_ 0x00070000 + +// Priority +#define XAMPROPERTY_PRI_LO 0x00100000 +#define XAMPROPERTY_PRI_NORMAL 0x00200000 +#define XAMPROPERTY_PRI_HI 0x00400000 +#define XAMPROPERTY_PRI_BACKGROUND 0x00800000 +#define XAMPROPERTY_PRI_FOREGROUND 0x00080000 +#define _XAMPROPERTY_PRI_LOHIMASK_ 0x00700000 +#define _XAMPROPERTY_PRI_XGROUNDMASK_ 0x00880000 +#define _XAMPROPERTY_PRI_MASK_ 0x00F80000 + +// Misc +#define XAMPROPERTY_MISC_FIREONCE 0x01000000 +#define XAMPROPERTY_MISC_ONTITLEBEHALF 0x02000000 +#define XAMPROPERTY_MISC_ONSYSTEMBEHALF 0x04000000 +#define XAMPROPERTY_MISC_WAITONHANDLE 0x08000000 // By default, we expect a waitable kernel object (e.g. KEVENT) +#define XAMPROPERTY_MISC_SERIALQUEUE 0x10000000 // hxamtaskqueue needs to be set +#define XAMPROPERTY_MISC_FORCE_GROUND 0x20000000 // forces _XAMPROPERTY_PRI_XGROUNDMASK_ to be followed. Do not use this except in extreme cases! + +#define _XAMPROPERTY_MISC_BEHALFMASK_ 0x06000000 +#define _XAMPROPERTY_MISC_MASK_ 0x1F000000 + +typedef struct _XAMTASKATTRIBUTES +{ + DWORD dwProperties; // Zero or more XAMPROPERTY_* + + union + { + // mandatory for XAMPROPERTY_TYPE_PERIODIC + DWORD dwPeriod; // Period in millisec, only for XAMPROPERTY_TYPE_PERIODIC + + // mandatory to have one of these for XAMPROPERTY_TYPE_WAIT + PVOID pvWaitable; // Pointer to waitable kernel object, e.g.: KEVENT + HANDLE hWaitable; // (1) HANDLE to waitable object, requires XAMPROPERTY_MISC_WAITONHANDLE + // (2) Make sure to DuplicateHandle it! CloseHandle will automatically + // get called on it when the task is deleted. + // (3) If using this rather than hWaitable, then the task scheduling can + // fail if the HANDLE is invalid. That would be a caller error. + // (4) The HANDLE needs to be a system process HANDLE. + + // optionally for XAMPROPERTY_TYPE_POOLED (which is mutually exclusive with XAMPROPERTY_TYPE_WAIT) + HXAMTASKQUEUE hxamtaskqueue; + }; +} XAMTASKATTRIBUTES, *PXAMTASKATTRIBUTES; + +HRESULT +XamTaskSchedule( + IN PXAMTASKPROC pxamtaskproc, + IN PVOID pvParam, + IN PXAMTASKATTRIBUTES pxamtaskattribs OPTIONAL, // If NULL, default properties will be used + OUT PHXAMTASK phxamtask + ); + +// Usage +// Create a task using XamTaskCreate, can fail if out of memory +// Modify it using XamTaskModify, this cannot fail +// Schedule it using XamTaskReschedule, this cannot fail +HRESULT +XamTaskCreate( + OUT PHXAMTASK phxamtask + ); + +VOID +XamTaskReschedule( + IN HXAMTASK hxamtask + ); + +HRESULT +XamTaskSchedulerInitialize( + VOID + ); + +VOID +XamTaskCloseHandle( + IN HXAMTASKOBJ hxamtaskobj + ); + +VOID +XamTaskCancel( + IN HXAMTASK hxamtask + ); + +// Wait for task to be "done" or "cancelled" +VOID +XamTaskWaitOnCompletion( + IN HXAMTASK hxamtask + ); + +// S_OK: completed +// E_PENDING: not completed +HRESULT +XamTaskGetStatus( + IN HXAMTASK hxamtask + ); + +BOOL +XamTaskShouldExit( + VOID + ); + +#define XAMTASKMODIFY_NONE 0x00000000 +#define XAMTASKMODIFY_TASKPROC 0x00000001 +#define XAMTASKMODIFY_PVPARAM 0x00000002 +#define XAMTASKMODIFY_ATTRIBUTES 0x00000004 + +VOID +XamTaskModify( + IN HXAMTASK hxamtask, + IN DWORD dwFlags, + IN PXAMTASKPROC pxamtaskproc, + IN PVOID pvParam, + IN PXAMTASKATTRIBUTES pxamtaskattribs + ); + +VOID +XamTaskActivateXenonButtonHandler( + IN DWORD dwPortInput + ); + +HXAMTASK +XamTaskGetCurrentTask( + VOID + ); + +DWORD +XamTaskQueryProperty( + IN HXAMTASK hxamtask, + IN DWORD dwPropertyMask + ); + +HRESULT +XamTaskGetAttributes( + IN HXAMTASK hxamtask, + IN OUT PXAMTASKATTRIBUTES pxamtaskattribs + ); + +HRESULT +XamTaskGetWaitableObject( + IN HXAMTASK hxamtask, + OUT PHANDLE ph + ); + +HRESULT +XamTaskCreateQueue( + OUT PHXAMTASKQUEUE phxamtaskqueue + ); + +HRESULT +XamTaskGetCompletionStatus( + IN HXAMTASK hxamtask + ); + +// Not XamTask function, but close enough +BOOL +XamExecutingOnBehalfOfTitle( + VOID + ); + +#define XNFLAG_INTERNAL (0x80000000) +#define XNMASK_AREA (0x7e000000) +#define XNMASK_VERSION (0x01FF0000) +#define XNID_INTERNAL(Version, Area, Index)(DWORD)(XNID(Version, Area, Index) | XNFLAG_INTERNAL) + +// +// This version number needs to be bumped up each time we add a notification +// after a final release. When a game links to an xdk, this version number +// is linked into the game and only notifications with version less than or +// equal to XNID_CURRENTVERSION will be send to the title. This scheme will +// help keep new notitifications from breaking existing titles. +// +#define XNID_CURRENTVERSION (0) +#define XNOTIFY_FEEDBACK (0x00000010) +#define _XNAREA_FEEDBACK (4) +#define XN_SYS_TITLELOAD XNID_INTERNAL(0, _XNAREA_SYSTEM, 0x0001) +#define XN_SYS_TIMEZONE XNID_INTERNAL(0, _XNAREA_SYSTEM, 0x0002) +#define XN_SYS_LANGUAGE XNID_INTERNAL(0, _XNAREA_SYSTEM, 0x0003) +#define XN_SYS_VIDEOFLAGS XNID_INTERNAL(0, _XNAREA_SYSTEM, 0x0004) +#define XN_SYS_AUDIOFLAGS XNID_INTERNAL(0, _XNAREA_SYSTEM, 0x0005) +#define XN_SYS_PARENTALCONTROLGAMES XNID_INTERNAL(0, _XNAREA_SYSTEM, 0x0006) +#define XN_SYS_PARENTALCONTROLPASSWORD XNID_INTERNAL(0, _XNAREA_SYSTEM, 0x0007) +#define XN_SYS_PARENTALCONTROLMOVIES XNID_INTERNAL(0, _XNAREA_SYSTEM, 0x0008) +#define XN_SYS_DASHCONTEXTCHANGED XNID_INTERNAL(0, _XNAREA_SYSTEM, 0x000c) +#define XN_SYS_DISCMEDIACHANGED XNID_INTERNAL(0, _XNAREA_SYSTEM, 0x000d) +#define XN_SYS_THEMECHANGED XNID_INTERNAL(0, _XNAREA_SYSTEM, 0x000f) +#define XN_SYS_SYSTEMUPDATECHANGED XNID_INTERNAL(0, _XNAREA_SYSTEM, 0x0010) +#define XN_LIVE_INVITE_RECEIVED XNID_INTERNAL(0, _XNAREA_LIVE, 0x0004) +#define XN_LIVE_INVITE_ANSWER_RECEIVED XNID_INTERNAL(0, _XNAREA_LIVE, 0x0005) +#define XN_LIVE_MESSAGE_LIST_CHANGED XNID_INTERNAL(0, _XNAREA_LIVE, 0x0006) +#define XN_LIVE_POINTS_BALANCE_CHANGED XNID_INTERNAL(0, _XNAREA_LIVE, 0x000B) +#define XN_LIVE_PLAYERSLIST_CHANGED XNID_INTERNAL(0, _XNAREA_LIVE, 0x000C) +#define XN_LIVE_ITEM_PURCHASED XNID_INTERNAL(0, _XNAREA_LIVE, 0x000D) +#define XN_FRIENDS_REQUEST_RECEIVED XNID_INTERNAL(0, _XNAREA_FRIENDS, 0x0004) +#define XN_FRIENDS_ANSWER_RECEIVED XNID_INTERNAL(0, _XNAREA_FRIENDS, 0x0005) +#define XN_FRIENDS_REQUEST_RESULT XNID_INTERNAL(0, _XNAREA_FRIENDS, 0x0006) + +// +// Feedback notifications +// + +#define XN_FEEDBACK_FIRST XNID(0, _XNAREA_FEEDBACK, 0x0001) +#define XN_FEEDBACK_COMPLAINT_SENT XNID_INTERNAL(0, _XNAREA_FEEDBACK, 0x0001) +#define XN_FEEDBACK_PR_SENT XNID_INTERNAL(0, _XNAREA_FEEDBACK, 0x0002) +#define XN_FEEDBACK_PR_CHANGED XNID_INTERNAL(0, _XNAREA_FEEDBACK, 0x0003) +#define XN_FEEDBACK_LAST XNID(0, _XNAREA_FEEDBACK, 0x0004) + +#define XN_XMP_MEDIASOURCECONNECTIONCHANGED XNID_INTERNAL(0, _XNAREA_XMP, 0x0004) +#define XN_XMP_TITLEPLAYLISTCONTENTCHANGED XNID_INTERNAL(0, _XNAREA_XMP, 0x0005) +#define XN_XMP_LOCALMEDIACONTENTCHANGED XNID_INTERNAL(0, _XNAREA_XMP, 0x0006) +#define XN_XMP_DASHNOWPLAYINGQUEUEMODECHANGED XNID_INTERNAL(0, _XNAREA_XMP, 0x0007) +HANDLE +WINAPI +XamNotifyCreateListener( + IN ULONGLONG qwAreas, + IN DWORD dwVersion + ); + +HANDLE +WINAPI +XamNotifyCreateListenerInternal( + IN ULONGLONG qwAreas, + IN BOOL fReceiveInternalNotifications, + IN DWORD dwVersion + ); + +#define XNotifyCreateListenerInternal(qwAreas, fReceiveInternalNotifications) \ + XamNotifyCreateListenerInternal(qwAreas, fReceiveInternalNotifications, XNID_CURRENTVERSION) + +VOID +WINAPI +XNotifyBroadcast( + IN DWORD dwNotificationId, + IN ULONG_PTR param + ); + +HRESULT +WINAPI +XNotifyRegisterArea( + IN ULONGLONG qwArea, + IN DWORD dwMinGlobalMessage, + IN DWORD dwMaxGlobalMessage + ); + +VOID +WINAPI +XNotifyResetGlobalListener(); + +VOID +WINAPI +XNotifyFreeTitleHandles(); + +VOID +WINAPI +XNotifyFreeUIAppHandles(); + +VOID +WINAPI +XNotifyTitleStartup(); + + +#define XNOTIFYUI_TYPE_FRIENDONLINE 0 +#define XNOTIFYUI_TYPE_GAMEINVITE 1 +#define XNOTIFYUI_TYPE_FRIENDREQUEST 2 +#define XNOTIFYUI_TYPE_GENERIC 3 +#define XNOTIFYUI_TYPE_MULTIPENDING 4 +#define XNOTIFYUI_TYPE_PERSONALMESSAGE 5 +#define XNOTIFYUI_TYPE_SIGNEDOUT 6 +#define XNOTIFYUI_TYPE_SIGNEDIN 7 +#define XNOTIFYUI_TYPE_SIGNEDINLIVE 8 +#define XNOTIFYUI_TYPE_SIGNEDINNEEDPASS 9 +#define XNOTIFYUI_TYPE_CHATREQUEST 10 +#define XNOTIFYUI_TYPE_CONNECTIONLOST 11 +#define XNOTIFYUI_TYPE_DOWNLOADCOMPLETE 12 +#define XNOTIFYUI_TYPE_SONGPLAYING 13 +#define XNOTIFYUI_TYPE_PREFERRED_REVIEW 14 +#define XNOTIFYUI_TYPE_AVOID_REVIEW 15 +#define XNOTIFYUI_TYPE_COMPLAINT 16 +#define XNOTIFYUI_TYPE_CHATCALLBACK 17 +#define XNOTIFYUI_TYPE_REMOVEDMU 18 +#define XNOTIFYUI_TYPE_REMOVEDGAMEPAD 19 +#define XNOTIFYUI_TYPE_CHATJOIN 20 +#define XNOTIFYUI_TYPE_CHATLEAVE 21 +#define XNOTIFYUI_TYPE_GAMEINVITESENT 22 +#define XNOTIFYUI_TYPE_CANCELPERSISTENT 23 +#define XNOTIFYUI_TYPE_CHATCALLBACKSENT 24 +#define XNOTIFYUI_TYPE_MULTIFRIENDONLINE 25 +#define XNOTIFYUI_TYPE_ONEFRIENDONLINE 26 +#define XNOTIFYUI_TYPE_ACHIEVEMENT 27 +#define XNOTIFYUI_TYPE_HYBRIDDISC 28 +#define XNOTIFYUI_TYPE_MAX 28 + + +#define XNOTIFYUI_PRIORITY_LOW 0 +#define XNOTIFYUI_PRIORITY_DEFAULT 1 +#define XNOTIFYUI_PRIORITY_HIGH 2 +#define XNOTIFYUI_PRIORITY_PERSISTENT 3 + +VOID +WINAPI +XNotifyUISetOptions( + BOOL fShow, + BOOL fPlaySound + ); + +VOID +WINAPI +XNotifyUIGetOptions( + BOOL* pfShow, + BOOL* pfPlaySound + ); + +DWORD +WINAPI +XamInputGetState( + IN DWORD dwUserIndex, + IN DWORD dwFlags, + OUT PXINPUT_STATE pState + ); + +DWORD +WINAPI +XamInputGetCapabilities( + IN DWORD dwUserIndex, + IN DWORD dwFlags, + OUT PXINPUT_CAPABILITIES pCapabilities + ); + +DWORD +WINAPI +XamInputSetState( + IN DWORD dwUserIndex, + IN DWORD dwFlags, + IN PXINPUT_VIBRATION pVibration, + IN BYTE bAmplitude OPTIONAL, + IN BYTE bFrequency OPTIONAL, + IN BYTE bOffset OPTIONAL + ); + +DWORD +WINAPI +XamInputGetDeviceStats( + IN DWORD dwUserIndex, + OUT PXINPUT_DEVICE_STATS pDeviceStats + ); + +DWORD +WINAPI +XamInputGetKeystroke( + IN DWORD dwUserIndex, + IN DWORD dwFlags, + OUT PXINPUT_KEYSTROKE pKeystroke + ); + +DWORD +WINAPI +XamInputGetKeystrokeEx( + IN OUT PDWORD pdwUserIndex, + IN DWORD dwFlags, + OUT PXINPUT_KEYSTROKE pKeystroke + ); + +DWORD +WINAPI +XamInputGetKeystrokeHud( + IN DWORD dwUserIndex, + OUT PXINPUT_KEYSTROKE pKeystroke + ); + +DWORD +WINAPI +XamInputSetLayoutKeyboard( + IN DWORD dwUserIndex, + IN DWORD dwLanguage + ); + +DWORD +WINAPI +XamInputResetLayoutKeyboard( + IN DWORD dwUserIndex + ); + +WORD +WINAPI +XamInputToggleKeyLocks( + IN DWORD dwUserIndex, + IN WORD wToggleMask + ); + +VOID +XamInputEnableAutobind( + IN BOOL Enable + ); + +DWORD +XamEnableSystemAppInput( + IN DWORD dwUserIndex, + IN BOOL Enable + ); + +#define XDASHCONTEXT_NONE 0 +#define XDASHCONTEXT_TROUBLESHOOTER 1 +#define XDASHCONTEXT_ACCOUNTRECOVERY 2 +#define XDASHCONTEXT_OOBE 3 + +VOID +XamSetDashContext( + IN DWORD dwDashContext + ); + +DWORD +XamGetDashContext( + VOID + ); + +DWORD +XamGetCurrentTitleId( + VOID + ); + +BOOL +WINAPI +XamIsCurrentTitleDash( + VOID + ); + +XBOXAPI +ULONG +WINAPI +XamGetSystemVersion( + VOID + ); + +XBOXAPI +NTSTATUS +WINAPI +XamGetGameRatings( + OUT PUCHAR* ppGameRatings, + OUT PULONG pcGameRatings + ); + +XBOXAPI +DWORD +WINAPI +XamGetWCNConfigFile( + OUT LPSTR pszFile, + IN DWORD cchFile + ); + +DECLSPEC_NORETURN +XBOXAPI +VOID +WINAPI +XamLaunchNewImage( + IN LPCSTR pszImagePath, + IN DWORD dwFlags + ); + + +//------------------------------------------------------------------------------ +// XVoice APIs +//------------------------------------------------------------------------------ +#ifdef __XVOICE_H__ +XBOXAPI +HRESULT +WINAPI +XamVoiceCreate( + IN DWORD dwUserIndex, + IN DWORD dwMaxAttachedPackets, + OUT PXVOICE_HANDLE phHandle + ); + +XBOXAPI +BOOL +WINAPI +XamVoiceHeadsetPresent( + IN XVOICE_HANDLE hObject + ); + +XBOXAPI +HRESULT +WINAPI +XamVoiceSubmitPacket( + IN XVOICE_HANDLE hObject, + IN BOOL fInput, + IN OUT PXMEDIAPACKET Packet + ); + +XBOXAPI +BOOL +WINAPI +XamVoiceClose( + IN XVOICE_HANDLE hObject + ); +#endif __XVOICE_H__ + +#define XA_NONE 0x00000000 +#define XA_REVIEW 0x00000000 // Tag XamAlloc callswith + // this if you're not sure + // what flags to use +#define XA_DEFAULT 0x00000000 + +// Type of memory +#define XA_WORKSPACE 0x10000000 +#define XA_HEAP 0x20000000 +#define XA_PHYSICAL 0x40000000 +#define XA_XMP 0x80000000 +#define _XA_TYPE_MASK_ 0xF0000000 + +// Modifiers +#define XA_PERMANENT 0x01000000 +#define XA_UIRUNTIME 0x02000000 +#define XA_CHARGESYSTEM 0x04000000 +#define XA_CHARGETITLE 0x08000000 + +// By default all allocations thru XamAlloc are zero'ed out, pass this flag in to +// avoid that. +#define XA_NOZEROMEMORY 0x00100000 + +// Internalto XamAlloc use only, do not use +#define _XA_DEBUGHEAP_ 0x00010000 + +#define _XA_CHARGE_MASK_ 0x0C000000 +#define _XA_LIFETIME_MASK_ 0x03000000 +#define _XA_MODIFIER_MASK_ 0x0F100000 + +// Don't touch the _HXAMAPP_MASK_ values! +//#define XA_DONTTOUCH_ _HXAMAPP_MASK_ + +HRESULT +WINAPI +XamAlloc( + IN DWORD dwFlags, + IN DWORD cb, + OUT PVOID* ppv + ); + +// Use only for physical allocs +HRESULT +WINAPI +XamAllocEx( + IN DWORD dwFlagsEx, + IN DWORD dwFlags, + IN DWORD cb, + OUT PVOID* ppv + ); + +VOID +WINAPI +XamFree( + IN PVOID pv + ); + +SIZE_T +WINAPI +XamAllocSize( + IN PVOID pv + ); + + + +//------------------------------------------------------------------------------ +// Session handle helpers +//------------------------------------------------------------------------------ + +DWORD +WINAPI +XamSessionCreateHandle(HANDLE* ph); + +DWORD +WINAPI +XamSessionRefObjByHandle(HANDLE h, void** ppSessionStruct); + + +//------------------------------------------------------------------------------ +DWORD +XamGetOverlappedResult( + IN PXOVERLAPPED lpXOverlapped, + OUT LPDWORD pdwResult, + IN BOOL bWait + ); + +DWORD +XamGetOverlappedExtendedError( + IN PXOVERLAPPED lpXOverlapped + ); + +DWORD +XamEnumerate( + IN HANDLE hEnum, + IN DWORD dwFlags, + IN PVOID pvBuffer, + IN DWORD cbBuffer, + OUT PDWORD pcItemsReturned OPTIONAL, + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + +DWORD +XamContentCreate( + IN DWORD dwUserIndex, + IN LPCSTR pszRootName, + IN CONST XCONTENT_DATA* pcd, + IN DWORD dwContentFlags, + OUT PDWORD pdwDisposition OPTIONAL, + OUT PDWORD pdwLicenseMask OPTIONAL, + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + +DWORD +XamContentCreateEx( + IN DWORD dwUserIndex, + IN LPCSTR pszRootName, + IN CONST XCONTENT_DATA* pcd, + IN DWORD dwContentFlags, + OUT PDWORD pdwDisposition OPTIONAL, + OUT PDWORD pdwLicenseMask OPTIONAL, + IN DWORD dwFileCacheSize, + IN ULARGE_INTEGER uliContentSize, + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + +DWORD +XamContentCreateInternal( + IN LPCSTR pszRootName, + IN CONST XCONTENT_DATA_INTERNAL* pcdi, + IN DWORD dwContentFlags, + OUT PDWORD pdwDisposition OPTIONAL, + OUT PDWORD pdwLicenseMask OPTIONAL, + IN DWORD dwFileCacheSize, + IN ULARGE_INTEGER uliContentSize, + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + +DWORD +XamContentOpenFile( + IN DWORD dwUserIndex, + IN LPCSTR pszRootName, + IN LPCSTR pszFileName, + IN DWORD dwContentFlags, + IN DWORD dwFileCacheSize, + OUT PDWORD pdwLicenseMask OPTIONAL, + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + +DWORD +XamContentOpenFileInternal( + IN DWORD dwUserIndex, + IN LPCSTR pszRootName, + IN LPCSTR pszFileName, + IN DWORD dwContentFlags, + IN DWORD dwFileCacheSize, + OUT PXCONTENT_DATA_INTERNAL pcdi OPTIONAL, + OUT PDWORD pdwLicenseMask OPTIONAL, + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + +DWORD +XamContentInstall( + IN DWORD dwUserIndex, + IN XCONTENTDEVICEID DeviceID, + IN LPCSTR pszFileName, + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + +DWORD +XamContentDelete( + IN DWORD dwUserIndex, + IN CONST XCONTENT_DATA* pcd, + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + +DWORD +XamContentDeleteInternal( + IN CONST XCONTENT_DATA_INTERNAL* pcdi, + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + + +DWORD +XamContentResolve( + IN DWORD dwUserIndex, + IN CONST XCONTENT_DATA* pcd, + OUT LPSTR pszPath, + IN DWORD cchPath, + IN BOOL fCreateDir, + IN LPCSTR pszRootName, OPTIONAL + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + +DWORD +XamContentResolveInternal( + IN CONST XCONTENT_DATA_INTERNAL* pcdi, + OUT LPSTR pszPath, + IN DWORD cchPath, + IN BOOL fCreateDir, + IN LPCSTR pszRootName, OPTIONAL + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + +DWORD +XamContentGetAttributes( + IN DWORD dwUserIndex, + IN CONST XCONTENT_DATA* pcd, + OUT LPWIN32_FILE_ATTRIBUTE_DATA pfad, + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + +DWORD +XamContentGetAttributesInternal( + IN CONST XCONTENT_DATA_INTERNAL* pcdi, + OUT LPWIN32_FILE_ATTRIBUTE_DATA pfad, + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + +DWORD +XamContentCopyInternal( + IN CONST XUID* pXuidDst, OPTIONAL + IN CONST XCONTENTDEVICEID* pDeviceIdDst, OPTIONAL + IN CONST XCONTENT_DATA_INTERNAL* pcdi, + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + +DWORD +XamContentMoveInternal( + IN CONST XUID* pXuidDst, OPTIONAL + IN CONST XCONTENTDEVICEID* pDeviceIdDst, OPTIONAL + IN CONST XCONTENT_DATA_INTERNAL* pcdi, + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + +#define XCONTENT_COPYFLAG_NONE 0x00000000 +#define XCONTENT_COPYFLAG_DELETESOURCE 0x00000001 +#define XCONTENT_COPYFLAG_DEVICETRANSFER 0x00000002 +#define XCONTENT_COPYFLAG_PROFILETRANSFER 0x00000004 + +DWORD +XamContentClose( + IN LPCSTR pszRootName, + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + +DWORD +XamContentFlush( + IN LPCSTR pszRootName, + IN PXOVERLAPPED pOverlapped OPTIONAL + ); + +DWORD +XamContentCreateEnumerator( + IN DWORD dwUserIndex, + IN XCONTENTDEVICEID DeviceID, + IN DWORD dwContentType, + IN DWORD dwContentFlags, + IN DWORD cItem, + OUT PDWORD pcbBuffer, OPTIONAL + OUT PHANDLE phEnum + ); + +DWORD +XamContentCreateEnumeratorInternal( + IN XUID xuid, + IN XCONTENTDEVICEID dwDeviceId, + IN DWORD dwContentType, + IN DWORD dwTitleId, + IN DWORD dwContentFlags, + IN DWORD cItem, + OUT PDWORD pcbBuffer, OPTIONAL + OUT PHANDLE phEnum + ); + +DWORD +XamContentCreateDeviceEnumerator( + IN DWORD dwContentTypes, + IN DWORD dwFlags, + IN DWORD cItem, + OUT PDWORD pcbBuffer OPTIONAL, + OUT PHANDLE phEnum + ); + + + +#define COMMONUSER_XUID ((XUID) -1) + +DWORD +XamContentAggregateCreateEnumerator( + IN XUID xuid, + IN XCONTENTDEVICEID DeviceId, + IN DWORD dwContentType, + IN DWORD dwTitleId, + OUT PHANDLE phEnum + ); + +DWORD +XamContentGetDeviceState( + IN XCONTENTDEVICEID DeviceID, + IN OUT PXOVERLAPPED pOverlapped + ); + +DWORD +XamContentGetDeviceData( + IN XCONTENTDEVICEID DeviceID, + OUT PXDEVICE_DATA pDeviceData + ); + +DWORD +XamContentGetDeviceName( + IN XCONTENTDEVICEID DeviceID, + OUT LPWSTR pwszName, + IN DWORD cchName + ); + +DWORD +XamContentGetMetaDataInternal( + IN CONST XCONTENT_DATA_INTERNAL* pcdi, + OUT XCONTENT_METADATA* pContentMetaData, + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + +DWORD +XamContentSetThumbnail( + IN DWORD dwUserIndex, + IN CONST XCONTENT_DATA* pcd, + IN CONST BYTE* pbThumbnail, + IN DWORD cbThumbnail, + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + +DWORD +XamContentGetThumbnail( + IN DWORD dwUserIndex, + IN CONST XCONTENT_DATA* pContentData, + OUT PBYTE pbThumbnail, OPTIONAL + IN OUT PDWORD pcbThumbnail, + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + +DWORD +XamContentGetCreator( + IN DWORD dwUserIndex, + IN CONST XCONTENT_DATA* pContentData, + OUT BOOL* pfUserIsCreator, + OUT PXUID pxuid, OPTIONAL + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + +DWORD +XamContentSetThumbnailInternal( + IN CONST XCONTENT_DATA_INTERNAL* pcdi, + IN CONST BYTE* pbThumbnail, + IN DWORD cbThumbnail, + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + +DWORD +XamContentGetLicenseMask( + OUT DWORD* pdwLicenseMask, + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + +#define XCONTENT_PACKAGE_FS_DEVICE_PREFIX "\\Device\\Package_" +#define XCONTENT_MAX_PACKAGE_FS_DEVICE_NAME 64 + +#define XCONTENT_PKGFLAG_KEEP_OPEN_ON_TITLE_TERMINATE 0x00000001 +#define XCONTENT_PKGFLAG_DONT_UPDATE_DIGESTS_ON_CLOSE 0x00000002 + +#define COMMON_XCONTENT_PKGFLAGS (XCONTENT_PKGFLAG_KEEP_OPEN_ON_TITLE_TERMINATE | \ + XCONTENT_PKGFLAG_DONT_UPDATE_DIGESTS_ON_CLOSE) + +typedef struct _XCONTENT_MOUNTED_PACKAGE +{ + PVOID pvFsDeviceObject; + PVOID pvFsBlockCache; + LIST_ENTRY leMountedPackages; + DWORD dwFlags; + HANDLE hPackageFile; + DWORD dwOpenRefCount; + RTL_CRITICAL_SECTION csHeaderLock; + XCONTENT_HEADER ContentHeader; + XCONTENT_METADATA ContentMetaData; + PBYTE pbOtherMetaData; + DWORD dwOtherMetaDataSize; + XCONTENTDEVICEID DeviceIDLocked; + CHAR szFsDeviceName[XCONTENT_MAX_PACKAGE_FS_DEVICE_NAME]; + CHAR szPackageFilePath[MAX_PATH]; +} XCONTENT_MOUNTED_PACKAGE, *PXCONTENT_MOUNTED_PACKAGE; + +#define XCONTENT_CREATEPKG_KEEP_OPEN_ON_TITLE_TERMINATE XCONTENT_PKGFLAG_KEEP_OPEN_ON_TITLE_TERMINATE +#define XCONTENT_CREATEPKG_DONT_UPDATE_DIGESTS_ON_CLOSE XCONTENT_PKGFLAG_DONT_UPDATE_DIGESTS_ON_CLOSE +#define XCONTENT_CREATEPKG_OVERWRITE 0x00010000 + +#define VALID_XCONTENT_CREATEPKG_FLAGS (XCONTENT_CREATEPKG_KEEP_OPEN_ON_TITLE_TERMINATE | \ + XCONTENT_CREATEPKG_DONT_UPDATE_DIGESTS_ON_CLOSE | \ + XCONTENT_CREATEPKG_OVERWRITE) + +DWORD +XamContentCreateAndMountPackage( + IN LPCSTR szPackagePath, + IN HANDLE hFileToUse OPTIONAL, + IN CONST XCONTENT_METADATA* pMetaData, + IN CONST BYTE* pbOtherMetaData OPTIONAL, + IN DWORD dwOtherMetaDataSize, + IN DWORD dwFlags, + IN XCONTENTDEVICEID DeviceIDToLock, + OUT PXCONTENT_MOUNTED_PACKAGE* ppMountedPackage + ); + +#define XCONTENT_OPENPKG_DONT_VERIFY_SIGNATURE 0x00010000 +#define XCONTENT_OPENPKG_COPY_EXISTING_HANDLE 0x00020000 + +#define VALID_XCONTENT_OPENPKG_FLAGS (XCONTENT_OPENPKG_DONT_VERIFY_SIGNATURE | \ + XCONTENT_OPENPKG_COPY_EXISTING_HANDLE) + +DWORD +XamContentOpenPackageFile( + IN LPCSTR szPackagePath, + IN DWORD dwContentType, + IN DWORD dwFlags, + OUT HANDLE * phPackageFile, + OUT PXCONTENT_MOUNTED_PACKAGE* ppExistingMountedPackage, + OUT XCONTENT_HEADER * pContentHeader, + OUT XCONTENT_METADATA * pContentMetaData, + OUT BYTE * pbOtherMetaData OPTIONAL, + IN OUT DWORD * pdwOtherMetaDataSize OPTIONAL + ); + +#define XCONTENT_MOUNTPKG_KEEP_OPEN_ON_TITLE_TERMINATE XCONTENT_PKGFLAG_KEEP_OPEN_ON_TITLE_TERMINATE +#define XCONTENT_MOUNTPKG_DONT_UPDATE_DIGESTS_ON_CLOSE XCONTENT_PKGFLAG_DONT_UPDATE_DIGESTS_ON_CLOSE + +#define VALID_XCONTENT_MOUNTPKG_FLAGS (XCONTENT_MOUNTPKG_KEEP_OPEN_ON_TITLE_TERMINATE | \ + XCONTENT_MOUNTPKG_DONT_UPDATE_DIGESTS_ON_CLOSE) + +DWORD +XamContentMountPackage( + IN HANDLE hPackageFile, + IN LPCSTR szPackagePath, + IN const XCONTENT_HEADER * pContentHeader, + IN const XCONTENT_METADATA * pContentMetaData, + IN const BYTE * pbOtherMetaData OPTIONAL, + IN DWORD dwOtherMetaDataSize, + IN DWORD dwFlags, + IN XCONTENTDEVICEID DeviceIDToLock, + OUT PXCONTENT_MOUNTED_PACKAGE * ppMountedPackage + ); + +DWORD +XamContentWritePackageHeader( + IN XCONTENT_MOUNTED_PACKAGE * pMountedPackage + ); + +DWORD +XamContentFlushPackage( + IN XCONTENT_MOUNTED_PACKAGE * pMountedPackage + ); + +DWORD +XamContentDismountAndClosePackage( + IN XCONTENT_MOUNTED_PACKAGE * pMountedPackage + ); + +DWORD +XamContentClosePackageFile( + IN HANDLE hPackageFile + ); + +DWORD +XamContentLockUnlockPackageHeaders( + IN XCONTENT_MOUNTED_PACKAGE * pMountedPackage, + IN BOOL fLock + ); + +DWORD +XamContentEstimatePackageSize( + IN DWORD cbContentSize + ); + +#define XamContentReferencePackage(pkg) ObReferenceObject((pkg)->pvFsDeviceObject) +#define XamContentDereferencePackage(pkg) ObDereferenceObject((pkg)->pvFsDeviceObject) +#define XamContentSetPackageFlags(pkg, flags) ((DWORD) InterlockedOr((LONG*) (&(pkg)->dwFlags), (LONG) (flags))) +#define XamContentClearPackageFlags(pkg, flags) ((DWORD) InterlockedAnd((LONG*) (&(pkg)->dwFlags), (LONG) (~(flags)))) + + +DWORD +XamContentLaunchImage( + IN DWORD dwUserIndex, + IN CONST XCONTENT_DATA* pContentData, + IN LPCSTR pszImagePath +); + + +DWORD +XamContentLaunchImageInternal( + IN CONST XCONTENT_DATA_INTERNAL* pContentData, + IN LPCSTR pszImagePath + ); + +typedef struct _XDEVICERENAMEPARAM +{ + XCONTENTDEVICEID DeviceID; + LPCWSTR pwszName; + DWORD cchName; +} XDEVICERENAMEPARAM, *PXDEVICERENAMEPARAM; + +//------------------------------------------------------------------------------ +// XamUser functions and flags +//------------------------------------------------------------------------------ +#define XAMUSER_NONE 0x00000000 +#define XAMUSER_XUID_OFFLINE 0x00000001 +#define XAMUSER_XUID_ONLINE 0x00000002 +#define XAMUSER_XUID_GUEST 0x00000004 +#define XAMUSER_RECOVER_ACCOUNT 0x80000000 + +#define XAMUSERLOGON_OFFLINEONLY 0x00000001 +#define XAMUSERLOGON_FORCELIVELOGOFF 0x00000002 // requires XAMUSERLOGON_OFFLINEONLY +#define XAMUSERLOGON_ADDUSERS 0x00000004 +#define XAMUSERLOGON_REMOVEUSERS 0x00000008 +#define XAMUSERLOGON_FOREGROUNDPRI 0x00000010 +#define XAMUSERLOGON_NOPOPUPNOTIFICATION 0x00000020 +#define XAMUSERLOGON_DONTWAITFORCOMPLETION 0x00000040 +#define XAMUSERLOGON_ALLOWMACHINEACCOUNTONLY 0x00000080 +#define XAMUSERLOGON_CHECKONLINETICKETSONLY 0x00000100 +#define XAMUSERLOGON_ALLOWDEFAULTUSER 0x00000200 +#define XAMUSERLOGON_ALLOWUSERSWITHREQUIREDMESSAGE 0x00000400 +#define XAMUSERLOGON_RESTRICTEDPOPUPNOTIFICATION 0x00000800 + + +HRESULT +WINAPI +XamUserGetXUID( + IN DWORD dwUserIndex, + IN DWORD dwFlags, // XAMUSER_XUID_ONLINE, OFFLINE or EITHER + OUT PXUID pxuid + ); + +HRESULT +WINAPI +XamUserGetIndexFromXUID( + IN XUID xuid, + IN DWORD dwFlags, + OUT PDWORD pdwUserIndex + ); + +HRESULT +WINAPI +XamUserGetGamerTag( + IN DWORD dwUserIndex, + OUT LPWSTR pszGamerTag, + IN DWORD cchGamerTag + ); + +HRESULT +WINAPI +XamUserLogon( + IN CONST XUID* rgUsers, + IN DWORD dwFlags, + IN PXOVERLAPPED pOverlapped OPTIONAL + ); + +#ifndef PROFILEENUMRESULT +typedef struct _PROFILEENUMRESULT PROFILEENUMRESULT; +#endif + +HRESULT +WINAPI +XamUserLogonEx( + IN CONST PROFILEENUMRESULT* rgUsers, + IN DWORD dwFlags, + IN PXOVERLAPPED pOverlapped OPTIONAL + ); + +HRESULT +WINAPI +XamUserFlushLogonQueue( + IN PXOVERLAPPED pOverlapped OPTIONAL + ); + +DWORD +WINAPI +XamUserGetUserIndexMask( + IN DWORD dwFlags // See XAMUSER_ + ); + +DWORD +WINAPI +XamUserGetRequestedUserIndexMask( + IN DWORD dwFlags // See XAMUSER_ + ); + + +DWORD +WINAPI +XamGetUserPresetPresenceState( + IN DWORD dwUserIndex + ); + +VOID +WINAPI +XamSetUserPresetPresenceState( + IN DWORD dwUserIndex, + IN DWORD dwStateFlags + ); + +BOOL +WINAPI +XamUserIsOnlineEnabled( + IN DWORD dwUserIndex + ); + +DWORD +WINAPI +XamUserGetUserFlags( + IN DWORD dwUserIndex + ); + +DWORD +WINAPI +XamUserGetUserFlagsFromXUID( + IN XUID xuid + ); + +DWORD +WINAPI +XamUserGetCachedUserFlags( + IN DWORD dwUserIndex + ); + +BYTE +WINAPI +XamUserGetOnlineCountryFromXUID( + IN XUID xuid + ); + +BYTE +WINAPI +XamUserGetMembershipTier( + IN DWORD dwUserIndex + ); + +BYTE +WINAPI +XamUserGetMembershipTierFromXUID( + IN XUID xuid + ); + +BOOL +WINAPI +XamUserIsGuest( + IN DWORD dwUserIndex + ); + + + +// Macros to use with XamUserGetUserIndexMask. Given a user index and a bit +// mask, tells if a user index bit is on or off. +#define XAMUSER_MASK_USERINDEX_X(__dwUserIndex__, __dw__) (!!((__dw__) & (1 << (__dwUserIndex__)))) + +#define XAMUSER_MASK_USERINDEX_0(__dw__) XAMUSER_USERINDEX_X(0, __dw__) +#define XAMUSER_MASK_USERINDEX_1(__dw__) XAMUSER_USERINDEX_X(1, __dw__) +#define XAMUSER_MASK_USERINDEX_2(__dw__) XAMUSER_USERINDEX_X(2, __dw__) +#define XAMUSER_MASK_USERINDEX_3(__dw__) XAMUSER_USERINDEX_X(3, __dw__) + +HRESULT +WINAPI +XamUserGetDeviceContext( + IN DWORD dwUserIndex, + IN UCHAR ucDeviceCategory, + OUT PULONG_PTR pulDeviceContext + ); + +HRESULT +WINAPI +XamUserLookupDevice( + IN ULONG_PTR ulDeviceContext, + IN UCHAR ucDeviceCategory, + OUT PDWORD pdwUserIndex + ); + +HRESULT +WINAPI +XamUserBindDeviceCallback( + IN ULONG_PTR ulUserIdentifier, + IN ULONG_PTR ulDeviceContext, + IN UCHAR ucDeviceCategory, + IN BOOLEAN fUnbindUser, + OUT PUCHAR pucAssignedUser + ); + +DWORD +WINAPI +XamUserCheckPrivilege( + IN DWORD dwUserIndex, + IN DWORD PrivilegeType, + OUT PBOOL pfResult + ); + +DWORD +WINAPI +XamUserAreUsersFriends( + IN DWORD dwUserIndex, + IN PXUID pXuids, + IN DWORD dwXuidCount, + OUT PBOOL pfResult OPTIONAL, + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + + +// Defines for XAMACCOUNTINFO's dwMask, indicate valid fields. +// Keep these bits packed together as much as possible. Might use some +// remaining bits for versioning at a later time. +#define XAMPROFILE_NONE 0x00000000 +#define XAMPROFILE_PASSCODE 0x10000000 // set if password field is valid +#define XAMPROFILE_ONLINEENABLED 0x20000000 // set if account is online enabled + +#define XAMPROFILE_VERSIONMASK 0x000000FF + +#define XAMPROFILE_VERSION1 1 + +#define XAMPROFILE_CURRENTVERSION XAMPROFILE_VERSION1 + +#define XAMPROFILE_MAX_HD 32 +#define XAMPROFILE_MAX_MU 8 + +#define XAMACCOUNT_LIVEFLAG_ACCTREQUIRESMGMT 0x00000001 + + +#define XAMACCOUNT_PASSCODELENGTH 4 +#define XAMACCOUNT_ONLINEDOMAINSIZE 20 +#define XAMACCOUNT_ONLINEKERBEROSREALMSIZE 24 +#define XAMACCOUNT_ONLINEKEYLENGTH 16 +#define XAMACCOUNT_USERPASSPORTMEMBERNAMESIZE (113 + 1) +#define XAMACCOUNT_USERPASSPORTPASSWORDSIZE (16 + 16) +#define XAMACCOUNT_OWNERPASSPORTMEMBERNAMESIZE XAMACCOUNT_USERPASSPORTMEMBERNAMESIZE + + +#define XAMUSER_ISTEAMXUID IsTeamXUID +#define XAMUSER_ISOFFLINEXUID IsOfflineXUID +#define XAMUSER_ISONLINEXUID IsOnlineXUID +#define XAMUSER_ISGUESTXUID IsGuestXUID + +#pragma pack(push, 1) + +typedef struct _XAMACCOUNTINFO +{ + DWORD dwReserved; // Don't touch outside of XamProfile* functions + DWORD dwLiveFlags; + WCHAR szGamerTag[XUSER_NAME_SIZE]; + XUID xuidOnline; + DWORD dwCachedUserFlags; + DWORD dwOnlineServiceNetworkID; + BYTE rgbPasscode[XAMACCOUNT_PASSCODELENGTH]; + CHAR szOnlineDomain[XAMACCOUNT_ONLINEDOMAINSIZE]; + CHAR szOnlineKerberosRealm[XAMACCOUNT_ONLINEKERBEROSREALMSIZE]; + BYTE rgbOnlineKey[XAMACCOUNT_ONLINEKEYLENGTH]; + CHAR szUserPassportMembername[XAMACCOUNT_USERPASSPORTMEMBERNAMESIZE]; + CHAR rgcUserPassportPassword[XAMACCOUNT_USERPASSPORTPASSWORDSIZE]; + CHAR szOwnerPassportMembername[XAMACCOUNT_OWNERPASSPORTMEMBERNAMESIZE]; +} XAMACCOUNTINFO, *PXAMACCOUNTINFO; + +#pragma pack(pop) + +typedef struct _USER_PAYMENT_INFO USER_PAYMENT_INFO, *PUSER_PAYMENT_INFO; +typedef struct _PASSPORT_SESSION_TOKEN PASSPORT_SESSION_TOKEN; + +HRESULT +WINAPI +XamProfileCreate( + IN DWORD dwFlags, // XAMUSER_XUID_ONLINE, OFFLINE or both + IN OUT PXCONTENTDEVICEID pDeviceID, + IN XUID xuidOffline, + IN CONST XAMACCOUNTINFO* paccountinfo, + IN CONST USER_PAYMENT_INFO* puserpaymentinfo, + IN CONST PASSPORT_SESSION_TOKEN* puserPassportToken, + IN CONST PASSPORT_SESSION_TOKEN* pownerPassportToken, + OUT PVOID* ppvContext + ); + +HRESULT +WINAPI +XamProfileGetCreationStatus( + IN PVOID pvContext, + OUT PXUID pxuidOffline + ); + +HRESULT +WINAPI +XamProfileDelete( + IN XCONTENTDEVICEID DeviceID, + IN XUID xuidOffline + ); + +typedef struct _PROFILEENUMRESULT +{ + XUID xuidOffline; + XAMACCOUNTINFO xai; + XCONTENTDEVICEID DeviceID; +} PROFILEENUMRESULT, *PPROFILEENUMRESULT; + +DWORD +WINAPI +XamProfileCreateEnumerator( + IN XCONTENTDEVICEID DeviceID, + OUT PHANDLE phEnum + ); + +DWORD +WINAPI +XamProfileEnumerate( + IN HANDLE hEnum, + IN DWORD dwFlags, + OUT PPROFILEENUMRESULT pProfileEnumResult, + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + +DWORD +WINAPI +XamProfileFindAccount( + IN XUID xuidOffline, + OUT PXAMACCOUNTINFO pAccountInfo, + OUT PXCONTENTDEVICEID pDeviceID OPTIONAL + ); + +DWORD +WINAPI +XamProfileRenameAccount( + IN XUID xuidOffline, + IN LPCWSTR pszName + ); + +DWORD +WINAPI +XamProfileOpen( + IN XUID xuidOffline, + IN LPCSTR pszRootName, + IN DWORD dwFlags, + OUT PXCONTENT_DATA_INTERNAL pcdi OPTIONAL + ); + + +DWORD +WINAPI +XamProfileClose( + IN LPCSTR pszRootName + ); + + +HRESULT +WINAPI +XamProfileLoadAccountInfo( + IN XCONTENTDEVICEID DeviceID, + IN XUID xuidOffline, + OUT PXAMACCOUNTINFO pAccountInfo + ); + +HRESULT +WINAPI +XamProfileSaveAccountInfo( + IN XCONTENTDEVICEID DeviceID, + IN XUID xuidOffline, + IN XAMACCOUNTINFO * pAccountInfo + ); + + +__inline +BOOL +XamProfileIsParentalControlled( + IN CONST XAMACCOUNTINFO* pAccountInfo + ) +{ + return ((pAccountInfo->dwCachedUserFlags & XONLINE_USER_PARENTAL_CONTROLLED) != 0); +} + +BOOL +WINAPI +XamAreMixedAccountsSignedIn( + ); + + +// +// Contains information need to process an async message. This structure +// is pointed to by the InternalContext field from the XOVERLAPPED structure. +// In some cases, when some user data needs to be associated with the message, +// memory for the user data and this structure is allocated in a single +// allocation. +// + +typedef struct _XASYNCMESSAGE +{ + HXAMAPP hxamapp; + DWORD dwMessage; + PXOVERLAPPED pOverlapped; + PVOID pBuffer; + PVOID UserEvent; + PVOID Apc; + HXAMTASK hXamTask; +} XASYNCMESSAGE, *PXASYNCMESSAGE; + +// +// XAM Boot Data +// +// This is shared between XAM and XBDM, so be sure to keep it backward +// compatible. +// + +typedef enum _XAM_BOOT_REASON +{ + XAM_BOOT_SYSTEM_START = 0, + XAM_BOOT_LAUNCH_MEDIA, + XAM_BOOT_LAUNCH_NEW_IMAGE, + XAM_BOOT_USER_REQUEST, + XAM_BOOT_DEBUG_REQUEST, + XAM_BOOT_RECOVERY, + XAM_BOOT_MFG_LOADER, + XAM_BOOT_DUMP, + XAM_BOOT_LAUNCH_DASHBOARD, + XAM_BOOT_LAUNCH_ANY_DASHBOARD, +} XAM_BOOT_REASON; + + +#define XAM_MAX_LAUNCH_PATH 256 +#define XAM_BOOT_DATA_FLAG_TITLE 0x00000001 +#define XAM_BOOT_DATA_FLAG_UNLOAD_HUD 0x00000002 +#define XAM_BOOT_DATA_FLAG_BOUND_PATH 0x00000004 +#define XAM_BOOT_DATA_FLAG_ASSUME_DVD 0x00000010 +#define XAM_BOOT_DATA_FLAG_DASH_ARCADE 0x00000020 +#define XAM_BOOT_DATA_FLAG_HYBRID_FORCE_DVD 0x00000040 +#define XAM_BOOT_DATA_FLAG_HYBRID_FORCE_GAME 0x00000080 +#define XAM_BOOT_DATA_FLAG_HYBRID_NO_NOTIFY 0x00000100 + +#pragma pack(push, 4) + +typedef struct _XAM_BOOT_DATA_BLOCK +{ + // + // Base (1888) structure + // + + XAM_BOOT_REASON Reason; + DWORD Flags; + PVOID ImagePhysicalBase; + ULONG ImageSize; + CHAR ImageName[XAM_MAX_LAUNCH_PATH]; + CHAR DDrive[XAM_MAX_LAUNCH_PATH]; + CHAR CommandLine[XAM_MAX_LAUNCH_PATH]; + + // + // Fields added after build 1888 + // + + DWORD MinVersion; +} XAM_BOOT_DATA_BLOCK; + +#pragma pack(pop) + + +HRESULT +WINAPI +XMsgAcquireAsyncMessageFromOverlapped( + IN PXOVERLAPPED pOverlapped, + OUT PXASYNCMESSAGE* ppMsg + ); + +HRESULT +WINAPI +XMsgReleaseAsyncMessageToOverlapped( + IN PXASYNCMESSAGE pMsg, + IN PXOVERLAPPED pOverlapped + ); + + +//------------------------------------------------------------------------------ +// System-defined string ids used in the SPA file +//------------------------------------------------------------------------------ + +#define X_STRINGID_TITLE 0x8000 + + +typedef struct +{ + DWORD dwTitleId; + ULONGLONG qwId; + DWORD dwUserIndex; + WCHAR* pwsz; + PDWORD pcch; +} XGI_READSTRING_MSG; + + +//------------------------------------------------------------------------------ +// Tiles/Images/Pictures +//------------------------------------------------------------------------------ + + +typedef enum +{ + XTILETYPE_ACHIEVEMENT = 0, + XTILETYPE_GAME_ICON = 1, + XTILETYPE_GAMER_TILE = 2, + XTILETYPE_GAMER_TILE_SMALL = 3, + XTILETYPE_LOCAL_GAMER_TILE = 4, + XTILETYPE_LOCAL_GAMER_TILE_SMALL = 5, + XTILETYPE_BKGND = 6, + XTILETYPE_AWARDED_GAMER_TILE = 7, + XTILETYPE_AWARDED_GAMER_TILE_SMALL = 8, + XTILETYPE_GAMER_TILE_BY_IMAGE_ID = 9, +} XTILETYPE; + + +#define X_IMAGEID_FLAGS_LARGE 0x00020000 +#define X_IMAGEID_FLAGS_SMALL 0x00010000 + +// number of tiles available to users to pick +#define NUM_FLASH_TILES 12 + +// total number of tiles available, including one for xbox 1 users +#define NUM_FLASH_TILES_ALL NUM_FLASH_TILES + 1 + +// +// System defined image ids +// + +#define X_IMAGEID_DEFAULT_TITLEID XENON_DASH_TITLE_ID +#define X_IMAGEID_DEFAULT_TILE 0x0 + X_IMAGEID_FLAGS_LARGE +#define X_IMAGEID_DEFAULT_TILE_SMALL 0x0 + X_IMAGEID_FLAGS_SMALL + +#define X_IMAGEID_GAME 0x8000 +#define X_IMAGEID_GAMER 0x8001 +#define X_IMAGEID_GAMER_SMALL 0x8002 +#define X_IMAGEID_BKGND 0x8003 +#define X_IMAGEID_GAME_MARKETPLACE 0x8004 + +typedef struct +{ + DWORD dwUserIndex; + DWORD dwNumXuids; + CONST XUID* rgXuids; +} XGI_PREPAREGAMERTILES_MSG; + +typedef struct +{ + XTILETYPE eTileType; + DWORD dwTitleId; // Used for game tile and achievements + ULONGLONG qwImageId; + DWORD dwUserIndex; // Used for achievements + PBYTE pbImage; + PDWORD pcbBuffer; + DWORD cbBuffer; + DWORD dwPitch; + DWORD dwHeight; +} XGI_READWRITETILE_MSG; + +typedef struct +{ + BOOL fForEnumerate; // Making available for enumeration, or making it the gamer's tile? + DWORD dwUserIndex; + DWORD dwTitleId; // Title id of the granting title + DWORD dwImageId; // Image id of the 64x64 tile + DWORD dwImageIdSmall; // Image id of the 32x32 tile + BOOL fUpdateSetting; // Update profile setting as a part of writing tile? (only if fForEnumeate = false) +} XGI_WRITEGAMERTILE_MSG; + + +XBOXAPI +DWORD +WINAPI +XamUserCreateAchievementEnumerator( + IN DWORD dwTitleId, // A title in your family or 0 for the current title + IN DWORD dwUserIndex, // User index of locally signed-in user making the request + IN XUID xuidRequestee, // XUID of remote user whose titles are enumerated (or INVALID_XUID for a local enumeration) + IN DWORD dwDetailFlags, // Get the descriptions, etc. + IN DWORD dwStartingIndex, // Number of achievements to skip before enumerating + IN DWORD cItem, // Number of achievements to retrieve per enumeration + OUT PDWORD pcbBuffer, // Size of buffer needed to enumerate + OUT PHANDLE ph // Handle to created enumerator + ); + + +XBOXAPI +DWORD +WINAPI +XamUserCreateStatsEnumerator( + IN DWORD dwTitleId, // Title id to read stats for, 0 if current + IN XGI_STATS_ENUMERATOR_TYPE enumType, // Type of enumeration to be performed + IN ULONGLONG qwPivot, // Rank, rating to start from, or user to pivot around, depending on type + IN DWORD dwNumRows, // Number of rows to retrieve + IN DWORD dwNumStatsSpecs, // Number of specs in the pSpecs parameter + IN CONST XUSER_STATS_SPEC* pSpecs, // Array of stats specs to retrieve + OUT PDWORD pcbBuffer, // Size of buffer needed to enumerate + OUT PHANDLE ph // Handle to created enumerator + ); + + +XBOXAPI +DWORD +WINAPI +XamUserCreateTitlesPlayedEnumerator( + IN DWORD dwTitleId, // A title in your family or 0 for the current title + IN DWORD dwUserIndex, // User index of locally signed-in user making the request + IN XUID xuid, // XUID of remote user whose titles are enumerated (or INVALID_XUID for a local enumeration) + IN DWORD dwStartingIndex, // Number to skip before enumerating + IN DWORD cItem, // Number to retrieve per enumeration + OUT PDWORD pcbBuffer, // Size of buffer needed to enumerate + OUT PHANDLE ph // Handle to created enumerator + ); + +void +XamInitFlashTiles(void); + +XBOXAPI +DWORD +WINAPI +XamPrepareGamerTiles( + IN DWORD dwUserIndex, // User index of user reading gamer tiles + IN DWORD dwNumXuids, // number of xuids in rgXuids + IN CONST XUID* rgXuids // List of users to prepare tiles for + ); + + +XBOXAPI +DWORD +WINAPI +XamReadTile( + IN XTILETYPE eTileType, + IN DWORD dwTitleId, + IN ULONGLONG qwImageId, + IN DWORD dwUserIndex, // User index of profile to search in + IN PBYTE pbImage, + IN OUT PDWORD pcbBuffer, + IN OUT PXOVERLAPPED pXOverlapped OPTIONAL + ); + + +XBOXAPI +DWORD +WINAPI +XamReadTileToTexture( + IN XTILETYPE eTileType, + IN DWORD dwTitleId, + IN ULONGLONG qwImageId, + IN DWORD dwUserIndex, // User index of profile to search in + IN OUT PBYTE pbTextureBuffer, + IN DWORD dwPitch, + IN DWORD dwHeight, + IN OUT PXOVERLAPPED pXOverlapped OPTIONAL + ); + + +XBOXAPI +DWORD +WINAPI +XamWriteGamerTile( + IN DWORD dwUserIndex, + IN DWORD dwTitleId, + IN DWORD dwImageId, + IN DWORD dwImageIdSmall, + IN BOOL fForEnumeration, + IN OUT PXOVERLAPPED pXOverlapped OPTIONAL + ); + + +XBOXAPI +DWORD +WINAPI +XamWriteTile( + IN XTILETYPE eTileType, + IN DWORD dwTitleId, + IN ULONGLONG qwImageId, + IN DWORD dwUserIndex, + IN PBYTE pbImage, + IN OUT DWORD cbImage, + IN OUT PXOVERLAPPED pXOverlapped OPTIONAL + ); + + +DWORD +WINAPI +XamParseGamerTileKey( + IN PXUSER_DATA pKey, + OUT PDWORD pdwTitleId, + OUT PDWORD pdwImageId, + OUT PDWORD pdwImageIdSmall + ); + + +XBOXAPI +DWORD +WINAPI +XamReadString( + IN DWORD dwTitleId, + IN ULONGLONG qwStringId, + IN DWORD dwUserIndex, // User index of profile to search in + IN WCHAR* pwsz, + IN OUT PDWORD pcch, + IN OUT PXOVERLAPPED pXOverlapped OPTIONAL + ); + + +XBOXAPI +DWORD +XamGetCachedTitleName( + IN DWORD dwTitleId, + OUT LPWSTR pwsz, + IN OUT PDWORD pcch + ); + +XBOXAPI +DWORD +XamGetCachedGamerTag( + IN XUID xuid, + OUT LPSTR psz, + IN OUT PDWORD pcch + ); + +XBOXAPI +DWORD +XamGetCachedGamerTagW( + IN XUID xuid, + OUT LPWSTR pwsz, + IN OUT PDWORD pcch + ); + +XBOXAPI +HRESULT +WINAPI +XamReadImage( + IN DWORD dwTileFlags, + IN DWORD dwTitleId, + IN DWORD dwUserIndex, + IN ULONGLONG qwImageId, + OUT HXUIBRUSH* phBrush + ); + + +XBOXAPI +HRESULT +WINAPI +XamDecompressPNGToTexture( + IN PBYTE pbPng, + IN DWORD cbPng, + IN PBYTE pbTexture, + IN DWORD dwPitch, + IN DWORD dwHeight + ); + + +//------------------------------------------------------------------------------ +// Server synchronization (profile settings, achievements, title list, etc.) +//------------------------------------------------------------------------------ + +typedef struct +{ + DWORD dwUserIndexMask; +} XGI_SYNC_MSG; + + +XBOXAPI +DWORD +WINAPI +XamUserProfileSync( + IN DWORD dwUserIndexMask, // Who to sync (bitmap of user indexes (LSB == user index 0)) + IN OUT PXOVERLAPPED pXOverlapped OPTIONAL + ); + + +//------------------------------------------------------------------------------ +// Title tracking and recovery +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ +// Titles-played list +//------------------------------------------------------------------------------ + +// The XUSER_TITLE_PLAYED structure defines the info stored for each title +// ever played. It's used in both the SPIs and as the format stored in a profile +// file. +// +// If this format changes then all existing title records in all profiles will +// be invalidated. That's why there are unused members for adding new info later. +// Just be sure that the size of the structure (including alignment packing) +// remains the same! + +typedef struct tagXUSER_TITLE_PLAYED +{ + DWORD dwTitleId; + + DWORD dwAchievementsPossible; + DWORD dwAchievementsEarned; + + DWORD dwCredPossible; + DWORD dwCredEarned; + + DWORD dwUnused1; + DWORD dwUnused2; + DWORD dwUnused3; + + FILETIME ftLastLoaded; // Only changed if online + + WCHAR wszTitleName[64]; // Includes null-terminator +} XUSER_TITLE_PLAYED; + + +typedef struct +{ + DWORD dwUserIndex; + CONST XUSER_TITLE_PLAYED* pTitleToRecover; +} XGI_RECOVERTITLE_MSG; + + +XBOXAPI +DWORD +WINAPI +XamProfileRecoverTitle( + IN DWORD dwUserIndex, + IN CONST XUSER_TITLE_PLAYED* pTitleToRecover, + IN OUT PXOVERLAPPED pXOverlapped OPTIONAL + ); + + +//------------------------------------------------------------------------------ +// Profile settings +//------------------------------------------------------------------------------ + +XBOXAPI +DWORD +WINAPI +XamUserReadProfileSettings( + IN DWORD dwTitleId, // A title in your family or 0 for the current title + IN DWORD dwUserIndexRequester, // User index of requesting user. Used for permission checking. + IN DWORD dwNumFor, // Count of XUIDs in pxuidFor + IN CONST XUID* pxuidFor, // Pointer to array of XUIDs to request settings for + IN DWORD dwNumSettingIds, // Count of setting ids in pdwSettingIds + IN CONST DWORD* pdwSettingIds, // Pointer to array of settings to retrieve + IN OUT DWORD* pcbResults, // Size of pResults buffer. If *pchResults is 0 then required size is returned. + IN OUT PXUSER_READ_PROFILE_SETTING_RESULT pResults, + IN OUT PXOVERLAPPED pXOverlapped OPTIONAL + ); + + +XBOXAPI +DWORD +WINAPI +XamUserWriteProfileSettings( + IN DWORD dwTitleId, + IN DWORD dwUserIndex, // User index of player whose settings are written + IN DWORD dwNumSettings, // Count of settings in pSettings + IN CONST PXUSER_PROFILE_SETTING pSettings, // Pointer to array of settings to set + IN PXOVERLAPPED pXOverlapped OPTIONAL + ); + + +//------------------------------------------------------------------------------ +// Messaging UI APIs +//------------------------------------------------------------------------------ + +XBOXAPI +DWORD +WINAPI +XamShowMessageComposeUI( + IN DWORD dwUserIndex, + IN CONST XUID* pXuidRecipients OPTIONAL, + IN UINT cRecipients, + IN LPCWSTR pszText OPTIONAL + ); + +XBOXAPI +DWORD +WINAPI +XamShowGameInviteUI( + IN DWORD dwUserIndex, + IN CONST XUID* pXuidRecipients OPTIONAL, + IN UINT cRecipients, + IN LPCWSTR pszText OPTIONAL + ); + +XBOXAPI +DWORD +WINAPI +XamShowFriendRequestUI( + IN DWORD dwUserIndex, + IN XUID xuidUser + ); + +XBOXAPI +DWORD +WINAPI +XamShowPrivateChatInviteUI( + IN DWORD dwUserIndex, + IN DWORD dwChannel + ); + + +//------------------------------------------------------------------------------ +// Virtual keyboard API +//------------------------------------------------------------------------------ + +typedef struct _XVIRTUALKBDUI_PARAMS +{ + DWORD dwUserIndex; + DWORD cchResultText; + DWORD dwFlags; + LPCWSTR pDefaultText; + LPCWSTR pTitleText; + LPCWSTR pDescriptionText; + LPWSTR pResultText; + PXOVERLAPPED pOverlapped; +} XVIRTUALKBDUI_PARAMS, *PXVIRTUALKBDUI_PARAMS; + +XBOXAPI +DWORD +WINAPI +XamShowKeyboardUI( + IN DWORD dwUserIndex, + IN DWORD dwFlags, + IN LPCWSTR pDefaultText, + IN LPCWSTR pTitleText, + IN LPCWSTR pDescriptionText, + OUT LPWSTR pResultText, + IN DWORD cchResultText, + IN OUT PXOVERLAPPED pOverlapped + ); + +//------------------------------------------------------------------------------ +// QuickChat UI API +//------------------------------------------------------------------------------ + +typedef struct _XSHOWQUICKCHATUI_PARAMS +{ + DWORD dwUserIndex; +} XSHOWQUICKCHATUI_PARAMS, *PXSHOWQUICKCHATUI_PARAMS; + +XBOXAPI +DWORD +WINAPI +XamShowQuickChatUI( + IN DWORD dwUserIndex + ); + +//------------------------------------------------------------------------------ +// VoiceMail application API +//------------------------------------------------------------------------------ +#define XSHOWVOICEMAILUI_RESULTS_NONE 0x00000000 +#define XSHOWVOICEMAILUI_RESULTS_RECORDED 0x00000001 +#define XSHOWVOICEMAILUI_RESULTS_ACCEPTED 0x00000002 + +typedef struct _XVOICEMAILUI_RESULTS +{ + DWORD dwResults; + DWORD cbRecordedBufferSize; +} XVOICEMAILUI_RESULTS, *PXVOICEMAILUI_RESULTS; + +#define XSHOWVOICEMAILUI_FLAGS_PLAYVOICE 0x00000001 +#define XSHOWVOICEMAILUI_FLAGS_RECORDVOICE 0x00000002 +#define XSHOWVOICEMAILUI_FLAGS_RESERVED1 0x00000004 +#define XSHOWVOICEMAILUI_FLAGS_RESERVED2 0x00000008 + +typedef struct _XVOICEMAILUI_PARAMS +{ + DWORD dwUserIndex; + DWORD dwFlags; + PBYTE pbBuffer; + DWORD cbBufferSize; + DWORD cbRecordedBufferSize; + WORD wCodec; + PXVOICEMAILUI_RESULTS pResults; +} XVOICEMAILUI_PARAMS, *PXVOICEMAILUI_PARAMS; + +XBOXAPI +DWORD +WINAPI +XamShowVoiceMailUI( + IN DWORD dwUserIndex, + IN DWORD dwFlags, + IN PBYTE pbBuffer, + IN DWORD cbBufferSize, + IN DWORD cbRecordedBufferSize, + IN WORD wCodec, + OUT PXVOICEMAILUI_RESULTS pResults + ); + + +//------------------------------------------------------------------------------ +// GamerProfile application API types +//------------------------------------------------------------------------------ + +#define XGAMERPROFILE_MODE_GAMERCARD 0x00 +#define XGAMERPROFILE_MODE_GAMES 0x01 +#define XGAMERPROFILE_MODE_ACHIEVEMENTS 0x02 +#define XGAMERPROFILE_MODE_EDIT 0x03 + +typedef struct _XGAMERPROFILE_PARAMS +{ + DWORD dwUserIndex; + DWORD dwMode; + XUID xuidTarget; + DWORD dwTitleId; +} XGAMERPROFILE_PARAMS, *PXGAMERPROFILE_PARAMS; + +//------------------------------------------------------------------------------ +// GamerProfile application APIs +//------------------------------------------------------------------------------ + +XBOXAPI +DWORD +WINAPI +XamShowGamerCardUI( + IN DWORD dwUserIndex + ); + +XBOXAPI +DWORD +WINAPI +XamShowGamerCardUIForXUID( + IN DWORD dwUserIndex, + IN XUID xuidPlayer, + IN BOOL fDisableChatButton + ); + +// +// API to show the Achievements UI +// + +XBOXAPI +DWORD +WINAPI +XamShowAchievementsUI( + IN DWORD dwUserIndex, + IN DWORD dwTitleId + ); + +XBOXAPI +DWORD +WINAPI +XamShowGamesUI( + IN DWORD dwUserIndex, + IN XUID xuidTarget + ); + +typedef struct _XSHOWFRIENDSUI_PARAMS +{ + DWORD dwUserIndex; + DWORD dwFlags; + XUID rgXuidRecipients[100]; + UINT cRecipients; + WCHAR szText[256]; + ULONGLONG qwParam; + DWORD dwChannel; +} XSHOWFRIENDSUI_PARAMS, *PXSHOWFRIENDSUI_PARAMS; + +#define XSHOWFRIENDSUI_FLAGS_SHOWMESSAGES (0x01) +#define XSHOWFRIENDSUI_FLAGS_COMPOSEMESSAGE (0x02) +#define XSHOWFRIENDSUI_FLAGS_GAMEINVITE (0x04) +#define XSHOWFRIENDSUI_FLAGS_FRIENDREQUEST (0x08) +#define XSHOWFRIENDSUI_FLAGS_SHOWPLAYERS (0x10) +#define XSHOWFRIENDSUI_FLAGS_GAMERPROFILE (0x20) +#define XSHOWFRIENDSUI_FLAGS_QUICKCHAT (0x40) +#define XSHOWFRIENDSUI_FLAGS_DISABLECHAT (0x80) +#define XSHOWFRIENDSUI_FLAGS_PRIVATECHATINVITE (0x100) +#define XSHOWFRIENDSUI_FLAGS_SHOWRECENTMESSAGE (0x200) +#define XSHOWFRIENDSUI_FLAGS_PRIVATECHATCHANNEL (0x400) +#define XSHOWFRIENDSUI_FLAGS_INVOKEDBYPRIVATECHAT (0x800) + + +XBOXAPI +DWORD +WINAPI +XamShowFriendsUI( + IN DWORD dwUserIndex + ); + +XBOXAPI +DWORD +WINAPI +XamShowPlayersUI( + IN DWORD dwUserIndex + ); + +XBOXAPI +DWORD +WINAPI +XamShowMessagesUI( + IN DWORD dwUserIndex + ); + +XBOXAPI +DWORD +WINAPI +XamShowMessagesUIEx( + IN DWORD dwUserIndex, + IN DWORD dwFlags + ); + +XBOXAPI +DWORD +WINAPI +XamShowRecentMessageUI( + IN DWORD dwUserIndex, + IN ULONGLONG qwParam + ); + +XBOXAPI +DWORD +WINAPI +XamShowRecentMessageUIEx( + IN DWORD dwFlags, + IN DWORD dwUserIndex, + IN ULONGLONG qwParam, + IN DWORD dwChannel + ); + +XBOXAPI +DWORD +WINAPI +XamShowFriendsUIp( + IN DWORD dwUserIndex, + IN DWORD dwFlags + ); + +typedef struct _XSHOWSIGNINUI_PARAMS +{ + DWORD dwUserIndex; + DWORD cPanes; + DWORD dwFlags; + PXOVERLAPPED pOverlapped; +} XSHOWSIGNINUI_PARAMS, *PXSHOWSIGNINUI_PARAMS; + +XBOXAPI +DWORD +WINAPI +XamShowSigninUI( + IN DWORD cPanes, + IN DWORD dwFlags + ); + +XBOXAPI +DWORD +WINAPI +XamShowSigninUIEx( + IN DWORD cPanes, + IN DWORD dwFlags, + IN OUT PXOVERLAPPED pxov + ); + +XBOXAPI +DWORD +WINAPI +XamShowSigninUIp( + IN DWORD dwUserIndex, + IN DWORD cPanes, + IN DWORD dwFlags + ); + +XBOXAPI +DWORD +WINAPI +XamShowPasscodeVerifyUI( + IN DWORD dwUserIndex, + OUT PMESSAGEBOX_RESULT pResult, + IN OUT PXOVERLAPPED pOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XamShowDirtyDiscErrorUI( + IN DWORD dwUserIndex + ); + +//------------------------------------------------------------------------------ +// Feedback application APIs +//------------------------------------------------------------------------------ + +// +// Feedback API +// + +#define FEEDBACK_ENTRYPOINT_PLAYERREVIEW 0 +#define FEEDBACK_ENTRYPOINT_COMPLAINT 1 +#define FEEDBACK_ENTRYPOINT_REPUTATION 2 + +typedef struct _XSHOWFEEDBACKUI_PARAMS +{ + DWORD dwUserIndex; + XUID _xuidFeedbackTarget; + DWORD _dEntryPoint; +} XSHOWFEEDBACKUI_PARAMS, *PXSHOWFEEDBACKUI_PARAMS; + +// +// API to show the feedback UI +// + +XBOXAPI +DWORD +WINAPI +XamShowPlayerReviewUI( + IN DWORD dwUserIndex, + IN XUID XuidFeedbackTarget + ); + + +XBOXAPI +DWORD +WINAPI +XamShowComplaintUI( + IN DWORD dwUserIndex, + IN XUID XuidFeedbackTarget + ); + + +XBOXAPI +DWORD +WINAPI +XamShowReputationUI( + IN DWORD dwUserIndex + ); + +XBOXAPI +DWORD +WINAPI +XamContentGetMarketplaceCounts( + IN DWORD dwUserIndex, + IN DWORD dwContentCategories, + IN DWORD cbResults, + IN OUT XOFFERING_CONTENTAVAILABLE_RESULT* pResults, + IN PXOVERLAPPED pXOverlapped OPTIONAL + ); + +#define XSHOWMARKETPLACEUI_ACTIVETITLEID 0 + +typedef struct _MP_BILLING_ACCOUNT_INFO +{ + BOOL fEditMode; + BYTE bPaymentTypeId; + WCHAR wszPaymentInstrumentId[MAX_INSTANCE_ID_LENGTH]; + + WCHAR wszStreet1[MAX_STREET_SIZE]; + WCHAR wszStreet2[MAX_STREET_SIZE]; + WCHAR wszCity[MAX_CITY_SIZE]; + WCHAR wszDistrict[MAX_DISTRICT_SIZE]; + WCHAR wszState[MAX_STATE_SIZE]; + WCHAR wszPostalCode[MAX_POSTALCODE_SIZE]; + + WCHAR wszPhonePrefix[MAX_PHONE_PREFIX_SIZE]; + WCHAR wszPhoneNumber[MAX_PHONE_NUMBER_SIZE]; + WCHAR wszPhoneExtension[MAX_PHONE_EXTENSION_SIZE]; + + BYTE bCardTypeId; + WCHAR wszCreditAccountHolderName[MAX_CC_NAME_SIZE]; + WCHAR wszCreditAccountNumber[MAX_CC_NUMBER_SIZE]; + WCHAR wszCreditCCVNumber[MAX_CC_CCV_NUMBER_SIZE]; + FILETIME ftExpirationDate; + + WCHAR wszDebitAccountHolderName[MAX_DD_NAME_SIZE]; + WCHAR wszDebitAccountNumber[MAX_DD_NUMBER_SIZE]; + WCHAR wszDebitBankCode[MAX_DD_BANK_CODE_SIZE]; + WCHAR wszDebitBranchCode[MAX_DD_BRANCH_CODE_SIZE]; + WCHAR wszDebitCheckDigits[MAX_DD_CHECK_DIGITS_SIZE]; +} MP_BILLING_ACCOUNT_INFO, *PMP_BILLING_ACCOUNT_INFO; + +typedef struct _XSHOWMARKETPLACEUI_PARAMS +{ + DWORD dwUserIndex; + XUID UserXuid; + DWORD dwEntryPoint; + ULONGLONG qwOfferID; + DWORD dwOfferType; + DWORD dwContentCategories; + DWORD dwTitleId; + + BYTE bOnlineCountry; + PMP_BILLING_ACCOUNT_INFO pBillingInfo; + PXOVERLAPPED pOverlapped; +} XSHOWMARKETPLACEUI_PARAMS, *PXSHOWMARKETPLACEUI_PARAMS; + +// +// XamShowMarketplaceUI - This is a private SPI that will be called by the Dashboard +// and the public XShowMarketplaceUI to display and +// enumerate content specific to the title specified by the +// dwTitleId parameter. +// +// dwUserIndex - The index of the currently signed in user for which content +// should be displayed +// dwEntryPoint - The starting location of the Marketplace HUD UI (See the +// XSHOWMARKETPLACEUI_ENTRYPOINTS enum) +// qwOfferID - If the entry point is specific to an offer the offering +// ID needs to be provided, otherwise this can be 0. +// dwOfferType - This can be used to filter the content list by offer type. +// dwContentCategories - If the title wishes to display only certain types of +// items (i.e. cars, maps, weapons, etc), they can use +// this category bit filter. +// dwTitleId - The Title Id of the the title that the content should be +// displayed for. +// + +XBOXAPI +DWORD +WINAPI +XamShowMarketplaceUI( + IN DWORD dwUserIndex, + IN DWORD dwEntryPoint, + IN ULONGLONG qwOfferID, + IN DWORD dwOfferType, + IN DWORD dwContentCategories, + IN DWORD dwTitleId + ); + +XBOXAPI +DWORD +WINAPI +XamShowForcedNameChangeUI( + IN DWORD dwUserIndex + ); + +XBOXAPI +DWORD +WINAPI +XamShowSignupCreditCardUI( + IN BYTE bOnlineCountry, + IN OUT PMP_BILLING_ACCOUNT_INFO pCreditCardInfo, + IN BOOL fParentCreditCard, + IN OUT PXOVERLAPPED pOverlapped + ); + +typedef struct _XSHOWDEVICESELECTORUI_PARAMS +{ + DWORD dwUserIndex; + DWORD dwContentType; + DWORD dwContentFlags; + ULARGE_INTEGER uliBytesRequested; + PXCONTENTDEVICEID pDeviceID; + PXOVERLAPPED pOverlapped; +} XSHOWDEVICESELECTORUI_PARAMS, *PXSHOWDEVICESELECTORUI_PARAMS; + +XBOXAPI +DWORD +WINAPI +XamShowDeviceSelectorUI( + IN DWORD dwUserIndex, + IN DWORD dwContentType, + IN DWORD dwContentFlags, + IN ULARGE_INTEGER uliBytesRequested, + OUT PXCONTENTDEVICEID pDeviceID, + IN OUT PXOVERLAPPED pOverlapped + ); + + +//------------------------------------------------------------------------------ +// Updater application APIs +//------------------------------------------------------------------------------ + +#define XSHOWUPDATER_UPDATESOURCE_LIVE 0x00000001 +#define XSHOWUPDATER_UPDATESOURCE_GAMEDISC 0x00000002 +#define XSHOWUPDATER_UPDATESOURCE_STORAGE 0x00000003 +#define XSHOWUPDATER_UPDATESOURCE_CACHE 0x00000004 +#define XSHOWUPDATER_UPDATESOURCEMASK 0x0000000F +#define XSHOWUPDATER_LAUNCHING_DASH 0x00000010 + +typedef struct _XSHOWUPDATERUI_PARAMS +{ + DWORD dwUserIndex; + DWORD dwUpdateFlags; + char szUpdatePath[MAX_PATH]; + XEX_EXECUTION_ID ExecutionId; + char szTitleToLaunchWhenDone[XAM_MAX_LAUNCH_PATH]; + char szTitleToLaunchDDrive[XAM_MAX_LAUNCH_PATH]; +} XSHOWUPDATERUI_PARAMS, *PXSHOWUPDATERUI_PARAMS; + +XBOXAPI +DWORD +WINAPI +XamShowUpdaterUI( + IN DWORD dwUserIndex, + IN DWORD dwUpdateFlags, + IN LPCSTR pszUpdatePath OPTIONAL, + IN CONST XEX_EXECUTION_ID* pExecutionId OPTIONAL, + IN LPCSTR pszTitleToLaunchWhenDone OPTIONAL, + IN LPCSTR pszTitleToLaunchDDrive OPTIONAL + ); + +XBOXAPI +HRESULT +WINAPI +XamUpdateStart( + IN CONST CHAR* pszUpdatePath OPTIONAL, + IN DWORD dwShowUpdaterFlags, + IN CONST XEX_EXECUTION_ID* pExecutionId OPTIONAL, + IN CONST CHAR* pszTitleToLaunchWhenDone OPTIONAL, + IN CONST CHAR* pszTitleToLaunchDDrive OPTIONAL, + OUT PHANDLE phUpdate + ); + +XBOXAPI +HRESULT +WINAPI +XamUpdateGetProgress( + IN HANDLE hUpdate, + OUT PDWORD pdwUpdateStateId OPTIONAL, + OUT PDWORD pdwPercentComplete OPTIONAL, + OUT ULONGLONG* pqwNumerator OPTIONAL, + OUT ULONGLONG* pqwDenominator OPTIONAL + ); + +XBOXAPI +void +WINAPI +XamUpdateGetExtenderInstance( + IN HANDLE hUpdate, + IN CONST CHAR* szSectionName, + OUT HINSTANCE* phInstance + ); + +XBOXAPI +void +WINAPI +XamUpdateFinish( + IN HANDLE hUpdate + ); + +XBOXAPI +HRESULT +WINAPI +XamUpdateAllocateExtenderBuffer( + IN HANDLE hUpdate, + IN DWORD dwExtenderSize, + OUT BYTE** ppbBuffer + ); + +XBOXAPI +HRESULT +WINAPI +XamUpdateAttachExtenderInstance( + IN HANDLE hUpdate, + IN HINSTANCE hInstance + ); + +XBOXAPI +VOID +WINAPI +XamRestartTitleLoadAfterUpdate( + VOID + ); + +XBOXAPI +VOID +WINAPI +XamUIThreadDisableFontPatching( + VOID + ); + +XBOXAPI +VOID +WINAPI +XamUIThreadEnableFontPatching( + VOID + ); + +XBOXAPI +DWORD +WINAPI +XamUpdateGetBaseSystemVersion( + VOID + ); + +XBOXAPI +DWORD +WINAPI +XamUpdateGetCurrentSystemVersion( + VOID + ); + + +//------------------------------------------------------------------------------ +// MessageBox and Live Upsell UI APIs (both are provided by the HUD sysapp) +//------------------------------------------------------------------------------ + +#define MESSAGEBOX_OPTION_MESSAGEBOX 0 +#define MESSAGEBOX_OPTION_LIVEUPSELL 1 + +#define XMB_TITLEMAX 32 +#define XMB_TEXTMAX 256 +#define XMB_BUTTONTEXTMAX 32 + +typedef struct _MESSAGEBOX_PARAMS +{ + DWORD dwOption; + DWORD dwUserIndex; + WCHAR szTitle[XMB_TITLEMAX]; + WCHAR szText[XMB_TEXTMAX]; + DWORD cButtons; + WCHAR rgButtons[XMB_MAXBUTTONS][XMB_BUTTONTEXTMAX]; + DWORD dwFocusButton; + DWORD dwFlags; + PMESSAGEBOX_RESULT pResult; + PXOVERLAPPED pOverlapped; +} MESSAGEBOX_PARAMS, *PMESSAGEBOX_PARAMS; + +XBOXAPI +DWORD +WINAPI +XamShowMessageBoxUI( + IN DWORD dwUserIndex, + IN LPCWSTR pszTitle, + IN LPCWSTR pszText, + IN DWORD cButtons, + IN LPCWSTR* rgButtons, + IN DWORD dwFocusButton, + IN DWORD dwFlags, + OUT PMESSAGEBOX_RESULT pResult, + IN OUT PXOVERLAPPED pOverlapped + ); + +#define MESSAGEBOXEX_ID_PAL50_INCOMPATIBLE 1 + +XBOXAPI +DWORD +WINAPI +XamShowMessageBoxUIEx( + IN DWORD dwUserIndex, + IN LPCWSTR pszTitle, + IN LPCWSTR pszText, + IN DWORD cButtons, + IN LPCWSTR* rgButtons, + IN DWORD dwFocusButton, + IN DWORD dwFlags, + IN DWORD dwMessageID, + OUT PMESSAGEBOX_RESULT pResult, + IN OUT PXOVERLAPPED pOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XamShowLiveUpsellUI( + VOID + ); + + +//------------------------------------------------------------------------------ +// Create Profile UI API +//------------------------------------------------------------------------------ + +#define XCREATEPROFILE_MODE_CREATENEW 0x00 +#define XCREATEPROFILE_MODE_SIGNUP 0x01 +#define XCREATEPROFILE_MODE_RECOVER 0x02 + +typedef struct _XCREATEPROFILEUI_PARAMS +{ + DWORD dwUserIndex; + DWORD dwMode; + XUID xuid; +} XCREATEPROFILEUI_PARAMS, *PXSHOWCREATEPROFILEUI_PARAMS; + +#define XENON_SIGNUP_TITLE_ID 0xFFFE07DE + +XBOXAPI +DWORD +WINAPI +XamShowCreateProfileUI( + IN DWORD dwUserIndex + ); + +XBOXAPI +DWORD +WINAPI +XamShowLiveSignupUI( + IN DWORD dwUserIndex, + IN BOOL fRecoverAccount + ); + + +//------------------------------------------------------------------------------ +// RecentPlayers Cache APIs +//------------------------------------------------------------------------------ + +XBOXAPI +DWORD +WINAPI +XamUserAddRecentPlayer( + IN DWORD dwUserIndex, + IN XUID pUser, + IN DWORD dwFlags, + IN DWORD dwTitleID, + IN DWORD dwRating, + IN LPCSTR szGamertag + ); + + +XBOXAPI +DWORD +WINAPI +XamUserUpdateRecentPlayer( + IN DWORD dwUserIndex, + IN XUID xuidUser, + IN DWORD dwFlags, + IN DWORD dwRating, + IN LPCSTR szGamertag + ); + + +XBOXAPI +DWORD +WINAPI +XamUserCreatePlayerEnumerator( + IN DWORD dwUserIndex, + IN DWORD dwStartingIndex, + IN DWORD cItem, + OUT PDWORD pcbBuffer, + OUT PHANDLE ph + ); + +//------------------------------------------------------------------------------ +// Error code helpers +//------------------------------------------------------------------------------ + +__inline +DWORD +Win32FromHRESULT( + IN HRESULT hr + ) +{ + DWORD dw; + + if (SUCCEEDED(hr)) + { + dw = ERROR_SUCCESS; + } + + else if (FACILITY_WIN32 == HRESULT_FACILITY(hr)) + { + dw = (hr & ~0xFFFF0000); + } + + else + { + dw = ERROR_FUNCTION_FAILED; + } + + return dw; +} + +//------------------------------------------------------------------------------ +// XN_SYS_DISCMEDIACHANGED parameter and support API +//------------------------------------------------------------------------------ + +#define XDISCMEDIATYPE_NONE 0 +#define XDISCMEDIATYPE_GAMEDISC 1 +#define XDISCMEDIATYPE_XBOXGAME 2 +#define XDISCMEDIATYPE_UNKNOWN 3 +#define XDISCMEDIATYPE_DVDA 4 +#define XDISCMEDIATYPE_DVD 5 +#define XDISCMEDIATYPE_VCD 6 +#define XDISCMEDIATYPE_CDAUDIO 7 +#define XDISCMEDIATYPE_CDDATA 8 +#define XDISCMEDIATYPE_GAMEDVDHYBRID 9 + +#define MAX_TITLE_TILE 16384 +#define MAX_TITLE_NAME 23 // Includes null-terminator + +typedef struct _XGAMEINFO +{ + DWORD dwTitleId; + WCHAR wszTitleName[MAX_TITLE_NAME]; +} XGAMEINFO, *PXGAMEINFO; + +HRESULT +WINAPI +XamGetGameInfo( + OUT PXGAMEINFO pGameDiscInfo + ); + +XBOXAPI +VOID +WINAPI +XamGetMediaInfo( + DWORD* pdwMediaType, + DWORD* pdwTitleId + ); + +//------------------------------------------------------------------------------ +// Inactivity settings SPI +//------------------------------------------------------------------------------ + +#define XAMINACTIVITY_SCREENSAVER 0 +#define XAMINACTIVITY_AUTOSHUTOFF 1 +#define XAMINACTIVITY_COUNT 2 + +#define XAMSCREENSAVER_OFFVALUE 4096 +#define XAMSCREENSAVER_ONVALUE 10 + +HRESULT +WINAPI +XamEnableInactivityProcessing( + IN DWORD InactivityIndex, + IN BOOL Enable + ); + +HRESULT +WINAPI +XamSetInactivityTime( + IN DWORD InactivityIndex, + IN DWORD Minutes + ); + +VOID +WINAPI +XamSetInactivityTimeFromConfig( + DWORD InactivityIndex + ); + +VOID +XamResetInactivity( + VOID + ); + +XBOXAPI +BOOL +WINAPI +XamIsSysUiInvokedByXenonButton( + VOID + ); + +XBOXAPI +BOOL +WINAPI +XamIsSysUiInvokedByTitle( + VOID + ); + +XBOXAPI +BOOL +WINAPI +XamIsUIActive( + VOID + ); + +XBOXAPI +VOID +WINAPI +XamSysUiDisableAutoClose( + BOOL fLeaveOpen + ); + +//------------------------------------------------------------------------------ +// Power Management SPI +//------------------------------------------------------------------------------ + +typedef enum _XAMPOWERMODE +{ + XAMPOWERMODE_QUIET = 0, + XAMPOWERMODE_FULL, +} XAMPOWERMODE, *PXAMPOWERMODE; + +XBOXAPI +DWORD +WINAPI +XamSetPowerMode( + IN XAMPOWERMODE PowerMode + ); + +//------------------------------------------------------------------------------ +// Challenge Response SPI +//------------------------------------------------------------------------------ + +XBOXAPI +DWORD +WINAPI +XamExecuteChallenge( + IN PBYTE Image, + IN DWORD ImageSize, + IN PBYTE Arguments, + IN DWORD ArgumentsSize, + IN PBYTE ResultBuffer, + IN DWORD ResultBufferSize + ); + +//----------------------------------------------------------------------------- +// Internal Utility methods that are NOT exported via DLL. +//----------------------------------------------------------------------------- + +NTSTATUS +XamQuerySymbolicLink( + LPCSTR SymbolicLinkName, + LPSTR DeviceNameBuffer, + DWORD DeviceNameBufferSize + ); + + +#ifdef __cplusplus +}; +#endif + + +#pragma warning(pop) + +#endif // __XAMP_H__ diff --git a/xbdm/imp/xboxp.h b/xbdm/imp/xboxp.h new file mode 100644 index 0000000..de93855 --- /dev/null +++ b/xbdm/imp/xboxp.h @@ -0,0 +1,1402 @@ + + +// +// All APIs unique to Xbox that live in XAPILIB.LIB should be +// defined in this header file +// + +#ifndef _XBOXP_ +#define _XBOXP_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "xbox.h" + +#ifdef __cplusplus +} +#endif + +#pragma warning(push) +#pragma warning(disable: 4201) // unnamed struct/union + +#define XBOXAPI + +#ifdef __cplusplus +extern "C" { +#endif + +#define GUEST_SELECTOR_XUID ((XUID) 0xE000000000000000) + +XBOXAPI +FORCEINLINE +BOOL +WINAPI +IsOfflineXUID( + XUID xuid + ) +{ + return (xuid & 0xF000000000000000) == 0xE000000000000000; +} + +XBOXAPI +FORCEINLINE +BOOL +WINAPI +IsOnlineXUID( + XUID xuid + ) +{ + return (xuid & 0xFFFF000000000000) == 0x0009000000000000; +} + +XBOXAPI +FORCEINLINE +BOOL +WINAPI +IsGuestXUID( + XUID xuid + ) +{ + DWORD HighPart; + + HighPart = (DWORD)(xuid >> 48); + + return ((HighPart & 0x000F) == 0x9) && ((HighPart & 0x00C0) > 0); +} + + +#define MAX_DISPLAY_BLOCKS 50001 + +XBOXAPI +DWORD +WINAPI +XGetDisplayBlocks( + IN LPCSTR szPathName + ); + +XBOXAPI +HANDLE +WINAPI +XapipCreateThread( + IN LPSECURITY_ATTRIBUTES lpThreadAttributes OPTIONAL, + IN DWORD dwStackSize OPTIONAL, + IN LPTHREAD_START_ROUTINE lpStartAddress, + IN LPVOID lpParameter OPTIONAL, + IN DWORD dwCreationFlags OPTIONAL, + IN DWORD dwThreadProcessor, + OUT LPDWORD lpThreadId OPTIONAL + ); + +#define XSAVEGAME_NOCOPY 1 + +XBOXAPI +DWORD +WINAPI +XCreateSaveGame( + IN LPCSTR szRootPathName, + IN LPCWSTR wszSaveGameName, + IN DWORD dwCreationDisposition, + IN DWORD dwCreateFlags, + OUT LPSTR szPathBuffer, + IN UINT uSize + ); + +XBOXAPI +DWORD +WINAPI +XDeleteSaveGame( + IN LPCSTR szRootPathName, + IN LPCWSTR wszSaveGameName + ); + +#define MAX_GAMENAME 128 + +typedef struct _XGAME_FIND_DATA { + WIN32_FIND_DATAA wfd; + CHAR szSaveGameDirectory[MAX_PATH]; + WCHAR szSaveGameName[MAX_GAMENAME]; +} XGAME_FIND_DATA, *PXGAME_FIND_DATA; + +XBOXAPI +HANDLE +WINAPI +XFindFirstSaveGame( + IN LPCSTR szRootPathName, + OUT PXGAME_FIND_DATA pFindGameData + ); + +XBOXAPI +BOOL +WINAPI +XFindNextSaveGame( + IN HANDLE hFindGame, + OUT PXGAME_FIND_DATA pFindGameData + ); + +XBOXAPI +BOOL +WINAPI +XFindClose( + IN HANDLE hFind + ); + +#define MAX_NICKNAME 32 + +XBOXAPI +BOOL +WINAPI +XSetNicknameW( + IN LPCWSTR wszNickname, + IN BOOL fPreserveCase + ); +#define XSetNickname XSetNicknameW + +XBOXAPI +HANDLE +WINAPI +XFindFirstNicknameW( + IN BOOL fThisTitleOnly, + OUT LPWSTR wszNickname, + IN UINT uSize + ); +#define XFindFirstNickname XFindFirstNicknameW + +XBOXAPI +BOOL +WINAPI +XFindNextNicknameW( + IN HANDLE hFindNickname, + OUT LPWSTR wszNickname, + IN UINT uSize + ); +#define XFindNextNickname XFindNextNicknameW + +typedef ULONGLONG XOFFERING_ID; + +#define MAX_CONTENT_DISPLAY_NAME 128 + +typedef struct _XCONTENT_FIND_DATA { + WIN32_FIND_DATAA wfd; + XOFFERING_ID qwOfferingId; + DWORD dwFlags; + CHAR szContentDirectory[MAX_PATH]; + WCHAR szDisplayName[MAX_CONTENT_DISPLAY_NAME]; +} XCONTENT_FIND_DATA, *PXCONTENT_FIND_DATA; + +XBOXAPI +HANDLE +WINAPI +XFindFirstContent( + IN LPCSTR szRootPathName, + IN DWORD dwFlagFilter, + OUT PXCONTENT_FIND_DATA pFindContentData + ); + +XBOXAPI +BOOL +WINAPI +XFindNextContent( + IN HANDLE hFindContent, + OUT PXCONTENT_FIND_DATA pFindContentData + ); + +XBOXAPI +BOOL +WINAPI +XGetContentInstallLocation( + IN DWORD dwTitleID, + IN LPCSTR szSourceMetadataFileName, + OUT LPSTR szInstallDirectory + ); + +XBOXAPI +BOOL +WINAPI +XGetContentInstallLocationFromIDs( + IN DWORD dwTitleID, + IN XOFFERING_ID xOfferingID, + OUT LPSTR szInstallDirectory + ); + +XBOXAPI +BOOL +WINAPI +XInstallContentSignatures( + IN DWORD dwTitleID, + IN LPCSTR szSourceMetadataFileName, + IN LPCSTR szDestinationDirectory + ); + +XBOXAPI +BOOL +WINAPI +XCreateContentSimple( + IN DWORD dwTitleID, + IN XOFFERING_ID xOfferingID, + IN DWORD dwContentFlags, + IN LPCWSTR wszContentName, + IN LPCSTR szDestinationDirectory + ); + +XBOXAPI +BOOL +WINAPI +XRemoveContent( + IN LPCSTR szDirectoryName + ); + +XBOXAPI +HANDLE +WINAPI +XLoadContentSignaturesWithFileName( + IN DWORD dwTitleID, + IN LPCSTR szMetadataFileName +); + +XBOXAPI +BOOL +WINAPI +XLocateSignatureByNameEx( + IN HANDLE hSignature, + IN LPCSTR szFileName, + IN DWORD dwFileOffset, + IN OUT LPDWORD pdwDataSize, + OUT LPBYTE* ppbSignatureData, + OUT LPDWORD pdwSignatureSize +); + +XBOXAPI +BOOL +WINAPI +XLocateNextSignature( + IN HANDLE hSignature, + OUT LPSTR* pszFileName, + OUT LPDWORD pdwFileNameLength, + OUT LPDWORD pdwFileOffset, + OUT LPDWORD pdwDataSize, + OUT LPBYTE* ppbSignatureData, + OUT LPDWORD pdwSignatureSize +); + +XBOXAPI +BOOL +WINAPI +XInstallContentSignaturesWithFileName( + IN DWORD dwTitleID, + IN LPCSTR szSourceMetadataFileName, + IN LPCSTR szDestinationName, + IN DWORD dwInstallFlags +); + +XBOXAPI +BOOL +WINAPI +XInstallContentSignaturesEx( + IN DWORD dwTitleID, + IN LPCSTR szSourceMetadataFileName, + IN LPCSTR szInstallDirectory, + IN DWORD dwInstallFlags + ); + +#define XSIG_INSTALL_NO_CHECK_SIGNATURE 0x00000001 +#define XSIG_INSTALL_MARK_AS_INSTALLED 0x00000002 + +#define XCALCSIG_LIVE_SIGNATURE_SIZE 100 + +typedef struct { + DWORD SignatureFlags; + BYTE LiveSignature[XCALCSIG_LIVE_SIGNATURE_SIZE]; +} XCONTSIG_LIVE_SIGNATURE_INFO, *PXCONTSIG_LIVE_SIGNATURE_INFO; + +XBOXAPI +HANDLE +WINAPI +XLoadContentSignaturesEx( + IN DWORD dwTitleID, + IN LPCSTR szDirectoryName + ); + +#define XLoadContentSignatures(lpDirectoryName) \ + XLoadContentSignaturesEx(0, lpDirectoryName) + +XBOXAPI +BOOL +WINAPI +XLocateLiveSignature( + IN HANDLE hSignature, + OUT PXCONTSIG_LIVE_SIGNATURE_INFO pxlsInfo, + OUT PBYTE pbLiveDigest + ); + +XBOXAPI +BOOL +WINAPI +XLocateSignatureByIndex( + IN HANDLE hSignature, + IN DWORD dwSignatureIndex, + OUT LPBYTE* ppbSignatureData, + OUT LPDWORD pdwSignatureSize + ); + +XBOXAPI +BOOL +WINAPI +XLocateSignatureByName( + IN HANDLE hSignature, + IN LPCSTR szFileName, + IN DWORD dwFileOffset, + IN DWORD dwDataSize, + OUT LPBYTE* ppbSignatureData, + OUT LPDWORD pdwSignatureSize + ); + +XBOXAPI +BOOL +WINAPI +XCalculateContentSignature( + IN LPBYTE pbData, + IN DWORD dwDataSize, + OUT LPBYTE pbSignature, + IN OUT LPDWORD pdwSignatureSize + ); + +XBOXAPI +VOID +WINAPI +XCloseContentSignatures( + IN HANDLE hSignature + ); + +XBOXAPI +VOID +WINAPI +XComputeContentSignatureKey( + IN ULONG dwTitleID, + OUT PUCHAR pbSignatureKey + ); +XBOXAPI +DWORD +WINAPI +XGetLocale(); +#define XC_VIDEO_STANDARD_PAL_M 4 + +// +// Index for reserved fields in XVIDEO_MODE +// + +#define XVIDEO_MODE_INDEX_PIXEL_CLOCK 0 + +#define XC_AV_PACK_SDC 0 // Standard-definition component +#define XC_AV_PACK_SCART 1 // SCART (composite and RGB SDTV) +#define XC_AV_PACK_RFU 2 // RF SDTV +#define XC_AV_PACK_HDC 3 // High-definition component +#define XC_AV_PACK_RESERVED 4 // Reserved +#define XC_AV_PACK_CSV 5 // Composite/S-Video +#define XC_AV_PACK_PC 6 // PC (output RGB VGA, hsync/vsync/DDC) +#define XC_AV_PACK_NONE 7 // Indicates no AV pack plugged in +#define XC_AV_PACK_MAX 8 + +XBOXAPI +DWORD +WINAPI +XGetAVPack( + VOID + ); + +XBOXAPI +DWORD +WINAPI +XGetVideoStandard( + VOID + ); +#define XC_VIDEO_FLAGS_LETTERBOX 0x00000010 +#define XC_VIDEO_FLAGS_PAL_60Hz 0x00000040 + +// +// Analog speaker configuration values are a enumeration while digital values +// are a bitmask. 0 is not a valid analog value, but 0 in the digital word +// indicates that no digital encoding or preencoded output is allowed on the +// digital channel. In that case, the digital channel will output the same +// data as the analog. +// + +#define XC_AUDIO_FLAGS_SURROUND 0x00000001 +#define XC_AUDIO_FLAGS_MONO 0x00000002 +#define XC_AUDIO_FLAGS_ENABLE_DOLBYDIGITAL 0x00010000 +#define XC_AUDIO_FLAGS_ENABLE_WMAPRO 0x00020000 + +#define XC_AUDIO_FLAGS_BASICMASK 0x0000FFFF +#define XC_AUDIO_FLAGS_ENCODEDMASK 0xFFFF0000 + +#define XC_AUDIO_FLAGS_BASIC(c) ((DWORD)(c) & XC_AUDIO_FLAGS_BASICMASK) +#define XC_AUDIO_FLAGS_ENCODED(c) ((DWORD)(c) & XC_AUDIO_FLAGS_ENCODEDMASK) +#define XC_AUDIO_FLAGS_COMBINED(b,e) (XC_AUDIO_FLAGS_BASIC(b) | XC_AUDIO_FLAGS_ENCODED(e)) + +#define XC_AUDIO_FLAGS_DEFAULT XC_AUDIO_FLAGS_COMBINED(XC_AUDIO_FLAGS_SURROUND, XC_AUDIO_FLAGS_ENABLE_DOLBYDIGITAL) + +XBOXAPI +DWORD +WINAPI +XGetAudioFlags( + VOID + ); +#define XC_CONSOLE_REGION_NA 0x00 +#define XC_CONSOLE_REGION_ASIA 0x01 +#define XC_CONSOLE_REGION_EUROPE 0x02 +#define XC_CONSOLE_REGION_RESTOFWORLD 0x03 +#define XC_CONSOLE_REGION_DEVKIT 0x7F + +#define XC_GAME_REGION(region, subregion) \ + ((XC_CONSOLE_REGION_##region << 8) | (subregion)) + +#define XC_GAME_REGION_NA_ALL XC_GAME_REGION(NA, 0xFF) +#define XC_GAME_REGION_ASIA_ALL XC_GAME_REGION(ASIA, 0xFF) +#define XC_GAME_REGION_ASIA_JAPAN XC_GAME_REGION(ASIA, 0x01) +#define XC_GAME_REGION_ASIA_CHINA XC_GAME_REGION(ASIA, 0x02) +#define XC_GAME_REGION_ASIA_REST XC_GAME_REGION(ASIA, 0xFC) +#define XC_GAME_REGION_EUROPE_ALL XC_GAME_REGION(EUROPE, 0xFF) +#define XC_GAME_REGION_EUROPE_AUNZ XC_GAME_REGION(EUROPE, 0x01) +#define XC_GAME_REGION_EUROPE_REST XC_GAME_REGION(EUROPE, 0xFE) +#define XC_GAME_REGION_RESTOFWORLD_ALL XC_GAME_REGION(RESTOFWORLD, 0xFF) +#define XC_GAME_REGION_DEVKIT_ALL XC_GAME_REGION(DEVKIT, 0xFF) +#define XC_GAME_REGION_MANUFACTURING 0x8000 + +#define XC_GAME_REGION_REGION(region) \ + (((region) & 0xFF00) >> 8) + +// +// These flags are stored in the retail flags (XCONFIG_USER_RETAIL_FLAGS). +// + +#define XC_MISC_FLAG_AUTOPOWERDOWN 0x00000001 +#define XC_MISC_FLAG_DONT_USE_DST 0x00000002 +#define XC_MISC_FLAG_CONNECTIONNOTICE 0x00000004 +#define XC_MISC_FLAG_24HCLOCK 0x00000008 +#define XC_MISC_FLAG_NO_NOTIFY_DISPLAY 0x00000010 +#define XC_MISC_FLAG_NO_NOTIFY_SOUND 0x00000020 +#define XC_MISC_FLAG_OOBE_HAS_RUN 0x00000040 + +#define XC_MISC_FLAG_ALL_MASK ((XC_MISC_FLAG_AUTOPOWERDOWN) | (XC_MISC_FLAG_DONT_USE_DST) | (XC_MISC_FLAG_CONNECTIONNOTICE) | \ + (XC_MISC_FLAG_24HCLOCK) | (XC_MISC_FLAG_NO_NOTIFY_DISPLAY) | (XC_MISC_FLAG_NO_NOTIFY_SOUND) | \ + (XC_MISC_FLAG_OOBE_HAS_RUN)) + +#define XINPUT_GAMEPAD_XE 0x0400 +#define XINPUT_GAMEPAD_BINDING 0x0800 +#define XINPUT_FLAG_SYSTEMAPP 0x80000000 +#define XINPUT_MAX_RAW_BUFFER (32) + +typedef struct _XINPUT_RAW +{ + BYTE Buffer[XINPUT_MAX_RAW_BUFFER]; + BYTE Length; + DWORD dwPacketNumber; +} XINPUT_RAW, *PXINPUT_RAW; + +// +// The master vibration level is stored as a user profile setting. It may be +// one of the following. These are redundant definitions. The actual profile +// enum values may be found in xonline.h, but this header includes these +// definitions for the driver and other system components. +// + +#define XINPUT_VIBRATION_LEVEL_NONE 0 +#define XINPUT_VIBRATION_LEVEL_LOW 1 +#define XINPUT_VIBRATION_LEVEL_MEDIUM 2 +#define XINPUT_VIBRATION_LEVEL_HIGH 3 +#define XINPUT_VIBRATION_LEVEL_MAX 4 + +// +// Battery level may only be one of the following +// + +#define XINPUT_BATTERY_LEVEL_LITTLE 0 +#define XINPUT_BATTERY_LEVEL_LOW 1 +#define XINPUT_BATTERY_LEVEL_MEDIUM 2 +#define XINPUT_BATTERY_LEVEL_HIGH 3 +#define XINPUT_BATTERY_LEVEL_MAX 4 + +// +// Wireless signal strength may be reported as one of the following values +// + +#define XINPUT_SIGNAL_STRENGTH_VERY_LOW 0 +#define XINPUT_SIGNAL_STRENGTH_LOW 1 +#define XINPUT_SIGNAL_STRENGTH_MEDIUM 2 +#define XINPUT_SIGNAL_STRENGTH_GOOD 3 +#define XINPUT_SIGNAL_STRENGTH_MAX 4 + +typedef struct _XINPUT_DEVICE_STATS { + ULONG ulBatteryLevel; + ULONG ulSignalStrength; + ULONG ulDeviceType; + ULONG ulDevicePort; + ULONG ulDeviceVersion; +} XINPUT_DEVICE_STATS, *PXINPUT_DEVICE_STATS; +XBOXAPI +DWORD +WINAPI +XInputSetStateEx( + IN DWORD dwUserIndex, + IN PXINPUT_VIBRATION pVibration, + IN BYTE bAmplitude OPTIONAL, + IN BYTE bFrequency OPTIONAL, + IN BYTE bOffset OPTIONAL + ); + +XBOXAPI +DWORD +WINAPI +XInputRawState( + IN DWORD dwUserIndex, + IN DWORD dwFlags, + IN BOOL fSetState, + IN PXINPUT_RAW pRawState + ); + +typedef struct _XINPUT_POLLING_PARAMETERS +{ + BYTE fAutoPoll:1; + BYTE fInterruptOut:1; + BYTE ReservedMBZ1:6; + BYTE bInputInterval; + BYTE bOutputInterval; + BYTE ReservedMBZ2; +} XINPUT_POLLING_PARAMETERS, *PXINPUT_POLLING_PARAMETERS; + +typedef struct _XINPUT_DEVICE_DESCRIPTION +{ + WORD wVendorID; + WORD wProductID; + WORD wVersion; +} XINPUT_DEVICE_DESCRIPTION, *PXINPUT_DEVICE_DESCRIPTION; + +XBOXAPI +DWORD +WINAPI +XInputGetDeviceDescription( + IN HANDLE hDevice, + OUT PXINPUT_DEVICE_DESCRIPTION pDescription + ); + +#define XINPUT_LIGHTGUN_CALIBRATION_CENTER_X 0 +#define XINPUT_LIGHTGUN_CALIBRATION_CENTER_Y 0 +#define XINPUT_LIGHTGUN_CALIBRATION_UPPERLEFT_X -25000 +#define XINPUT_LIGHTGUN_CALIBRATION_UPPERLEFT_Y 25000 + +typedef struct _XINPUT_LIGHTGUN_CALIBRATION_OFFSETS +{ + WORD wCenterX; + WORD wCenterY; + WORD wUpperLeftX; + WORD wUpperLeftY; +} XINPUT_LIGHTGUN_CALIBRATION_OFFSETS, *PXINPUT_LIGHTGUN_CALIBRATION_OFFSETS; + +// +// XVoice APIs +// + +typedef PVOID XVOICE_HANDLE, *PXVOICE_HANDLE; +typedef struct XMEDIAPACKET *PXMEDIAPACKET; + +#ifdef __XVOICE_H__ +XBOXAPI +HRESULT +WINAPI +XVoiceCreate( + IN DWORD dwUserIndex, + IN DWORD dwMaxAttachedPackets, + OUT PXVOICE_HANDLE phHandle + ); + +XBOXAPI +HRESULT +WINAPI +XVoiceSubmitPacket( + IN XVOICE_HANDLE hObject, + IN BOOL fInput, + IN OUT PXMEDIAPACKET pPacket + ); + +XBOXAPI +BOOL +WINAPI +XVoiceClose( + IN XVOICE_HANDLE hObject + ); +#endif // __XVOICE_H__ + + +XBOXAPI +DWORD +WINAPI +XCleanDrive( + IN CHAR chDrive + ); + +XBOXAPI +BOOL +WINAPI +XapiRecovery( + IN BOOL QuickFormat + ); + +#define XINIT_LIMIT_DEVKIT_MEMORY 0x00000004 +#define XINIT_NO_SETUP_HARD_DISK 0x00000008 +#define XINIT_DONT_MODIFY_HARD_DISK 0x00000010 + +XBOXAPI +DWORD +WINAPI +XMountUtilityDriveInternal( + IN DWORD dwTitleId, + IN BOOL fFormatClean, + IN DWORD dwBytesPerCluster, + IN SIZE_T dwFileCacheSize + ); + +XBOXAPI +BOOL +WINAPI +XFormatUtilityDrive( + VOID + ); + +XBOXAPI +DWORD +WINAPI +XMountAlternateTitleA( + IN LPCSTR szRootPath, + IN DWORD dwAltTitleId, + OUT PCHAR pchDrive + ); +#define XMountAlternateTitle XMountAlternateTitleA + +XBOXAPI +DWORD +WINAPI +XUnmountAlternateTitleA( + IN CHAR chDrive + ); +#define XUnmountAlternateTitle XUnmountAlternateTitleA + +XBOXAPI +DWORD +WINAPI +XGetDiskSectorSizeA( + IN LPCSTR szRootPathName + ); +#define XGetDiskSectorSize XGetDiskSectorSizeA + +#define XBOX_HD_SECTOR_SIZE 512 +#define XBOX_DVD_SECTOR_SIZE 2048 +#define XBOX_MU_SECTOR_SIZE 4096 + +XBOXAPI +DWORD +WINAPI +XGetDiskClusterSizeA( + IN LPCSTR szRootPathName + ); +#define XGetDiskClusterSize XGetDiskClusterSizeA + + +#ifdef _XBOX_ //only define this if xbox.h was already included. +#include +typedef struct _XDCS_DVD_CODE_INFORMATION +{ + WORD bcdVersion; + DWORD dwCodeLength; +} XDCS_DVD_CODE_INFORMATION, *PXDCS_DVD_CODE_INFORMATION; +#include + +typedef struct _XDCS_ASYNC_DOWNLOAD_REQUEST +{ + DWORD dwDeviceInstance; + PVOID pvBuffer; + ULONG ulOffset; + ULONG ulLength; + ULONG ulBytesRead; + ULONG ulStatus; + HANDLE hCompleteEvent; +} XDCS_ASYNC_DOWNLOAD_REQUEST, *PXDCS_ASYNC_DOWNLOAD_REQUEST; + +DWORD +WINAPI +XDCSGetInformation( + IN DWORD dwPort, + OUT PDWORD pdwDeviceInstance, + OUT PXDCS_DVD_CODE_INFORMATION pDvdCodeInformation + ); + +DWORD +WINAPI +XDCSDownloadCode( + DWORD dwDeviceInstance, + PVOID pvBuffer, + ULONG ulOffset, + ULONG ulLength, + PULONG pulBytesRead + ); + +DWORD +WINAPI +XDCSDownloadCodeAsync( + IN OUT PXDCS_ASYNC_DOWNLOAD_REQUEST pXDCSDownloadRequest + ); +#endif //_XBOX_ + +BOOL +WINAPI +XapiSetLocalTime( + IN CONST SYSTEMTIME* lpLocalTime + ); + +DWORD +WINAPI +XapipQueryTimeZoneInformation( + OUT PTIME_ZONE_INFORMATION TimeZoneInformation, + OUT PBOOL pfUseDST + ); + +DWORD +WINAPI +XapipSetTimeZoneInformation( + IN PTIME_ZONE_INFORMATION TimeZoneInformation + ); + +BOOL +WINAPI +XapipUseDaylightSavingTime(); + +#define MAX_LAUNCH_DATA_SIZE 1020 +#define XLDEMO_RUNMODE_KIOSKMODE 0x01 +#define XLDEMO_RUNMODE_USERSELECTED 0x02 +#define MAX_LAUNCH_CMDLINE_SIZE 256 + + +// +// Structures and enumerations for LaunchData. +// + +#define XDASHLAUNCHDATA_RESERVED_SIZE (MAX_LAUNCH_DATA_SIZE - 12) + +#define XDASHLAUNCHDATA_COMMAND_DEFAULT 0 +#define XDASHLAUNCHDATA_COMMAND_SIGNUP 1 +#define XDASHLAUNCHDATA_COMMAND_NETWORKTROUBLESHOOTER 2 +#define XDASHLAUNCHDATA_COMMAND_ARCADE 3 +#define XDASHLAUNCHDATA_COMMAND_MEMORY 4 +#define XDASHLAUNCHDATA_COMMAND_MUSIC 6 +#define XDASHLAUNCHDATA_COMMAND_DVD 7 +#define XDASHLAUNCHDATA_COMMAND_MCXDOWNLOADER 8 // MCX depends on this value *never* changing +#define XDASHLAUNCHDATA_COMMAND_MEDIANETWORKTROUBLESHOOTER 9 +#define XDASHLAUNCHDATA_COMMAND_ACCOUNTMANAGE_HOME 10 +#define XDASHLAUNCHDATA_COMMAND_ACCOUNTMANAGE_PRIVACY 11 +#define XDASHLAUNCHDATA_COMMAND_ACCOUNTMANAGE_ACCEPTTOU 12 +#define XDASHLAUNCHDATA_COMMAND_ACCOUNTMANAGE_BILLING 13 +#define XDASHLAUNCHDATA_COMMAND_GAMES_DEMOS 14 +#define XDASHLAUNCHDATA_COMMAND_GAMES_TRAILERS 15 +#define XDASHLAUNCHDATA_COMMAND_RETURNFROMENTRYPOINT_MUSIC 16 +#define XDASHLAUNCHDATA_COMMAND_MARKETPLACE_TILES 17 +#define XDASHLAUNCHDATA_COMMAND_SETTINGS 18 +#define XDASHLAUNCHDATA_COMMAND_RETURNFROMENTRYPOINT_GAMES 19 +#define XDASHLAUNCHDATA_COMMAND_FAMILYSETTINGS 20 +#define XDASHLAUNCHDATA_COMMAND_RETURNFROMENTRYPOINT_SYSTEM 21 +#define XDASHLAUNCHDATA_COMMAND_OOBE_WELCOME 22 +#define XDASHLAUNCHDATA_COMMAND_GAMES_ARCADE 23 + +typedef struct _XDASHLAUNCHDATA +{ + DWORD dwVersion; + DWORD dwCommand; + DWORD dwUserIndex; + BYTE Reserved[XDASHLAUNCHDATA_RESERVED_SIZE]; +} XDASHLAUNCHDATA; + + +XBOXAPI +DWORD +WINAPI +XSetLaunchData( + IN PVOID pLaunchData, + IN DWORD dwLaunchDataSize + ); + +XBOXAPI +DWORD +WINAPI +XGetLaunchDataSize( + OUT LPDWORD pdwLaunchDataSize + ); + +XBOXAPI +DWORD +WINAPI +XGetLaunchData( + OUT PVOID pBuffer, + IN DWORD dwBufferSize + ); + +DECLSPEC_NORETURN +XBOXAPI +VOID +WINAPI +XLaunchNewImage( + IN LPCSTR szImagePath, + IN DWORD dwFlags + ); + +// XLaunchNewImage keyword constants. +// Titles depend on these strings staying the same. +#define XLAUNCH_KEYWORD_DETECT_MEDIA "XLNI_DET_MEDIA" + +#define XLAUNCH_FLAG_FROM_MEMORY 0x00000001 +#define XLAUNCH_FLAG_DETECT_MEDIA 0x00000002 +#define XLAUNCH_FLAG_NO_ABSOLUTE_PATHS 0x00000004 +#define XLAUNCH_FLAG_NO_PACKAGES 0x00000008 +#define XLAUNCH_FLAG_UNLOAD_HUD 0x00000010 +#define XLAUNCH_FLAG_BOUND_PATH 0x00000020 +#define XLAUNCH_FLAG_SYSTEM_VERSION 0x00000040 +#define XLAUNCH_FLAG_ASSUME_DVD 0x00000080 +#define XLAUNCH_FLAG_DASH_ARCADE 0x00000100 +#define XLAUNCH_FLAG_HYBRID_FORCE_DVD 0x00000200 +#define XLAUNCH_FLAG_HYBRID_FORCE_GAME 0x00000400 +#define XLAUNCH_FLAG_HYBRID_NO_NOTIFY 0x00000800 + +#define XTRAY_STATE_CLOSED 0 +#define XTRAY_STATE_CLOSING 1 +#define XTRAY_STATE_OPEN 2 +#define XTRAY_STATE_OPENING 3 +#define XTRAY_STATE_READING 4 + +XBOXAPI +DWORD +WINAPI +XGetTrayState( + VOID + ); + +XBOXAPI +HRESULT +WINAPI +XLaunchMedia( + VOID + ); + +XBOXAPI +VOID +WINAPI +XLaunchNewImageEx( + IN LPCSTR szImagePath, + IN LPCSTR szDDrivePath, + IN LPCSTR szCmdLine, + IN DWORD dwFlags + ); + +typedef struct _XSWAPDISC_RESULTS +{ + DWORD dwNewDiscNumber; +} XSWAPDISC_RESULTS, *PXSWAPDISC_RESULTS; + +XBOXAPI +DWORD +WINAPI +XSwapDiscAndLaunchNewImage( + IN LPCWSTR wszDiscName, + IN DWORD dwDiscNumber, + IN LPCSTR szImagePath, + IN DWORD dwFlags, + OUT PXSWAPDISC_RESULTS pResults OPTIONAL, + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + +// +// Register or deregister a notification routine +// which will be called when a thread is created or deleted. +// +// NOTE: The XTHREAD_NOTIFICATION structure must remain +// valid until the thread notification routine is deregistered. +// For example, you can use a global variable for this. +// But you should NOT use a local variable inside a function. +// +DWORD +WINAPI +XGetFilePhysicalSortKey( + IN HANDLE hFile + ); + +VOID +WINAPI +XSetProcessHeap( + IN HANDLE hHeap + ); + +#define XCALCSIG_SIGNATURE_SIZE 20 +typedef union { + BYTE Signature[XCALCSIG_SIGNATURE_SIZE]; + BYTE LiveSignature[XCALCSIG_LIVE_SIGNATURE_SIZE]; +} XCALCSIG_SIGNATURE, *PXCALCSIG_SIGNATURE; + +#define XCALCSIG_FLAG_SAVE_GAME (0x00000000) +#define XCALCSIG_FLAG_NON_ROAMABLE (0x00000001) +#define XCALCSIG_FLAG_CONTENT (0x00000002) +#define XCALCSIG_FLAG_DIGEST (0x00000004) +#define XCALCSIG_FLAG_ONLINE (0x00000008) + +XBOXAPI +HANDLE +WINAPI +XCalculateSignatureBegin( + IN DWORD dwFlags + ); + +XBOXAPI +HANDLE +WINAPI +XCalculateSignatureBeginEx( + IN DWORD dwFlags, + IN DWORD dwAltTitleId + ); + +XBOXAPI +DWORD +WINAPI +XCalculateSignatureUpdate( + IN HANDLE hCalcSig, + IN CONST BYTE* pbData, + IN ULONG cbData + ); + +XBOXAPI +DWORD +WINAPI +XCalculateSignatureEnd( + IN HANDLE hCalcSig, + OUT PXCALCSIG_SIGNATURE pSignature + ); + +XBOXAPI +ULONG +WINAPI +XAutoPowerDownTimeRemaining( + VOID + ); + +typedef VOID (*FLASH_PROGRESS_ROUTINE)(ULONG BytesWritten); + +XBOXAPI +DWORD +WINAPI +XapiFlashKernelImage( + IN PVOID ImageBuffer, + IN SIZE_T ImageSize, + IN BOOL IgnoreVersionChecking, + IN BOOL ForceStockImage, + IN FLASH_PROGRESS_ROUTINE ProgressRoutine OPTIONAL + ); + +XBOXAPI +BOOL +WINAPI +XapiReplaceRootDirectoryFile( + IN HANDLE hVolume, + IN LPCSTR szReplacedFileName, + IN LPCSTR szReplacementFileName, + IN BOOL fCleanupMode + ); +// XOVERLAPPED::InternalLow is a Win32 error code. If the operation is pending +// the value is ERROR_IO_PENDING, else it is the result of the operation. +#define XCONTENTTYPE_NONE 0x00000000 +#define XCONTENTTYPE_PROFILE 0x00010000 +#define XCONTENTTYPE_GAMERPICTURE 0x00020000 +#define XCONTENTTYPE_THEMATICSKIN 0x00030000 +#define XCONTENTTYPE_CACHE 0x00040000 +#define XCONTENTTYPE_STORAGEDOWNLOAD 0x00050000 +#define XCONTENTTYPE_XBOXSAVEDGAME 0x00060000 +#define XCONTENTTYPE_XBOXDOWNLOAD 0x00070000 +#define XCONTENTTYPE_GAMEDEMO 0x00080000 +#define XCONTENTTYPE_VIDEO 0x00090000 +#define XCONTENTTYPE_GAMETITLE 0x000A0000 +#define XCONTENTTYPE_INSTALLER 0x000B0000 +#define XCONTENTTYPE_GAMETRAILER 0x000C0000 +#define XCONTENTTYPE_ARCADE 0x000D0000 + +#define XCONTENTTYPE_PRIVATEMASK 0xFFFF0000 +#define XCONTENTTYPE_PUBLICMASK 0x0000FFFF +#define XCONTENTTYPE_VALID (XCONTENTTYPE_PRIVATEMASK | XCONTENTTYPE_PUBLICMASK) +#define XCONTENTTYPE_ANY XCONTENTTYPE_VALID +#define _XCONTENTFLAG_CREATIONMASK_ 0x0000000F +#define XCONTENTFLAG_DISALLOWSOURCEDEVICESELECTION 0x00000400 + +#define XCONTENTFLAG_EXECUTE 0x04000000 + +// Private enumeration scoping +#define XCONTENTFLAG_OWNER 0x10000000 +#define XCONTENTFLAG_TITLE 0x20000000 +#define XCONTENTFLAG_TYPE 0x40000000 + +#define XCONTENTFLAG_ENUM_SCOPING_MASK (XCONTENTFLAG_ENUM_EXCLUDECOMMON | \ + XCONTENTFLAG_OWNER | \ + XCONTENTFLAG_TITLE | \ + XCONTENTFLAG_TYPE) + + +#define XCONTENTFLAGS_VALID (XCONTENTFLAG_NONE | \ + XCONTENTFLAG_CREATENEW | \ + XCONTENTFLAG_CREATEALWAYS | \ + XCONTENTFLAG_OPENEXISTING | \ + XCONTENTFLAG_OPENALWAYS | \ + XCONTENTFLAG_TRUNCATEEXISTING | \ + XCONTENTFLAG_NOPROFILE_TRANSFER | \ + XCONTENTFLAG_STRONG_SIGNED | \ + XCONTENTFLAG_NODEVICE_TRANSFER | \ + XCONTENTFLAG_MANAGESTORAGE | \ + XCONTENTFLAG_FORCE_SHOW_UI | \ + XCONTENTFLAG_DISALLOWSOURCEDEVICESELECTION | \ + XCONTENTFLAG_ENUM_EXCLUDECOMMON | \ + XCONTENTFLAG_EXECUTE | \ + XCONTENTFLAG_OWNER | \ + XCONTENTFLAG_TITLE | \ + XCONTENTFLAG_TYPE) + + +#ifdef __cplusplus +typedef struct _XCONTENT_DATA_INTERNAL : public XCONTENT_DATA { +#else // __cplusplus +typedef struct _XCONTENT_DATA_INTERNAL { + XCONTENT_DATA; +#endif // !__cplusplus + XUID xuid; + DWORD dwTitleId; +} XCONTENT_DATA_INTERNAL, *PXCONTENT_DATA_INTERNAL; + +#define XCONTENTDEVICETYPE_NONE ((XCONTENTDEVICETYPE)0) +#define XCONTENTDEVICETYPE_SYSTEMMU ((XCONTENTDEVICETYPE)3) +#define XCONTENTDEVICETYPE_USBMASS ((XCONTENTDEVICETYPE)16) + +#define XCONTENTDEVICETYPE_MASK 0xF + +// +// This flag is OR'd into a device type if the device is unformatted +// + +#define XCONTENTDEVICEFLAG_UNFORMATTED ((XCONTENTDEVICETYPE)0x80000000) + +// +// This flag can be supplied to XContentCreateDeviceEnumerator to enumerate +// USB mass storage devices +// + +#define XCONTENTDEVICEFLAG_USBMASS (0x40000000) + +typedef struct _XCREATECONTENTPARAM +{ + DWORD dwUserIndex; + CHAR szRootName[64]; + union + { + XCONTENT_DATA cd; + XCONTENT_DATA_INTERNAL cdi; + }; + DWORD dwContentFlags; + PDWORD pdwDisposition; + PDWORD pdwLicenseMask; + DWORD dwFileCacheSize; + ULARGE_INTEGER uliContentSize; + PXOVERLAPPED pOverlapped; + DWORD cbContentData; +} XCREATECONTENTPARAM, *PXCREATECONTENTPARAM; + + +typedef PVOID HXAMAPP; + +#define XENUMHEADERFLAG_NONE 0x00000000 +#define XENUMHEADERFLAG_FOREGROUND_PRI 0x00000001 + +typedef struct _XENUMERATORHEADER +{ + HXAMAPP hxamapp; + DWORD dwMsgIDEnum; + DWORD dwMsgIDCloseEnum; + DWORD dwUserIndex; + DWORD cItemsRequested; + DWORD dwEnumFlags; +} XENUMERATORHEADER, *PXENUMERATORHEADER; + +DWORD +WINAPI +XContentCreateDeviceEnumerator( + IN DWORD dwContentTypes, + IN DWORD dwFlags, + IN DWORD cItem, + OUT PDWORD pcbBuffer OPTIONAL, + OUT PHANDLE phEnum + ); + +DWORD +WINAPI +XContentFormatDevice( + IN XCONTENTDEVICEID DeviceID, + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ); + +DWORD +WINAPI +XContentRenameDevice( + IN XCONTENTDEVICEID DeviceID, + IN LPCWSTR pwszName, + IN DWORD cchName + ); + + +typedef struct _XENUMERATEPARAM +{ + DWORD dwUserIndex; + DWORD dwFlags; + PVOID pvPrivateEnumStructure; + PVOID pvBuffer; + DWORD cbBuffer; + DWORD cItemsRequested; + PDWORD pcItemsReturned; + PXOVERLAPPED pxoverlapped; +} XENUMERATEPARAM; + +// Enumeration flags +#define ENUMERATEFLAG_NONE 0x00000000 +#define ENUMERATEFLAG_BACK 0x00000001 +#define ENUMERATEFLAG_FOREGROUND 0x00000002 +#define ENUMERATEFLAG_MATCHINGINSTANCE 0x00000004 +#define ENUMERATEFLAG_INCLUDEPARTIALDOWNLOADS 0x00000008 +#define ENUMERATEFLAG_INCLUDECORRUPTCONTENT 0x00000010 + +//----------------------------------------------------------------------------- +// Private Game Instrumentation structures and functions +//----------------------------------------------------------------------------- + +typedef struct +{ + DWORD dwUserIndex; + XUID xuid; + DWORD dwContextId; + DWORD dwContextValue; +} XGI_USERSETCONTEXT_MSG, *PXGI_USERSETCONTEXT_MSG; + +typedef struct +{ + DWORD dwUserIndex; + XUID xuid; + DWORD dwPropertyId; + DWORD cbValue; + CONST VOID* pvValue; +} XGI_USERSETPROPERTY_MSG; + +// General enumererator structure for XGI title and achievement enumerations +typedef struct _XENUMERATOR_XGI +{ + DWORD dwTitleId; + XUID xuid; + DWORD dwUserIndex; + DWORD dwDetailFlags; + DWORD dwCurrentOffset; + BOOL fServer; +} XENUMERATOR_XGI, *PXENUMERATOR_XGI; + +typedef struct _XGI_CREATEENUM_MSG +{ + DWORD dwTitleId; // A title in your family or 0 for the current title + DWORD dwUserIndex; // User index of locally signed-in user whose "things" are enumerated + XUID xuid; // XUID of remote user whose "things" are enumerated + DWORD dwDetailFlags; // Get the descriptions, etc. (used for achievements) + DWORD dwStartingIndex; // Number to start at + PXENUMERATOR_XGI pxenum; +} XGI_CREATEENUM_MSG, *PXGI_CREATEENUM_MSG; + +// Message passed to system app to write an achievement +typedef struct +{ + DWORD dwNumAchievements; // Number of structs in pAchievements + CONST XUSER_ACHIEVEMENT* pAchievements; // Achievement/user tuple to set +} XGI_WRITEACHIEVEMENT_MSG; + +//----------------------------------------------------------------------------- +// Internal functions +//----------------------------------------------------------------------------- + +DWORD XVerifySameFamily(DWORD dwTitleId); + + +// +// Internal only privileges +// + +#define XPRIVILEGE_ADD_FRIEND 255 // on|off +#define XPRIVILEGE_MULTIPLAYER_ENABLED_BY_TIER 253 // on|off +#define XPRIVILEGE_VIDEO_MESSAGING_SEND 250 // on|off +#define XPRIVILEGE_XBOX1_LIVE_ACCESS 242 // on|off + +#define X_PROPERTY_MODIFIER_MASK 0x0F000000 +#define X_PROPERTY_MATCHTYPE_MASK 0x00F00000 +#define X_PROPERTY_RESERVED_MASK 0x000F0000 +// These must match the X_ATTRIBUTE_TYPE_MASK value defines +#define X_PROPERTY_MODIFIER_PARAM 0x02000000 +#define X_PROPERTY_MODIFIER_BUILTIN 0x03000000 +#define X_PROPERTY_MODIFIER_CONSTANT 0x05000000 + +// These must match the X_ATTRIBUTE_DATATYPE_MASK value defines +#define X_PROPERTY_MATCHTYPE_INTEGER 0x00000000 +#define X_PROPERTY_MATCHTYPE_STRING 0x00100000 +#define X_PROPERTY_MATCHTYPE_BLOB 0x00200000 +#define X_PROPERTY_MATCHTYPE_NULL 0x00F00000 + +// Picture keys are in the format of XXXXXXXXXYYYYYYYYZZZZZZZZ +// where +// XXXXXXXX is the title id associated with the picture (in hex) +// YYYYYYYY is the normal picture image id (in hex) +// ZZZZZZZZ is the small picture image id (in hex) +// + +#define XUSER_PICTURE_KEY_LEN ((sizeof(DWORD) * 2) * 3) +// Add room for a terminating null +#define XUSER_PICTURE_KEY_CHARS (XUSER_PICTURE_KEY_LEN + 1) + +// Stats APIs +//----------------------------------------------------------------------------- +// Private stats structures and functions +//----------------------------------------------------------------------------- + +typedef struct _XGI_VIEWRESET_MSG +{ + DWORD dwUserIndex; + DWORD dwViewId; +} XGI_VIEWRESET_MSG, *PXGI_VIEWRESET_MSG; + +typedef struct _XGI_STATSREAD_MSG +{ + DWORD dwTitleId; + DWORD dwNumXuids; + CONST XUID* pXuids; + DWORD dwNumStatsSpecs; + CONST XUSER_STATS_SPEC* pSpecs; + DWORD cbResults; + PXUSER_STATS_READ_RESULTS pResults; +} XGI_STATSREAD_MSG, *PXGI_STATSREAD_MSG; + +typedef struct _XGI_STATSENUM_MSG +{ + DWORD dwTitleId; + DWORD dwRankStart; + DWORD dwNumRows; + DWORD dwNumStatsSpecs; + CONST XUSER_STATS_SPEC* pSpecs; + DWORD cbBuffer; + PHANDLE ph; // Handle to created enumerator +} XGI_STATSENUM_MSG, *PXGI_STATSENUM_MSG; + + +typedef enum _XGI_STATS_ENUMERATOR_TYPE +{ + XGI_STATS_ENUM_BY_XUID, + XGI_STATS_ENUM_BY_RANK, + XGI_STATS_ENUM_BY_RANK_PER_SPEC, + XGI_STATS_ENUM_BY_RATING +} XGI_STATS_ENUMERATOR_TYPE; + +// Data held by each stats enumerator. +typedef struct _XENUMERATOR_STATS +{ + DWORD dwTitleId; + XGI_STATS_ENUMERATOR_TYPE enumType; + ULONGLONG qwPivot; + PDWORD pStaringRanks; + DWORD dwNumStatsSpecs; + PXUSER_STATS_SPEC pSpecs; +} XENUMERATOR_STATS, *PXENUMERATOR_STATS; + +typedef struct _XGI_CREATESTATSENUM_MSG +{ + DWORD dwTitleId; + PXENUMERATOR_STATS pStatsEnum; +} XGI_CREATESTATSENUM_MSG, *PXGI_CREATESTATSENUM_MSG; + +// Signin UI API +#define XSSUI_FLAGS_ADDUSER 0x00010000 +#define XSSUI_FLAGS_COMPLETESIGNIN 0x00020000 +#define XSSUI_FLAGS_SHOWONLYPARENTALLYCONTROLLED 0x00040000 +#define XSSUI_FLAGS_ENABLE_GUEST 0x00080000 +#define XSSUI_FLAGS_DISALLOWRELOAD 0x00100000 +#define XSSUI_FLAGS_VALID (XSSUI_FLAGS_SHOWONLYONLINEENABLED | \ + XSSUI_FLAGS_LOCALSIGNINONLY | \ + XSSUI_FLAGS_ADDUSER | \ + XSSUI_FLAGS_COMPLETESIGNIN | \ + XSSUI_FLAGS_SHOWONLYPARENTALLYCONTROLLED | \ + XSSUI_FLAGS_ENABLE_GUEST | \ + XSSUI_FLAGS_DISALLOWRELOAD) + + +XBOXAPI +DWORD +WINAPI +XShowSigninUIp( + IN DWORD dwUserIndex, + IN DWORD cPanes, + IN DWORD dwFlags + ); + + +typedef enum _XSHOWMARKETPLACEUI_PRIVATE_ENTRYPOINTS { + XSHOWMARKETPLACEUI_PRIVATE_ENTRYPOINT_ADDPOINTS = XSHOWMARKETPLACEUI_ENTRYPOINT_MAX, + XSHOWMARKETPLACEUI_PRIVATE_ENTRYPOINT_PREPAIDCODE, + XSHOWMARKETPLACEUI_PRIVATE_ENTRYPOINT_FNC, + XSHOWMARKETPLACEUI_PRIVATE_ENTRYPOINT_GAMERTAGPURCHASE, + XSHOWMARKETPLACEUI_PRIVATE_ENTRYPOINT_SIGNUP_CREDITCARD, + XSHOWMARKETPLACEUI_PRIVATE_ENTRYPOINT_SIGNUP_PARENTCREDITCARD, + XSHOWMARKETPLACEUI_PRIVATE_ENTRYPOINT_FILTERED_CONTENTLIST, + XSHOWMARKETPLACEUI_PRIVATE_ENTRYPOINT_MAX +} XSHOWMARKETPLACEUI_PRIVATE_ENTRYPOINTS; + +#define XMB_ICONMASK 0x00000003 +#define XMB_WAITANIMATION 0x00001000 +#define XMB_LIVEPASSCODEMODE 0x00030000 +#define XMB_MODEMASK 0x00030000 + +#define MAXACTIONTEXTLENGTH 30 +#define MAXACTIONS 3 + +XBOXAPI +VOID +WINAPI +XCustomGetActionSetting( + IN DWORD dwActionIndex, + OUT DWORD* pdwFlags, + OUT LPWSTR szActionText, + IN DWORD cchMaxText + ); + +XBOXAPI +VOID +WINAPI +XCustomBroadcastActionEvent( + IN DWORD dwUserIndex, + IN DWORD dwActionIndex, + IN XUID xuid + ); + +#ifndef HXUIBRUSH +typedef struct _XUIBRUSH* HXUIBRUSH; +#endif + +HRESULT +WINAPI +XCustomGetBannerImage( + OUT HXUIBRUSH* phBrush + ); + +#ifdef __cplusplus +} +#endif + +#pragma warning(pop) + +#endif // _XBOXP_ + diff --git a/xbdm/imp/xcabinet.h b/xbdm/imp/xcabinet.h new file mode 100644 index 0000000..1148587 --- /dev/null +++ b/xbdm/imp/xcabinet.h @@ -0,0 +1,362 @@ +// --------------------------------------------------------------------------------------- +// xcabinet.h +// +// Copyright (C) Microsoft Corporation +// --------------------------------------------------------------------------------------- + +#ifndef __XCABINET_H__ +#define __XCABINET_H__ + +// --------------------------------------------------------------------------------------- +// Includes +// --------------------------------------------------------------------------------------- + +#ifdef __cplusplus +extern "C" { +#endif + +#include "xecrypt.h" +#include "cabinet.h" + +#ifdef __cplusplus +} +#endif + +#pragma pack(push, 1) + + +// --------------------------------------------------------------------------------------- + +// +// Define the real RC4 SHA1 structures and functions +// +#define RC4_CONFOUNDER_LEN 8 + +typedef struct _RC4_SHA_HEADER { + BYTE Checksum[XECRYPT_SHA_DIGEST_SIZE]; + BYTE Confounder[RC4_CONFOUNDER_LEN]; +} RC4_SHA_HEADER, *PRC4_SHA_HEADER; + +// +// Define a structure that describes an extended CFFOLDER entry +// that also has an associated HMAC (per-folder reserved data) +// +typedef struct +{ + CFFOLDER cffolder; // CFFOLDER + RC4_SHA_HEADER hmac; // RC4 SHA1 Hmac + +} CFFOLDER_HMAC, *PCFFOLDER_HMAC; + +// +// Define a union of all known CAB flags +// +#define cfhdrFLAGS_ALL (cfhdrPREV_CABINET | \ + cfhdrNEXT_CABINET | \ + cfhdrRESERVE_PRESENT) + +// +// Define our header cache structure +// +typedef struct +{ + CFHEADER cfheader; // Cabinet file header + CFRESERVE cfreserve; // Reserved data specification + + RC4_SHA_HEADER digestFolders; // CFFOLDERS digest + RC4_SHA_HEADER digestFiles; // CFFILES digest + +} XONLINECONTENT_HEADER, *PXONLINECONTENT_HEADER; + +// +// Define sizes related to the fixed header +// +#define XONLINECONTENT_FIXED_HEADER_SIZE \ + (sizeof(XONLINECONTENT_HEADER)) + +#define XONLINECONTENT_FIXED_HEADER_SIZE_WITH_HMAC \ + (XONLINECONTENT_FIXED_HEADER_SIZE + \ + sizeof(RC4_SHA_HEADER)) + +#define XONLINECONTENT_FIXED_HEADER_SIZE_WITH_HMAC_AND_CHECKPOINT \ + (XONLINECONTENT_FIXED_HEADER_SIZE + \ + sizeof(RC4_SHA_HEADER) + sizeof(DWORD)) + +#define XONLINECONTENT_COMPLETE_HEADER_SIZE \ + (XONLINECONTENT_FIXED_HEADER_SIZE_WITH_HMAC_AND_CHECKPOINT + \ + XONLINECONTENT_PK_SIGNATURE_SIZE) + +#define XONLINECONTENT_CHECKPOINT \ + (XONLINECONTENT_FIXED_HEADER_SIZE + \ + sizeof(RC4_SHA_HEADER)) + +// +// Define the maximum number of CFFOLDER entries allowed in a content package. +// +#define XONLINECONTENT_MAX_CFFOLDER ((DWORD)100) + +// +// Define a threshold size for the minimum folder size to justify the +// additional folder overhead. +// +#define XONLINECONTENT_MIN_FOLDER_SIZE ((DWORD)(5 * 1024)) // 5KB + +// +// Define the "attribute" flag to indicate that the current folder is a +// continuation from the same file in the previous folder. +// +#define XONLINECONTENT_FOLDER_CONTINUATION ((WORD)0x8000) + +// +// Define the minimum size for a CFFILE entry (+ 2 == one character name + NULL +// terminator). +// +#define XONLINECONTENT_MIN_CFFILE_SIZE ((DWORD)(sizeof(CFFILE) + 2)) + +// +// Define the maximum number of CFFILE entries allowed in a content package. +// +#define XONLINECONTENT_MAX_CFFILE ((DWORD)1000000) +C_ASSERT(XONLINECONTENT_MAX_CFFILE <= (0xFFFFFFFF / XONLINECONTENT_MIN_CFFILE_SIZE)); + +// +// Define the size of a PK signature. +// +#define XONLINECONTENT_PK_SIGNATURE_SIZE 256 + +#ifndef BSAFE_PUB_KEY + +// +// BUGBUG: +// +// BSAFE_PUB_KEY not defined in XeCrypt yet, so we define it here +// +typedef struct { + DWORD magic; /* Should always be RSA1 */ + DWORD keylen; // size of modulus buffer + DWORD bitlen; // # of bits in modulus + DWORD datalen; // max number of bytes to be encoded + DWORD pubexp; //public exponent +} BSAFE_PUB_KEY, FAR *LPBSAFE_PUB_KEY; + +#endif + +// +// Define the max size of a public key +// +#define XONLINECONTENT_MAX_PUBLIC_KEY_SIZE \ + (XONLINECONTENT_PK_SIGNATURE_SIZE + \ + sizeof(BSAFE_PUB_KEY) + \ + (sizeof(DWORD) * 4)) + + +// +// Define the various reserve values +// +#define XONLINECONTENT_HEADER_RESERVE_SIZE \ + ((sizeof(RC4_SHA_HEADER) * 3) + sizeof(DWORD) + \ + XONLINECONTENT_PK_SIGNATURE_SIZE) + +#define XONLINECONTENT_PERFOLDER_RESERVE_SIZE \ + (sizeof(RC4_SHA_HEADER)) + +// +// Define the smallest possible size for a content package +// +#define XONLINECONTENT_MIN_CONTENT_SIZE \ + (sizeof(CFHEADER) + sizeof(CFRESERVE) + \ + XONLINECONTENT_HEADER_RESERVE_SIZE) + +// +// Define a confounder for the version stamp +// +#define XONLINECONTENT_CHECKPOINT_CONFOUNDER ((DWORD)0x5aef320b) + +// +// Define the prefix for files with special installation meaning +// +#define XINSTALLER_SPECIAL_NAME_PREFIX "$install_" + +// +// Define the fixed name of the package within the CAB +// +#define XINSTALLER_PACKAGE_FILE_NAME "$package" + +// +// Define the installation extender prefix and suffix +// +#define XINSTALLER_EXTENDER_FILE_NAME_PREFIX XINSTALLER_SPECIAL_NAME_PREFIX +#define XINSTALLER_EXTENDER_FILE_NAME_SUFFIX ".xex" + +// +// We deal with clusters a lot, so define the size of a cluster +// +#define XBOX_CLUSTER_SIZE (1 << 14) + + +// --------------------------------------------------------------------------------------- + +typedef enum _XONLINECONTENT_RESUME_STATE +{ + XONLINECONTENT_RESUME_STATE_FILE_HEADERS_NOT_READY = 'FILH', + XONLINECONTENT_RESUME_STATE_NEW_FOLDER = 'FOLD', + XONLINECONTENT_RESUME_STATE_NEW_FOLDER_RESUME_ATTEMPT_2 = 'FOL2', + XONLINECONTENT_RESUME_STATE_NEW_FOLDER_RESUME_ATTEMPT_3 = 'FOL3', +} XONLINECONTENT_RESUME_STATE; + +typedef struct _XONLINECONTENT_RESUME_HEADER { + + // + // Resume state identifier. + // + XONLINECONTENT_RESUME_STATE ResumeState; + + // + // Index of current file being downloaded/processed. + // + DWORD dwCurrentFileIndex; + + // + // Offset into current file being downloaded/processed. + // + LARGE_INTEGER liCurrentFileOffset; + + // + // Number of bytes successfully downloaded/processed. + // + LARGE_INTEGER liBytesProcessed; + + // + // Last-modified timestamp for resuming download/processing. + // + LARGE_INTEGER liLastModified; +} XONLINECONTENT_RESUME_HEADER; + +#define XONLINECONTENT_MAX_SINGLE_FILE_RESUME_DATA_SIZE \ + (XONLINECONTENT_COMPLETE_HEADER_SIZE + \ + (XONLINECONTENT_MAX_CFFOLDER * sizeof(CFFOLDER_HMAC)) + \ + (XONLINECONTENT_MAX_CFFOLDER * sizeof(CFFILE))) + + + +// --------------------------------------------------------------------------------------- + + +// +// Content delivery +// + +// +// The CFFILE structure has a WORD field for the file time which +// we will hijack for our special flags. Xbox content will use thie +// field to indicate special options instead of the file time. +// The following bits are defined for the time field, and honored +// by the content installation API. +// + +// This flag indicates that the file should be copied to the +// user partition rather than the title area +#define XONLINECONTENT_A_USER_DATA (0x0001) + +// This flag indicates that this file is a continuation of +// a file in the previous folder. The data in this file should +// be appended to the previous file. This file must be the first +// file in the folder. +#define XONLINECONTENT_A_CONTINUED_FROM_PREV (0x0002) + +// This flag indicates that this file will be continued into the +// next folder. The data in the next folder should be appended to +// this file. This file must be the last file in the folder. +#define XONLINECONTENT_A_CONTINUED_INTO_NEXT (0x0004) + +// +// Define the size of the download buffer. This cannot be +// less than XONLINECONTENT_LZX_OUTPUT_SIZE +// +#define XONLINECONTENT_DL_BUFFER_SIZE (1024 * 64) + +// +// Define the LZX decoder history window size, this should be no +// less than 32k (ROM decompressor uses 128k) +// +#define XONLINECONTENT_LZX_WINDOW_SIZE CHUNK_SIZE + +// +// Define the output buffer for decompress. This must not be +// less than 32k +//#define XONLINECONTENT_LZX_OUTPUT_SIZE \ +// ((CHUNK_SIZE) + XBOX_HD_SECTOR_SIZE) +#define XONLINECONTENT_LZX_OUTPUT_SIZE \ + (CHUNK_SIZE) + + + +// +// TODO: From \public\i386\sdk\inc\fdi.h. Need byte reversal? +// + +/*** tcompXXX - Diamond compression types + * + * These are passed to FCIAddFile(), and are also stored in the CFFOLDER + * structures in cabinet files. + * + * NOTE: We reserve bits for the TYPE, QUANTUM_LEVEL, and QUANTUM_MEM + * to provide room for future expansion. Since this value is stored + * in the CFDATA records in the cabinet file, we don't want to + * have to change the format for existing compression configurations + * if we add new ones in the future. This will allows us to read + * old cabinet files in the future. + */ + +typedef unsigned short TCOMP; /* tcomp */ + +#define tcompMASK_TYPE 0x000F // Mask for compression type +#define tcompTYPE_NONE 0x0000 // No compression +#define tcompTYPE_MSZIP 0x0001 // MSZIP +#define tcompTYPE_QUANTUM 0x0002 // Quantum +#define tcompTYPE_LZX 0x0003 // LZX +#define tcompBAD 0x000F // Unspecified compression type + +#define tcompMASK_LZX_WINDOW 0x1F00 // Mask for LZX Compression Memory +#define tcompLZX_WINDOW_LO 0x0F00 // Lowest LZX Memory (15) +#define tcompLZX_WINDOW_HI 0x1500 // Highest LZX Memory (21) +#define tcompSHIFT_LZX_WINDOW 8 // Amount to shift over to get int + +#define tcompMASK_QUANTUM_LEVEL 0x00F0 // Mask for Quantum Compression Level +#define tcompQUANTUM_LEVEL_LO 0x0010 // Lowest Quantum Level (1) +#define tcompQUANTUM_LEVEL_HI 0x0070 // Highest Quantum Level (7) +#define tcompSHIFT_QUANTUM_LEVEL 4 // Amount to shift over to get int + +#define tcompMASK_QUANTUM_MEM 0x1F00 // Mask for Quantum Compression Memory +#define tcompQUANTUM_MEM_LO 0x0A00 // Lowest Quantum Memory (10) +#define tcompQUANTUM_MEM_HI 0x1500 // Highest Quantum Memory (21) +#define tcompSHIFT_QUANTUM_MEM 8 // Amount to shift over to get int + +#define tcompMASK_RESERVED 0xE000 // Reserved bits (high 3 bits) + +#define CompressionTypeFromTCOMP(tc) \ + ((tc) & tcompMASK_TYPE) + +#define CompressionLevelFromTCOMP(tc) \ + (((tc) & tcompMASK_QUANTUM_LEVEL) >> tcompSHIFT_QUANTUM_LEVEL) + +#define CompressionMemoryFromTCOMP(tc) \ + (((tc) & tcompMASK_QUANTUM_MEM) >> tcompSHIFT_QUANTUM_MEM) + +#define TCOMPfromTypeLevelMemory(t,l,m) \ + (((m) << tcompSHIFT_QUANTUM_MEM ) | \ + ((l) << tcompSHIFT_QUANTUM_LEVEL) | \ + ( t )) + +#define LZXCompressionWindowFromTCOMP(tc) \ + (((tc) & tcompMASK_LZX_WINDOW) >> tcompSHIFT_LZX_WINDOW) + +#define TCOMPfromLZXWindow(w) \ + (((w) << tcompSHIFT_LZX_WINDOW ) | \ + ( tcompTYPE_LZX )) + + +#pragma pack(pop) + +#endif // ! defined __XCABINET_H__ + diff --git a/xbdm/imp/xdbg.h b/xbdm/imp/xdbg.h new file mode 100644 index 0000000..e1a7c6b --- /dev/null +++ b/xbdm/imp/xdbg.h @@ -0,0 +1,266 @@ +/*++ + +Copyright (c) 1989-2000 Microsoft Corporation + +Module Name: + + xdbg.h + +Abstract: + + Internal debug header for XBox OS and library components + +--*/ + + +#ifndef _XDBG_H +#define _XDBG_H + +#ifdef _DEBUG +#define DBG 1 +#endif + +#ifndef ASSERT +#if DBG + #define ASSERT( exp ) \ + if (!(exp)) \ + RtlAssert( #exp, __FILE__, __LINE__, NULL ) +#else // DBG + #define ASSERT( exp ) +#endif // DBG +#endif // ! ASSERT + +#ifndef ASSERTMSG +#if DBG + #define ASSERTMSG( msg, exp ) \ + if (!(exp)) \ + RtlAssert( #exp, __FILE__, __LINE__, msg ) +#else // DBG + #define ASSERTMSG( msg, exp ) +#endif // DBG +#endif // ! ASSERTMSG + +#if 0 +#ifndef RIP +#if DBG + #define RIP(msg) \ + do{ LPCSTR _ = (msg); \ + _asm { mov eax, BREAKPOINT_RIP } \ + _asm { mov ecx, _ } \ + _asm { int 2dh } \ + _asm { int 3 } \ + } while(0) + +#else // DBG + #define RIP(msg) {} +#endif // DBG +#endif // ! RIP + +#ifndef RIP_ON_NOT_TRUE +#if DBG + #define RIP_ON_NOT_TRUE(ApiName, Expression) \ + do{ \ + if(!(Expression)) \ + { \ + UCHAR _[512]; \ + _snprintf(_, sizeof(_), "%s: parameter check failed. (%s) was not true.\n", ApiName, #Expression);\ + _[511]='\0'; \ + _asm { mov eax, BREAKPOINT_RIP } \ + _asm { mov ecx, _ } \ + _asm { int 2dh } \ + _asm { int 3 } \ + } \ + }while(0) +#else // DBG +#define RIP_ON_NOT_TRUE(ApiName, Expression) +#endif // DBG +#endif // !RIP_ON_NOT_TRUE + +#ifndef RIP_ON_NOT_TRUE_WITH_MESSAGE +#if DBG + #define RIP_ON_NOT_TRUE_WITH_MESSAGE(Expression, Message) \ + do{ \ + if(!(Expression)) \ + { \ + RIP(Message); \ + } \ + }while(0) +#else // DBG + #define RIP_ON_NOT_TRUE_WITH_MESSAGE(Expression, Message) +#endif // DBG +#endif // !RIP_ON_NOT_TRUE_WITH_MESSAGE +#endif // 0 + +#define XDBG_ERROR 1 +#define XDBG_WARNING 2 +#define XDBG_TRACE 3 +#define XDBG_ENTRY 4 +#define XDBG_EXIT 5 + +#ifndef XDBG_COMPILE_LEVEL +#define XDBG_COMPILE_LEVEL XDBG_WARNING +#endif // ! XDBG_COMPILE_LEVEL + +#ifndef XDBGPRINT +#if DBG +#define XDBGPRINT RtlDebugPrint +#else // DBG +#define XDBGPRINT 1 ? (void)0 : (void) +#endif // DBG +#endif // ! XDBGPRINT + +#ifndef XDBGERR +#if DBG && (XDBG_COMPILE_LEVEL >= XDBG_ERROR) +#define XDBGERR RtlDebugError +#else // DBG +#define XDBGERR 1 ? (void)0 : (void) +#endif // DBG +#endif // ! XDBGERR + +#ifndef XDBGWRN +#if DBG && (XDBG_COMPILE_LEVEL >= XDBG_WARNING) +#define XDBGWRN RtlDebugWarning +#else // DBG +#define XDBGWRN 1 ? (void)0 : (void) +#endif // DBG +#endif // ! XDBGWRN + +#ifndef XDBGTRC +#if DBG && (XDBG_COMPILE_LEVEL >= XDBG_TRACE) +#define XDBGTRC RtlDebugTrace +#else // DBG +#define XDBGTRC 1 ? (void)0 : (void) +#endif // DBG +#endif // ! XDBGTRC + +#ifndef XDBGENT +#if DBG && (XDBG_COMPILE_LEVEL >= XDBG_ENTRY) +#define XDBGENT RtlDebugEntry +#else // DBG +#define XDBGENT 1 ? (void)0 : (void) +#endif // DBG +#endif // ! XDBGENT + +#ifndef XDBGEXT +#if DBG && (XDBG_COMPILE_LEVEL >= XDBG_EXIT) +#define XDBGEXT RtlDebugExit +#else // DBG +#define XDBGEXT 1 ? (void)0 : (void) +#endif // DBG +#endif // ! XDBGEXT + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef _NTSYSTEM_ +#define XKERNELAPI +#else // _NTSYSTEM_ +#define XKERNELAPI DECLSPEC_IMPORT +#endif // _NTSYSTEM_ + +#if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) +#define XDBGAPI __stdcall +#define XDBGAPIV __cdecl +#else +#define XDBGAPI +#define XDBGAPIV +#endif + +XKERNELAPI +VOID +XDBGAPI +RtlAssert( + LPCSTR FailedAssertion, + LPCSTR FileName, + ULONG LineNumber, + PCHAR Message + ); + +ULONG +_cdecl +DbgPrint( + PCH Format, + ... + ); + +VOID +RtlDebugError(const CHAR* Module, + const CHAR* Format, + ... + ); + +VOID +_cdecl +RtlDebugWarning(const CHAR* Module, + const CHAR* Format, + ... + ); + +VOID +_cdecl +RtlDebugTrace(const CHAR* Module, + const CHAR* Format, + ... + ); + + +VOID +_cdecl +RtlDebugEntry(const CHAR* Module, + const CHAR* Format, + ... + ); + + +VOID +_cdecl +RtlDebugExit(const CHAR* Module, + const CHAR* Format, + ... + ); + + +VOID +_cdecl +RtlDebugPrint(ULONG Level, + const CHAR* Module, + const CHAR* Format, + ... + ); + +int +_cdecl +RtlSprintf( CHAR *Buffer, + const CHAR *Format, + ... + ); +int +_cdecl +RtlSnprintf(CHAR *Buffer, + int SizeInBytes, + const CHAR *Format, + ... + ); + +int +_cdecl +RtlVsnprintf(CHAR *Buffer, + int SizeInBytes, + const CHAR *Format, + va_list va + ); + +int +_cdecl +RtlVsprintf(CHAR *Buffer, + const CHAR *Format, + va_list va + ); + + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _XDBG_H diff --git a/xbdm/imp/xex.h b/xbdm/imp/xex.h new file mode 100644 index 0000000..ad651af --- /dev/null +++ b/xbdm/imp/xex.h @@ -0,0 +1,704 @@ +/*++ + +Copyright (c) 2000-2005 Microsoft Corporation + +Module Name: + + xex.h + +Abstract: + + This module contains the structures that describe the Xenon Executable (XEX) + format. + +--*/ + +#ifndef _XEX_H_ +#define _XEX_H_ + +#include "xexhv.h" + +#pragma warning(push) +#pragma warning(disable:4201) + +#define MAX_XEX_HEADERS_SIZE (64 * 1024) + +typedef struct _XEX_SECURITY_INFO { + // + // The size of this header. + // + ULONG Size; + + // + // Specifies the total size of the image as loaded in memory (not + // including headers). + // + ULONG ImageSize; + + // + // The root of trust for this image. + // + HV_IMAGE_INFO ImageInfo; + + // + // Specifies the allowed media sources for this image. + // + ULONG AllowedMediaTypes; + + // + // The number of page ranges. + // + ULONG PageDescriptorCount; + + // + // The individual page descriptors follow this structure. + // +} XEX_SECURITY_INFO, *PXEX_SECURITY_INFO; + +// +// All valid media types from which images may be loaded. +// N.B. Any media that may be inserted through the optical disc drive should be +// added to XEX_MEDIA_TYPE_DISC_MEDIA_MASK +// + +#define XEX_MEDIA_TYPE_HARD_DISK 0x00000001 +#define XEX_MEDIA_TYPE_DVD_X2 0x00000002 +#define XEX_MEDIA_TYPE_DVD_CD 0x00000004 +#define XEX_MEDIA_TYPE_DVD_5_RO 0x00000008 +#define XEX_MEDIA_TYPE_DVD_9_RO 0x00000010 +#define XEX_MEDIA_TYPE_FLASH 0x00000020 +#define XEX_MEDIA_TYPE_MEMORY_UNIT 0x00000080 +#define XEX_MEDIA_TYPE_MASS_STORAGE 0x00000100 +#define XEX_MEDIA_TYPE_NETWORK_FILESYSTEM 0x00000200 +#define XEX_MEDIA_TYPE_UNKNOWN_SOURCE 0x00000400 +#define XEX_MEDIA_TYPE_PACKAGE_MASK 0xFF000000 +#define XEX_MEDIA_TYPE_PACKAGE(PackageType) \ + (1 << ((PackageType) + 24)) + +#define XEX_PACKAGE_TYPE_UNKNOWN 0x00 +#define XEX_PACKAGE_TYPE_ANY_CONSOLE 0x01 +#define XEX_PACKAGE_TYPE_THIS_CONSOLE 0x02 +#define XEX_PACKAGE_TYPE_XBOX_LIVE 0x03 +#define XEX_PACKAGE_TYPE_XBOX_PLATFORM 0x04 +#define XEX_NUMBER_OF_PACKAGE_TYPES 0x05 + +#define XEX_MEDIA_TYPE_DISC_MEDIA_MASK \ + (XEX_MEDIA_TYPE_DVD_X2 | \ + XEX_MEDIA_TYPE_DVD_CD | \ + XEX_MEDIA_TYPE_DVD_5_RO | \ + XEX_MEDIA_TYPE_DVD_9_RO) + +// +// Everything in the header is stored in big-endian format. +// + +typedef struct _IMAGE_XEX_HEADER { + + // + // Contains XEX_HEADER_MAGIC. + // + ULONG Magic; + + // + // Flags describing the load policy of this object to the loader. + // + ULONG ModuleFlags; + + // + // Specifies the total size of header information, including this + // header. + // + ULONG SizeOfHeaders; + + // + // Specifies the size of header information that can be discarded + // after the load is complete. + // + ULONG SizeOfDiscardableHeaders; + + // + // A pointer to the security information for this module (in the file, + // this a RVA). + // + PXEX_SECURITY_INFO SecurityInfo; + + // + // Specifies the number of entries in the header field directory. + // + ULONG HeaderDirectoryEntryCount; +} IMAGE_XEX_HEADER, *PIMAGE_XEX_HEADER; + +#define XEX_HEADER_MAGIC 'XEX2' + +// +// The type of this object. This is a union of policy bits that describe +// the way the loader will treat this module: +// +#define XEX_MODULE_FLAG_TITLE_PROCESS 0x0001 +#define XEX_MODULE_FLAG_TITLE_IMPORTS 0x0002 +#define XEX_MODULE_FLAG_DEBUGGER 0x0004 +#define XEX_MODULE_FLAG_DLL 0x0008 +#define XEX_MODULE_FLAG_PATCH 0x0010 +#define XEX_MODULE_FLAG_PATCH_FULL 0x0020 +#define XEX_MODULE_FLAG_PATCH_DELTA 0x0040 +#define XEX_MODULE_TYPE_TITLE \ + (XEX_MODULE_FLAG_TITLE_PROCESS) +#define XEX_MODULE_TYPE_TITLE_DLL \ + (XEX_MODULE_FLAG_TITLE_PROCESS | XEX_MODULE_FLAG_DLL) +#define XEX_MODULE_TYPE_SYSTEM_APP \ + (XEX_MODULE_FLAG_DLL) +#define XEX_MODULE_TYPE_SYSTEM_DLL \ + (XEX_MODULE_FLAG_DLL | XEX_MODULE_FLAG_TITLE_IMPORTS) + +#define XEX_MODULE_FLAG_BOUND_PATH 0x40000000 +#define XEX_MODULE_FLAG_SILENT_LOAD 0x80000000 + +// +// After the header structure is a list of header directory entries. Each +// entry is an ordered pair of (key, value). The keys correspond to the types +// of header data that can be present. The upper 24 bits of the key number +// describe the type of data described (exe name, title ID, loader policy, +// whatever), and the lower 8 bits describe the size of the data in DWORDs. If +// the size is 0, there is no data; if the size is 1, the value in the header +// is the value of the data; if the size is more than 1, the value in the +// header is the file offset to the location of the data. The size 255 has a +// special meaning, indicating that the referenced data describes its own size +// in its first DWORD. +// + +typedef struct _IMAGE_XEX_DIRECTORY_ENTRY { + ULONG Key; + ULONG Value; +} IMAGE_XEX_DIRECTORY_ENTRY, *PIMAGE_XEX_DIRECTORY_ENTRY; + +#define XEX_HEADER_STRUCT(key, struct) \ + (((key) << 8) | (sizeof (struct) >> 2)) +#define XEX_HEADER_FIXED_SIZE(key, size) \ + (((key) << 8) | ((size) >> 2)) +#define XEX_HEADER_ULONG(key) \ + (((key) << 8) | 1) +#define XEX_HEADER_FLAG(key) \ + ((key) << 8) +#define XEX_HEADER_SIZEDSTRUCT(key) \ + (((key) << 8) | 0xFF) + +#define XEX_HEADER_STRING(key) \ + XEX_HEADER_SIZEDSTRUCT(key) + +// +// A section header. +// +#define XEX_SECTION_NAME_LENGTH 8 + +typedef struct _XEX_SECTION_HEADER { + // + // Name of this section + // + CHAR SectionName[XEX_SECTION_NAME_LENGTH]; + + // + // Base address of this section + // + ULONG VirtualAddress; + + // + // Size of this section as loaded + // + ULONG VirtualSize; +} XEX_SECTION_HEADER, *PXEX_SECTION_HEADER; + +// +// The section table is a ULONG size of the total table followed by +// individual section entries stored in base address order. The count +// is determined from the size of the table. +// +#define XEX_HEADER_SECTION_TABLE \ + XEX_HEADER_SIZEDSTRUCT(2) + +// +// A description of blockwise data in this image. +// +typedef struct _XEX_DATA_DESCRIPTOR { + // + // The size of the data area. + // + ULONG Size; + + // + // The root digest of the data area. + // + UCHAR DataDigest[20]; +} XEX_DATA_DESCRIPTOR, *PXEX_DATA_DESCRIPTOR; + +typedef struct _XEX_COMPRESSED_DATA_DESCRIPTOR { + // + // The size of the compression window. + // + ULONG WindowSize; + + // + // The descriptor of the first data block. + // + XEX_DATA_DESCRIPTOR FirstDescriptor; +} XEX_COMPRESSED_DATA_DESCRIPTOR, *PXEX_COMPRESSED_DATA_DESCRIPTOR; + +#define XEX_DEFAULT_COMPRESSION_WINDOW 0x8000 + +typedef struct _XEX_FILE_DATA_DESCRIPTOR { + // + // The size of this header. + // + ULONG Size; + + // + // Data flags. + // + USHORT Flags; + + // + // The format of data in this image. + // + USHORT Format; + + // + // Format-specific data follows this header. + // +} XEX_FILE_DATA_DESCRIPTOR, *PXEX_FILE_DATA_DESCRIPTOR; + +#define XEX_DATA_FLAG_ENCRYPTED 0x0001 + +#define XEX_DATA_FORMAT_NONE 0x0000 +#define XEX_DATA_FORMAT_RAW 0x0001 +#define XEX_DATA_FORMAT_COMPRESSED 0x0002 +#define XEX_DATA_FORMAT_DELTA_COMPRESSED 0x0003 + +#define XEX_FILE_DATA_DESCRIPTOR_HEADER \ + XEX_HEADER_SIZEDSTRUCT(3) + +// +// Patch files identify the base file they're patching by including the +// hash of the base file headers. +// +#define XEX_PATCH_FILE_BASE_REFERENCE \ + XEX_HEADER_FIXED_SIZE(4, 20) + +// +// Delta patch files include the following header. +// +typedef struct _XEX_DELTA_PATCH_DESCRIPTOR { + // + // The size of this header. + // + ULONG Size; + + // + // The version of the target file. + // + ULONG TargetVersion; + + // + // The version of the source file. + // + ULONG SourceVersion; + + // + // The hash of HV_IMAGE_INFO.Signature[] of the source file. + // + UCHAR DigestSource[20]; + + // + // The deobfuscated ImageKey of the source file encrypted with the + // deobfuscated ImageKey of the target file. + // + UCHAR ImageKeySource[16]; + + // + // The size of the XEX headers of the target file. + // + ULONG SizeOfTargetHeaders; + + // + // The offset into the source XEX headers to copy into the target + // headers buffer before delta decompression begins. + // + ULONG DeltaHeadersSourceOffset; + + // + // The size of the source XEX headers starting at the above offset + // to copy into the target headers buffer before delta decompression + // begins. + // + ULONG DeltaHeadersSourceSize; + + // + // The offet into the target XEX headers buffer to copy the source + // headers range given above before delta decompression begins. + // + ULONG DeltaHeadersTargetOffset; + + // + // The offset into the source image to copy into the target image + // buffer before delta decompression begins. + // + ULONG DeltaImageSourceOffset; + + // + // The size of the source image starting at the above offset to copy + // into the target image buffer before delta decompression begins. + // + ULONG DeltaImageSourceSize; + + // + // The offset into the target image buffer to copy the source image + // range given above before delta decompression begins. + // + ULONG DeltaImageTargetOffset; + + // + // Following this header is a series of LZX_DELTA_CHUNK structures + // that describe the transformation of the source file headers into + // the target file headers. + // +} XEX_DELTA_PATCH_DESCRIPTOR, * PXEX_DELTA_PATCH_DESCRIPTOR; + +#define XEX_HEADER_DELTA_PATCH_DESCRIPTOR \ + XEX_HEADER_SIZEDSTRUCT(5) + +// +// The bound pathname of this image, if it can run from only one location. +// +#define XEX_HEADER_BOUND_PATH \ + XEX_HEADER_STRING(0x0080) + +// +// The original base address of this image, if different from the load +// address. +// +#define XEX_HEADER_ORIGINAL_BASE_ADDRESS \ + XEX_HEADER_ULONG(0x0100) + +// +// The entry point of this image. +// +#define XEX_HEADER_ENTRY_POINT \ + XEX_HEADER_FLAG(0x0101) + +// +// The base of the PE image. +// +#define XEX_HEADER_PE_BASE \ + XEX_HEADER_ULONG(0x0102) + +// +// A single table of imports. +// + +#define XEX_HEADER_IMPORTS \ + XEX_HEADER_SIZEDSTRUCT(0x0103) + +// +// The address of the PE export table. +// +#define XEX_HEADER_PE_EXPORTS \ + XEX_HEADER_STRUCT(0xE104, IMAGE_DATA_DIRECTORY) + +// +// Image information for debugging. +// +typedef struct _XEX_VITAL_STATS { + ULONG CheckSum; + ULONG TimeDateStamp; +} XEX_VITAL_STATS, *PXEX_VITAL_STATS; + +#define XEX_HEADER_VITAL_STATS \ + XEX_HEADER_STRUCT(0x0180, XEX_VITAL_STATS) + +// +// Callcap import information. +// +typedef struct _XEX_CALLCAP_IMPORTS { + ULONG BeginFunctionThunkAddress; + ULONG EndFunctionThunkAddress; +} XEX_CALLCAP_IMPORTS, *PXEX_CALLCAP_IMPORTS; + +#define XEX_HEADER_CALLCAP_IMPORTS \ + XEX_HEADER_STRUCT(0x0181, XEX_CALLCAP_IMPORTS) + +// +// Fastcap information. +// +#define XEX_HEADER_FASTCAP_ENABLED \ + XEX_HEADER_FLAG(0x0182) + +// +// PE Module name +// +#define XEX_HEADER_PE_MODULE_NAME \ + XEX_HEADER_STRING(0x0183) + +#if defined(_M_PPCBE) +#pragma bitfield_order(push, lsb_to_msb) +#endif + +// +// Define the length of the library name stored in a library version structure. +// + +#define XEXIMAGE_LIBRARY_VERSION_NAME_LENGTH 8 + +// +// Define the structure of a XBE library version descriptor. +// + +typedef struct _XEXIMAGE_LIBRARY_VERSION { + + // + // Specifies ASCII text padded with nulls to identify the library. + // + UCHAR LibraryName[XEXIMAGE_LIBRARY_VERSION_NAME_LENGTH]; + + // + // Specifies the major version number of the library. + // + USHORT MajorVersion; + + // + // Specifies the minor version number of the library. + // + USHORT MinorVersion; + + // + // Specifies the build version number of the library. + // + USHORT BuildVersion; + + // + // Specifies the QFE version number of the library. + // + USHORT QFEVersion : 8; + + // + // The QFEVersion was 13 bits. Lets leach it down to 8 bits and leave ourselves some more bits for flags. + // + USHORT Unused : 4; + +#if 0 // Features are unsupported for now. + // + // Specifies whether this is actually a feature and not a library + // + USHORT LibFeature : 1; +#endif + + // + // Specifies whether this version stamp pertains to the module itself. + // + USHORT XEXVersion : 1; + + // + // Specifies the approved status of this library + // 0 = unapproved + // 1 = conditionally approved + // 2 = approved + USHORT ApprovedLibrary : 2; + + // + // Specifies TRUE if this is a debug build of the library, else FALSE. + // + USHORT DebugBuild : 1; + +} XEXIMAGE_LIBRARY_VERSION, *PXEXIMAGE_LIBRARY_VERSION; + +// People tend to initialize the raw bits of the XEXIMAGE_LIBRARY_VERSION struct. +// Here are some helpfull defines for doing that. +#define LIBVER_DEBUG_BIT 0x8000 +#define LIBVER_APPROVED_BIT 0x4000 +#define LIBVER_CONDITIONAL_BIT 0x2000 +#define LIBVER_XBEVERSION_BIT 0x1000 +#define LIBVER_FEATURE_BIT 0x0800 +#define LIBVER_UNUSED_BITS 0x0700 +#define LIBVER_QFEVERSION_BITS 0x00FF + +#if defined(_M_PPCBE) +#pragma bitfield_order(pop) +#endif + +// +// The build version table. +// +#define XEX_HEADER_BUILD_VERSIONS \ + XEX_HEADER_SIZEDSTRUCT(0x0200) + +// +// A descriptor for static TLS data. +// +typedef struct _XEX_TLS_DATA { + ULONG TlsSlotCount; + PVOID AddressOfRawData; + ULONG SizeOfRawData; + ULONG SizeOfTlsData; +} XEX_TLS_DATA, *PXEX_TLS_DATA; + +#define XEX_HEADER_TLS_DATA \ + XEX_HEADER_STRUCT(0x201, XEX_TLS_DATA) + +// +// The default stack size for threads created in this process. +// +#define XEX_HEADER_STACK_SIZE \ + XEX_HEADER_FLAG(0x0202) + +// +// The default filesystem cache size. +// +#define XEX_HEADER_FSCACHE_SIZE \ + XEX_HEADER_ULONG(0x203) + +// +// Size of the initial XAPI heap +// +#define XEX_HEADER_XAPI_HEAP_SIZE \ + XEX_HEADER_ULONG(0x0204) + +// +// Executable privilege settings. Settings are numbered from 0 through +// 1024, where the high 5 bits indicate which header field in the range +// 0x300 through 0x31F contains the privilege bit and the low 5 bits indicate +// which bit of the header field contains the privilege bit. +// + + +// +// This flag allows a title to control whether the system forcibly reboots the +// running title when certain events happen (such as tray ejection, etc.). The +// title may be required to do some notification handling if this privilege is +// specified. +// + +#define XEX_PRIVILEGE_NO_FORCE_REBOOT 0 + +// +// Allow the system to create foreground tasks on behalf of the title. +// + +#define XEX_PRIVILEGE_FOREGROUND_TASKS 1 + +// +// Do not create a mapping to the optical disc drive. Note that, if the title +// lives on a disc in the drive, the title's D:\ and GAME:\ mappings will still +// be created to point at the root of the optical media, but the CdRom0:\ +// mapping will not be created. +// + +#define XEX_PRIVILEGE_NO_ODD_MAPPING 2 + +// +// Indicates that the title is capable of handling MCE button press on remote +// control and that system should not have special processing for it. +// + +#define XEX_PRIVILEGE_HANDLE_MCE_INPUT 3 + +// +// This privilege restricts the use of the Xbox 360 Guide (HUD). When this +// privilege is specified, the main menu of the guide will display a message +// saying it is disabled. Any extra user functionality such as voice chats +// will also be disabled. +// + +#define XEX_PRIVILEGE_RESTRICT_HUD_FEATURES 4 + +// +// Indicates that a title handles controller disconnections by displaying a +// message to the user directing him to reconnect it. +// + +#define XEX_PRIVILEGE_HANDLE_GAMEPAD_DISCONNECT 5 + +// +// This privilege allows titles to create insecure sockets that do not use +// the XSP networking protocol wrapper. +// + +#define XEX_PRIVILEGE_INSECURE_SOCKETS 6 + +// +// This privilege configures XNet to allow interoperability with the original +// Xbox's XSP networking protocol. +// + +#define XEX_PRIVILEGE_XBOX_1_XSP_INTEROP 7 + +// +// This privilege indicates that the title is allowed to set dash context +// information which can modify the way Guide (HUD) behaves in some cases. +// + +#define XEX_PRIVILEGE_SET_DASH_CONTEXT 8 + +// +// This privilege indicates to the Guide (HUD) that the title exposes a game +// voice channel, which should be shown to the user when appropriate (e.g. in +// QuickChat). +// + +#define XEX_PRIVILEGE_TITLE_USES_GAME_VOICE_CHANNEL 9 + +// +// This privilege indicates that the title does not support PAL50 +// + +#define XEX_PRIVILEGE_TITLE_PAL50_INCOMPATIBLE 10 + +// +// This privilege indicates that the title can use an insecured utitilty cache +// partition (i.e. XMountUtitliyDrive will mount the cache partition using FATX +// instead of STFS). +// + +#define XEX_PRIVILEGE_TITLE_INSECURE_UTILITYDRIVE 11 + +#define XEX_HEADER_EXECUTION_ID \ + XEX_HEADER_STRUCT(0x400, XEX_EXECUTION_ID) + +// +// Array of custom Live service IDs to request +// +typedef struct _XEX_SERVICE_ID_LIST { + ULONG Size; + ULONG CustomServiceIDs[4]; +} XEX_SERVICE_ID_LIST, *PXEX_SERVICE_ID_LIST; + +#define XEX_HEADER_SERVICE_ID_LIST \ + XEX_HEADER_SIZEDSTRUCT(0x401) + +// +// Size of the title workspace area. +// +#define XEX_HEADER_WORKSPACE_SIZE \ + XEX_HEADER_ULONG(0x0402) + +// +// Game rating by region +// +#define XEX_NUMBER_GAME_RATING_SYSTEMS 64 + +#define XEX_HEADER_GAME_RATINGS \ + XEX_HEADER_FIXED_SIZE(0x403, XEX_NUMBER_GAME_RATING_SYSTEMS) + +// +// System Link LAN key +// +#define XEX_LAN_KEY_SIZE 16 + +#define XEX_HEADER_LAN_KEY \ + XEX_HEADER_FIXED_SIZE(0x404, XEX_LAN_KEY_SIZE) + +// +// MS logo information. +// +#define XEX_HEADER_MSLOGO \ + XEX_HEADER_SIZEDSTRUCT(0x0405) + +#pragma warning(pop) + +#endif // _XEX_H_ diff --git a/xbdm/imp/xexhv.h b/xbdm/imp/xexhv.h new file mode 100644 index 0000000..c316e6f --- /dev/null +++ b/xbdm/imp/xexhv.h @@ -0,0 +1,155 @@ +/*++ + +Copyright (c) 2000-2005 Microsoft Corporation + +Module Name: + + xexhv.h + +Abstract: + + This module defines the structures of the Xenon Executable (XEX) + format that are used by the hypervisor. + +--*/ + +#ifndef _XEXHV_H_ +#define _XEXHV_H_ + +// +// Define the root security information of an executable image. +// + +typedef struct _HV_IMAGE_INFO { + // + // The signature of this object. + // + UCHAR Signature[256]; + + // + // The size of this object. + // + ULONG InfoSize; + + // + // Flags describing this image. + // + ULONG ImageFlags; + + // + // Specifies the address at which this module is to be loaded. + // + ULONG LoadAddress; + + // + // The hash of the image's first page descriptor. + // + UCHAR ImageHash[20]; + + // + // The number of import tables for this image. + // + ULONG ImportTableCount; + + // + // The digest of the first import table. + // + UCHAR ImportDigest[20]; + + // + // Specifies the media identifier for this image. This must immediately + // follow the import/export information. + // + UCHAR MediaID[16]; + + // + // Specifies the key used to encrypt this image. + // + UCHAR ImageKey[16]; + + // + // The address of this image's export table, if any. + // + ULONG ExportTableAddress; + + // + // The hash of the header information. + // + UCHAR HeaderHash[20]; + + // + // Game regions in which this image is allowed to run. + // + ULONG GameRegion; +} HV_IMAGE_INFO, *PHV_IMAGE_INFO; + +#define XEX_SECURITY_FLAG_MFG_MODE 0x00000006 +#define XEX_SECURITY_FLAG_MFG_UTIL 0x00000002 // runs in verified mfg mode +#define XEX_SECURITY_FLAG_MFG_SUPPORT 0x00000004 // runs in all mfg modes +#define XEX_SECURITY_FLAG_MFG_AWARE 0x00000006 // runs in all modes +#define XEX_SECURITY_FLAG_XGD2_MEDIA 0x00000008 +#define XEX_SECURITY_FLAG_HV_PRIVS_MASK 0x000FFF00 +#define XEX_SECURITY_FLAG_HV_PRIVS_SHIFT 8 +#define XEX_SECURITY_FLAG_SMALL_PAGES 0x10000000 +#define XEX_SECURITY_FLAG_NO_REGION 0x20000000 +#define XEX_SECURITY_FLAG_REVOCABLE 0x40000000 +#define XEX_SECURITY_FLAG_REQUIRE_COOKIE 0x80000000 + +#define XEX_HV_PRIVILEGE_CARDEA_KEY 0 +#define XEX_HV_PRIVILEGE_XEIKA_KEY 1 +#define XEX_HV_PRIVILEGE_TITLE_USER_MODE 2 +#define XEX_HV_PRIVILEGE_SYSTEM_USER_MODE 3 +#define XEX_HV_PRIVILEGE_ORANGE_0 4 +#define XEX_HV_PRIVILEGE_ORANGE_1 5 +#define XEX_HV_PRIVILEGE_ORANGE_2 6 + +// +// Define a page descriptor for image data. +// + +typedef struct _HV_PAGE_INFO { + // + // Information describing the page range. The high 3 bits describe the + // page access policy, and the low 29 bits are the number of pages over + // which to apply it. + // + ULONG PageDescription; + + // + // The digest of the next range's page descriptor plus the next range's + // data. + // + UCHAR DataDigest[20]; +} HV_PAGE_INFO, *PHV_PAGE_INFO; + +#define XEX_SECURITY_PAGE_COUNT_SHIFT 4 +#define XEX_SECURITY_PAGE_PROTECT_MASK 0x0000000F +#define XEX_SECURITY_PAGE_ENCRYPT 0x00000008 +#define XEX_SECURITY_PAGE_PROTECT 0x00000004 +#define XEX_SECURITY_PAGE_NOEXECUTE 0x00000002 +#define XEX_SECURITY_PAGE_NOWRITE 0x00000001 +#define XEX_SECURITY_PAGE_CODE \ + (XEX_SECURITY_PAGE_NOWRITE) +#define XEX_SECURITY_PAGE_READONLY \ + (XEX_SECURITY_PAGE_NOEXECUTE | XEX_SECURITY_PAGE_NOWRITE) +#define XEX_SECURITY_PAGE_READWRITE \ + (XEX_SECURITY_PAGE_NOEXECUTE) + +// +// Define the header for image exports. +// + +typedef struct _HV_IMAGE_EXPORT_TABLE { + ULONG Magic[3]; + ULONG ModuleNumber[2]; + ULONG Version[3]; + ULONG ImageBaseAddress; + ULONG Count; + ULONG Base; +} HV_IMAGE_EXPORT_TABLE, *PHV_IMAGE_EXPORT_TABLE; + +#define XEX_EXPORT_MAGIC_0 0x48000000 +#define XEX_EXPORT_MAGIC_1 0x00485645 +#define XEX_EXPORT_MAGIC_2 0x48000000 + +#endif // _XEXHV_H_ diff --git a/xbdm/imp/xinput.h b/xbdm/imp/xinput.h new file mode 100644 index 0000000..fbb3b88 --- /dev/null +++ b/xbdm/imp/xinput.h @@ -0,0 +1,181 @@ +/*++ + +Copyright (c) Microsoft Corporation + +Module Name: + + xinput.h + +Abstract: + + This module defines xinput structures + +--*/ + +#ifndef _XINPUT_H +#define _XINPUT_H + +// +// Define the values for HID keycodes +// + +#define USBHID_KEYCODE_A 0x04 +#define USBHID_KEYCODE_Z 0x1D + +#define USBHID_KEYCODE_1 0x1E +#define USBHID_KEYCODE_9 0x26 +#define USBHID_KEYCODE_0 0x27 + +#define USBHID_KEYCODE_RETURN 0x28 + +#define USBHID_KEYCODE_QUESTION 0x38 +#define USBHID_KEYCODE_CAPSLOCK 0x39 + +#define USBHID_KEYCODE_KEYPADNUMLOCK 0x53 +#define USBHID_KEYCODE_KEYPADBACKSLASH 0x54 +#define USBHID_KEYCODE_KEYPADDECIMAL 0x63 + +#define USBHID_KEYCODE_LCONTROL 0xE0 +#define USBHID_KEYCODE_LSHIFT 0xE1 +#define USBHID_KEYCODE_LALT 0xE2 +#define USBHID_KEYCODE_LGUI 0xE3 +#define USBHID_KEYCODE_RCONTROL 0xE4 +#define USBHID_KEYCODE_RSHIFT 0xE5 +#define USBHID_KEYCODE_RALT 0xE6 +#define USBHID_KEYCODE_RGUI 0xE7 + +// +// Define the values for HID key modifier +// + +#define USBHID_MODIFIER_LCTRL 0x01 +#define USBHID_MODIFIER_LSHIFT 0x02 +#define USBHID_MODIFIER_LALT 0x04 +#define USBHID_MODIFIER_LGUI 0x08 +#define USBHID_MODIFIER_RCTRL 0x10 +#define USBHID_MODIFIER_RSHIFT 0x20 +#define USBHID_MODIFIER_RALT 0x40 +#define USBHID_MODIFIER_RGUI 0x80 + +// +// Define the values for HID LEDs +// + +#define USBHID_LED_NUMLOCK 0x01 +#define USBHID_LED_CAPSLOCK 0x02 +#define USBHID_LED_SCROLLLOCK 0x04 + +// +// Internal state needed by the API +// + +#define INTERNAL_STATE_INDEX_SYSAPP 0 +#define INTERNAL_STATE_INDEX_TITLE 1 + + +typedef struct _GAMEPAD_STATE_DATA { + DWORD LastPacketNumber; + UCHAR AnalogPressedState; + WORD ButtonPressedState; + WORD LeftThumbPressedState; + WORD RightThumbPressedState; +} GAMEPAD_STATE_DATA, *PGAMEPAD_STATE_DATA; + +typedef struct _INTERNAL_KEYSTROKE_QUEUE { + XINPUT_KEYSTROKE Data[10]; // worst possible case, 6 real keys + 4 modifiers + UCHAR Size; + UCHAR Count; + UCHAR InIndex; + UCHAR OutIndex; +} INTERNAL_KEYSTROKE_QUEUE, *PINTERNAL_KEYSTROKE_QUEUE; + +// +// Language Support for Keyboards. Each language +// is implemented as an XINPUT_LANGUAGE_SERVICE. +// + +#define MAX_LANGUAGE_SERVICE_AREA 8 +typedef BOOL (*PFNXINPUTPROCESSLANG)(PXINPUT_KEYSTROKE pKeystroke, PVOID pvStateArea); +typedef DWORD (*PFNXINPUTRESETLANGSTATEAREA)(PVOID pvStateArea); +typedef BOOL (*PFNXINPUTLANGISKEYPENDING)(PVOID pvStateArea); + +typedef struct _XINPUT_LANGUAGE_SERVICE +{ + DWORD dwLanguage; + PFNXINPUTRESETLANGSTATEAREA pfnResetStateArea; + PFNXINPUTPROCESSLANG pfnProcess; + PFNXINPUTLANGISKEYPENDING pfnIsKeyPending; + WORD wSupportedModifiers; +} XINPUT_LANGUAGE_SERVICE, *PXINPUT_LANGUAGE_SERVICE; + +// +// Languages +// +#ifdef __cplusplus +extern "C" { +#endif + +extern XINPUT_LANGUAGE_SERVICE XAM_EnglishLanguageSupport; +extern XINPUT_LANGUAGE_SERVICE XAM_EnglishUKLanguageSupport; +extern XINPUT_LANGUAGE_SERVICE XAM_JapaneseLanguageSupport; +extern XINPUT_LANGUAGE_SERVICE XAM_GermanLanguageSupport; +extern XINPUT_LANGUAGE_SERVICE XAM_FrenchLanguageSupport; +extern XINPUT_LANGUAGE_SERVICE XAM_FrenchCanadaLanguageSupport; +extern XINPUT_LANGUAGE_SERVICE XAM_ItalianLanguageSupport; +extern XINPUT_LANGUAGE_SERVICE XAM_SpanishLanguageSupport; +extern XINPUT_LANGUAGE_SERVICE XAM_ChineseBopomofoLanguageSupport; +extern XINPUT_LANGUAGE_SERVICE XAM_ChineseChajeiLanguageSupport; +extern XINPUT_LANGUAGE_SERVICE XAM_KoreanLanguageSupport; +extern XINPUT_LANGUAGE_SERVICE XAM_SwedishLanguageSupport; +extern XINPUT_LANGUAGE_SERVICE XAM_PortuguesePTLanguageSupport; +extern XINPUT_LANGUAGE_SERVICE XAM_PortugueseBRLanguageSupport; + +#ifdef __cplusplus +} +#endif + +typedef struct _INTERNAL_STATE_DATA { + + // + // these are 256-bit arrays that reflect the per-process + // state of the keyboard as last reported + // + + UCHAR DownHIDKeys[32]; // snapshot of keys held down (using USB HIDs) + UCHAR DownVirtualKeys[32]; // snapshot of keys held down (using VK_* codes) + INTERNAL_KEYSTROKE_QUEUE PendingKeystrokes; // actual keystrokes (key up and down events) + + GAMEPAD_STATE_DATA GamepadState[XUSER_MAX_COUNT]; + DWORD LastReturnedPacketNumber[XUSER_MAX_COUNT]; + UCHAR LastReturnedConnectedState[XUSER_MAX_COUNT]; + DWORD LastKeyTime; + WORD LastKeyDown; + WORD LastKeyFlags; + UCHAR LastKeyDownHidCode; + UCHAR LastKeyDevice; // 0: None, 1: Gamepad, 2: Keyboard + UCHAR SlowRepeat; +} INTERNAL_STATE_DATA, *PINTERNAL_STATE_DATA; + +// +// Per-keyboard, as oppose to per-process per-keyboard state. +// Basically, the language settings, and the lock flags. +// + +typedef struct _INTERNAL_KEYBOARD_STATE { + PXINPUT_LANGUAGE_SERVICE pLanguageService; + UCHAR LanguageStateArea[MAX_LANGUAGE_SERVICE_AREA]; + WORD wLockFlags; +} INTERNAL_KEYBOARD_STATE, *PINTERNAL_KEYBOARD_STATE; + + +typedef struct _INTERNAL_IR_STATE { + KSPIN_LOCK SpinLock; + ULONG ButtonCode; + ULONG LastToggle; + ULONG SendUpButtonCode; + ULONG LastSMCNotificationTime; + ULONG LastKeyDownTime; + UCHAR SlowRepeat; +} INTERNAL_IR_STATE, *PINTERNAL_IR_STATE; + +#endif // _XINPUT_H diff --git a/xbdm/imp/xonlinep.h b/xbdm/imp/xonlinep.h new file mode 100644 index 0000000..9ad6bb9 --- /dev/null +++ b/xbdm/imp/xonlinep.h @@ -0,0 +1,9489 @@ + + +/* + * Version 1.1859 + * + * xonlinep.h + * + * This module contains the private definitions for Xbox Live + * + * Created on 11/19/05 at 04:36:34. + */ + +#ifndef __XONLINEP__ +#define __XONLINEP__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +// +// Temporary method used to identify titles. Must be called prior to +// logging on. +// +void +WINAPI +XNetLogonSetTitleID( + IN DWORD dwTitleID + ); + +// +// Internal error codes to forward info within the client logon process +// +#define XONLINE_E_LOGON_NO_IP_ADDRESS _HRESULT_TYPEDEF_(0x80151901L) +#define XONLINE_E_LOGON_NO_DNS_SERVICE _HRESULT_TYPEDEF_(0x80151902L) +#define XONLINE_E_LOGON_DNS_LOOKUP_FAILED _HRESULT_TYPEDEF_(0x80151903L) +#define XONLINE_E_LOGON_DNS_LOOKUP_TIMEDOUT _HRESULT_TYPEDEF_(0x80151904L) +#define XONLINE_E_LOGON_INVALID_XBOX_ONLINE_INFO _HRESULT_TYPEDEF_(0x80151905L) +#define XONLINE_E_LOGON_MACS_FAILED _HRESULT_TYPEDEF_(0x80151906L) +#define XONLINE_E_LOGON_MACS_TIMEDOUT _HRESULT_TYPEDEF_(0x80151907L) +#define XONLINE_E_LOGON_AUTHENTICATION_FAILED _HRESULT_TYPEDEF_(0x80151908L) +#define XONLINE_E_LOGON_AUTHENTICATION_TIMEDOUT _HRESULT_TYPEDEF_(0x80151909L) +#define XONLINE_E_LOGON_AUTHORIZATION_FAILED _HRESULT_TYPEDEF_(0x8015190AL) +#define XONLINE_E_LOGON_AUTHORIZATION_TIMEDOUT _HRESULT_TYPEDEF_(0x8015190BL) +#define XONLINE_E_LOGON_XBOX_ACCOUNT_INVALID _HRESULT_TYPEDEF_(0x8015190CL) +#define XONLINE_E_LOGON_XBOX_ACCOUNT_BANNED _HRESULT_TYPEDEF_(0x8015190DL) +#define XONLINE_E_LOGON_SG_SERVICE_FAILED _HRESULT_TYPEDEF_(0x8015190EL) +#define XONLINE_E_LOGON_PRESENCE_SERVICE_FAILED _HRESULT_TYPEDEF_(0x8015190FL) +#define XONLINE_E_LOGON_PRESENCE_SERVICE_TIMEDOUT _HRESULT_TYPEDEF_(0x80151910L) +#define XONLINE_E_LOGON_TIMEDOUT _HRESULT_TYPEDEF_(0x80151911L) +#define XONLINE_E_LOGON_UNKNOWN_TITLE _HRESULT_TYPEDEF_(0x80151912L) +#define XONLINE_E_LOGON_INTERNAL_ERROR _HRESULT_TYPEDEF_(0x80151913L) +#define XONLINE_E_LOGON_MACHINE_AUTHENTICATION_FAILED _HRESULT_TYPEDEF_(0x80151914L) +#define XONLINE_E_LOGON_TGT_REVOKED _HRESULT_TYPEDEF_(0x80151915L) +#define XONLINE_E_LOGON_CACHE_MISS _HRESULT_TYPEDEF_(0x80151916L) +#define XONLINE_E_LOGON_NOT_UPNP_NAT _HRESULT_TYPEDEF_(0x80151917L) +#define XONLINE_E_LOGON_INCONCLUSIVE_UPNP_NAT _HRESULT_TYPEDEF_(0x80151918L) +#define XONLINE_E_LOGON_UPNP_NAT_HARD_FAILURE _HRESULT_TYPEDEF_(0x80151919L) +#define XONLINE_E_LOGON_UPNP_PORT_UNAVAILABLE _HRESULT_TYPEDEF_(0x8015191AL) + +#define XOnlineIsPrivateLogonHR( hr ) (((hr) & 0xFFFFFF00L) == 0x80151900L) + +// XUID compatibility macros +#define XOnlineIsUserGuest IsGuestXUID + +// +// Xbox Live Service ID +// + +#define XONLINE_PRESENCE_SERVICE 1 +#define XONLINE_STRING_SERVICE 2 +#define XONLINE_AUTO_UPDATE_SERVICE 3 +#define XONLINE_CONTENT_AVAILABLE_SERVICE 4 +#define XONLINE_BASE_SUBSCRIPTION_SERVICE XONLINE_CONTENT_AVAILABLE_SERVICE +#define XONLINE_USER_ACCOUNT_SERVICE 5 +#define XONLINE_MATCHMAKING_SERVICE 6 +#define XONLINE_STATISTICS_SERVICE 7 +#define XONLINE_FEEDBACK_SERVICE 8 +#define XONLINE_BILLING_OFFERING_SERVICE 9 +#define XONLINE_NICKNAME_VERIFICATION_SERVICE XONLINE_BILLING_OFFERING_SERVICE +#define XONLINE_DIAGNOSTIC_LOGGING_SERVICE 10 +#define XONLINE_TOU_SERVICE 11 +#define XONLINE_SIGNATURE_SERVICE 12 +#define XONLINE_QUERY_SERVICE 13 +#define XONLINE_NAME_RESOLUTION_SERVICE 14 +#define XONLINE_STORAGE_SERVICE 15 +#define XONLINE_ARBITRATION_SERVICE 16 +#define XONLINE_USAGE_DATA_SERVICE 17 +#define XONLINE_MESSAGING_SERVICE 18 +#define XONLINE_TEAM_SERVICE 19 +#define XONLINE_NAT_TYPE_DETECTION_SERVICE 20 +#define XONLINE_DRM_SERVICE 21 + +// These services are for testing against the SGs +#define XONLINE_SG_SITE_1_AUTH_SERVICE 129 +#define XONLINE_SG_SITE_2_AUTH_SERVICE 130 +#define XONLINE_SG_SITE_1_TEST_SERVICE 129 +#define XONLINE_SG_SITE_2_TEST_SERVICE 130 + +#define XONLINE_UPNP_NAT_SERVICE 0xFFFFFFFF +#define XONLINE_MAX_SERVICE 21 +#define XONLINE_INVALID_SERVICE 0 + +#define XONLINE_S_LOGON_USER_MESSAGE_ENUMERATION_NEEDED _HRESULT_TYPEDEF_(0x001512F1L) + +// +// Service info +// +#define XNET_LOGON_SERVICE_INFO_INSECURE 0x0001 // service IP & port is insecure + +#pragma pack(push, 4) +typedef struct _XNET_LOGON_SERVICE_INFO +{ + DWORD dwServiceID; + IN_ADDR inaService; + WORD wServicePort; + WORD wFlags; +} XNET_LOGON_SERVICE_INFO, *PXNET_LOGON_SERVICE_INFO; +#pragma pack(pop) + + +// +// Logon flags +// +#define XNET_LOGON_FLAG_GET_NEW_TICKETS_ONLY 0x00000001 +#define XNET_LOGON_FLAG_UPDATE_SERVICE_ONLY 0x00000002 +#define XNET_LOGON_FLAG_REFRESH_TICKETS_ONLY 0x00010000 + + +#define XONLINE_MAX_LOGON_USERS 4 + +#define XONLINE_GAMERTAG_SIZE 16 +#define XONLINE_MAX_GAMERTAG_LENGTH (XONLINE_GAMERTAG_SIZE - 1) +#define XONLINE_PASSCODE_LENGTH 4 +#define XONLINE_USERDOMAIN_SIZE 20 +#define XONLINE_MAX_USERDOMAIN_LENGTH (XONLINE_USERDOMAIN_SIZE - 1) +#define XONLINE_KERBEROSREALM_SIZE 24 +#define XONLINE_MAX_KERBEROSREALM_LENGTH (XONLINE_KERBEROSREALM_SIZE - 1) +#define XONLINE_KEY_LENGTH 16 + +// +// A structure that contains the 64-bit XUID plus the user flags +// +#pragma pack(push, 4) +typedef struct _XUIDWITHFLAGS { + XUID qwUserID; + DWORD dwUserFlags; +} XUIDWITHFLAGS, *PXUIDWITHFLAGS; +#pragma pack(pop) + +// +// Used in dwUserFlags in XUIDWITHFLAGS +// +#define XONLINE_USER_GUEST_MASK 0x00000003 +#define XONLINE_USER_NOSHOW_RATING_MASK 0x0000001C +#define XONLINE_USER_DISCONNECT_RATING_MASK 0x000000E0 +#define XONLINE_USER_COUNTRY_MASK 0x0000ff00 +#define XONLINE_USER_VOICE_NOT_ALLOWED 0x00010000 +#define XONLINE_USER_PURCHASE_NOT_ALLOWED 0x00020000 +#define XONLINE_USER_NICKNAME_NOT_ALLOWED 0x00040000 +#define XONLINE_USER_SHARED_CONTENT_NOT_ALLOWED 0x00080000 +#define XONLINE_USER_PARENTAL_CONTROLLED 0x01000000 + +#define XONLINE_USER_MEMBERSHIP_TIER_MASK 0x00F00000 + +#define XOnlineUserFlagsMembershipTier(dwUserFlags) ((BYTE)(((dwUserFlags) & XONLINE_USER_MEMBERSHIP_TIER_MASK) >> 20)) +#define XOnlineUserFlagsCountryId(dwUserFlags) ((BYTE)(((dwUserFlags) & XONLINE_USER_COUNTRY_MASK) >> 8)) +#define XOnlineUserFlagsGuestNumber(dwUserFlags) ((dwUserFlags) & XONLINE_USER_GUEST_MASK) +#define XOnlineUserFlagsSetGuestNumber(dwUserFlags,guestNumber) ((dwUserFlags) = ((dwUserFlags) & ~XONLINE_USER_GUEST_MASK) | (guestNumber & XONLINE_USER_GUEST_MASK)) +#define XOnlineUserFlagsIsUserGuest(dwUserFlags) (((dwUserFlags) & XONLINE_USER_GUEST_MASK) != 0) + +// +// Compatibility macros +// +#define XOnlineUserCountryId XamUserGetOnlineCountryFromXUID +#define XOnlineUserMembershipTier XamUserGetMembershipTierFromXUID + +// +// Used in dwUserOptions in XNET_LOGON_USER +// +#define XNET_LOGON_USER_OPTION_REQUIRE_PASSCODE 0x00000001 + +#pragma pack(push, 4) +typedef struct _XNET_LOGON_USER +{ + XUIDWITHFLAGS xuid; + DWORD dwServiceNetworkID; + CHAR szGamertag[XONLINE_GAMERTAG_SIZE]; + DWORD dwUserOptions; + BYTE passcode[XONLINE_PASSCODE_LENGTH]; + CHAR domain[XONLINE_USERDOMAIN_SIZE]; + CHAR kerberosRealm[XONLINE_KERBEROSREALM_SIZE]; + BYTE key[XONLINE_KEY_LENGTH]; + HRESULT hr; +} XNET_LOGON_USER, *PXNET_LOGON_USER; +#pragma pack(pop) + +typedef enum _XNET_LOGON_NAT_TYPE +{ + XNET_LOGON_NAT_TYPE_OPEN = 1, + XNET_LOGON_NAT_TYPE_MODERATE, + XNET_LOGON_NAT_TYPE_STRICT +} XNET_LOGON_NAT_TYPE; + +typedef enum _XNET_LOGON_DNS_TYPE +{ + XNET_LOGON_DNS_MACS, + XNET_LOGON_DNS_AS, + XNET_LOGON_DNS_TGS, + XNET_LOGON_DNS_XDS, + XNET_LOGON_DNS_MAINTENANCE, + NUM_XNET_LOGON_DNS_TYPES +} XNET_LOGON_DNS_TYPE; + +#define XNET_LOGON_MAX_DNS_NAME_LENGTH 80 // 80 characters, including NULL termination + + +// +// If 2 or 3 bits are used in any status flag, then the meaning is as follows +// +#define XNET_LOGON_STATUS_INITIAL 0x0 +#define XNET_LOGON_STATUS_START 0x1 +#define XNET_LOGON_STATUS_SUCCESS 0x2 +#define XNET_LOGON_STATUS_FAIL 0x3 +#define XNET_LOGON_STATUS_SOCKET_FAIL 0x4 +#define XNET_LOGON_STATUS_RECV_FAIL 0x5 +#define XNET_LOGON_STATUS_MEMORY_FAIL 0x6 +#define XNET_LOGON_STATUS_TIMEOUT_FAIL 0x7 + +// +// Meaning of bits on the Online Logon Status DWORD +// +#define XNET_LOGON_STATUS_XNET_FAILED 0x00000001 +#define XNET_LOGON_STATUS_EEPROM_FAILED 0x00000002 +#define XNET_LOGON_STATUS_GENEALOGY_FAILED 0x00000004 +#define XNET_LOGON_STATUS_OUT_OF_MEMORY 0x00000008 +#define XNET_LOGON_STATUS_USER_KEY_INCORRECT 0x00000010 + +#define XNET_LOGON_STATUS_UPNP_EXCHANGE 0x00000060 +#define XNET_LOGON_STATUS_UPNP_EXCHANGE_SHIFT 5 + +#define XNET_LOGON_STATUS_MACS_EXCHANGE 0x00000380 +#define XNET_LOGON_STATUS_MACS_EXCHANGE_SHIFT 7 + +#define XNET_LOGON_STATUS_AS_EXCHANGE 0x00001C00 +#define XNET_LOGON_STATUS_AS_EXCHANGE_SHIFT 10 + +#define XNET_LOGON_STATUS_TGS_EXCHANGE 0x0000E000 +#define XNET_LOGON_STATUS_TGS_EXCHANGE_SHIFT 13 + +#define XNET_LOGON_STATUS_MACS_DNS_LOOKUP 0x00030000 +#define XNET_LOGON_STATUS_MACS_DNS_LOOKUP_SHIFT 16 + +#define XNET_LOGON_STATUS_AS_DNS_LOOKUP 0x000C0000 +#define XNET_LOGON_STATUS_AS_DNS_LOOKUP_SHIFT 18 + +#define XNET_LOGON_STATUS_TGS_DNS_LOOKUP 0x00300000 +#define XNET_LOGON_STATUS_TGS_DNS_LOOKUP_SHIFT 20 + +#define XNET_LOGON_STATUS_MACHINE_ACCOUNT_LOOKUP 0x00C00000 +#define XNET_LOGON_STATUS_MACHINE_ACCOUNT_LOOKUP_SHIFT 22 + +#define XNET_LOGON_STATUS_COMBINED_TICKET_CACHE 0x03000000 +#define XNET_LOGON_STATUS_COMBINED_TICKET_CACHE_SHIFT 24 + +#define XNET_LOGON_STATUS_SERVICE_TICKET_CACHE 0x0C000000 +#define XNET_LOGON_STATUS_SERVICE_TICKET_CACHE_SHIFT 26 + +#define XNET_LOGON_STATUS_SG_EXCHANGE 0x30000000 +#define XNET_LOGON_STATUS_SG_EXCHANGE_SHIFT 28 + +// +// The following values are not reported with Xbox 360. +// +#define XONLINE_LOGON_STATUS_PRESENCE_EXCHANGE 0xC0000000 +#define XONLINE_LOGON_STATUS_PRESENCE_EXCHANGE_SHIFT 30 + +// +// Macros to get/set a logon status field +// +#define XNetLogonSetStatus(dwStatus, field, status) (dwStatus = ((dwStatus) & ~(field)) | ((status) << field##_SHIFT)); +#define XNetLogonGetStatus(dwStatus, field) (((dwStatus) & (field)) >> field##_SHIFT) + + + +// +// To load any override information for our live services +// +HRESULT +WINAPI +XNetLogonInitOverrideInfo(); + +HRESULT +WINAPI +XNetLogonTaskStart( + IN const XNET_LOGON_USER * pUsers, + IN DWORD dwFlags + ); + +HRESULT +WINAPI +XNetLogonTaskContinue( + ); + +void +WINAPI +XNetLogonTaskClose( + ); + +XNET_LOGON_USER * +WINAPI +XNetLogonGetLoggedOnUsers( + ); + +HRESULT +WINAPI +XNetLogonGetNatType( + OUT XNET_LOGON_NAT_TYPE * pNatType + ); + +HRESULT +WINAPI +XNetLogonGetServiceInfo( + IN DWORD dwServiceID, + OUT PXNET_LOGON_SERVICE_INFO pServiceInfo + ); + +DWORD * +WINAPI +XNetLogonGetUserPrivileges( + IN ULONGLONG qwUserId + ); + +// +// Override console certificate passed up to Live (devkit only). +// The buffer is expected to contain an XE_CONSOLE_CERTIFICATE structure. +// +BOOL +WINAPI +XNetLogonSetConsoleCertificate( + IN const BYTE * pbConsoleCertificate, + IN DWORD dwConsoleCertificateSize + ); + +HRESULT +WINAPI +XNetLogonGetMachineID( + IN OUT ULONGLONG * pqwMachineID + ); + +DWORD +WINAPI +XNetLogonGetTitleID( + IN DWORD dwServiceID + ); + +DWORD +WINAPI +XNetLogonGetTitleVersion( + ); + +DWORD +WINAPI +XNetLogonGetServiceNetworkID(); + +void +WINAPI +XNetLogonGetDnsString( + IN XNET_LOGON_DNS_TYPE DnsType, + IN OUT char * pszBuffer, + IN DWORD dwBufferLength + ); + +void +WINAPI +XNetLogonGetExtendedStatus( + OUT DWORD * pdwStatus, + OUT DWORD * pdwStatusError + ); + +BOOL +WINAPI +XNetLogonClearTicketCaches( + IN DWORD dwFlags + ); + +#define XONLINE_SERVICE_INFO_INSECURE 0x0001 // reserved flag, service IP & port is insecure +#define XONLINE_SERVICE_INFO_HOSTNAME_PTR 0x0002 // reserved flag, dwServiceID is a pointer to a hostname string instead + +// ==================================================================== +// XOnline Teams +// + +// +// Team/Team Member structure flags +// + +#define XONLINE_TEAM_MSG_RECRUIT 0x00000001 +#define XONLINE_TEAM_MSG_GAME_INVITE 0x00000002 +#define XONLINE_TEAM_MEMBER_RECRUITED 0x00000004 + +// +// XOnlineTeamMembersEnumerate flags +// + +#define XONLINE_TEAM_SHOW_RECRUITS 0x00000001 + +typedef enum { + XONLINE_TEAM_DELETE = 0x00000001, + XONLINE_TEAM_MODIFY_DATA = 0x00000002, + XONLINE_TEAM_MODIFY_MEMBER_PERMISSIONS = 0x00000004, + XONLINE_TEAM_DELETE_MEMBER = 0x00000008, + XONLINE_TEAM_RECRUIT_MEMBERS = 0x00000010, + + XONLINE_TEAM_LIVE_PERMISSIONS_ALL = 0xFFFFFFFF +} XONLINE_TEAM_LIVE_PERMISSIONS; + +// for some reason, xlivegen doesn't recgonize double +// or DOUBLE types natively. +typedef double __XLIVEGEN_DOUBLE; + + +// These settings are neither readable nor writable by titles +#define XPROFILE_PERMISSIONS XPROFILEID( XUSER_DATA_TYPE_INT32, sizeof(DWORD), 0) +#define XPROFILE_GAMER_TYPE XPROFILEID( XUSER_DATA_TYPE_INT32, sizeof(DWORD), 1) +#define XPROFILE_GAMER_PRESENCE_USER_STATE XPROFILEID( XUSER_DATA_TYPE_INT32, sizeof(DWORD), 7) +#define XPROFILE_GAMERCARD_TIER XPROFILEID( XUSER_DATA_TYPE_INT32, sizeof(DWORD), 58) + +// This constant is used to verify a title doesn't try to write to an invalid +// setting id. BE SURE TO UPDATE THIS IF YOU ADD ANY MORE PROFILE SETTING IDS! +#define XPROFILE_MAX_SETTING_ID 59 + +// This is an approximation of the total size of all profile settings. It's +// important that this size remains smaller than the size of the response +// buffer in SettingsTracker::Sync or the server won't be able to return all +// the settings in one shot. Until the protocol supports multiple round trips +// to read all the settings this is a limitation we must live with even if it +// means not adding any more settings. +#define XPROFILE_MAX_AGGREGATE_SIZE ((3 * XPROFILE_SETTING_MAX_SIZE) + \ + XPROFILE_SETTING_MAX_PICTURE_KEY_PATH + \ + XPROFILE_SETTING_MAX_GAMERCARD_MOTTO + \ + (40 * sizeof(DWORD))) + +// XPROFILE_GAMERCARD_TIER_OPTIONS == XONLINE_TIER_TYPE. Do not redefine the values. + +// XPROFILE_GAMERCARD_TIER_OPTIONS == XONLINE_TIER_TYPE. Do not redefine the values. + +DWORD +WINAPI +XSessionGetInvitationData ( + IN DWORD dwUserIndex, + OUT PXSESSION_INFO pSessionInfo + ); + + +//----------------------------------------------------------------------------- +// Private Session API message structures +//----------------------------------------------------------------------------- + +// This struct is stored in a session handle +// It only contains a pointer to the SessionTracker object allocated in +// XGI for now, but I've defined a struct for ease of expansion and for +// more legible code. +typedef struct tagSESSION_STRUCT +{ + void* pSessionTracker; +} SESSION_STRUCT; + +typedef struct +{ + SESSION_STRUCT* pSessionStruct; + DWORD dwFlags; + DWORD dwMaxPublicSlots; + DWORD dwMaxPrivateSlots; + DWORD dwUserIndex; + PXSESSION_INFO pSessionInfo; + ULONGLONG* pqwSessionNonce; +} XGI_SESSIONCREATE_MSG; + +typedef struct +{ + SESSION_STRUCT* pSessionStruct; + DWORD dwFlags; + DWORD dwMaxPublicSlots; + DWORD dwMaxPrivateSlots; +} XGI_SESSIONMODIFY_MSG; + +typedef struct +{ + SESSION_STRUCT* pSessionStruct; + DWORD dwUsers; + const XUID* pXuids; + const DWORD* pdwUserIndexes; + const BOOL* pfPrivateSlots; +} XGI_SESSIONMANAGE_MSG; + +typedef struct +{ + SESSION_STRUCT* pSessionStruct; + DWORD dwFlags; + ULONGLONG qwSessionNonce; +} XGI_SESSIONSTATE_MSG; + +typedef struct +{ + SESSION_STRUCT* pSessionStruct; + DWORD dwFlags; + ULONGLONG qwSessionNonce; + DWORD dwSessionDurationSec; + DWORD cbResultsBuffer; + PXSESSION_REGISTRATION_RESULTS pResults; +} XGI_SESSIONREGISTER_MSG; + +typedef struct +{ + DWORD dwProcedureIndex; + DWORD dwUserIndex; + DWORD dwNumResults; + WORD wNumProperties; + WORD wNumContexts; + PXUSER_PROPERTY pSearchProperties; + PXUSER_CONTEXT pSearchContexts; + DWORD cbResultsBuffer; + PXSESSION_SEARCHRESULT_HEADER pSearchResults; +} XGI_SESSIONSEARCH_MSG; + +typedef struct +{ + DWORD dwProcedureIndex; + DWORD dwUserIndex; + DWORD dwNumResults; + WORD wNumProperties; + WORD wNumContexts; + PXUSER_PROPERTY pSearchProperties; + PXUSER_CONTEXT pSearchContexts; + DWORD cbResultsBuffer; + PXSESSION_SEARCHRESULT_HEADER pSearchResults; + DWORD dwNumUsers; +} XGI_SESSIONSEARCHEX_MSG; + +typedef struct +{ + DWORD dwUserIndex; + XNKID sessionID; + DWORD cbResultsBuffer; + PXSESSION_SEARCHRESULT_HEADER pSearchResults; +} XGI_SESSIONSEARCHBYID_MSG; + +typedef struct +{ + DWORD dwUserIndex; + PXSESSION_INFO pSessionInfo; +} XGI_SESSIONINVITE_MSG; + +typedef struct +{ + SESSION_STRUCT* pSessionStruct; + XUID xuid; + DWORD dwNumViews; + CONST XSESSION_VIEW_PROPERTIES* pViews; +} XGI_STATSWRITE_MSG; + + +//----------------------------------------------------------------------------- +// Session APIs +//----------------------------------------------------------------------------- + +#define XSESSION_SEARCH_BY_ID_PROC 0xFFFFFFFF // Global query to find a session by session ID. Available in all titles. Param 0 must be SessionID + +#define XSESSION_CREATE_PRIVATE_MODIFIERS_MASK 0x00001000 +#define XSESSION_CREATE_PRIVATE_FORCE_UDP 0x00001000 // Arbitrated session results will only be reported in udp + + +//----------------------------------------------------------------------------- +// Mute List APIs +//----------------------------------------------------------------------------- + + +typedef struct _XUSER_MUTELIST_REQUEST +{ + DWORD dwUserIndex; + XUID Xuid; + DWORD dwResult; +} XUSER_MUTELIST_REQUEST; + +XBOXAPI +DWORD +WINAPI +XUserpMuteListAdd( + DWORD dwUserIndex, + XUID XuidRemoteTalker + ); + +XBOXAPI +DWORD +WINAPI +XUserpMuteListRemove( + DWORD dwUserIndex, + XUID XuidRemoteTalker + ); + + +//----------------------------------------------------------------------------- +// Private Arbitration APIs +//----------------------------------------------------------------------------- + + +#define XARB_FLAG_IS_TOURNAMENT 0x0001 +#define XARB_FLAG_CAN_EXTEND_TIME 0x0002 +#define XARB_FLAG_USES_SESSION_HOST 0x0004 +#define XARB_FLAG_FOR_TEAMS 0x0008 +#define XARB_FLAG_FFA 0x0010 +#define XARB_FLAG_IS_PUBLISHER_TOURNAMENT 0x0020 + +#define XARB_FLAG_I_VOLUNTARILY_QUIT 0x8000 +#define XARB_FLAG_I_WAS_HOST 0x4000 +#define XARB_FLAG_LOST_CONNECTIVITY 0x2000 +#define XARB_FLAG_LOST_CONNECTIVITY_SUBMITTED 0x1000 +#define XARB_FLAG_TYPE_1_SUSPICIOUS_INFO_SUBMITTED 0x0800 +#define XARB_FLAG_TYPE_2_SUSPICIOUS_INFO_SUBMITTED 0x0400 +#define XARB_FLAG_TYPE_3_SUSPICIOUS_INFO_SUBMITTED 0x0200 +#define XARB_FLAG_STATS_BUNDLE_SUBMITTED 0x0100 +#define XARB_FLAG_TOURNAMENT_BUNDLE_SUBMITTED 0x0080 + +extern const CHAR *rgszFunctionNames[]; + +#define ORDINAL_0206_XFriendsCreateEnumerator (WORD)0x0206 +#define ORDINAL_0586_XInviteGetAcceptedInfo (WORD)0x0586 +#define ORDINAL_0583_XInviteSend (WORD)0x0583 +#define ORDINAL_000b_XPresenceCreateEnumerator (WORD)0x000b +#define ORDINAL_0010_XPresenceInitialize (WORD)0x0010 +#define ORDINAL_000d_XPresenceSubscribe (WORD)0x000d +#define ORDINAL_000e_XPresenceUnsubscribe (WORD)0x000e +#define ORDINAL_0e15_XStorageDelete (WORD)0x0e15 +#define ORDINAL_0e11_XStorageDownloadToMemory (WORD)0x0e11 +#define ORDINAL_0e14_XStorageEnumerate (WORD)0x0e14 +#define ORDINAL_0e13_XStorageUploadFromMemory (WORD)0x0e13 +#define ORDINAL_0801_XStringVerify (WORD)0x0801 +#define ORDINAL_0914_XContentDownload (WORD)0x0914 +#define ORDINAL_0917_XContentDownloadGetInProgressMetadata (WORD)0x0917 +#define ORDINAL_0913_XContentGetReferral (WORD)0x0913 +#define ORDINAL_0916_XContentRefreshLicense (WORD)0x0916 +#define ORDINAL_0915_XContentRefreshLicenseSubTask (WORD)0x0915 +#define ORDINAL_0207_XFriendsRequestWorker (WORD)0x0207 +#define ORDINAL_0584_XInviteAnswer (WORD)0x0584 +#define ORDINAL_0585_XInviteRevoke (WORD)0x0585 +#define ORDINAL_0587_XInviteSendMessage (WORD)0x0587 +#define ORDINAL_0800_XLookupTitleName (WORD)0x0800 +#define ORDINAL_0506_XMessageCreate (WORD)0x0506 +#define ORDINAL_0511_XMessageDelete (WORD)0x0511 +#define ORDINAL_0505_XMessageDeleteWorker (WORD)0x0505 +#define ORDINAL_0507_XMessageDestroy (WORD)0x0507 +#define ORDINAL_050f_XMessageDetailsGetProperty (WORD)0x050f +#define ORDINAL_050e_XMessageDetailsGetSummary (WORD)0x050e +#define ORDINAL_05a1_XMessageDownloadAttachmentToMemory (WORD)0x05a1 +#define ORDINAL_0501_XMessageEnumerate (WORD)0x0501 +#define ORDINAL_0513_XMessageEnumerateWorker (WORD)0x0513 +#define ORDINAL_050d_XMessageGetDetails (WORD)0x050d +#define ORDINAL_0503_XMessageGetDetailsWorker (WORD)0x0503 +#define ORDINAL_0509_XMessageGetProperty (WORD)0x0509 +#define ORDINAL_0502_XMessageGetSummary (WORD)0x0502 +#define ORDINAL_0514_XMessageGetSummaryWorker (WORD)0x0514 +#define ORDINAL_0581_XMessageInviteAnswerWorker (WORD)0x0581 +#define ORDINAL_0582_XMessageInviteRevokeWorker (WORD)0x0582 +#define ORDINAL_0580_XMessageInviteSendWorker (WORD)0x0580 +#define ORDINAL_050b_XMessageRevoke (WORD)0x050b +#define ORDINAL_0512_XMessageSend (WORD)0x0512 +#define ORDINAL_050a_XMessageSendWorker (WORD)0x050a +#define ORDINAL_0510_XMessageSetFlags (WORD)0x0510 +#define ORDINAL_0504_XMessageSetFlagsWorker (WORD)0x0504 +#define ORDINAL_0508_XMessageSetProperty (WORD)0x0508 +#define ORDINAL_0100_XOnlineMatchCreate (WORD)0x0100 +#define ORDINAL_0102_XOnlineMatchDelete (WORD)0x0102 +#define ORDINAL_0006_XOnlineMatchRegisterSession (WORD)0x0006 +#define ORDINAL_0104_XOnlineMatchSearch (WORD)0x0104 +#define ORDINAL_0101_XOnlineMatchUpdate (WORD)0x0101 +#define ORDINAL_0300_XOnlineQueryAdd (WORD)0x0300 +#define ORDINAL_0306_XOnlineQueryFindFromIds (WORD)0x0306 +#define ORDINAL_0301_XOnlineQueryRemove (WORD)0x0301 +#define ORDINAL_0302_XOnlineQueryRemoveId (WORD)0x0302 +#define ORDINAL_0305_XOnlineQuerySearch (WORD)0x0305 +#define ORDINAL_0307_XOnlineQuerySelect (WORD)0x0307 +#define ORDINAL_0303_XOnlineQueryUpdate (WORD)0x0303 +#define ORDINAL_0304_XOnlineQueryUpdateId (WORD)0x0304 +#define ORDINAL_0400_XOnlineTeamCreate (WORD)0x0400 +#define ORDINAL_0401_XOnlineTeamDelete (WORD)0x0401 +#define ORDINAL_0407_XOnlineTeamEnumerate (WORD)0x0407 +#define ORDINAL_0408_XOnlineTeamEnumerateByUserXUID (WORD)0x0408 +#define ORDINAL_0404_XOnlineTeamJoin (WORD)0x0404 +#define ORDINAL_0402_XOnlineTeamMemberRecruit (WORD)0x0402 +#define ORDINAL_0403_XOnlineTeamMemberRecruitByName (WORD)0x0403 +#define ORDINAL_0405_XOnlineTeamMemberRemove (WORD)0x0405 +#define ORDINAL_0406_XOnlineTeamMemberSetProperties (WORD)0x0406 +#define ORDINAL_0409_XOnlineTeamMembersEnumerate (WORD)0x0409 +#define ORDINAL_040a_XOnlineTeamSetProperties (WORD)0x040a +#define ORDINAL_0203_XOnlinepFriendsAcceptRequest (WORD)0x0203 +#define ORDINAL_0204_XOnlinepFriendsRejectRequest (WORD)0x0204 +#define ORDINAL_0202_XOnlinepFriendsRemove (WORD)0x0202 +#define ORDINAL_0200_XOnlinepFriendsRequest (WORD)0x0200 +#define ORDINAL_0201_XOnlinepFriendsRequestByName (WORD)0x0201 +#define ORDINAL_0a00_XOnlinepMuteListAdd (WORD)0x0a00 +#define ORDINAL_0a01_XOnlinepMuteListRemove (WORD)0x0a01 +#define ORDINAL_0003_XOnlinepNotificationSendDequeue (WORD)0x0003 +#define ORDINAL_0009_XOnlinepPeerSubscribe (WORD)0x0009 +#define ORDINAL_000a_XOnlinepPeerUnsubscribe (WORD)0x000a +#define ORDINAL_0600_XOnlinepSetUserSettings2 (WORD)0x0600 +#define ORDINAL_0008_XPresenceGetLocalSession (WORD)0x0008 +#define ORDINAL_0007_XPresenceGetPeerSession (WORD)0x0007 +#define ORDINAL_000c_XPresenceGetState (WORD)0x000c +#define ORDINAL_0002_XPresenceSendAlives (WORD)0x0002 +#define ORDINAL_000f_XPresenceSendDeadUsers (WORD)0x000f +#define ORDINAL_0004_XPresenceSetState (WORD)0x0004 +#define ORDINAL_0005_XPresenceUpdateStateFlags (WORD)0x0005 +#define ORDINAL_0d01_XResolveName (WORD)0x0d01 +#define ORDINAL_0c02_XSignatureCheckRevocation (WORD)0x0c02 +#define ORDINAL_0c01_XSignatureVerify (WORD)0x0c01 +#define ORDINAL_0e04_XStorageDeleteWorker (WORD)0x0e04 +#define ORDINAL_0e10_XStorageDownloadToDirectoryInternal (WORD)0x0e10 +#define ORDINAL_0e01_XStorageDownloadWorker (WORD)0x0e01 +#define ORDINAL_0e03_XStorageEnumerateWorker (WORD)0x0e03 +#define ORDINAL_0e12_XStorageUploadFromDirectoryInternal (WORD)0x0e12 +#define ORDINAL_0e02_XStorageUploadWorker (WORD)0x0e02 +#define ORDINAL_0802_XStringLookup (WORD)0x0802 +#define ORDINAL_0952_XUpdateDownload (WORD)0x0952 +#define ORDINAL_0951_XUpdateGetReferral (WORD)0x0951 +#define ORDINAL_0b00_XUserAddAffiliate (WORD)0x0b00 +#define ORDINAL_1003_XUserEnumerateReceivedReviews (WORD)0x1003 +#define ORDINAL_1002_XUserEnumerateSentReviews (WORD)0x1002 +#define ORDINAL_0a02_XUserFindUser (WORD)0x0a02 +#define ORDINAL_1004_XUserGetAggregateReviews (WORD)0x1004 +#define ORDINAL_0b01_XUserIsAffiliate (WORD)0x0b01 +#define ORDINAL_0b02_XUserQueryAffiliate (WORD)0x0b02 +#define ORDINAL_1005_XUserSubmitComplaint (WORD)0x1005 +#define ORDINAL_1001_XUserSubmitPlayerReview (WORD)0x1001 +#define ORDINAL_0621__XAccountAcceptTermsOfUse (WORD)0x0621 +#define ORDINAL_061f__XAccountAcknowledgeDowngrade (WORD)0x061f +#define ORDINAL_060c__XAccountAddPaymentInstrument (WORD)0x060c +#define ORDINAL_061a__XAccountChangeGamertag (WORD)0x061a +#define ORDINAL_061c__XAccountChangeSubscriptionPaymentInstrument (WORD)0x061c +#define ORDINAL_061b__XAccountCreateLiveAccount (WORD)0x061b +#define ORDINAL_060a__XAccountCreateLiveAccountOld (WORD)0x060a +#define ORDINAL_0611__XAccountGetAccountInfo (WORD)0x0611 +#define ORDINAL_0627__XAccountGetAccountInfoFromPassport (WORD)0x0627 +#define ORDINAL_060e__XAccountGetLinkedGamertag (WORD)0x060e +#define ORDINAL_060b__XAccountGetPaymentInstruments (WORD)0x060b +#define ORDINAL_0602__XAccountGetPointsBalance (WORD)0x0602 +#define ORDINAL_0614__XAccountGetPostalCode (WORD)0x0614 +#define ORDINAL_0604__XAccountGetUserInfo (WORD)0x0604 +#define ORDINAL_0616__XAccountGetUserSubscriptionDetails (WORD)0x0616 +#define ORDINAL_0624__XAccountGetUserType (WORD)0x0624 +#define ORDINAL_0625__XAccountLinkXbox1Account (WORD)0x0625 +#define ORDINAL_0618__XAccountMigrateXbox1User (WORD)0x0618 +#define ORDINAL_0626__XAccountMigrateXboxComUser (WORD)0x0626 +#define ORDINAL_0620__XAccountQuery (WORD)0x0620 +#define ORDINAL_0605__XAccountRecoverAccount (WORD)0x0605 +#define ORDINAL_060d__XAccountRemovePaymentInstrument (WORD)0x060d +#define ORDINAL_0619__XAccountReserveGamertag (WORD)0x0619 +#define ORDINAL_0610__XAccountSetAccountInfo (WORD)0x0610 +#define ORDINAL_0622__XAccountSetStatus (WORD)0x0622 +#define ORDINAL_061e__XAccountTroubleshoot (WORD)0x061e +#define ORDINAL_0601__XAccountUpdateParentalControls (WORD)0x0601 +#define ORDINAL_0615__XAccountUpdatePaymentInstrument (WORD)0x0615 +#define ORDINAL_0623__XAccountVerifyBillingInfo (WORD)0x0623 +#define ORDINAL_0617__XAccountVerifyBillingToken (WORD)0x0617 +#define ORDINAL_061d__XAccountVerifyParentCreditCard (WORD)0x061d +#define ORDINAL_0909__XBannerGetHotList (WORD)0x0909 +#define ORDINAL_0908__XBannerGetList (WORD)0x0908 +#define ORDINAL_0902__XOfferingContentAvailable (WORD)0x0902 +#define ORDINAL_0901__XOfferingContentDetails (WORD)0x0901 +#define ORDINAL_0900__XOfferingContentEnumerate (WORD)0x0900 +#define ORDINAL_0912__XOfferingEnumerateGenres (WORD)0x0912 +#define ORDINAL_0911__XOfferingEnumerateTitlesByFilter (WORD)0x0911 +#define ORDINAL_0910__XOfferingGetTitleDetails (WORD)0x0910 +#define ORDINAL_0903__XOfferingInternalUpdateAccessTimes (WORD)0x0903 +#define ORDINAL_0906__XOfferingPurchase (WORD)0x0906 +#define ORDINAL_0907__XOfferingPurchaseGamertag (WORD)0x0907 +#define ORDINAL_0905__XOfferingSubscriptionDetails (WORD)0x0905 +#define ORDINAL_0904__XOfferingSubscriptionEnumerate (WORD)0x0904 +#define ORDINAL_0f00__XOnlineArbitrationRegister (WORD)0x0f00 +#define ORDINAL_0f02__XOnlineArbitrationReportResult (WORD)0x0f02 +#define ORDINAL_0f01__XOnlineArbitrationTimeExtend (WORD)0x0f01 +#define ORDINAL_070e__XOnlineStatsEnumerateByRank (WORD)0x070e +#define ORDINAL_070f__XOnlineStatsEnumerateByRating (WORD)0x070f +#define ORDINAL_070d__XOnlineStatsEnumerateByXuid (WORD)0x070d +#define ORDINAL_0705__XOnlineStatsPost (WORD)0x0705 +#define ORDINAL_0703__XOnlineStatsRead (WORD)0x0703 +#define ORDINAL_0706__XOnlineStatsReset (WORD)0x0706 +#define ORDINAL_0609__XPassportChangePasswordInternal (WORD)0x0609 +#define ORDINAL_0607__XPassportCreateInternal (WORD)0x0607 +#define ORDINAL_0606__XPassportGetEncryptedProxyParameters (WORD)0x0606 +#define ORDINAL_0613__XPassportGetMemberName (WORD)0x0613 +#define ORDINAL_060f__XPassportGetSecretQuestions (WORD)0x060f +#define ORDINAL_0612__XPassportGetUserData (WORD)0x0612 +#define ORDINAL_0608__XPassportLoginInternal (WORD)0x0608 +#define ORDINAL_0709__XProfileClearTitle (WORD)0x0709 +#define ORDINAL_070b__XProfileEnumAchievements (WORD)0x070b +#define ORDINAL_0708__XProfileEnumTitles (WORD)0x0708 +#define ORDINAL_0711__XProfileReadOnlineSettings (WORD)0x0711 +#define ORDINAL_070a__XProfileSyncAchievements (WORD)0x070a +#define ORDINAL_0710__XProfileSyncOnlineSettings (WORD)0x0710 +#define ORDINAL_0707__XProfileSyncTitles (WORD)0x0707 + +#define X_ATTRIBUTE_DATATYPE_MASK 0x00f00000 +#define X_ATTRIBUTE_DATATYPE_INTEGER 0x00000000 +#define X_ATTRIBUTE_DATATYPE_STRING 0x00100000 +#define X_ATTRIBUTE_DATATYPE_BLOB 0x00200000 +#define X_MAX_STRING_ATTRIBUTE_LEN 400 +#define X_MAX_BLOB_ATTRIBUTE_LEN 800 +#define XONLINE_MATCH_MAX_ATTRIBUTES 64 +#define XONLINE_MATCH_MAX_SEARCH_RESULTS 50 +#define MAX_GAMERTAG_SIZE 16 +#define MAX_FRIENDS 100 +#define MAX_MUTELISTUSERS 250 +#define NOTIF_NUM_NOTIFICATIONS 12 +#define NOTIF_MAX_QVAL 16 +#define NOTIF_MAX_TITLE_STATE_BYTES 8 +#define NOTIF_MAX_NICKNAME_BYTES 24 +#define NOTIF_MAX_RICH_PRESENCE_BYTES 128 +#define MAX_TITLE_STATE_BYTES 256 +#define PQUEUE_BUDDY_REQ 0 +#define PQUEUE_LIST_CHANGE 1 +#define PQUEUE_PRESENCE 2 +#define PQUEUE_INVITE 3 +#define PQUEUE_INVITE_ANSWER 4 +#define PQUEUE_PEER_PRESENCE 6 +#define PQUEUE_PRESENCE_2 7 +#define PQUEUE_LOCAL_INVITED 16 +#define PQUEUE_LOCAL_INVITE_ANSWERED 17 +#define PQUEUE_LOCAL_INVITE_REVOKED 18 +#define XONLINE_MAX_PARENTAL_CONTROL_SOURCE_NAME_LENGTH 100 +#define MAX_FIRSTNAME_SIZE 64 +#define MAX_LASTNAME_SIZE 64 +#define MAX_EMAIL_SIZE 129 +#define MAX_PHONE_PREFIX_SIZE 12 +#define MAX_PHONE_NUMBER_SIZE 12 +#define MAX_PHONE_EXTENSION_SIZE 12 +#define MAX_STREET_SIZE 128 +#define MAX_CITY_SIZE 64 +#define MAX_DISTRICT_SIZE 64 +#define MAX_STATE_SIZE 64 +#define MAX_POSTALCODE_SIZE 16 +#define MAX_CC_NAME_SIZE 64 +#define MAX_CC_NUMBER_SIZE 24 +#define MAX_CC_CCV_NUMBER_SIZE 4 +#define MAX_DD_NAME_SIZE 64 +#define MAX_DD_NUMBER_SIZE 24 +#define MAX_DD_BANK_CODE_SIZE 64 +#define MAX_DD_BRANCH_CODE_SIZE 64 +#define MAX_DD_CHECK_DIGITS_SIZE 64 +#define MAX_TOKEN_SIZE 26 +#define MAX_INSTANCE_ID_LENGTH 17 +#define XONLINE_USERDOMAIN_SIZE 20 +#define XONLINE_REALM_NAME_SIZE 24 +#define XONLINE_KEY_LENGTH 16 +#define XONLINE_PASSPORT_MEMBER_NAME_MAX_LEN 113 +#define XONLINE_PASSPORT_SECRET_QUESTION_MIN_LEN 5 +#define XONLINE_PASSPORT_SECRET_QUESTION_MAX_LEN 64 +#define XONLINE_PASSPORT_LOGIN_TOKEN_REQUEST_MAX_LEN 2000 +#define XONLINE_PASSPORT_PUBLIC_KEY_MODULUS_MAX_LEN 128 +#define XONLINE_PASSPORT_ENCRYPTED_PASSWORD_MAX_LEN 384 +#define XONLINE_PASSPORT_ENCRYPTED_SESSION_KEY_MAX_LEN 128 +#define XONLINE_PASSPORT_SECRET_QUESTION_MAX_COUNT 10 +#define XONLINE_XUACS_MAX_PAYMENT_INSTRUMENTS 10 +#define XONLINE_XUACS_MAX_POSTAL_CODE_MATCHES 20 +#define XONLINE_XUACS_MAX_SUBSCRIPTION_DESCRIPTION_LENGTH 500 +#define XONLINE_XUACS_MAX_SUBSCRIPTION_FRIENDLY_NAME_LENGTH 50 +#define XONLINE_XUACS_MAX_ISO_CODE_LENGTH 3 +#define XONLINE_XUACS_MAX_FORMATTED_PRICE_LENGTH 20 +#define XONLINE_XBOS_MAX_OFFER_PRICE_TEXT_LENGTH 50 +#define XONLINE_XBOS_MAX_OFFER_NAME_LENGTH 100 +#define XONLINE_XBOS_MAX_PRICES_PER_OFFER 10 +#define XONLINE_XBOS_MAX_OFFERS_ENUMERATED 100 +#define XONLINE_XBOS_MAX_TITLES_ENUMERATED 100 +#define XONLINE_XBOS_MAX_OFFER_SELL_TEXT_LENGTH 1000 +#define XONLINE_XBOS_MAX_TITLE_NAME_LENGTH 100 +#define XONLINE_CONTENT_ID_LEN 20 +#define XONLINE_XBOS_MAX_TITLE_TITLE_LENGTH 60 +#define XONLINE_XBOS_MAX_TITLE_SELL_TEXT_LENGTH 1000 +#define XONLINE_XBOS_MAX_TITLE_DEVELOPER_LENGTH 60 +#define XONLINE_XBOS_MAX_TITLE_PUBLISHER_LENGTH 60 +#define XONLINE_XBOS_MAX_TITLE_GENRE_LENGTH 60 +#define XONLINE_XBOS_MAX_GENRE_NAME_LENGTH 255 +#define XONLINE_XBOS_MAX_GENRES_ENUMERATED 50 +#define XONLINE_BANNER_MAX_COUNT 128 +#define XONLINE_BANNER_MAX_PATH 128 +#define XONLINE_BANNER_MAX_TITLE_NAME 200 +#define XONLINE_BANNER_MAX_OFFER_NAME 200 +#define XONLINE_QUERY_MAX_ATTRIBUTES 32 +#define XONLINE_QUERY_MAX_STRING_ATTRIBUTE_LEN 128 +#define XONLINE_QUERY_MAX_BLOB_ATTRIBUTE_LEN 128 +#define XONLINE_QUERY_MAX_FIND_NUM_ENTITYIDS 10 +#define XONLINE_MAX_TEAM_COUNT 8 +#define XONLINE_MAX_TEAM_MEMBER_COUNT 64 +#define XONLINE_MAX_TEAM_NAME_SIZE 16 +#define XONLINE_MAX_TEAM_DESCRIPTION_SIZE 256 +#define XONLINE_MAX_TEAM_MOTTO_SIZE 256 +#define XONLINE_MAX_TEAM_URL_SIZE 256 +#define XONLINE_MAX_TEAM_NAME_BYTES 32 +#define XONLINE_MAX_TEAM_DESCRIPTION_BYTES 512 +#define XONLINE_MAX_TEAM_MOTTO_BYTES 512 +#define XONLINE_MAX_TEAM_URL_BYTES 512 +#define XONLINE_MAX_TEAM_DATA_SIZE 100 +#define XONLINE_MAX_TEAM_MEMBER_DATA_SIZE 100 +#define XPROFILE_SETTING_MAX_COUNT 32 +#define XPROFILE_SETTING_MAX_READ_USERS 16 +#define XPROFILE_SETTING_MAX_RETURN_SETTINGS 512 +#define XPROFILE_MAX_SYNC_SETTINGS_REQUEST 32 +#define XPROFILE_MAX_SYNC_SETTINGS_RESULTS 128 +#define XPROFILE_SETTING_MAX_SIZE 1000 +#define XONLINE_STAT_ATTRS_IN_SPEC 64 +#define XONLINE_STAT_MAX_PROCEDURE_COUNT 100 +#define XONLINE_STAT_MAX_PARAM_COUNT 256 +#define XONLINE_STAT_MAX_SPECS 64 +#define XONLINE_MAX_STATS_USER_COUNT 101 +#define XONLINE_MAX_STATS_ROW_COUNT 100 +#define XSTAT_PROC_DATA_TYPE_NULL 0 +#define XSTAT_PROC_DATA_TYPE_INT8 1 +#define XSTAT_PROC_DATA_TYPE_INT16 2 +#define XSTAT_PROC_DATA_TYPE_INT32 3 +#define XSTAT_PROC_DATA_TYPE_INT64 4 +#define XSTAT_PROC_DATA_TYPE_DOUBLE 5 +#define XSTAT_PROC_DATA_TYPE_PUID 7 +#define XPROFILE_MAX_TITLE_NAME_LEN 23 +#define XPROFILE_MAX_SYNC_TITLES_REQUEST 32 +#define XPROFILE_MAX_SYNC_TITLES_RESULTS 32 +#define XPROFILE_MAX_ENUM_TITLE 32 +#define XPROFILE_MAX_REPLACE_IDS 10 +#define XPROFILE_MAX_NEXT_IDS 10 +#define XPROFILE_MAX_ACHIEVEMENT_NAME_LEN 32 +#define XPROFILE_MAX_ACHIEVEMENT_DESC_LEN 100 +#define XPROFILE_MAX_ACHIEVEMENT_HOWTO_LEN 100 +#define XPROFILE_MAX_SYNC_ACHIEVEMENTS_REQUEST 32 +#define XPROFILE_MAX_SYNC_ACHIEVEMENTS_RESULTS 32 +#define XPROFILE_MAX_ENUM_ACHIEVEMENTS 200 +#define XMSG_MAX_NUM_MESSAGES 125 +#define XMSG_MAX_PROPS 256 +#define XMSG_MAX_DETAILS 4096 +#define XONLINE_LIVE_SIGNATURE_SIZE 100 +#define XSIGNATURE_MAX_SIGNATURES_TO_VERIFY 1 +#define XSIGNATURE_MAX_CONTENT_TUPLES 32 +#define XONLINE_MAX_PATHNAME_DOMAIN_LENGTH 63 +#define XSTORAGE_MAX_SIGNATURE_SIZE 20 +#define XSTORAGE_MAX_ATTRIBUTES_SIZE 256 +#define XSTORAGE_DOWNLOAD_WORKER_EXTRA_OBJECT_SIZE 256 +#define XSTORAGE_UPLOAD_WORKER_EXTRA_OBJECT_SIZE 256 +#define XSTORAGE_MISC_WORKER_EXTRA_OBJECT_SIZE 256 +#define XSTORAGE_MAX_DISPLAYNAME 128 +#define XSTORAGE_DOWNLOAD_TO_DIRECTORY_EXTRA_OBJECT_SIZE_INTERNAL 200000 +#define XSTORAGE_UPLOAD_FROM_DIRECTORY_EXTRA_OBJECT_SIZE 80000 +#define XMESSAGE_SEND_EXTRA_OBJECT_SIZE 1500 +#define XMESSAGE_DOWNLOAD_ATTACH_TO_MEM_EXTRA_OBJECT_SIZE 1024 +#define XFRIENDS_REQUEST_EXTRA_OBJECT_SIZE 1500 +#define XREFERRAL_MAX_URL_SIZE 500 +#define XCONTENT_REFERRAL_MAX_URL_COUNT 10 +#define XCONTENT_MAX_PATH 256 +#define XCONTENT_HEADER_MAX_SIZE 2048 +#define XCONTENT_DOWNLOAD_EXTRA_OBJECT_SIZE 250000 +#define XUPDATE_DOWNLOAD_EXTRA_OBJECT_SIZE 250000 +#define XARB_MAX_REGISTRANTS_IN_SESSION 64 +#define XARB_MAX_USERS_IN_SESSION 4 +#define XARB_MAX_SUSPICIOUS_INFO_MESSAGE_LENGTH 256 +#define XARB_MAX_COMP_BUNDLE_BYTES 0 +#define FB_REVIEW_MAX_TYPE 10 +#define XFB_MAX_ENUM_REVIEW_RESULTS 100 +#define XFB_MAX_AGG_REVIEW_RESULTS FB_REVIEW_MAX_TYPE + +// +// Note: these must be kept in sync with the same list in +// xonline\main\private\common\genx\xon\inc\xonline.x: +// +#define XONLINE_FRIENDSTATE_ENUM_RESERVED1 0x00030000 +#define XONLINE_FRIENDSTATE_ENUM_RESERVED2 0x00040000 +#define XONLINE_FRIENDSTATE_ENUM_RESERVED3 0x00050000 +#define XONLINE_FRIENDSTATE_ENUM_RESERVED4 0x00060000 + +C_ASSERT(XONLINE_MAX_LOGON_USERS == XUSER_MAX_COUNT); +C_ASSERT(XONLINE_GAMERTAG_SIZE == XUSER_NAME_SIZE); + + +#define DASH_TITLE_ID 0xFFFE0000 +#define XENON_DASH_TITLE_ID 0xFFFE07D1 + + +// ==================================================================== +// Logon related +// + +#define XONLINE_S_LOGON_USER_MESSAGE_ENUMERATION_NEEDED _HRESULT_TYPEDEF_(0x001512F1L) + +XAMINLINE +BOOL +XNetLogonTitleIDIsSamePublisher( + IN DWORD dwServiceID, + IN DWORD dwTitleID + ) +{ + return HIWORD(dwTitleID) == HIWORD(XNetLogonGetTitleID(dwServiceID)); +} + + +// ==================================================================== +// XOnline Task Throttling +// + +#define XONLINE_THROTTLE_FLAG_DELAY 0x00000001 // delay starting each new operation until the throttle delay period expires, must always be specified for Xenon +#define XONLINE_THROTTLE_FLAG_FAIL 0x00000002 // return XONLINE_E_TASK_THROTTLED for new tasks that are started during the throttle delay period +#define XONLINE_THROTTLE_FLAG_CANCEL_PREVIOUS 0x00000004 // force the previous task of the same type to fail with XONLINE_E_TASK_ABORTED_BY_DUPLICATE when possible +#define XONLINE_THROTTLE_FLAG_RIP 0x00000008 // RIP in debug, not supported on Xenon +#define XONLINE_THROTTLE_FLAG_IGNORE_SERVER 0x00000010 // ignore any changes in the delay or flags that the server requests, debug/devkit only +#define XONLINE_THROTTLE_FLAG_FROM_END 0x00000020 // throttle time is enforced from when the last task finished instead of started, not supported on Xbox 1 + +#define XONLINE_VALID_THROTTLE_FLAGS (XONLINE_THROTTLE_FLAG_DELAY | \ + XONLINE_THROTTLE_FLAG_FAIL | \ + XONLINE_THROTTLE_FLAG_CANCEL_PREVIOUS | \ + XONLINE_THROTTLE_FLAG_RIP | \ + XONLINE_THROTTLE_FLAG_IGNORE_SERVER | \ + XONLINE_THROTTLE_FLAG_FROM_END) + +typedef struct _XONLINE_REQUEST_THROTTLE_SETTINGS +{ + DWORD dwThrottleDelayMs; // delay enforced between tasks, in milliseconds + DWORD dwThrottleFlags; // throttle flags in use, see XONLINE_THROTTLE_FLAG_xxx +} XONLINE_REQUEST_THROTTLE_SETTINGS, *PXONLINE_REQUEST_THROTTLE_SETTINGS; + + + +// ==================================================================== +// XOnline Matchmaking +// + +typedef enum +{ + MATCH_OP_CREATE = 0, + MATCH_OP_SEARCH, + MATCH_OP_INVALID + +} MATCH_OP; + +#define DW_LEN_HTTP_RESP_HDR 200 +#define DW_LEN_SENDBUFFER (400 + DW_LEN_HTTP_RESP_HDR) + +#define X_ATTRIBUTE_TYPE_MASK 0x0F000000 +#define X_ATTRIBUTE_TYPE_SESSION 0x00000000 +#define X_ATTRIBUTE_TYPE_PARAM 0x02000000 +#define X_ATTRIBUTE_TYPE_BUILTIN 0x03000000 +#define X_ATTRIBUTE_TYPE_CONSTANT 0x05000000 + +#define X_ATTRIBUTE_RESERVED ~(X_ATTRIBUTE_SCOPE_MASK | \ + X_ATTRIBUTE_DATATYPE_MASK | \ + X_ATTRIBUTE_TYPE_MASK | \ + X_ATTRIBUTE_ID_MASK) + +// NOTE: Changing these values impacts both the client and the server. +#define X_MATCH_MAX_QUERY_PARAMS 20 +#define X_MATCH_MAX_QUERY_RESULTS 50 +#define X_MATCH_MAX_TITLE_SCHEMA_ATTRS 40 +#define X_MATCH_MAX_ATTRIBUTE_DATA 4096 + +#define X_ATTRIBUTE_SCOPE_MASK 0x80000000 +#define X_ATTRIBUTE_SCOPE_GLOBAL 0x80000000 + +#define X_ATTRIBUTE_RESERVED1_MASK 0x70000000 +#define X_ATTRIBUTE_RESERVED2_MASK 0x000F0000 +#define X_ATTRIBUTE_RESERVED3_MASK 0x0F000000 + +#define X_MATCH_PROTOCOL_VERSION 0x01000000 // 1.0.0000 +#define X_MIN_SEARCH_RESULT_COLUMNS 8 + +// +// Reserved title search sproc indices +// +#define X_SSINDEX_GET_SESSION (DWORD)-1 // special sproc to retrieve session by session id +#define XMATCH_QUERYID_FLAG_SUMMARY_QUERY 0x80000000 +#define XMATCH_QUERYID_FLAG_RESERVED 0x7FFF0000 + +// +// This structure defines a session. When used on the client, will be +// included in a larger structure pre-pended with an async task struct. +// The following structure is identical to the host advertisement wire +// protocol. +// The raw data for session title, application data and attributes will +// typically follow this structure in the same area of memory, and on the +// wire. +// +typedef struct _XMATCH_SESSION +{ + DWORD dwMessageLength; + XNKID SessionID; + DWORD dwTitleID; + XNADDR HostAddress; + DWORD dwPublicOpen; + DWORD dwPrivateOpen; + DWORD dwPublicFilled; + DWORD dwPrivateFilled; + DWORD dwNumAttributes; +} XMATCH_SESSION, *PXMATCH_SESSION; + +// +// This structure is passed up to delete a session. +// +typedef struct _XMATCH_SESSION_DELETE +{ + DWORD dwMessageLength; + XNKID SessionID; + DWORD dwTitleID; +} XMATCH_SESSION_DELETE, *PXMATCH_SESSION_DELETE; + +// +// This structure defines the information passed to the server +// to initiate a search for a game session. +// + +#define XONLINE_MATCH_FLAG_NAT_TYPE_MASK 0x0003 +#define XONLINE_MATCH_FLAGS_RESERVED 0xFFFC + +typedef struct _XMATCH_SEARCH +{ + DWORD dwMessageLength; + DWORD dwTitleID; + DWORD dwProcedureIndex; + XNADDR ClientAddress; + WORD wNumUsers; + WORD wFlags; + DWORD dwNumParameters; +} XMATCH_SEARCH, *PXMATCH_SEARCH; + +// ==================================================================== +// SGADDR + +#pragma pack(push, 1) + +typedef struct _SGADDR { + IN_ADDR inaSg; // IP address of the SG for the client + DWORD dwSpiSg; // Pseudo-random identifier assigned by the SG + ULONGLONG qwXboxID; // Unique identifier of client machine account + BYTE abReserved[4]; // Reserved (must be zero) +} SGADDR; + +#pragma pack(pop) + +// +// This structure is the body of dead xbox requests. +// + +typedef struct _XMATCH_DEAD_XBOX +{ + DWORD dwMessageLength; + SGADDR sgaddr; + DWORD dwTitleID; + DWORD dwTitleRegion; + ULONGLONG aqwUserID[XONLINE_MAX_LOGON_USERS]; +} XMATCH_DEAD_XBOX, *PXMATCH_DEAD_XBOX; + +// +// This structure is the body of dead SG requests. +// + +typedef struct _XMATCH_DEAD_SG +{ + DWORD dwMessageLength; + SGADDR sgaddr; +} XMATCH_DEAD_SG, *PXMATCH_DEAD_SG; + +#pragma pack(push, 1) + +// NOTE: The client doesn't use this at all +typedef struct _XMATCH_SEARCHRESULT_HEADER +{ + DWORD dwMessageLength; + USHORT nNumSearchResults; + USHORT fFlags; // Unused, always zero + DWORD dwLoggingThreshold; // Unused, always zero +} XMATCH_SEARCHRESULT_HEADER, *PXMATCH_SEARCHRESULT_HEADER; + +typedef struct _XMATCH_SEARCHRESULT +{ + DWORD dwResultLength; + XNKID SessionID; + XNADDR HostAddress; + XNKEY KeyExchangeKey; + DWORD dwPublicOpen; + DWORD dwPrivateOpen; + DWORD dwPublicFilled; + DWORD dwPrivateFilled; + DWORD dwNumAttributes; +} XMATCH_SEARCHRESULT, *PXMATCH_SEARCHRESULT; + +#pragma pack(pop) + + +// +// Notifications +// + +typedef enum P_MSG_TYPES +{ + // Incoming messages + PMSG_MIN_REQ_TYPE = 1000, + PMSG_HELLO = 1000, + PMSG_ALIVE = 1001, + PMSG_SYNC = 1002, + PMSG_REFRESH = 1003, + PMSG_ADD = 1004, + PMSG_DELETE = 1005, + PMSG_ACCEPT = 1006, + PMSG_REJECT = 1007, + PMSG_BLOCK = 1008, + PMSG_UNBLOCK = 1009, + PMSG_INVITE = 1010, + PMSG_CANCEL = 1011, + PMSG_INVITE_ANSWER = 1012, + PMSG_NICKNAME = 1013, + PMSG_STATE = 1014, + PMSG_DEAD_XBOX = 1015, + PMSG_DEAD_SG = 1016, + PMSG_ANNOUNCE = 1017, + PMSG_SUBSCRIBED = 1018, + PMSG_UNSUBSCRIBE = 1019, + PMSG_ADDED = 1020, + PMSG_ACCEPTED = 1021, + PMSG_REMOVED = 1022, + PMSG_KICK = 1023, + PMSG_DEAD_USER = 1024, + PMSG_ALIVE_2 = 1025, + PMSG_WEB_FRIENDS = 1026, + PMSG_WEB_ALIVE = 1027, + PMSG_WEB_ANNOUNCE = 1028, + PMSG_WEB_SUBSCRIBED = 1029, + PMSG_WEB_UNSUBSCRIBE = 1030, + PMSG_PEER_SESSION = 1031, + PMSG_TEAM_LIST_TEAMS = 1032, + PMSG_TEAM_LIST_MEMBERS = 1033, + PMSG_TEAM_CREATE = 1034, + PMSG_TEAM_DELETE = 1035, + PMSG_TEAM_REMOVE = 1036, + PMSG_TEAM_MANAGE_TEAM = 1037, + PMSG_TEAM_MANAGE_MEMBER = 1038, + PMSG_TEAM_RECRUIT = 1039, + PMSG_TEAM_JOIN = 1040, + PMSG_TEAM_GET_TICKET = 1041, + PMSG_PEER_SUBSCRIBE = 1042, + PMSG_PEER_UNSUBSCRIBE = 1043, + PMSG_WATCH_START = 1044, + PMSG_WATCH_STOP = 1045, + PMSG_ADD_2 = 1046, + PMSG_INVITE_2 = 1047, + PMSG_ALIVE_INTERNAL = 1048, + PMSG_STATE_2 = 1049, + PMSG_GET_STATE = 1050, + PMSG_TEAM_CREATE_XE = 1051, + PMSG_TEAM_MANAGE_TEAM_XE = 1052, + PMSG_ADD_AFFILIATES = 1053, + PMSG_IS_AFFILIATE = 1054, + PMSG_QUERY_AFFILIATES = 1055, + PMSG_GET_PRESENCE_INFO = 1056, + PMSG_PRESENCE_INFO_REPLY = 1057, + PMSG_INVALIDATE_USER = 1058, + PMSG_FIND_USER = 1059, + PMSG_CHECK_TITLE_MESSAGES = 1060, + PMSG_TEAM_LIST_USER_TEAMS = 1061, + PMSG_MAX_REQ_TYPE = 1061, + + // Outgoing messages + PMSG_MIN_REPLY_TYPE = 1101, + PMSG_ALIVE_REPLY = 1101, + PMSG_SYNC_REPLY = 1102, + PMSG_WEB_FRIENDS_REPLY = 1103, + PMSG_WEB_ALIVE_REPLY = 1104, + PMSG_PEER_SESSION_REPLY = 1105, + PMSG_INVITE_REPLY = 1106, + PMSG_TEAM_LIST_TEAMS_REPLY = 1107, + PMSG_TEAM_LIST_MEMBERS_REPLY = 1108, + PMSG_TEAM_CREATE_REPLY = 1109, + PMSG_TEAM_DELETE_REPLY = 1110, + PMSG_TEAM_REMOVE_REPLY = 1111, + PMSG_TEAM_MANAGE_TEAM_REPLY = 1112, + PMSG_TEAM_MANAGE_MEMBER_REPLY = 1113, + PMSG_TEAM_RECRUIT_REPLY = 1114, + PMSG_TEAM_JOIN_REPLY = 1115, + PMSG_TEAM_GET_TICKET_REPLY = 1116, + PMSG_PEER_SUBSCRIBE_REPLY = 1117, + PMSG_PEER_UNSUBSCRIBE_REPLY = 1118, + PMSG_GET_STATE_REPLY = 1119, + PMSG_IS_AFFILIATE_REPLY = 1120, + PMSG_QUERY_AFFILIATES_REPLY = 1121, + PMSG_FIND_USER_REPLY = 1122, + PMSG_CHECK_TITLE_MESSAGES_REPLY = 1123, + PMSG_TEAM_LIST_USER_TEAMS_REPLY = 1124, + PMSG_MAX_REPLY_TYPE = 1124 + +}; + +#define P_STATE_MASK_NONE 0x0000 +#define P_STATE_MASK_ONLINE 0x0001 // Set if online +#define P_STATE_MASK_PLAYING 0x0002 // Set if playing a game +#define P_STATE_MASK_CLOAKED 0x0004 // Set to fake being offline +#define P_STATE_MASK_VOICE 0x0008 // Set if supports voice +#define P_STATE_MASK_JOINABLE 0x0010 // Set if session is joinable +#define P_STATE_MASK_GUESTS 0x0060 +#define P_STATE_MASK_RESERVED0 0x0080 +#define P_STATE_MASK_SENTREQUEST 0x40000000 +#define P_STATE_MASK_RECEIVEDREQUEST 0x80000000 + +#define P_BUDDY_STATUS_OK 0 // Mutualy accepted buddy +#define P_BUDDY_STATUS_PENDING 1 // Buddy request pending accetance +#define P_BUDDY_STATUS_REQUEST 2 // Buddy request to accept or reject + +// Internal cloaked state +#define XONLINE_FRIENDSTATE_FLAG_CLOAKED 0x00000004 + +// Used by all Presence and Notification protocols that accept an answer member +typedef enum P_INVITE_REPLIES +{ + PINVITE_REPLY_NO = 0, + PINVITE_REPLY_YES = 1, + PINVITE_REPLY_NEVER = 2 +}; + +typedef enum Q_MSG_TYPES +{ + // + // Incoming messages + // + QMSG_MIN_REQ_TYPE = 0, + QMSG_HELLO = 0, + QMSG_USER_INFO = 1, + QMSG_ADD = 2, + QMSG_DELETE = 3, + QMSG_DELETE_MATCHES = 4, + QMSG_DEAD_XBOX = 5, + QMSG_DEAD_SG = 6, + QMSG_LIST = 7, + QMSG_DEQUEUE = 8, + QMSG_DEAD_USER = 9, + QMSG_WEB_USER_INFO = 10, + QMSG_WEB_PRESENCE = 11, + QMSG_WEB_LIST = 12, + QMSG_ENUM_MESSAGES = 13, + QMSG_MESSAGE_SUMMARY = 14, + QMSG_MESSAGE_DETAILS = 15, + QMSG_DELETE_MESSAGE = 16, + QMSG_SEND_MESSAGE = 17, + QMSG_REVOKE_MESSAGE = 18, + QMSG_DELETE_TITLE = 19, + QMSG_ENUM_TITLES = 20, + QMSG_MESSAGE_FLAGS = 21, + QMSG_ENUM_SYSTEM_MESSAGES = 22, + QMSG_SYSTEM_MESSAGE_DETAILS = 23, + QMSG_DELETE_SYSTEM_MESSAGE = 24, + QMSG_SEND_SYSTEM_MESSAGE = 25, + QMSG_REVOKE_MESSAGE_EX = 26, + QMSG_ENUM_MESSAGES_2 = 27, + QMSG_MESSAGE_SUMMARY_2 = 28, + QMSG_MAX_REQ_TYPE = 28, + + // + // Outgoing messages + // + QMSG_MIN_REPLY_TYPE = 100, + QMSG_LIST_REPLY = 100, + QMSG_WEB_LIST_REPLY = 101, + QMSG_ENUM_MESSAGES_REPLY = 102, + QMSG_MESSAGE_SUMMARY_REPLY = 103, + QMSG_MESSAGE_DETAILS_REPLY = 104, + QMSG_DELETE_MESSAGE_REPLY = 105, + QMSG_SEND_MESSAGE_REPLY = 106, + QMSG_REVOKE_MESSAGE_REPLY = 107, + QMSG_DELETE_TITLE_REPLY = 108, + QMSG_ENUM_TITLES_REPLY = 109, + QMSG_MESSAGE_FLAGS_REPLY = 110, + QMSG_ENUM_SYSTEM_MESSAGES_REPLY = 111, + QMSG_SYSTEM_MESSAGE_DETAILS_REPLY = 112, + QMSG_DELETE_SYSTEM_MESSAGE_REPLY = 113, + QMSG_SEND_SYSTEM_MESSAGE_REPLY = 114, + QMSG_ENUM_MESSAGES_2_REPLY = 115, + QMSG_MESSAGE_SUMMARY_2_REPLY = 116, + QMSG_MAX_REPLY_TYPE = 116 +}; + + +#define XONLINE_FRIENDSTATE_MASK_REQUESTFLAGS (XONLINE_FRIENDSTATE_FLAG_RECEIVEDREQUEST | XONLINE_FRIENDSTATE_FLAG_SENTREQUEST) +#define XONLINE_FRIENDSTATE_MASK_CLIENTFLAGS (XONLINE_FRIENDSTATE_MASK_REQUESTFLAGS | XONLINE_FRIENDSTATE_FLAG_INVITEREJECTED | XONLINE_FRIENDSTATE_FLAG_INVITEACCEPTED | XONLINE_FRIENDSTATE_FLAG_RECEIVEDINVITE | XONLINE_FRIENDSTATE_FLAG_SENTINVITE) + +// Errors returned by Presence/Notification = 0x801520XX +#define XONLINE_E_NOTIFICATION_SERVER_BUSY _HRESULT_TYPEDEF_(0x80152001L) +#define XONLINE_E_NOTIFICATION_LIST_FULL _HRESULT_TYPEDEF_(0x80152002L) +#define XONLINE_E_NOTIFICATION_BLOCKED _HRESULT_TYPEDEF_(0x80152003L) +#define XONLINE_E_NOTIFICATION_FRIEND_PENDING _HRESULT_TYPEDEF_(0x80152004L) +#define XONLINE_E_NOTIFICATION_FLUSH_TICKETS _HRESULT_TYPEDEF_(0x80152005L) +#define XONLINE_E_NOTIFICATION_TOO_MANY_REQUESTS _HRESULT_TYPEDEF_(0x80152006L) +#define XONLINE_E_NOTIFICATION_USER_ALREADY_EXISTS _HRESULT_TYPEDEF_(0x80152007L) +#define XONLINE_E_NOTIFICATION_USER_NOT_FOUND _HRESULT_TYPEDEF_(0x80152008L) +#define XONLINE_E_NOTIFICATION_OTHER_LIST_FULL _HRESULT_TYPEDEF_(0x80152009L) +#define XONLINE_E_NOTIFICATION_SELF _HRESULT_TYPEDEF_(0x8015200AL) +#define XONLINE_E_NOTIFICATION_SAME_TITLE _HRESULT_TYPEDEF_(0x8015200BL) +#define XONLINE_E_NOTIFICATION_NO_TASK _HRESULT_TYPEDEF_(0x8015200CL) +#define XONLINE_E_NOTIFICATION_NOT_INITIALIZED _HRESULT_TYPEDEF_(0x8015200DL) +#define XONLINE_E_NOTIFICATION_TOO_MANY_SUBS _HRESULT_TYPEDEF_(0x8015200EL) + +#define XONLINE_S_NOTIFICATION_NO_PEER_SUBSCRIBE _HRESULT_TYPEDEF_(0x0015200EL) + +// Errors returned by teams = 0x801521XX +#define XONLINE_E_TEAMS_SERVER_BUSY _HRESULT_TYPEDEF_(0x80152100L) +#define XONLINE_E_TEAMS_TEAM_FULL _HRESULT_TYPEDEF_(0x80152101L) +#define XONLINE_E_TEAMS_MEMBER_PENDING _HRESULT_TYPEDEF_(0x80152102L) +#define XONLINE_E_TEAMS_TOO_MANY_REQUESTS _HRESULT_TYPEDEF_(0x80152103L) +#define XONLINE_E_TEAMS_USER_ALREADY_EXISTS _HRESULT_TYPEDEF_(0x80152104L) +#define XONLINE_E_TEAMS_USER_NOT_FOUND _HRESULT_TYPEDEF_(0x80152105L) +#define XONLINE_E_TEAMS_USER_TEAMS_FULL _HRESULT_TYPEDEF_(0x80152106L) +#define XONLINE_E_TEAMS_SELF _HRESULT_TYPEDEF_(0x80152107L) +#define XONLINE_E_TEAMS_NO_TASK _HRESULT_TYPEDEF_(0x80152108L) +#define XONLINE_E_TEAMS_TOO_MANY_TEAMS _HRESULT_TYPEDEF_(0x80152109L) +#define XONLINE_E_TEAMS_TEAM_ALREADY_EXISTS _HRESULT_TYPEDEF_(0x8015210AL) +#define XONLINE_E_TEAMS_TEAM_NOT_FOUND _HRESULT_TYPEDEF_(0x8015210BL) +#define XONLINE_E_TEAMS_INSUFFICIENT_PRIVILEGES _HRESULT_TYPEDEF_(0x8015210CL) +#define XONLINE_E_TEAMS_NAME_CONTAINS_BAD_WORDS _HRESULT_TYPEDEF_(0x8015210DL) +#define XONLINE_E_TEAMS_DESCRIPTION_CONTAINS_BAD_WORDS _HRESULT_TYPEDEF_(0x8015210EL) +#define XONLINE_E_TEAMS_MOTTO_CONTAINS_BAD_WORDS _HRESULT_TYPEDEF_(0x8015210FL) +#define XONLINE_E_TEAMS_URL_CONTAINS_BAD_WORDS _HRESULT_TYPEDEF_(0x80152110L) +#define XONLINE_E_TEAMS_NOT_A_MEMBER _HRESULT_TYPEDEF_(0x80152111L) +#define XONLINE_E_TEAMS_NO_ADMIN _HRESULT_TYPEDEF_(0x80152112L) + +// Errors returned by offering service = 0x801530XX + 0x801531XX +#define XONLINE_S_OFFERING_NEW_CONTENT _HRESULT_TYPEDEF_(0x00153101L) // new content is available +#define XONLINE_S_OFFERING_NO_NEW_CONTENT _HRESULT_TYPEDEF_(0x00153102L) // no new content is available +#define XONLINE_E_OFFERING_BAD_REQUEST _HRESULT_TYPEDEF_(0x80153001L) // server received incorrectly formatted request +#define XONLINE_E_OFFERING_INVALID_USER _HRESULT_TYPEDEF_(0x80153002L) // cannot find account for this user +#define XONLINE_E_OFFERING_INVALID_OFFER_ID _HRESULT_TYPEDEF_(0x80153003L) // offer does not exist +#define XONLINE_E_OFFERING_INELIGIBLE_FOR_OFFER _HRESULT_TYPEDEF_(0x80153004L) // )] private /title not allowed to purchase offer +#define XONLINE_E_OFFERING_OFFER_EXPIRED _HRESULT_TYPEDEF_(0x80153005L) // offer no longer available +#define XONLINE_E_OFFERING_SERVICE_UNREACHABLE _HRESULT_TYPEDEF_(0x80153006L) // apparent connectivity problems +#define XONLINE_E_OFFERING_PURCHASE_BLOCKED _HRESULT_TYPEDEF_(0x80153007L) // this user is not allowed to make purchases +#define XONLINE_E_OFFERING_PURCHASE_DENIED _HRESULT_TYPEDEF_(0x80153008L) // this user's payment is denied by billing provider +#define XONLINE_E_OFFERING_BILLING_SERVER_ERROR _HRESULT_TYPEDEF_(0x80153009L) // nonspecific billing provider error +#define XONLINE_E_OFFERING_OFFER_NOT_CANCELABLE _HRESULT_TYPEDEF_(0x8015300AL) // either this offer doesn't exist, or it's marked as un-cancelable +#define XONLINE_E_OFFERING_NOTHING_TO_CANCEL _HRESULT_TYPEDEF_(0x8015300BL) // this user doesn't have one of these anyways +#define XONLINE_E_OFFERING_ALREADY_OWN_MAX _HRESULT_TYPEDEF_(0x8015300CL) // this user already owns the maximum allowed +#define XONLINE_E_OFFERING_NO_CHARGE _HRESULT_TYPEDEF_(0x8015300DL) // this is a free offer; no purchase is necessary +#define XONLINE_E_OFFERING_PERMISSION_DENIED _HRESULT_TYPEDEF_(0x8015300EL) // permission denied +#define XONLINE_E_OFFERING_NAME_TAKEN _HRESULT_TYPEDEF_(0x8015300FL) // Name given to XOnlineVerifyNickname is taken (dosen't vet) + +// DMP-specific client XBOS/XUACS HRESULTS = 0x801534XX + +#define XONLINE_E_DMP_E_UNKNOWN_ERROR _HRESULT_TYPEDEF_(0x80153410L) // Generic DMP error. See server event log for specific details about what went wrong. +#define XONLINE_E_DMP_E_REQUEST_CANNOT_BE_COMPLETED _HRESULT_TYPEDEF_(0x80153411L) // The request cannot be completed due to user state. If the user is disabled then AddPromotionalBalance cannot be called upon that user. +#define XONLINE_E_DMP_E_INSUFFICIENT_BALANCE _HRESULT_TYPEDEF_(0x80153412L) // There is not sufficient balance to support this transaction +#define XONLINE_E_DMP_E_MAX_BALANCE_EXCEEDED _HRESULT_TYPEDEF_(0x80153413L) // The result point balance will exceed the policy max balance +#define XONLINE_E_DMP_E_MAX_ACQUISITION_EXCEEDED _HRESULT_TYPEDEF_(0x80153414L) // The point amount exceeds the policy max acquisition limit per transaction +#define XONLINE_E_DMP_E_MAX_CONSUMPTION_EXCEEDED _HRESULT_TYPEDEF_(0x80153415L) // The user consumption per period of time would exceed the policy limit +#define XONLINE_E_DMP_E_NO_MORE_PROMO_POINTS _HRESULT_TYPEDEF_(0x80153416L) // There are no more points to distribute for this tenant sku combination. All the promo points for this partner's promotional SKU are gone already! +#define XONLINE_E_DMP_E_PROMOTION_LIMIT_LIFE_MAX _HRESULT_TYPEDEF_(0x80153417L) // The promotional points user obtained would exceed the sku limit. There is a configurable per user limit on each promotion. The partner sets it in offer modeling time +#define XONLINE_E_DMP_E_PROMO_EXPIRED _HRESULT_TYPEDEF_(0x80153418L) // The promotional SKU has expired. The enddate for a promo is a configured limit set by the partner. If a request comes in after that configured deadline then the request is rejected + +// Errors returned by xcbk service = 0x801535XX + +// Errors returned by uacs service = 0x801540XX +#define XONLINE_S_ACCOUNTS_NAME_TAKEN _HRESULT_TYPEDEF_(0x00000010L) + +#define XONLINE_E_ACCOUNTS_NAME_TAKEN _HRESULT_TYPEDEF_(0x80154000L) +#define XONLINE_E_ACCOUNTS_INVALID_USER _HRESULT_TYPEDEF_(0x80154002L) +#define XONLINE_E_ACCOUNTS_BAD_CREDIT_CARD _HRESULT_TYPEDEF_(0x80154003L) +#define XONLINE_E_ACCOUNTS_BAD_BILLING_ADDRESS _HRESULT_TYPEDEF_(0x80154004L) +#define XONLINE_E_ACCOUNTS_ACCOUNT_BANNED _HRESULT_TYPEDEF_(0x80154005L) +#define XONLINE_E_ACCOUNTS_PERMISSION_DENIED _HRESULT_TYPEDEF_(0x80154006L) +#define XONLINE_E_ACCOUNTS_INVALID_VOUCHER _HRESULT_TYPEDEF_(0x80154007L) +#define XONLINE_E_ACCOUNTS_DATA_CHANGED _HRESULT_TYPEDEF_(0x80154008L) // unexpected modifications made during request. commit is aborted to avoid overwriting modifcations. +#define XONLINE_E_ACCOUNTS_VOUCHER_ALREADY_USED _HRESULT_TYPEDEF_(0x80154009L) +#define XONLINE_E_ACCOUNTS_OPERATION_BLOCKED _HRESULT_TYPEDEF_(0x8015400AL) +#define XONLINE_E_ACCOUNTS_POSTAL_CODE_REQUIRED _HRESULT_TYPEDEF_(0x8015400BL) +#define XONLINE_E_ACCOUNTS_TRY_AGAIN_LATER _HRESULT_TYPEDEF_(0x8015400CL) +#define XONLINE_E_ACCOUNTS_NOT_A_RENEWAL_OFFER _HRESULT_TYPEDEF_(0x8015400DL) +#define XONLINE_E_ACCOUNTS_RENEWAL_IS_LOCKED _HRESULT_TYPEDEF_(0x8015400EL) +#define XONLINE_E_ACCOUNTS_VOUCHER_REQUIRED _HRESULT_TYPEDEF_(0x8015400FL) +#define XONLINE_E_ACCOUNTS_ALREADY_DEPROVISIONED _HRESULT_TYPEDEF_(0x80154010L) +#define XONLINE_E_ACCOUNTS_INVALID_PRIVILEGE _HRESULT_TYPEDEF_(0x80154011L) +#define XONLINE_E_ACCOUNTS_INVALID_SIGNED_PASSPORT_PUID _HRESULT_TYPEDEF_(0x80154012L) +#define XONLINE_E_ACCOUNTS_PASSPORT_ALREADY_LINKED _HRESULT_TYPEDEF_(0x80154013L) +#define XONLINE_E_ACCOUNTS_MIGRATE_NOT_XBOX1_USER _HRESULT_TYPEDEF_(0x80154014L) +#define XONLINE_E_ACCOUNTS_MIGRATE_BAD_SUBSCRIPTION _HRESULT_TYPEDEF_(0x80154015L) +#define XONLINE_E_ACCOUNTS_PASSPORT_NOT_LINKED _HRESULT_TYPEDEF_(0x80154016L) +#define XONLINE_E_ACCOUNTS_NOT_XENON_USER _HRESULT_TYPEDEF_(0x80154017L) +#define XONLINE_E_ACCOUNTS_CREDIT_CARD_REQUIRED _HRESULT_TYPEDEF_(0x80154018L) +#define XONLINE_E_ACCOUNTS_MIGRATE_NOT_XBOXCOM_USER _HRESULT_TYPEDEF_(0x80154019L) +#define XONLINE_E_ACCOUNTS_NOT_A_VOUCHER_OFFER _HRESULT_TYPEDEF_(0x8015401AL) +#define XONLINE_E_ACCOUNTS_REACHED_TRIAL_OFFER_LIMIT _HRESULT_TYPEDEF_(0x8015401BL) +#define XONLINE_E_ACCOUNTS_XBOX1_MANAGEMENT_BLOCKED _HRESULT_TYPEDEF_(0x8015401CL) +#define XONLINE_E_ACCOUNTS_OFFLINE_XUID_ALREADY_USED _HRESULT_TYPEDEF_(0x8015401DL) +#define XONLINE_E_ACCOUNTS_BILLING_PROVIDER_TIMEOUT _HRESULT_TYPEDEF_(0x8015401EL) +#define XONLINE_E_ACCOUNTS_MIGRATION_OFFER_NOT_FOUND _HRESULT_TYPEDEF_(0x8015401FL) + +// Errors returned by Notification = 0x801550XX +#define XONLINE_E_NOTIFICATION_BAD_CONTENT_TYPE _HRESULT_TYPEDEF_(0x80155000L) +#define XONLINE_E_NOTIFICATION_REQUEST_TOO_SMALL _HRESULT_TYPEDEF_(0x80155001L) +#define XONLINE_E_NOTIFICATION_INVALID_MESSAGE_TYPE _HRESULT_TYPEDEF_(0x80155002L) +#define XONLINE_E_NOTIFICATION_NO_ADDRESS _HRESULT_TYPEDEF_(0x80155003L) +#define XONLINE_E_NOTIFICATION_INVALID_PUID _HRESULT_TYPEDEF_(0x80155004L) +#define XONLINE_E_NOTIFICATION_NO_CONNECTION _HRESULT_TYPEDEF_(0x80155005L) +#define XONLINE_E_NOTIFICATION_SEND_FAILED _HRESULT_TYPEDEF_(0x80155006L) +#define XONLINE_E_NOTIFICATION_RECV_FAILED _HRESULT_TYPEDEF_(0x80155007L) +#define XONLINE_E_NOTIFICATION_MESSAGE_TRUNCATED _HRESULT_TYPEDEF_(0x80155008L) +#define XONLINE_E_NOTIFICATION_INVALID_TITLE_ID _HRESULT_TYPEDEF_(0x80155009L) +#define XONLINE_E_NOTIFICATION_NO_DATA _HRESULT_TYPEDEF_(0x8015200DL) +#define XONLINE_S_NOTIFICATION_NO_PEER_SUBSCRIBE _HRESULT_TYPEDEF_(0x0015200EL) + +// Errors returned by Messages = 0x80155AXX +#define XONLINE_E_MESSAGE_INVALID_MESSAGE_ID _HRESULT_TYPEDEF_(0x80155A01L) // the specified message was not found +#define XONLINE_E_MESSAGE_PROPERTY_DOWNLOAD_REQUIRED _HRESULT_TYPEDEF_(0x80155A02L) // the property was too large to fit into the details block, it must be retrieved separately using XOnlineMessageDownloadAttachmentxxx +#define XONLINE_E_MESSAGE_PROPERTY_NOT_FOUND _HRESULT_TYPEDEF_(0x80155A03L) // the specified property tag was not found +#define XONLINE_E_MESSAGE_NO_VALID_SENDS_TO_REVOKE _HRESULT_TYPEDEF_(0x80155A04L) // no valid sends to revoke were found +#define XONLINE_E_MESSAGE_NO_MESSAGE_DETAILS _HRESULT_TYPEDEF_(0x80155A05L) // the specified message does not have any details +#define XONLINE_E_MESSAGE_INVALID_TITLE_ID _HRESULT_TYPEDEF_(0x80155A06L) // an invalid title ID was specified +#define XONLINE_E_MESSAGE_SENDER_BLOCKED _HRESULT_TYPEDEF_(0x80155A07L) // a send failed because the recipient has blocked the sender +#define XONLINE_E_MESSAGE_MAX_DETAILS_SIZE_EXCEEDED _HRESULT_TYPEDEF_(0x80155A08L) // the property couldn't be added because the maximum details size would be exceeded +#define XONLINE_E_MESSAGE_INVALID_MESSAGE_TYPE _HRESULT_TYPEDEF_(0x80155A09L) +#define XONLINE_E_MESSAGE_USER_OPTED_OUT _HRESULT_TYPEDEF_(0x80155A0AL) // a send failed because the message is marketing and the recipient has opted-out for the sending title +// Success codes returned by Messages = 0x00155AXX +#define XONLINE_S_MESSAGE_PENDING_SYNC _HRESULT_TYPEDEF_(0x00155A01L) // updated message list is currently being retrieved (after logon or disabling summary refresh), returned results may be out of date + + +// Errors returned by uodb procs = 0x801560XX +#define XONLINE_E_UODB_KEY_ALREADY_EXISTS _HRESULT_TYPEDEF_(0x80156000L) // service key already exists when attempting to insert key + + +// Errors returned by billing services = 0x80162XXX - 0x8016EXXX +#define XONLINE_E_BILLING_AUTHORIZATION_FAILED _HRESULT_TYPEDEF_(0x80167611) // Credit card authorization failed; user should update credit card info in Dash. +#define XONLINE_E_BILLING_CREDIT_CARD_EXPIRED _HRESULT_TYPEDEF_(0x80167531) // The credit card has expired or will expire this month; user should update card info in Dash. +#define XONLINE_E_BILLING_NON_ACTIVE_ACCOUNT _HRESULT_TYPEDEF_(0x80169d94) // The account specified is no longer active; user should call customer service +#define XONLINE_E_BILLING_INVALID_PAYMENT_INSTRUMENT_STATUS _HRESULT_TYPEDEF_(0x80169e7f) // User's payment instrument is in a bad state. They should call customer service to rectify the issue. + +// generated from xonline/private/common/mc/sps25/imperr/imperr.pl +#define XONLINE_E_BILLING_BAN_NULL_INPUT_PARAMETER _HRESULT_TYPEDEF_(0x80167594) // Null input parameter passed to a Ban API +#define XONLINE_E_BILLING_ALREADY_BANNED _HRESULT_TYPEDEF_(0x80167599) // Already banned +#define XONLINE_E_BILLING_NOT_BANNED _HRESULT_TYPEDEF_(0x8016759e) // Not banned +#define XONLINE_E_BILLING_BANNEDPERSON _HRESULT_TYPEDEF_(0x801675bc) // This account is banned +#define XONLINE_E_BILLING_COUNTRY_CURRENCY_PI_MISMATCH _HRESULT_TYPEDEF_(0x801675c1) // There is a country/currency/payment instrument type mismatch +#define XONLINE_E_BILLING_INVALID_PAYMENT_INSTRUMENT_TYPE _HRESULT_TYPEDEF_(0x801675c8) // The payment instrument type specified is invalid +#define XONLINE_E_BILLING_INVALID_CREDIT_CARD_TYPE _HRESULT_TYPEDEF_(0x801675cb) // The credit card type specified is invalid +#define XONLINE_E_BILLING_DECRYPTION_FAILURE _HRESULT_TYPEDEF_(0x801675d0) // There was a failure during decryption. Make sure data is encrypted correctly +#define XONLINE_E_BILLING_BANNED_PAYMENT_INSTRUMENT _HRESULT_TYPEDEF_(0x801675c6) // The payment instrument specified is banned. +#define XONLINE_E_BILLING_INVALID_DD_ACCOUNT _HRESULT_TYPEDEF_(0x801675e4) // Direct Debit account validation failed +#define XONLINE_E_BILLING_DD_CONCATENATED_STRING_LENGTH_EXCEEDS_24 _HRESULT_TYPEDEF_(0x801675e9) // The concatenated DD account number exceeds 24. +#define XONLINE_E_BILLING_INVALID_CREDIT_CARD_NUMBER _HRESULT_TYPEDEF_(0x80167530) // The credit card number is invalid +#define XONLINE_E_BILLING_AVS_FAILED _HRESULT_TYPEDEF_(0x8016760c) // Address verification failed +#define XONLINE_E_BILLING_PAYMENT_PROVIDER_CONNECTION_FAILED _HRESULT_TYPEDEF_(0x8016761b) // Unable to connect to payment provider +#define XONLINE_E_BILLING_DD_INVALID_COUNTRY _HRESULT_TYPEDEF_(0x8016762f) // Invalid country code. +#define XONLINE_E_BILLING_DD_INVALID_ACCOUNT_FORMAT _HRESULT_TYPEDEF_(0x80167634) // Invalid account format. +#define XONLINE_E_BILLING_DD_INVALID_BANKCODE_FORMAT _HRESULT_TYPEDEF_(0x80167639) // Invalid bank code format. +#define XONLINE_E_BILLING_DD_INVALID_BRANCHCODE_FORMAT _HRESULT_TYPEDEF_(0x8016763e) // Invalid branch code format. +#define XONLINE_E_BILLING_DD_INVALID_CHECKDIGIT_FORMAT _HRESULT_TYPEDEF_(0x80167643) // Invalid check digit format. +#define XONLINE_E_BILLING_DD_ACCOUNT_MISSING _HRESULT_TYPEDEF_(0x80167648) // account missing. +#define XONLINE_E_BILLING_DD_BANKCODE_MISSING _HRESULT_TYPEDEF_(0x8016764d) // bank code missing. +#define XONLINE_E_BILLING_DD_BRANCHCODE_MISSING _HRESULT_TYPEDEF_(0x80167652) // branch code missing. +#define XONLINE_E_BILLING_DD_CHECKDIGIT_MISSING _HRESULT_TYPEDEF_(0x80167657) // check digit missing. +#define XONLINE_E_BILLING_DD_ERROR_IN_FIELDS _HRESULT_TYPEDEF_(0x8016765c) // There are fields errors. +#define XONLINE_E_BILLING_DD_INVALID_ACCOUNT_VALUE _HRESULT_TYPEDEF_(0x80167661) // Invalid account VALUE. +#define XONLINE_E_BILLING_DD_INVALID_BANKCODE_VALUE _HRESULT_TYPEDEF_(0x80167666) // Invalid bank code VALUE. +#define XONLINE_E_BILLING_DD_INVALID_BRANCHCODE_VALUE _HRESULT_TYPEDEF_(0x8016766b) // Invalid branch code VALUE. +#define XONLINE_E_BILLING_DD_INVALID_CHECKDIGIT_VALUE _HRESULT_TYPEDEF_(0x80167670) // Invalid check digit VALUE. +#define XONLINE_E_BILLING_DD_INVALID_ACCOUNT_HOLDER_NAME _HRESULT_TYPEDEF_(0x8016767a) // A direct debit account holder name can't be longer than 35 characters. +#define XONLINE_E_BILLING_PAYMENT_PROVIDER_CONNECTION_TIMEOUT _HRESULT_TYPEDEF_(0x8016767f) // Payment provider connection timed out +#define XONLINE_E_BILLING_ALREADY_IN_SPECIFIED_STATE _HRESULT_TYPEDEF_(0x80169c41) // The object is already in the desired state. +#define XONLINE_E_BILLING_REQUIRED_FIELD_MISSING _HRESULT_TYPEDEF_(0x80169c45) // Required field missing +#define XONLINE_E_BILLING_ACTIVE_SUBSCRIPTIONS _HRESULT_TYPEDEF_(0x80169c46) // The account has subscriptions on it. +#define XONLINE_E_BILLING_INVALID_ACCOUNT_SOUCE _HRESULT_TYPEDEF_(0x80169c4d) // Account source is not valid. +#define XONLINE_E_BILLING_INVALID_CREATION_DATE _HRESULT_TYPEDEF_(0x80169c4e) // Creation date cannot be later than current time. +#define XONLINE_E_BILLING_EXCEEDING_TAX_EXEMPT_LIMITS _HRESULT_TYPEDEF_(0x80169c55) // No more tax exemptions allowed for this account. +#define XONLINE_E_BILLING_GENERATE_NEXT_ID _HRESULT_TYPEDEF_(0x80169c59) // Generating next id +#define XONLINE_E_BILLING_INVALID_STATE_FOR_COUNTRY _HRESULT_TYPEDEF_(0x80169c5f) // The specified state for the country is invalid +#define XONLINE_E_BILLING_INVALID_BILLABLE_ACCOUNT_ID _HRESULT_TYPEDEF_(0x80169cc2) // Invalid account +#define XONLINE_E_BILLING_INVALID_BILLABLE_ACCOUNT_STATUS_ID _HRESULT_TYPEDEF_(0x80169cc7) // The account status specified is invalid +#define XONLINE_E_BILLING_INVALID_PHONE_TYPE _HRESULT_TYPEDEF_(0x80169cd6) // Invalid Phone Type +#define XONLINE_E_BILLING_INVALID_OFFERING_ID _HRESULT_TYPEDEF_(0x80169ce5) // Invalid Offering was specified +#define XONLINE_E_BILLING_INVALID_COUNTRY_CODE _HRESULT_TYPEDEF_(0x80169cea) // The country code specified is not valid +#define XONLINE_E_BILLING_INVALID_ADDRESS_ID _HRESULT_TYPEDEF_(0x80169cef) // The address id specified is not valid. +#define XONLINE_E_BILLING_INVALID_PAYMENT_METHOD_ID _HRESULT_TYPEDEF_(0x80169cf9) // The payment instrument ID specified is invalid. +#define XONLINE_E_BILLING_SUBSCRIPTION_ALREADY_CANCELED _HRESULT_TYPEDEF_(0x80169d08) // The subscription has already been cancelled. +#define XONLINE_E_BILLING_INVALID_SUBSCRIPTION_ID _HRESULT_TYPEDEF_(0x80169d0d) // The subscription id specified is invalid +#define XONLINE_E_BILLING_INVALID_PERIOD_TO_PROCESS _HRESULT_TYPEDEF_(0x80169d2b) // An invalid period was specified. +#define XONLINE_E_BILLING_INVALID_SUBSCRIPTION_STATUS _HRESULT_TYPEDEF_(0x80169d3a) // An invalid subscription status was specified or the state of the specified subscription does not allow this operation. +#define XONLINE_E_BILLING_VATID_DOESNOTHAVEEXPDATE _HRESULT_TYPEDEF_(0x80169d95) // VATIDs do not have an expiration date +#define XONLINE_E_BILLING_TAXID_EXPDATE _HRESULT_TYPEDEF_(0x80169d96) // Expiration date was not specified +#define XONLINE_E_BILLING_INVALID_TAX_EXEMPT_TYPE _HRESULT_TYPEDEF_(0x80169d97) // Invalid Tax Exempt specified +#define XONLINE_E_BILLING_NO_ACTIVE_SUBSCRIPTION _HRESULT_TYPEDEF_(0x80169d99) // No active subscription for adding service instance +#define XONLINE_E_BILLING_INVALID_SERVICE_INSTANCE _HRESULT_TYPEDEF_(0x80169d9e) // Invalid service instance for adding new user +#define XONLINE_E_BILLING_ADD_USER_TO_SERVICE_INSTANCE _HRESULT_TYPEDEF_(0x80169da3) // Failed to add a new user to a service instance +#define XONLINE_E_BILLING_INVALID_BILLABLEACCTSTATUS _HRESULT_TYPEDEF_(0x80169da8) // The attempted status change operation is inappropriate +#define XONLINE_E_BILLING_SERVICE_INSTANCES_NONE _HRESULT_TYPEDEF_(0x80169dbc) // No service instances available for specified billable account +#define XONLINE_E_BILLING_ACCOUNT_CLOSED _HRESULT_TYPEDEF_(0x80169dd1) // The Account is already closed +#define XONLINE_E_BILLING_BILLINGPERIOD_PAST _HRESULT_TYPEDEF_(0x80169dd6) // This period occurs in the past +#define XONLINE_E_BILLING_INVALID_ADJUSTMENTGUID _HRESULT_TYPEDEF_(0x80169dd7) // Invalid AdjustmentGUID +#define XONLINE_E_BILLING_INVALID_ADJUSMENT_FOR_PERIOD _HRESULT_TYPEDEF_(0x80169dd8) // This Adjustment not applicable to the specified period +#define XONLINE_E_BILLING_ADJUSTMENT_TOOBIG _HRESULT_TYPEDEF_(0x80169dd9) // Adjustment amount is too big +#define XONLINE_E_BILLING_ADJUSTMENT_TOOSMALL _HRESULT_TYPEDEF_(0x80169ddb) // Adjustment amount is too small +#define XONLINE_E_BILLING_INVALID_LOCALE _HRESULT_TYPEDEF_(0x80169de5) // Locale string is not a valid locale +#define XONLINE_E_BILLING_INVALID_CUSTOMER_TYPE _HRESULT_TYPEDEF_(0x80169de6) // Customer type is not valid +#define XONLINE_E_BILLING_INVALID_CURRENCY _HRESULT_TYPEDEF_(0x80169de7) // Currency string is not a valid currency +#define XONLINE_E_BILLING_DATE_EXPIRED _HRESULT_TYPEDEF_(0x80169de8) // The date is already expired +#define XONLINE_E_BILLING_GUID_EXISTS _HRESULT_TYPEDEF_(0x80169de9) // The guid passed in already exists in the system +#define XONLINE_E_BILLING_INVALID_VIOLATION_ID _HRESULT_TYPEDEF_(0x80169dec) // The specified Violation Id is invalid +#define XONLINE_E_BILLING_MISSING_VIOLATION_ID _HRESULT_TYPEDEF_(0x80169ded) // The Violation Id is required +#define XONLINE_E_BILLING_NEEDTODEPROVISION _HRESULT_TYPEDEF_(0x80169def) // You should deprovision some serviceinstances to proceed +#define XONLINE_E_BILLING_PARTIALCONV_INITIATED _HRESULT_TYPEDEF_(0x80169df0) // Partial Conversion is already initiated. +#define XONLINE_E_BILLING_PARTIALCONV_EXPECTED _HRESULT_TYPEDEF_(0x80169df2) // The subscription is expected to be in the partial state. +#define XONLINE_E_BILLING_INVALID_CATEGORY_NAME _HRESULT_TYPEDEF_(0x80169df3) // Category string is not a valid catergory +#define XONLINE_E_BILLING_OFFERING_NOT_PURCHASEABLE _HRESULT_TYPEDEF_(0x80169df5) // Offering is not purchaseable at this time +#define XONLINE_E_BILLING_OFFERING_ACCOUNT_CURRENCY_MISMATCH _HRESULT_TYPEDEF_(0x80169df6) // The offering currency does not match the account currency +#define XONLINE_E_BILLING_OFFERING_PAYMENT_INSTRUMENT_MISMATCH _HRESULT_TYPEDEF_(0x80169df7) // The specified offering does not support the given payment instrument type +#define XONLINE_E_BILLING_INVALID_DATE _HRESULT_TYPEDEF_(0x80169df8) // A date specified is not a valid date. +#define XONLINE_E_BILLING_CANNOT_EXCEED_MAX_OWNERSHIP _HRESULT_TYPEDEF_(0x80169df9) // Cannot exceed max ownership for this offering +#define XONLINE_E_BILLING_INVALID_RESOURCE_ID _HRESULT_TYPEDEF_(0x80169e02) // Invalid resource ID. +#define XONLINE_E_BILLING_UNIT_OF_MEASURE_MISMATCH _HRESULT_TYPEDEF_(0x80169e03) // The unit of measure reported in the usage event doesn't match the one configed in billing system. +#define XONLINE_E_BILLING_INVALID_OFFERING_FOR_LOCALE _HRESULT_TYPEDEF_(0x80169e05) // Offering doesn't exist for this Locale. +#define XONLINE_E_BILLING_NOT_A_BASE_OFFERING _HRESULT_TYPEDEF_(0x80169e06) // Offering is not a base offering. +#define XONLINE_E_BILLING_INVALID_ACCOUNT_STATUS _HRESULT_TYPEDEF_(0x80169e16) // Account state does not allow this operation. +#define XONLINE_E_BILLING_ACTIVE_SUBSCRIPTIONS_EXIST _HRESULT_TYPEDEF_(0x80169e1b) // Active subscriptions exist on this payment instrument. +#define XONLINE_E_BILLING_PRIMARY_PHONE_REQUIRED _HRESULT_TYPEDEF_(0x80169e25) // Primary phone required for payment instruments. +#define XONLINE_E_BILLING_EMAIL_REQUIRED _HRESULT_TYPEDEF_(0x80169e2a) // An Email address on the account is required for this operation. +#define XONLINE_E_BILLING_ACCOUNT_NOT_CLOSED _HRESULT_TYPEDEF_(0x80169e2b) // The account should be in CLOSED state to perform this operation. +#define XONLINE_E_BILLING_INVALID_VIOLATION _HRESULT_TYPEDEF_(0x80169e13) // Violation is invalid. +#define XONLINE_E_BILLING_SUBSCRIPTION_IS_CANCELLED _HRESULT_TYPEDEF_(0x80169e14) // The subscription is cancelled, and cannot change status. +#define XONLINE_E_BILLING_NO_VIOLATION _HRESULT_TYPEDEF_(0x80169e15) // No violation exists on this subscription. +#define XONLINE_E_BILLING_EXISTS_VIOLATION _HRESULT_TYPEDEF_(0x80169e17) // There are violations on this subscription. +#define XONLINE_E_BILLING_END_DATE_IN_THE_PAST _HRESULT_TYPEDEF_(0x80169e33) // The end date passed in is in the past. +#define XONLINE_E_BILLING_END_DATE_BEYOND_MAX _HRESULT_TYPEDEF_(0x80169e34) // The end date passed in is beyond the maximum allowable end date for this subscription. +#define XONLINE_E_BILLING_VIOLATION_ALREADY_SET _HRESULT_TYPEDEF_(0x80169e3e) // The violation is already set. +#define XONLINE_E_BILLING_NO_VIOLATION_SET _HRESULT_TYPEDEF_(0x80169e43) // No violation of this ID is set. +#define XONLINE_E_BILLING_INVALID_CONVERSION _HRESULT_TYPEDEF_(0x80169e4d) // This conversion path is not allowed. +#define XONLINE_E_BILLING_SUBS_NOT_INTERMEDIATE _HRESULT_TYPEDEF_(0x80169e4e) // The subscription is not in the partial state. +#define XONLINE_E_BILLING_OFFERING_NOT_PUBLISHED _HRESULT_TYPEDEF_(0x80169e52) // The Offering is not published. +#define XONLINE_E_BILLING_CONVERSION_NEEDTODEPROVISION _HRESULT_TYPEDEF_(0x80169e53) // Some ServiceInstances need to be deprovisioned inorder to continue. +#define XONLINE_E_BILLING_INVALID_MANDATE_STATUS _HRESULT_TYPEDEF_(0x80169e57) // The mandate status specified is not valid. +#define XONLINE_E_BILLING_PI_ALREADY_GOOD _HRESULT_TYPEDEF_(0x80169e61) // Payment instrument status is already GOOD. +#define XONLINE_E_BILLING_PI_ALREADY_DECLINED _HRESULT_TYPEDEF_(0x80169e66) // Payment instrument status is already DECLINED. +#define XONLINE_E_BILLING_PI_IS_DISABLED _HRESULT_TYPEDEF_(0x80169e6b) // Payment instrument status is DISABLED and cannot be changed to any other status. +#define XONLINE_E_BILLING_INVALID_OFFERING_GUID _HRESULT_TYPEDEF_(0x80169e84) // Invalid Offering GUID. +#define XONLINE_E_BILLING_OFFERING_REQUIRES_PI _HRESULT_TYPEDEF_(0x80169e89) // The offering specified requires a payment instrument to be specified. +#define XONLINE_E_BILLING_DELAYED_PROVISIONING_COMPONENTS_EXIST _HRESULT_TYPEDEF_(0x80169e93) // The offering cannot be purchased because it has delayed provisioning components. +#define XONLINE_E_BILLING_INVALID_AMOUNT_FOR_CURRENCY _HRESULT_TYPEDEF_(0x80169e99) // Amount cannot be adjusted because it does not follow guideline of Currency (JPY or KRW). +#define XONLINE_E_BILLING_INVALID_EMAIL_ADDRESS _HRESULT_TYPEDEF_(0x80169ea2) // The email address specified is not a valid email address. +#define XONLINE_E_BILLING_INVALID_TAX_EXEMPT_STATUS _HRESULT_TYPEDEF_(0x80169eac) // The tax exemption status specified is invalid. +#define XONLINE_E_BILLING_INVALID_OLD_PAYMENT_INSTRUMENT_STATUS _HRESULT_TYPEDEF_(0x80169eb6) // The status of the old payment instrument does not allow this operation. +#define XONLINE_E_BILLING_LAST_ADMIN_ROLE _HRESULT_TYPEDEF_(0x8016c3c3) // It is illegal to remove the last administrator role on the account. +#define XONLINE_E_BILLING_UPDATING_MEMBERNAME _HRESULT_TYPEDEF_(0x8016c3c8) // Error updating membername. +#define XONLINE_E_BILLING_OBJECT_ROLE_LIMIT_EXCEEDED _HRESULT_TYPEDEF_(0x8016c3cd) // This object has exceeded it's role limit of 100. +#define XONLINE_E_BILLING_MALFORMED_REQUEST _HRESULT_TYPEDEF_(0x8016ab7d) // Provision.dll: Provision request malformed +#define XONLINE_E_BILLING_WRONG_INPUT_PARAMETERS _HRESULT_TYPEDEF_(0x8016ab7e) // Provision.dll: Wrong input parameters +#define XONLINE_E_BILLING_MPF_CALL_FAILED _HRESULT_TYPEDEF_(0x8016ab7f) // Provision.dll: Microsoft Provisioning Framework call failed. %1 +#define XONLINE_E_BILLING_XML_OPERATION_ERROR _HRESULT_TYPEDEF_(0x8016ab80) // Provision.dll: Error during XML manipulation. %1 +#define XONLINE_E_BILLING_MPF_CREATE _HRESULT_TYPEDEF_(0x8016ab81) // Provision.dll: MPF client instantiation failed. %1 +#define XONLINE_E_BILLING_CREATION _HRESULT_TYPEDEF_(0x8016ab82) // Provision.dll: General error in sturtup code. %1 +#define XONLINE_E_BILLING_INCREMENT_TOTAL _HRESULT_TYPEDEF_(0x80164e39) // Cannot update total as requested. +#define XONLINE_E_BILLING_RES_NOT_BELONG_TO_OBJECT _HRESULT_TYPEDEF_(0x80164e57) // The resource doesn't belong to this service instance. +#define XONLINE_E_BILLING_DECLINING_BALANCE _HRESULT_TYPEDEF_(0x80164e5c) // The payment instrument on the current subscription has a declining balance +#define XONLINE_E_BILLING_DUPLICATE_TRACKING_GUID _HRESULT_TYPEDEF_(0x80164e75) // Attempted to insert Duplicate Tracking Guid into detail_event table. +#define XONLINE_E_BILLING_INVALID_EXPIRATION_DATE _HRESULT_TYPEDEF_(0x80164ea7) // The credit card expiration date specified is invalid +#define XONLINE_E_BILLING_UNKNOWN_MANDATE_STATUS _HRESULT_TYPEDEF_(0x80164eac) // The mandate status specified is invalid +#define XONLINE_E_BILLING_INVALID_CURRENCY2 _HRESULT_TYPEDEF_(0x80164ec0) // The input currency is incorrect. +#define XONLINE_E_BILLING_INVALID_BILLING_PERIOD _HRESULT_TYPEDEF_(0x80164f42) // Invalid billing period passed +#define XONLINE_E_BILLING_INVALID_ANNIV _HRESULT_TYPEDEF_(0x80164f9c) // Invalid billing anniversary date passed in as argument. +#define XONLINE_E_BILLING_INVALID_LINEITEM_ID _HRESULT_TYPEDEF_(0x80164ff6) // Invalid line item id +#define XONLINE_E_BILLING_LINE_ITEM_ID_NOT_OPEN _HRESULT_TYPEDEF_(0x80165046) // the specified line_item_id is not associated with a open record +#define XONLINE_E_BILLING_LINEITEM_ALREADY_OFFSET _HRESULT_TYPEDEF_(0x8016504b) // The line item has already been offset! +#define XONLINE_E_BILLING_INVALID_OFFSET_AMOUNT _HRESULT_TYPEDEF_(0x80165050) // Offset amount must be greater than 0 but no greater than original amount! +#define XONLINE_E_BILLING_CANNOT_OFFSET_HARD_SOFT_DECLINED _HRESULT_TYPEDEF_(0x80165055) // cannot offset line item which is soft/hard declined! +#define XONLINE_E_BILLING_AMOUNT_NOT_COLLECTED_YET _HRESULT_TYPEDEF_(0x8016505a) // Amount has not been collected yet, cannot be offset and immediately settled. +#define XONLINE_E_BILLING_CANNOT_OFFSET_ZERO_AMOUNT _HRESULT_TYPEDEF_(0x8016505f) // Cannot offset zero amount +#define XONLINE_E_BILLING_AMOUNT_IN_PROCESS _HRESULT_TYPEDEF_(0x80165064) // Amount in the process of being sent to the bank, cannot offset. +#define XONLINE_E_BILLING_INVALID_CREDIT_AMOUNT _HRESULT_TYPEDEF_(0x80165082) // Credit amount should not be 0. +#define XONLINE_E_BILLING_OFFSET_IMM_SETTLE_IN_PROG _HRESULT_TYPEDEF_(0x8016509b) // It's not allowed to offset line item which is immediate_settle_in_progress state. +#define XONLINE_E_BILLING_SA_IN_STATE_UNOFFSETABLE _HRESULT_TYPEDEF_(0x801650a5) // The status of the settlement amount containing the line item indicates that the item can't be offset. +#define XONLINE_E_BILLING_OFFSET_AMOUNT_GREATER_THAN_ORIGINAL _HRESULT_TYPEDEF_(0x801650aa) // The offset amount should never be greater than the original item amount. +#define XONLINE_E_BILLING_RES_BALANCE_CHANGE_ON_NONACTIVE_SUBS _HRESULT_TYPEDEF_(0x801650af) // It's not allowed to change a resource balance for a nonactive subscription. +#define XONLINE_E_BILLING_PMN_INSERT_FAILURE _HRESULT_TYPEDEF_(0x801661bc) // The member name for this passport could not be added. +#define XONLINE_E_BILLING_BADSAMECARDUSEDMULTIPLETIMES _HRESULT_TYPEDEF_(0x801661d0) // The same payment card number has been used for multiple times. +#define XONLINE_E_BILLING_PI_ALREADY_ON_ACCOUNT _HRESULT_TYPEDEF_(0x801661df) // The same payment instrument is already on the given account +#define XONLINE_E_BILLING_PUID_ROLE_LIMIT_EXCEEDED _HRESULT_TYPEDEF_(0x801661e4) // This Passport ID has exceeded it's role limit of 100. +#define XONLINE_E_BILLING_XPATHOBJECT_NOTFOUND _HRESULT_TYPEDEF_(0x80162710) // A select node operation failed. +#define XONLINE_E_BILLING_NOPERMISSION _HRESULT_TYPEDEF_(0x80162711) // Access Denied +#define XONLINE_E_BILLING_CANNOT_REMOVE_SELF _HRESULT_TYPEDEF_(0x80162712) // Cannot remove self from object +#define XONLINE_E_BILLING_BADXML _HRESULT_TYPEDEF_(0x80162713) // The XML passed in may be malformed or may not meet the SPK requirements for this API +#define XONLINE_E_BILLING_INVALIDCOMMENTSIZE _HRESULT_TYPEDEF_(0x80162714) // Comment text length must be 1 to 512 +#define XONLINE_E_BILLING_BADCANCELMODE _HRESULT_TYPEDEF_(0x80162715) // The cancel mode specified is invalid +#define XONLINE_E_BILLING_INVALID_BUF_SIZE _HRESULT_TYPEDEF_(0x80162716) // The input parameter has a wrong size +#define XONLINE_E_BILLING_INVALID_ROLE _HRESULT_TYPEDEF_(0x80162717) // The role specified is invalid +#define XONLINE_E_BILLING_INVALID_PPORT_ID _HRESULT_TYPEDEF_(0x80162718) // The passport id specified is invalid +#define XONLINE_E_BILLING_INVALID_ARG _HRESULT_TYPEDEF_(0x8016271a) // The argument specified is invalid +#define XONLINE_E_BILLING_UNKNOWN_SERVER_FAILURE _HRESULT_TYPEDEF_(0x8016271f) // Unknown server failure. +#define XONLINE_E_BILLING_INVALID_STATUS_VALUE _HRESULT_TYPEDEF_(0x80162720) // Invalid Status. Must be ENABLED or SUSPENDED. +#define XONLINE_E_BILLING_INVALID_FILTER _HRESULT_TYPEDEF_(0x80162721) // The filter field is invalid. It must be one of "Base", "Upgrade", "Downgrade", or "Renewal", or leave the filter empty. +#define XONLINE_E_BILLING_MISSING_CATEGORY _HRESULT_TYPEDEF_(0x80162722) // The Category field is missing. +#define XONLINE_E_BILLING_FIELD_TOO_SHORT _HRESULT_TYPEDEF_(0x80162723) // The input field is too short. +#define XONLINE_E_BILLING_FIELD_TOO_LONG _HRESULT_TYPEDEF_(0x80162724) // The input field is too long. +#define XONLINE_E_BILLING_BADZIP _HRESULT_TYPEDEF_(0x80162725) // The specified zip code is incorrect +#define XONLINE_E_BILLING_ONLYONENODE _HRESULT_TYPEDEF_(0x80162726) // Only one of these nodes should be passed in. +#define XONLINE_E_BILLING_CSR_AUTHZ_FAILED _HRESULT_TYPEDEF_(0x80162728) // Only CSR callers can invoke this API. +#define XONLINE_E_BILLING_NOT_ACCOUNT_ADMIN _HRESULT_TYPEDEF_(0x80162729) // The caller is not an administrator of the specified account. +#define XONLINE_E_BILLING_DELEGATE_ID_UNSPECIFIED _HRESULT_TYPEDEF_(0x8016272a) // The delegate passport id must be specified for CSR callers. +#define XONLINE_E_BILLING_REQUESTER_ID_UNSPECIFIED _HRESULT_TYPEDEF_(0x8016272b) // The requester passport id must be specified. +#define XONLINE_E_BILLING_INVALID_FLAG_VALUE _HRESULT_TYPEDEF_(0x8016272c) // Boolean Value must be 0, 1 +#define XONLINE_E_BILLING_PROVISIONING_INACTIVE_SUBSCRIPTION _HRESULT_TYPEDEF_(0x8016272d) // Provisioning service instance for subscription status being different than active +#define XONLINE_E_BILLING_INVALID_OBJECT_ID _HRESULT_TYPEDEF_(0x8016272e) // The Object specified is invalid. +#define XONLINE_E_BILLING_PARTNERNOTINBILLING _HRESULT_TYPEDEF_(0x80162738) // The calling partner is not registered in our database. +#define XONLINE_E_BILLING_RATING_FAILURE _HRESULT_TYPEDEF_(0x8016273d) // A rating error has occurred, check the event log and the tracer. +#define XONLINE_S_BILLING_SVR2_STARTED _HRESULT_TYPEDEF_(0x80162742) // BDKSVR2 started. +#define XONLINE_S_BILLING_CSR_API_CALL_MADE _HRESULT_TYPEDEF_(0x80162743) // CSR call made. +#define XONLINE_E_BILLING_CSR_CALL_FROM_NONCSR _HRESULT_TYPEDEF_(0x80162744) // CSR call ATTEMPT BY NON CSR CALLER +#define XONLINE_E_BILLING_TRANS_BALANCE_MISMATCHING_ACCTS _HRESULT_TYPEDEF_(0x8016274c) // from and to PI not on the same account in TransferBalance +#define XONLINE_E_BILLING_TRANS_BALANCE_TO_PI_INVALID _HRESULT_TYPEDEF_(0x80162751) // transfer-to PI not in good status in TransferBalance +#define XONLINE_E_BILLING_TRANS_BALANCE_TO_SAME_PI _HRESULT_TYPEDEF_(0x80162756) // transfer-to same PI in TransferBalance +#define XONLINE_E_BILLING_TRANS_BALANCE_NOT_ALLOW _HRESULT_TYPEDEF_(0x8016275b) // Transferring a balance between the Payment Instrument types is not allowed +#define XONLINE_E_BILLING_INTERNAL_ERROR _HRESULT_TYPEDEF_(0x80162760) // Internal database inconsistencies were detected. +#define XONLINE_E_BILLING_OUTSTANDING_BALANCE _HRESULT_TYPEDEF_(0x80162765) // A outstanding balance exists on this payment instrument. +#define XONLINE_E_BILLING_INVALID_REFERRALDATA_XML _HRESULT_TYPEDEF_(0x8016276a) // Invalid ReferralData XML. Check to make sure it exists, is between 1 and 1024 characters, and is valid xml. +#define XONLINE_E_BILLING_INVALID_GUID _HRESULT_TYPEDEF_(0x8016276f) // The guid specified is invalid +#define XONLINE_E_BILLING_UNSUPPORTED_PAYMENT_INSTRUMENT _HRESULT_TYPEDEF_(0x80162774) // unsupported payment instrument type for settlebalance +#define XONLINE_E_BILLING_SUBSCRIPTION_INACTIVE _HRESULT_TYPEDEF_(0x80162779) // The subscription is not active. +#define XONLINE_E_BILLING_INVALID_PM_FOR_STOP_PAYMENTS _HRESULT_TYPEDEF_(0x8016277e) // Cannot stop payments for Qwest payment method type. +#define XONLINE_E_BILLING_EXCEEDS_MAX_NUMBER_OF_USAGE_EVENTS _HRESULT_TYPEDEF_(0x80162783) // The number of usage events reported through one ReportUsageEvent() call exceeds the maximum system can handle. +#define XONLINE_E_BILLING_FIELD_NOT_UPDATEABLE _HRESULT_TYPEDEF_(0x80162788) // A field specified is not updateable. +#define XONLINE_E_BILLING_DEFERRED_COMPUTE_ONLY_NOT_SUPPORTED _HRESULT_TYPEDEF_(0x8016278d) // Calling CancelSubscription with an end date and in compute only mode is not supported. +#define XONLINE_E_BILLING_SETTLE_SHOULD_BE_THE_LAST_EVENT _HRESULT_TYPEDEF_(0x8016278e) // The SETTLE type event should be the last one in the event list of importsettlebillingitems. +#define XONLINE_E_BILLING_PAYMENT_METHOD_NO_LONGER_VALID _HRESULT_TYPEDEF_(0x8016278f) // The payment method used to pay for the line item is no long valid. +#define XONLINE_E_BILLING_PROCESS_USAGE_EVENTS _HRESULT_TYPEDEF_(0x80162790) // Failed to process some of the usage events. +#define XONLINE_E_BILLING_WRONG_OBJECT_ID_TYPE _HRESULT_TYPEDEF_(0x80162791) // The object ID does not contain account, subscription info. +#define XONLINE_E_BILLING_INVALID_PHONE_VALUE _HRESULT_TYPEDEF_(0x80162792) // The field contains invalid characters for a phone number +#define XONLINE_E_BILLING_INVALID_AMOUNT_VALUE _HRESULT_TYPEDEF_(0x80162797) // Amount value is invalid +#define XONLINE_E_BILLING_MISMATCH_ACCTID_IN_CLOSEBALANCE _HRESULT_TYPEDEF_(0x80162793) // The Payment InstrumentId and the Line Item Id do not match +#define XONLINE_E_BILLING_INTERNAL_ADD_COMMENT_FAILED _HRESULT_TYPEDEF_(0x80162794) // InternalAddComment failed. This needs to be escalated to SPG development. +#define XONLINE_E_BILLING_INVALID_IMMEDIATE_SETTLE_VALUE _HRESULT_TYPEDEF_(0x80162795) // Only FALSE is supported for the immediate settle flag. +#define XONLINE_E_BILLING_NO_RECORDS_FOR_STOP_PAYMENTS _HRESULT_TYPEDEF_(0x8016279c) // No eligible records were found for StopPayments API call. +#define XONLINE_E_BILLING_TAXWARE_FAILURE _HRESULT_TYPEDEF_(0x8016ea60) // A taxware error has occurred, check the event log and the tracer. +#define XONLINE_E_BILLING_ADDRESS_VALIDATION_FAILURE _HRESULT_TYPEDEF_(0x8016ea61) // An error has occurred while validating address, check the event log and the tracer. +#define XONLINE_E_BILLING_ZIP_INVALID _HRESULT_TYPEDEF_(0x8016ea6b) // VERAZIP: ZIP Code has not been found in the database. +#define XONLINE_E_BILLING_STATE_INVALID _HRESULT_TYPEDEF_(0x8016ea6c) // VERAZIP: Invalid State Code passed. +#define XONLINE_E_BILLING_ZIP_CITY_MISSING _HRESULT_TYPEDEF_(0x8016ea6d) // VERAZIP: No Zip Code or City Name passed. +#define XONLINE_E_BILLING_STATE_ZIP_INVALID _HRESULT_TYPEDEF_(0x8016ea6e) // VERAZIP: State Code/ZIP Code combination passed has not been found. +#define XONLINE_E_BILLING_STATE_CITY_INVALID _HRESULT_TYPEDEF_(0x8016ea6f) // VERAZIP: State Code/City Name combination passed has not been found. +#define XONLINE_E_BILLING_STATE_ZIP_CITY_INVALID _HRESULT_TYPEDEF_(0x8016ea70) // VERAZIP: State Code/ZIP Code/City Name combination passed has not been found. Neither State Code/ZIP Code combination nor State Code/City Name combination could be found. Currently BDK doesn't return any data, this text is from VeraZip documentation. +#define XONLINE_E_BILLING_STATE_ZIP_CITY_INVALID2 _HRESULT_TYPEDEF_(0x8016ea71) // VERAZIP: State Code, ZIP Code and City Name combination passed has not been found. Returned all ZIP codes associated with State Code/City Name combination. Currently BDK doesn't return any data, this text is from VeraZip documentation. +#define XONLINE_E_BILLING_STATE_ZIP_CITY_INVALID3 _HRESULT_TYPEDEF_(0x8016ea72) // VERAZIP: State Code, ZIP Code and City Name combination passed has not been found. Returned all City Names and ZIP Code Extensions associated with State Code/ Zip Code combination. Currently BDK doesn't return any data, this text is from VeraZip documentation. +#define XONLINE_E_BILLING_STATE_ZIP_CITY_INVALID4 _HRESULT_TYPEDEF_(0x8016ea73) // VERAZIP: State Code, ZIP Code and City Name combination passed has not been found. The error could be because you didn't pass in the state code. +#define XONLINE_E_BILLING_MULTIPLE_COUNTIES_FOUND _HRESULT_TYPEDEF_(0x8016ea7d) // VERAZIP: Two or more counties were found for State Code, ZIP Code and City Name combination. Returned all County Codes. Currently BDK doesn't return any data, this text is from VeraZip documentation. +#define XONLINE_E_BILLING_ZIP_INVALID_FOR_ENTERED_STATE _HRESULT_TYPEDEF_(0x8016ea7e) // VERAZIP: Zip Code not valid for State Code entered. Defaulted to State Code that matches ZIP Code entered. +#define XONLINE_E_BILLING_STATE_ZIP_COVERS_MULTIPLE_CITIES _HRESULT_TYPEDEF_(0x8016ea89) // VERAZIP: Valid State Code and Zip Code passed, but the Zip Code covers multiple City Names. Returned all City Names for this ZIP Code. Currently BDK doesn't return any data, this text is from VeraZip documentation. +#define XONLINE_E_BILLING_MULTIPLE_CITIES_FOUND _HRESULT_TYPEDEF_(0x8016ea8a) // VERAZIP: Valid State Code and City Name passed, but the city has multiple ZIP Codes. Returned all ZIP Codes for this city. Currently BDK doesn't return any data, this text is from VeraZip documentation. +#define XONLINE_E_BILLING_BAD_CITYNAME_LENGTH _HRESULT_TYPEDEF_(0x8016ea8b) // City name length is incorrect. +#define XONLINE_E_BILLING_BAD_COUNTRYCODE_LENGTH _HRESULT_TYPEDEF_(0x8016ea8c) // Country code length is incorrect. +#define XONLINE_E_BILLING_BAD_STATECODE_LENGTH _HRESULT_TYPEDEF_(0x8016ea8d) // State/Province code length is incorrect. +#define XONLINE_E_BILLING_BAD_ZIPCODE_LENGTH _HRESULT_TYPEDEF_(0x8016ea8e) // Zip code length is incorrect. +#define XONLINE_E_BILLING_BAD_PRODUCTCODE_LENGTH _HRESULT_TYPEDEF_(0x8016ea8f) // Product code length is incorrect. +#define XONLINE_E_BILLING_BAD_BUSINESSLOCATIONCODE_LENGTH _HRESULT_TYPEDEF_(0x8016ea90) // Business location code length is incorrect. +#define XONLINE_E_BILLING_BAD_TRANSACTIONDATE_LENGTH _HRESULT_TYPEDEF_(0x8016ea91) // Transaction date length is incorrect. +#define XONLINE_E_BILLING_BAD_VATREGISTRATION_LENGTH _HRESULT_TYPEDEF_(0x8016ea92) // VAT registration length is incorrect. +#define XONLINE_E_BILLING_BAD_CURRENCYCODE_LENGTH _HRESULT_TYPEDEF_(0x8016ea93) // Currency code length is incorrect. +#define XONLINE_E_BILLING_BAD_WTCODE_LENGTH _HRESULT_TYPEDEF_(0x8016ea94) // WorldTax code length is incorrect. +#define XONLINE_E_BILLING_INVALID_INPUT_TO_TAXWARE_OR_VERAZIP _HRESULT_TYPEDEF_(0x8016ea95) // Invalid input parameter was passed to TaxWare or the VeraZip system. +#define XONLINE_E_BILLING_UNSUPPORTED_CHAR_EXIST _HRESULT_TYPEDEF_(0x8016ea9c) // There are unsupported characters or sequences of characters existing in the input BSTR or XML. +#define XONLINE_E_BILLING_PI_IN_DECLINE _HRESULT_TYPEDEF_(0x801650c8) // the payment instrument already has declines on it, transferbalance not allowed + + +// +// Macro for detecting error status. +// Error codes start at 400 (HTTP_STATUS_BAD_REQUEST). +// +#define XONLINE_HTTPSTATUS_ANYERROR(status) ((status >= 400) ? TRUE : FALSE) + +// +// HRs for _XPassport* APIs +// + +#define XONLINE_E_PASSPORT_NAME_ALREADY_TAKEN _HRESULT_TYPEDEF_(0x8015d001) // Failed to create passport: name already taken +#define XONLINE_E_PASSPORT_WRONG_NAME_OR_PASSWORD _HRESULT_TYPEDEF_(0x8015d002) // Wrong password and/or membername dose not exist. +#define XONLINE_E_PASSPORT_LOCKED_OUT _HRESULT_TYPEDEF_(0x8015d003) // The credential is locked out. +#define XONLINE_E_PASSPORT_FORCE_RENAME _HRESULT_TYPEDEF_(0x8015d004) // The credential is in a forced renamed state +#define XONLINE_E_PASSPORT_FORCE_CHANGE_PASSWORD _HRESULT_TYPEDEF_(0x8015d005) // The password has to be changed. +#define XONLINE_E_PASSPORT_FORCE_CHANGE_SQ_SA _HRESULT_TYPEDEF_(0x8015d006) // The secret question and answer has to be changed. +#define XONLINE_E_PASSPORT_PASSWORD_EXPIRED _HRESULT_TYPEDEF_(0x8015d007) // The password for the account has expired. +#define XONLINE_E_PASSPORT_REQUIRE_EMAIL_VALIDATION _HRESULT_TYPEDEF_(0x8015d008) // The account is blocked pending email address validation. +#define XONLINE_E_FORBIDDEN_WORD _HRESULT_TYPEDEF_(0x8015d009) // String contained words that are forbidden by namespace administrator, examine input. +#define XONLINE_E_PASSWORD_BLANK _HRESULT_TYPEDEF_(0x8015d00a) // The password is blank. +#define XONLINE_E_PASSWORD_TOO_SHORT _HRESULT_TYPEDEF_(0x8015d00b) // The password is too short +#define XONLINE_E_PASSWORD_TOO_LONG _HRESULT_TYPEDEF_(0x8015d00c) // The password is too long +#define XONLINE_E_PASSWORD_CONTAINS_MEMBER_NAME _HRESULT_TYPEDEF_(0x8015d00d) // The password contains the member name. +#define XONLINE_E_PASSWORD_CONTAINS_INVALID_CHARACTERS _HRESULT_TYPEDEF_(0x8015d00e) // The password contains invalid characters. +#define XONLINE_E_SQ_CONTAINS_PASSWORD _HRESULT_TYPEDEF_(0x8015d00f) // The secret question contains the password. +#define XONLINE_E_SA_CONTAINS_PASSWORD _HRESULT_TYPEDEF_(0x8015d010) // The answer for the secret question contains the password. +#define XONLINE_E_PASSWORD_CONTAINS_SA _HRESULT_TYPEDEF_(0x8015d011) // The password validation code detected the answer to the secret question in the password. +#define XONLINE_E_SQ_CONTAINS_SA _HRESULT_TYPEDEF_(0x8015d015) // The secret question contains the answer. +#define XONLINE_E_SA_TOO_SHORT _HRESULT_TYPEDEF_(0x8015d017) +#define XONLINE_E_SA_CONTAINS_SQ _HRESULT_TYPEDEF_(0x8015d018) // The answer to the secret question contains that question. +#define XONLINE_E_SA_CONTAINS_MEMBER_NAME _HRESULT_TYPEDEF_(0x8015d019) // The answer for the secret question contains the member name. +#define XONLINE_E_MEMBER_NAME_TOO_SHORT _HRESULT_TYPEDEF_(0x8015d01a) // The signin name is too short. +#define XONLINE_E_MEMBER_NAME_INVALID _HRESULT_TYPEDEF_(0x8015d01b) // The signin name is incomplete or has invalid characters. +#define XONLINE_E_PASSPORT_INVALID_DOMAIN _HRESULT_TYPEDEF_(0x8015d01c) // Cannot create EASI passport on reserved domain (e.g. hotmail.com) +#define XONLINE_E_PASSPORT_INVALID_POSTAL_CODE _HRESULT_TYPEDEF_(0x8015d01d) // The postal code specified is invalid + +// +// Values used in passcodes +// + +typedef enum { + XONLINE_PASSCODE_DPAD_UP = 1, + XONLINE_PASSCODE_DPAD_DOWN, + XONLINE_PASSCODE_DPAD_LEFT, + XONLINE_PASSCODE_DPAD_RIGHT, + XONLINE_PASSCODE_GAMEPAD_X, + XONLINE_PASSCODE_GAMEPAD_Y, + XONLINE_PASSCODE_GAMEPAD_LEFT_TRIGGER = 9, + XONLINE_PASSCODE_GAMEPAD_RIGHT_TRIGGER, + XONLINE_PASSCODE_GAMEPAD_LEFT_SHOULDER, + XONLINE_PASSCODE_GAMEPAD_RIGHT_SHOULDER +} XONLINE_PASSCODE_TYPE; + +#pragma pack(push, 1) +typedef struct _USER_ACCOUNT_STATUS_INFO +{ + // Xbox Live user policy + + BOOL bNewTermsOfService; + BOOL bForcedNameChangeRequired; + FILETIME ftSuspendedUntil; + WORD wTotalDaysSuspended; + FILETIME ftVoiceBannedUntil; + WORD wTotalDaysVoiceBanned; + + // Billing-related information + + HRESULT hrBillingAccountStatus; +} USER_ACCOUNT_STATUS_INFO; +#pragma pack(pop) + + +// +// Define maximum sizes for various fields in the request +// + +#define MAX_FIRSTNAME_SIZE 64 +#define MAX_LASTNAME_SIZE 64 +#define MAX_EMAIL_SIZE 129 +#define MAX_PHONE_PREFIX_SIZE 12 +#define MAX_PHONE_NUMBER_SIZE 12 +#define MAX_PHONE_EXTENSION_SIZE 12 +#define MAX_STREET_SIZE 128 +#define MAX_CITY_SIZE 64 +#define MAX_DISTRICT_SIZE 64 +#define MAX_STATE_SIZE 64 +#define MAX_COUNTRYCODE_SIZE 2 +#define MAX_POSTALCODE_SIZE 16 +#define MAX_CC_NAME_SIZE 64 +#define MAX_CC_TYPE_SIZE 32 +#define MAX_CC_NUMBER_SIZE 24 +#define MAX_CC_EXPIRATION_SIZE 6 +#define MAX_CC_CCV_NUMBER_SIZE 4 +#define MAX_DD_BANK_CODE_SIZE 64 +#define MAX_DD_BRANCH_CODE_SIZE 64 +#define MAX_DD_CHECK_DIGITS_SIZE 64 +#define ACCOUNT_PIN_LENGTH 4 +#define VOUCHER_LENGTH 25 +#define MAX_VOUCHER_SIZE VOUCHER_LENGTH+1 +#define MAX_BILLING_TOKEN_SIZE MAX_VOUCHER_SIZE + +#define PRIVILEGES_DWORD_LENGTH 8 +#define MAX_PRIVILEGE_BITS 256 + +// +// Privilege bits (also defined in server tree's xonline.x) +// + +#define XONLINE_PRIVILEGE_MAX 255 + +// Add Friends +#define XONLINE_PRIVILEGE_ADD_FRIEND 255 // private, internal only - on|off + +// Sessions +#define XONLINE_PRIVILEGE_MULTIPLAYER_SESSIONS 254 // on|off (on is modified by FRIENDS_ONLY) +#define XONLINE_PRIVILEGE_MULTIPLAYER_ENABLED_BY_TIER 253 // private, internal only - on|off + +// Communications +#define XONLINE_PRIVILEGE_COMMUNICATIONS 252 // on|off (on is modified by FRIENDS_ONLY) +#define XONLINE_PRIVILEGE_COMMUNICATIONS_FRIENDS_ONLY 251 // on=friends only | off=everyone +// Sending video messages is restricted by tier and needs a second bit +#define XONLINE_PRIVILEGE_VIDEO_MESSAGING_SEND 250 // private, internal only - on|off + +// Profile +#define XONLINE_PRIVILEGE_PROFILE_VIEWING 249 // on|off (on is modified by FRIENDS_ONLY) +#define XONLINE_PRIVILEGE_PROFILE_VIEWING_FRIENDS_ONLY 248 // on=friends only | off=everyone + +// Viewing of User Created Content +#define XONLINE_PRIVILEGE_USER_CREATED_CONTENT 247 // on|off (on is modified by FRIENDS_ONLY) +#define XONLINE_PRIVILEGE_USER_CREATED_CONTENT_FRIENDS_ONLY 246 // sharing on=friends only | off=everyone + +// Premium Content Purchases +#define XONLINE_PRIVILEGE_PURCHASE_CONTENT 245 // on|off + +// Presence +#define XONLINE_PRIVILEGE_PRESENCE 244 // on|off (on is modified by FRIENDS_ONLY) +#define XONLINE_PRIVILEGE_PRESENCE_FRIENDS_ONLY 243 // on=friends only | off=everyone + +// Backward Compatibility +#define XONLINE_PRIVILEGE_XBOX1_LIVE_ACCESS 242 // private, internal only - on|off + +#define XONLINE_PRIVILEGE_MIN 242 + + +typedef enum { + XONLINE_PARENTAL_CONTROL_GROUP_OPEN = 0, + XONLINE_PARENTAL_CONTROL_GROUP_MEDIUM = 1, + XONLINE_PARENTAL_CONTROL_GROUP_RESTRICTED = 2 +} XONLINE_PARENTAL_CONTROL_GROUP_TYPE; + +typedef enum { + XONLINE_PAYMENT_INSTRUMENT_NONE = 0, + XONLINE_PAYMENT_INSTRUMENT_CREDIT_CARD = 1, + XONLINE_PAYMENT_INSTRUMENT_DIRECT_DEBIT = 2 +} XONLINE_PAYMENT_INSTRUMENT_TYPE; + +typedef enum { + XONLINE_CREDIT_CARD_VISA = 0, + XONLINE_CREDIT_CARD_MASTER_CARD = 1, + XONLINE_CREDIT_CARD_AMEX = 2, + XONLINE_CREDIT_CARD_DISCOVER = 3, + XONLINE_CREDIT_CARD_JCB = 4, + XONLINE_CREDIT_CARD_DINERS = 5, + XONLINE_CREDIT_CARD_KLCC = 6 +} XONLINE_CREDIT_CARD_TYPE; + +typedef enum { + XONLINE_TIER_INVALID = 0, + XONLINE_TIER_BRONZE = 3, + XONLINE_TIER_SILVER = 6 +} XONLINE_TIER_TYPE; + +typedef enum { + XONLINE_SUBSCRIPTION_PENDING = 0, + XONLINE_SUBSCRIPTION_ENABLED = 1, + XONLINE_SUBSCRIPTION_SUSPENDED = 2, + XONLINE_SUBSCRIPTION_EXPIRED = 3, + XONLINE_SUBSCRIPTION_CANCELED = 4, + XONLINE_SUBSCRIPTION_EXPIRED_NO_VIOLATIONS = 128 +} XONLINE_SUBSCRIPTION_STATUS_TYPE; + +typedef enum { + XONLINE_GENRE_BASE = 0, + XONLINE_GENRE_XARCADE = 116000000 +} XONLINE_GENRE_TYPE; + +typedef enum { + XONLINE_DMP_STATUS_ACTIVE = 0, + XONLINE_DMP_STATUS_DISABLED = 1, + XONLINE_DMP_STATUS_CLOSED = 2 +} XONLINE_DMP_STATUS_TYPE; + +typedef enum { + XONLINE_GET_POINTS_BALANCE_RESPONSE_ABOVE_LOW_BALANCE = 0x0001 +} XONLINE_GET_POINTS_BALANCE_RESPONSE_FLAGS; + +typedef enum { + XONLINE_GET_POINTS_BALANCE_DETAILS_RESPONSE_ABOVE_LOW_BALANCE = 0x0001 +} XONLINE_GET_POINTS_BALANCE_DETAILS_RESPONSE_FLAGS; + +typedef enum { + XONLINE_OFFERING_TYPE_SUBSCRIPTION = 0x00000001, + XONLINE_OFFERING_TYPE_CONTENT = 0x00000002, + XONLINE_OFFERING_TYPE_RENEWAL = 0x00000004, + XONLINE_OFFERING_TYPE_POINTS_BUNDLE = 0x00000008, + XONLINE_OFFERING_TYPE_GAMERTAG_CHANGE = 0x00000010, + XONLINE_OFFERING_TYPE_GAME_DEMO = 0x00000020, + XONLINE_OFFERING_TYPE_GAME_TRAILER = 0x00000040, + XONLINE_OFFERING_TYPE_THEME = 0x00000080, + XONLINE_OFFERING_TYPE_GAMEPLAY = 0x00000100, + XONLINE_OFFERING_TYPE_FULL_GAME = 0x00000200, + XONLINE_OFFERING_TYPE_PROMO_POINTS = 0x00000400, + XONLINE_OFFERING_TYPE_TILE = 0x00000800, + XONLINE_OFFERING_TYPE_ARCADE = 0x00002000 +} XONLINE_OFFERING_TYPE; + +typedef enum { + XONLINE_TAX_TYPE_NO_TAX = 0, + XONLINE_TAX_TYPE_DEFAULT = 1, + XONLINE_TAX_TYPE_GST = 2, + XONLINE_TAX_TYPE_VAT = 3, + XONLINE_TAX_TYPE_NOT_APPLICABLE = 4 +} XONLINE_TAX_TYPE; + +typedef enum { + XONLINE_OFFERING_FREQUENCY_ONE_TIME_CHARGE = 0, + XONLINE_OFFERING_FREQUENCY_MONTHLY = 1, + XONLINE_OFFERING_FREQUENCY_QUARTERLY = 2, + XONLINE_OFFERING_FREQUENCY_BIANNUALLY = 3, + XONLINE_OFFERING_FREQUENCY_ANNUALLY = 4 +} XONLINE_OFFERING_FREQUENCY; + +typedef enum { + XONLINE_OFFERING_RELATION_NONE = 1, + XONLINE_OFFERING_RELATION_BASE = 0, + XONLINE_OFFERING_RELATION_RENEWAL = 3 +} XONLINE_OFFERING_RELATION; + +typedef enum { + XONLINE_PAYMENT_TYPE_CREDIT_CARD = 0x00000001, + XONLINE_PAYMENT_TYPE_TOKEN = 0x00000002, + XONLINE_PAYMENT_TYPE_POINTS = 0x00000004 +} XONLINE_PAYMENT_TYPE; + +typedef enum { + XONLINE_CONTENT_ENUMERATE_USER_PLAYED_GAME_FILTER = 0x0001, + XONLINE_CONTENT_ENUMERATE_USER_HAS_PURCHASED_FILTER = 0x0002, + XONLINE_CONTENT_ENUMERATE_NEW_CONTENT_ONLY_FILTER = 0x0004 +} XONLINE_CONTENT_ENUMERATE_FLAGS; + +typedef enum { + XONLINE_BASIC_CONTENT_INFO_USER_HAS_PURCHASED = 0x0001, + XONLINE_BASIC_CONTENT_INFO_USER_HAS_VIEWED = 0x0002, + XONLINE_BASIC_CONTENT_INFO_IS_UNRESTRICTED = 0x0004 +} XONLINE_BASIC_CONTENT_INFO_FLAGS; + +typedef enum { + XONLINE_SUBSCRIPTION_QUERY_FOR_NEW = 0x0001, + XONLINE_SUBSCRIPTION_QUERY_FOR_RENEWALS = 0x0002, + XONLINE_SUBSCRIPTION_QUERY_FOR_CURRENT = 0x0004, + XONLINE_SUBSCRIPTION_QUERY_FOR_EXPIRED = 0x0008 +} XONLINE_SUBSCRIPTION_ENUMERATE_FLAGS; + +typedef enum { + XONLINE_BASIC_CONTENT_INFO_USER_IS_SUBSCRIBED = 0x0001 +} XONLINE_BASIC_SUBSCRIPTION_INFO_FLAGS; + +typedef enum { + XONLINE_SUBSCRIPTION_CONVERT_MODE_CONVERT = 0, + XONLINE_SUBSCRIPTION_CONVERT_MODE_RENEW = 1, + XONLINE_SUBSCRIPTION_CONVERT_MODE_INVALID = 2 +} XONLINE_SUBSCRIPTION_CONVERT_MODE; + +typedef enum { + XONLINE_TITLE_QUERY_FOR_NEW = 0x0001, + XONLINE_TITLE_QUERY_FOR_PLAYED = 0x0002 +} XONLINE_TITLE_ENUMERATE_FLAGS; + +#define XONLINE_OFFERING_BITFILTER_ALL = 0xFFFFFFFF; + +#pragma pack(push, 4) + +typedef struct _USER_XNAME +{ + WCHAR wszGamerTag[XONLINE_GAMERTAG_SIZE]; +} USER_XNAME; + + +typedef struct _USER_ACCOUNT_INFO +{ + USER_XNAME xname; + BYTE rgbPasscode[XONLINE_PASSCODE_LENGTH]; + FILETIME ftBirthdate; +} USER_ACCOUNT_INFO; + + +typedef struct _USER_PAYMENT_INFO +{ + WCHAR wszFirstName[MAX_FIRSTNAME_SIZE]; + WCHAR wszLastName[MAX_LASTNAME_SIZE]; + WCHAR wszStreet1[MAX_STREET_SIZE]; + WCHAR wszStreet2[MAX_STREET_SIZE]; + WCHAR wszDistrict[MAX_STREET_SIZE]; + WCHAR wszCity[MAX_CITY_SIZE]; + WCHAR wszState[MAX_STATE_SIZE]; + BYTE bCountryId; + WORD wLanguageId; + WCHAR wszPostalCode[MAX_POSTALCODE_SIZE]; + WCHAR wszPhonePrefix[MAX_PHONE_PREFIX_SIZE]; + WCHAR wszPhoneNumber[MAX_PHONE_NUMBER_SIZE]; + WCHAR wszPhoneExtension[MAX_PHONE_EXTENSION_SIZE]; + + BYTE bPaymentTypeId; + WCHAR wszCardHolder[MAX_CC_NAME_SIZE]; + BYTE bCardTypeId; + WCHAR wszCardNumber[MAX_CC_NUMBER_SIZE]; + FILETIME ftCardExpiration; + + WCHAR wszEmail[MAX_EMAIL_SIZE]; + WCHAR wszBankCode[MAX_DD_BANK_CODE_SIZE]; + WCHAR wszBranchCode[MAX_DD_BRANCH_CODE_SIZE]; + WCHAR wszCheckDigits[MAX_DD_CHECK_DIGITS_SIZE]; + + WCHAR wszVoucher[MAX_VOUCHER_SIZE]; + + BYTE bMsftOptIn; + BYTE bPartnerOptIn; + ULONGLONG qwOfferId; + FILETIME ftBirthdate; +} USER_PAYMENT_INFO; + +#pragma pack(pop) + + +// +// Calculate the maximum request buffer size * 3 for UTF8 conversion +// + +#define MAX_CREATE_OWNER_ACCT_STRINGS (3 * ( \ + XONLINE_GAMERTAG_SIZE + \ + MAX_FIRSTNAME_SIZE + \ + MAX_LASTNAME_SIZE + \ + MAX_STREET_SIZE + \ + MAX_STREET_SIZE + \ + MAX_DISTRICT_SIZE + \ + MAX_CITY_SIZE + \ + MAX_STATE_SIZE + \ + MAX_POSTALCODE_SIZE + \ + MAX_PHONE_PREFIX_SIZE + \ + MAX_PHONE_NUMBER_SIZE + \ + MAX_PHONE_EXTENSION_SIZE + \ + MAX_CC_NAME_SIZE + \ + MAX_CC_NUMBER_SIZE + \ + MAX_EMAIL_SIZE + \ + MAX_DD_BANK_CODE_SIZE + \ + MAX_DD_BRANCH_CODE_SIZE + \ + MAX_DD_CHECK_DIGITS_SIZE + \ + MAX_VOUCHER_SIZE)) + + +#pragma pack(push, 1) +struct CREATE_OWNER_ACCT_REQUEST +{ + ULONGLONG qwMachinePuid; + DWORD dwTitleId; + FILETIME ftBirthdate; + BYTE bMSSpam; + BYTE bPartnerSpam; + BYTE bCountryId; + WORD wLanguageId; + BYTE bCardTypeId; + FILETIME ftCardExpiration; + BYTE rgbData[MAX_CREATE_OWNER_ACCT_STRINGS]; +}; + +struct CREATE_OWNER_ACCT_RESPONSE +{ + ULONGLONG qwUserID; + BYTE rgbKey[XONLINE_KEY_LENGTH]; + CHAR szDomain[XONLINE_USERDOMAIN_SIZE]; + CHAR szRealm[XONLINE_KERBEROSREALM_SIZE]; +}; + +#pragma pack(pop) + +#ifndef max +#define max(a,b) (((a) > (b)) ? (a) : (b)) +#endif + +#ifndef min +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#endif + +#ifndef _countof +#define _countof(array) (sizeof(array)/sizeof(array[0])) +#endif + + +typedef DWORD MSGTIME; +#define FT_MSGTIME_BEGIN 0x01C2B128BA2B4000 // 1/1/2003 - used for conversion between FILETIME and MSGTIME +#define FileTimeToMsgTime( pFileTime ) (MSGTIME)( ( *((ULONGLONG*)(pFileTime)) - FT_MSGTIME_BEGIN ) / 10000000 ) + +XAMINLINE +FILETIME +MsgTimeToFileTime( MSGTIME mt) +{ + ULONGLONG ull = ((ULONGLONG)(mt) * 10000000 + FT_MSGTIME_BEGIN); + return *((FILETIME*)&ull); +} + + +// +// Game Invites +// +typedef enum +{ + XMSG_INVITE_ANSWER_NO = 0, + XMSG_INVITE_ANSWER_YES = 1, + XMSG_INVITE_ANSWER_NEVER = 2, + XMSG_INVITE_ANSWER_INVALID = 3 + +} XMSG_INVITE_ANSWER_TYPE; + +#pragma pack(push, 1) + +typedef union _XMSG_PROPERTY_DATA +{ + WORD wPropOffset; + WORD wData; + BYTE bData; + +} XMSG_PROPERTY_DATA, *PXMSG_PROPERTY_DATA; + +typedef struct _XMSG_PROPERTY +{ + WORD wPropTag; + XMSG_PROPERTY_DATA Data; + +} XMSG_PROPERTY, *PXMSG_PROPERTY; + +typedef struct _XMSG_PROPERTY_INTERNAL +{ + WORD wPropTag; // This property's type and unique identifier + union + { + WORD wPropOffset; // The offset from the start of rgbData of this property's data + WORD wData; // For type XONLINE_MSG_PROP_TYPE_I2 this contains the actual data + BYTE bData; // For type XONLINE_MSG_PROP_TYPE_I1 and XONLINE_MSG_PROP_TYPE_BOOL this contains the actual data + }; +} XMSG_PROPERTY_INTERNAL, *PXMSG_PROPERTY_INTERNAL; + +typedef struct _XMSG_DETAILS_INTERNAL +{ + WORD wPropCount; + WORD cbData; + + // XMSG_PROPERTY_INTERNAL rgProperties[wPropCount] + // BYTE rgbData[cbData] + +} XMSG_DETAILS_INTERNAL, *PXMSG_DETAILS_INTERNAL; + +typedef WORD XMSG_PROPERTY_STRING_INTERNAL; +typedef WORD XMSG_PROPERTY_BINARY_INTERNAL; + +typedef struct _XMSG_PROPERTY_ATTACHMENT_INTERNAL +{ + DWORD cbAttach; + DWORD dwAttachFlags; + DWORD cbAttachUrl; +} XMSG_PROPERTY_ATTACHMENT_INTERNAL; + +typedef struct _P_ALIVE_2_MSG_INTERNAL +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + + ULONGLONG qwUserID; + WORD cbAcctName; + XNADDR xnaddr; + XNKID xnkid; + XNKEY xnkey; + DWORD dwBuddyListVersion; + DWORD dwBlockListVersion; + + //XBOX_LIBRARY_VERSION clientVersion; + WORD wMajorVersion; + WORD wMinorVersion; + WORD wBuildNumber; + WORD wQFENumber; + + DWORD dwTitleID; + DWORD dwTitleVersion; + DWORD dwTitleRegion; + WORD ipportI; + IN_ADDR ipaI; + ULONGLONG liNonce; + ULONGLONG liTimeInit; + + // CHAR szAcctName[cbAcctName] +} P_ALIVE_2_MSG_INTERNAL; + +typedef struct _P_DEAD_USER_MSG_INTERNAL +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + + ULONGLONG qwUserID; +} P_DEAD_USER_MSG_INTERNAL; + +typedef struct _P_ADD_2_MSG_INTERNAL +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + + ULONGLONG qwSenderID; + ULONGLONG qwBuddyID; + DWORD dwMessageFlags; + WORD cbDetails; + CHAR szBuddyAcctName[XONLINE_GAMERTAG_SIZE]; + + // BYTE rgbDetails[cbDetails]; +}P_ADD_2_MSG_INTERNAL; + +typedef struct _P_INVITE_2_MSG_INTERNAL +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + + ULONGLONG qwUserID; + ULONGLONG qwSenderContext; + DWORD dwTitleID; + DWORD dwMessageFlags; + WORD cInvitees; + WORD cbDetails; + + // ULONGLONG rgqwInvitees[cInvitees]; + // BYTE pbDetails[cbDetails]; +} P_INVITE_2_MSG_INTERNAL; + +typedef struct _P_INVITE_ANSWER_MSG_INTERNAL +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + + ULONGLONG qwUserID; + ULONGLONG qwHostID; + XNKID MatchSessionID; + WORD wAnswer; +} P_INVITE_ANSWER_MSG_INTERNAL; + +typedef struct _P_CANCEL_MSG_INTERNAL +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + + ULONGLONG qwUserID; + XNKID SessionID; + WORD cInvitees; + + // ULONGLONG rgqwInviteeIDs[cInvitees]; +} P_CANCEL_MSG_INTERNAL; + +typedef struct _P_FIND_USER_MSG_INTERNAL +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + + ULONGLONG qwUserID; + ULONGLONG qwFindID; + CHAR szSenderName[XONLINE_GAMERTAG_SIZE]; +} P_FIND_USER_MSG_INTERNAL; + +typedef struct _Q_DEQUEUE_MSG_INTERNAL +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + + ULONGLONG qwUserID; + WORD wQType; + DWORD dwStartItemID; + WORD wMaxItems; + DWORD dwMaxTotalItemDataSize; +} Q_DEQUEUE_MSG_INTERNAL; + +typedef struct _Q_SEND_MESSAGE_MSG_INTERNAL +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + + ULONGLONG qwUserID; + ULONGLONG qwSenderContext; + DWORD dwMessageFlags; + DWORD dwSenderTitleID; + WORD wExpireMinutes; + WORD cbDetails; + WORD cRecipients; + BYTE bMessageType; + CHAR szSenderName[15]; + + // ULONGLONG rgqwRecipientIDs[cRecipients]; + // XMSG_DETAILS Details; +} Q_SEND_MESSAGE_MSG_INTERNAL; + +#pragma pack(pop) + +typedef struct _XMSG_PROPERTY_BINARY +{ + WORD cbData; + BYTE *rgbData; + +} XMSG_PROPERTY_BINARY, *PXMSG_PROPERTY_BINARY; + +typedef struct _XMSG_PROPERTY_STRING +{ + WORD cbString; + WCHAR *szString; + +} XMSG_PROPERTY_STRING, *PXMSG_PROPERTY_STRING; + +typedef struct _XMSG_PROPERTY_ATTACHMENT +{ + DWORD cbAttach; + DWORD dwAttachFlags; + DWORD cbAttachUrl; + CHAR szAttachUrl; + +} XMSG_PROPERTY_ATTACHMENT, *PXMSG_PROPERTY_ATTACHMENT; + +#define XONLINE_MSG_MAX_SUMMARY_NEEDED_IDS 4 +#define XONLINE_MAX_ALTERNATE_TITLE_ID 4 + + +typedef struct _XUSER_PRIVILEGE_MSG +{ + XUID xuidUser; + PXUID pXuids; + DWORD dwXuidCount; + BOOL fResult; + DWORD dwPrivilege; + PXOVERLAPPED pOverlapped; +} XUSER_PRIVILEGE_MSG, *PXUSER_PRIVILEGE_MSG; + + + +#define X_AFFILIATE_INDEX_TO_FLAG(dwIndex) (1 << dwIndex) +#define X_AFFILIATE_FLAG_TO_INDEX(dwFlag) \ + (dwFlag) == X_AFFILIATE_INDEX_TO_FLAG(X_AFFILIATE_ENCOUNTERED_INDEX) ? X_AFFILIATE_ENCOUNTERED_INDEX : \ + (dwFlag) == X_AFFILIATE_INDEX_TO_FLAG(X_AFFILIATE_COMPLETED_GAME_INDEX) ? X_AFFILIATE_COMPLETED_GAME_INDEX : \ + (dwFlag) == X_AFFILIATE_INDEX_TO_FLAG(X_AFFILIATE_POSITIVE_FEEDBACK_INDEX) ? X_AFFILIATE_POSITIVE_FEEDBACK_INDEX : \ + (dwFlag) == X_AFFILIATE_INDEX_TO_FLAG(X_AFFILIATE_NEGATIVE_FEEDBACK_INDEX) ? X_AFFILIATE_NEGATIVE_FEEDBACK_INDEX : \ + (dwFlag) == X_AFFILIATE_INDEX_TO_FLAG(X_AFFILIATE_AVOIDING_ME_INDEX) ? X_AFFILIATE_AVOIDING_ME_INDEX : \ + (dwFlag) == X_AFFILIATE_INDEX_TO_FLAG(X_AFFILIATE_FRIEND_INDEX) ? X_AFFILIATE_FRIEND_INDEX : \ + (dwFlag) == X_AFFILIATE_INDEX_TO_FLAG(X_AFFILIATE_BLOCK_INDEX) ? X_AFFILIATE_BLOCK_INDEX : \ + (dwFlag) == X_AFFILIATE_INDEX_TO_FLAG(X_AFFILIATE_MUTE_INDEX) ? X_AFFILIATE_MUTE_INDEX : X_AFFILIATE_INDEX_ERROR + +#define X_AFFILIATE_CLIENT_FLAGS \ + (X_AFFILIATE_INDEX_TO_FLAG(X_AFFILIATE_COMPLETED_GAME_INDEX) | X_AFFILIATE_INDEX_TO_FLAG(X_AFFILIATE_ENCOUNTERED_INDEX)) + + +typedef struct _XUSER_PLAYERLIST_USER +{ + ULONGLONG qwPlayerID; + DWORD dwFlags; + DWORD dwTitleID; + MSGTIME mtUpdated; + DWORD dwRating; + CHAR szGamertag[XONLINE_GAMERTAG_SIZE]; + BOOLEAN fPendingAdd; + WORD wNextPending; + +} XUSER_PLAYERLIST_USER; + +typedef struct _XUSER_PLAYERLIST_ITEM +{ + XUID xuidUser; + DWORD dwFlags; + DWORD dwTitleID; + DWORD dwRating; + char szGamertag[XONLINE_GAMERTAG_SIZE]; + +} XUSER_PLAYERLIST_ITEM; + +typedef struct _XUSER_ADDPLAYER_MSG +{ + DWORD dwUserIndex; + DWORD dwResult; + XUSER_PLAYERLIST_ITEM item; + +} XUSER_ADDPLAYER_MSG; + +typedef struct _XUSER_PLAYER_ENUM +{ + DWORD dwUserIndex; + DWORD dwStartingIndex; + DWORD cItem; + +} XUSER_PLAYER_ENUM; + +typedef struct _XUSER_ENUMPLAYER_MSG +{ + DWORD dwUserIndex; + DWORD dwStartingIndex; + DWORD cItem; + XUSER_PLAYER_ENUM* pxenum; + +} XUSER_ENUMPLAYER_MSG; + +//[end_import_internal(STRUCTS)] + +//[begin_import] +DWORD +XUserCreatePlayerEnumerator( + IN DWORD dwUserIndex, + IN DWORD dwStartingIndex, + IN DWORD cItem, + OUT DWORD * pcbBuffer, + OUT HANDLE * ph + ); + +//[end_import] + + +//----------------------------------------------------------------------------- +// Update download structures +//----------------------------------------------------------------------------- + +typedef HRESULT (WINAPI * PFNDOWNLOADINSTALLNEWFILE)(IN void * pvUserData, + IN const char * szFileName, + IN DWORD dwFileDataSize, + IN BOOL bResume); +typedef HRESULT (WINAPI * PFNDOWNLOADINSTALLFILEDATABEGIN)(IN void * pvUserData, + IN const char * szFileName, + IN BOOL bResume); +typedef HRESULT (WINAPI * PFNDOWNLOADINSTALLPROCESSDATA)(IN void * pvUserData, + IN const BYTE * pbData, + IN DWORD dwDataSize, + IN HANDLE hFile, + IN LARGE_INTEGER * pliFileOffset, + IN BOOL bResume); +typedef HRESULT (WINAPI * PFNDOWNLOADINSTALLFILEDATAEND)(IN void * pvUserData, + IN BOOL bResume); + +typedef struct _DOWNLOAD_INSTALLER +{ + void * pvUserData; // user context pointer associated with download task + PFNDOWNLOADINSTALLNEWFILE pfnDownloadInstallNewFile; // download installer new file handler + PFNDOWNLOADINSTALLFILEDATABEGIN pfnDownloadInstallFileDataBegin; // download installer file data begin handler + PFNDOWNLOADINSTALLPROCESSDATA pfnDownloadInstallProcessData; // download installer file data processing function + PFNDOWNLOADINSTALLFILEDATAEND pfnDownloadInstallFileDataEnd; // download installer file data end handler +} DOWNLOAD_INSTALLER; + + +#pragma pack(push, 1) + +typedef struct _XONLINE_ATTRIBUTE_STRING +{ + WORD Length; + WCHAR *lpValue; +} XONLINE_ATTRIBUTE_STRING, *PXONLINE_ATTRIBUTE_STRING; + +typedef struct _XONLINE_ATTRIBUTE_BLOB +{ + WORD Length; + BYTE *pbValue; +} XONLINE_ATTRIBUTE_BLOB, *PXONLINE_ATTRIBUTE_BLOB; + +typedef union _XONLINE_ATTRIBUTE_DATA +{ + ULONGLONG integer; + XONLINE_ATTRIBUTE_STRING string; + XONLINE_ATTRIBUTE_BLOB blob; +} XONLINE_ATTRIBUTE_DATA, *PXONLINE_ATTRIBUTE_DATA; + +typedef struct _XONLINE_ATTRIBUTE +{ + DWORD dwAttributeID; + XONLINE_ATTRIBUTE_DATA info; +} XONLINE_ATTRIBUTE, *PXONLINE_ATTRIBUTE; + +typedef struct _XONLINE_MATCH_SESSION_INFO +{ + XNKID SessionID; + XNKEY KeyExchangeKey; +} XONLINE_MATCH_SESSION_INFO, *PXONLINE_MATCH_SESSION_INFO; + +typedef struct _XONLINE_MATCH_SEARCHRESULT +{ + DWORD dwReserved; + XNKID SessionID; + XNADDR HostAddress; + XNKEY KeyExchangeKey; + DWORD dwPublicOpen; + DWORD dwPrivateOpen; + DWORD dwPublicFilled; + DWORD dwPrivateFilled; + DWORD dwNumAttributes; + DWORD *pAttributeOffsets; + XONLINE_ATTRIBUTE *pAttributes; +} XONLINE_MATCH_SEARCHRESULT, *PXONLINE_MATCH_SEARCHRESULT; + +typedef struct _XONLINE_MATCH_SEARCHRESULT_HEADER +{ + DWORD dwReserved; + USHORT NumSearchResults; + USHORT Flags; + DWORD LoggingThreshold; + XONLINE_MATCH_SEARCHRESULT *pResults; +} XONLINE_MATCH_SEARCHRESULT_HEADER, *PXONLINE_MATCH_SEARCHRESULT_HEADER; + +typedef struct _XMATCH_SESSION_CREATE_REQUEST +{ + DWORD dwMessageLength; + XNKID SessionID; + DWORD dwTitleID; + XNADDR HostAddress; + DWORD dwPublicOpen; + DWORD dwPrivateOpen; + DWORD dwPublicFilled; + DWORD dwPrivateFilled; + DWORD dwNumAttributes; + DWORD *pAttributeOffsets; + XONLINE_ATTRIBUTE *pAttributes; + XONLINE_MATCH_SESSION_INFO *pSessionInfo; +} XMATCH_SESSION_CREATE_REQUEST; + +typedef struct _XMATCH_SESSION_UPDATE_REQUEST +{ + DWORD dwMessageLength; + XNKID SessionID; + DWORD dwTitleID; + XNADDR HostAddress; + DWORD dwPublicOpen; + DWORD dwPrivateOpen; + DWORD dwPublicFilled; + DWORD dwPrivateFilled; + DWORD dwNumAttributes; + DWORD *pAttributeOffsets; + XONLINE_ATTRIBUTE *pAttributes; +} XMATCH_SESSION_UPDATE_REQUEST; + +typedef struct _XMATCH_SESSION_DELETE_REQUEST +{ + DWORD dwMessageLength; + XNKID SessionID; + DWORD dwTitleID; +} XMATCH_SESSION_DELETE_REQUEST; + +typedef struct _XMATCH_SEARCH_REQUEST +{ + DWORD dwMessageLength; + DWORD dwTitleID; + DWORD dwProcedureIndex; + XNADDR HostAddress; + WORD wNumUsers; + WORD wFlags; + DWORD dwNumAttributes; + DWORD *pAttributeOffsets; + XONLINE_ATTRIBUTE *pAttributes; + XONLINE_MATCH_SEARCHRESULT_HEADER *pSearchResults; +} XMATCH_SEARCH_REQUEST; + +typedef struct _STRING_LOOKUP_RESPONSE +{ + WORD wNumStrings; + STRING_DATA *pStringData; +} STRING_LOOKUP_RESPONSE; + +typedef struct _STRING_V1_TITLE_ID_REQUEST +{ + WORD wType; + WORD wLanguage; + WORD wNumTitles; + DWORD *pTitleIDs; + STRING_LOOKUP_RESPONSE *pResults; +} STRING_V1_TITLE_ID_REQUEST; + +typedef struct _STRING_LOOKUP_2_REQUEST +{ + DWORD dwTitleID; + WORD wNumStrings; + WORD wLocaleLen; + CHAR *szLocale; + DWORD *pStringIDs; + STRING_LOOKUP_RESPONSE *pResults; +} STRING_LOOKUP_2_REQUEST; + +typedef struct _STRING_VERIFY_2_REQUEST +{ + DWORD dwTitleID; + DWORD dwFlags; + WORD wLocaleLen; + WORD wNumStrings; + CHAR *szLocale; + STRING_DATA *pStringData; + STRING_VERIFY_RESPONSE *pResults; +} STRING_VERIFY_2_REQUEST; + +typedef struct _BASE_MSG_HEADER +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; +} BASE_MSG_HEADER; + +typedef struct _P_REPLY_BUDDY +{ + ULONGLONG qwBuddyID; + WORD cbAcctName; + BYTE bStatus; + CHAR *szAcctName; +} P_REPLY_BUDDY; + +typedef struct _P_REPLY_BLOCK +{ + ULONGLONG qwBlockID; +} P_REPLY_BLOCK; + +typedef struct _P_ALIVE_REPLY_MSG +{ + BASE_MSG_HEADER MsgHeader; + HRESULT hr; + DWORD dwBuddyListVersion; + WORD cBuddiesSent; + DWORD dwBlockListVersion; + WORD cBlocksSent; + P_REPLY_BUDDY *pBuddies; + P_REPLY_BLOCK *pBlocks; +} P_ALIVE_REPLY_MSG; + +typedef struct _XPRESENCE_ALIVE_REPLY +{ + P_ALIVE_REPLY_MSG *pAliveReplies; +} XPRESENCE_ALIVE_REPLY, *PPRESENCE_ALIVE_REPLY; + +typedef struct _XBOX_LIBRARY_VERSION +{ + WORD wMajorVersion; + WORD wMinorVersion; + WORD wBuildNumber; + WORD wQFENumber; +} XBOX_LIBRARY_VERSION; + +typedef struct _P_ALIVE_2_MSG +{ + BASE_MSG_HEADER MsgHeader; + ULONGLONG qwUserID; + WORD cbAcctName; + XNADDR xnaddr; + XNKID xnkid; + XNKEY xnkey; + DWORD dwBuddyListVersion; + DWORD dwBlockListVersion; + XBOX_LIBRARY_VERSION clientVersion; + DWORD dwTitleID; + DWORD dwTitleVersion; + DWORD dwTitleRegion; + WORD ipportI; + IN_ADDR ipaI; + ULONGLONG liNonce; + ULONGLONG liTimeInit; + CHAR *szAcctName; +} P_ALIVE_2_MSG; + +typedef struct _XPRESENCE_SEND_ALIVE +{ + P_ALIVE_2_MSG *pAlives; + XPRESENCE_ALIVE_REPLY *pAliveReply; +} XPRESENCE_SEND_ALIVE; + +typedef struct _P_DEAD_USER_MSG +{ + BASE_MSG_HEADER MsgHeader; + ULONGLONG qwUserID; +} P_DEAD_USER_MSG; + +typedef struct _XPRESENCE_SEND_DEAD_USER +{ + P_DEAD_USER_MSG *pDeadUsers; +} XPRESENCE_SEND_DEAD_USER; + +typedef struct _P_LIST_CHANGE_ITEM +{ + DWORD dwListVersion; + ULONGLONG qwTargetID; + WORD wOperationID; + HRESULT hr; + WORD cbTargetAcctName; + CHAR *szTargetAcctName; +} P_LIST_CHANGE_ITEM; + +typedef struct _P_PRESENCE_ITEM +{ + ULONGLONG qwBuddyID; + DWORD dwTitleID; + DWORD dwState; + XNKID MatchSessionID; + WORD cbNickname; + WORD cbTitleStuff; + BYTE *rgbNickName; + BYTE *rgbTitleStuff; +} P_PRESENCE_ITEM; + +typedef struct _P_PEER_PRESENCE_ITEM +{ + ULONGLONG qwUserID; + DWORD dwTitleID; + DWORD dwState; + XNKID MatchSessionID; + WORD cbTitleStuff; + BYTE *rgbTitleStuff; +} P_PEER_PRESENCE_ITEM; + +typedef struct _P_PRESENCE_2_ITEM +{ + ULONGLONG qwUserID; + DWORD dwTitleID; + DWORD dwState; + XNKID MatchSessionID; + MSGTIME mtUserTime; + WORD cbRichPresence; + WORD cbData; + WCHAR *wszRichPresence; + BYTE *rgbData; +} P_PRESENCE_2_ITEM; + +typedef struct _P_INVITE_ACTION_ITEM +{ + ULONGLONG qwTargetID; + DWORD dwContext; + XNKID SessionID; +} P_INVITE_ACTION_ITEM; + +typedef struct _P_INVITATION_ITEM +{ + ULONGLONG qwHostID; + XNKID MatchSessionID; + DWORD dwTitleID; + FILETIME ftSent; +} P_INVITATION_ITEM; + +typedef struct _P_INVITATION_ANSWER_ITEM +{ + ULONGLONG qwInviteeID; + XNKID MatchSessionID; + ULONGLONG ftSent; + WORD wAnswer; +} P_INVITATION_ANSWER_ITEM; + +typedef union _Q_REPLY_ITEM +{ + P_LIST_CHANGE_ITEM ChangeItem; + P_PRESENCE_ITEM PresenceItem; + P_INVITATION_ITEM InvitationItem; + P_INVITATION_ANSWER_ITEM AnswerItem; + P_PEER_PRESENCE_ITEM PeerPresenceItem; + P_PRESENCE_2_ITEM RichPresenceItem; + P_INVITE_ACTION_ITEM InviteActionItem; +} Q_REPLY_ITEM; + +typedef struct _Q_LIST_ITEM +{ + DWORD dwItemID; + WORD wItemLen; + Q_REPLY_ITEM ReplyItem; +} Q_LIST_ITEM; + +typedef struct _Q_LIST_REPLY_MSG +{ + BASE_MSG_HEADER MsgHeader; + ULONGLONG qwUserID; + WORD wQType; + HRESULT hr; + DWORD dwNextItemID; + WORD wQLeft; + WORD wNumItems; + DWORD dwTotalItemDataSize; + DWORD cdwQVals; + DWORD *rgdwQVals; + Q_LIST_ITEM *rgItems; +} Q_LIST_REPLY_MSG, *PQ_LIST_REPLY_MSG; + +typedef struct _Q_DEQUEUE_MSG +{ + BASE_MSG_HEADER MsgHeader; + ULONGLONG qwUserID; + WORD wQType; + DWORD dwStartItemID; + WORD wMaxItems; + DWORD dwMaxTotalItemDataSize; +} Q_DEQUEUE_MSG; + +typedef struct _XNOTIFICATION_SEND_DEQUEUE +{ + Q_DEQUEUE_MSG pDequeueMsg[1]; + Q_LIST_REPLY_MSG *pReply; +} XNOTIFICATION_SEND_DEQUEUE; + +typedef struct _PRESENCE_SET_STATE +{ + XUID UserXuid; + DWORD dwStateFlags; + XNKID sessionID; + DWORD cbState; + BYTE *pbState; +} PRESENCE_SET_STATE; + +typedef struct _PRESENCE_GET_STATE +{ + XUID UserXuid; + DWORD pdwStateFlags[1]; + XNKID pSessionID[1]; +} PRESENCE_GET_STATE; + +typedef struct _NOTIFICATION_UPDATE_STATE_FLAGS +{ + XUID UserXuid; + DWORD dwStateFlagsSet; + DWORD dwStateFlagsClear; +} NOTIFICATION_UPDATE_STATE_FLAGS; + +typedef struct _PRESENCE_SET_GAME_SESSION +{ + XUID UserXuid; + XNKID sessionID; +} PRESENCE_SET_GAME_SESSION; + +typedef struct _GET_SESSION_RESULTS +{ + ULONGLONG qwHostUserID; + DWORD dwTitleID; + DWORD dwTitleVersion; + DWORD dwTitleRegion; + XNADDR xnaddr; + XNKID xkid; + XNKEY xnkey; +} GET_SESSION_RESULTS, *PGET_SESSION_RESULTS; + +typedef struct _P_PEER_SESSION_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + XUID qwUserID; + XUID qwHostUserID; + GET_SESSION_RESULTS *pResults; +} P_PEER_SESSION_MSG; + +typedef struct _P_GET_PEER_SESSION +{ + GET_SESSION_RESULTS *pResults; +} P_GET_PEER_SESSION; + +typedef struct _P_PEER_SUBSCRIBE_REPLY_MSG +{ + BYTE pbInternal[32]; + HRESULT hr; +} P_PEER_SUBSCRIBE_REPLY_MSG; + +typedef struct _P_PEER_SUBSCRIBE_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + XUID qwUserID; + WORD cSrcUserIDs; + ULONGLONG *rgqwSrcUserIDs; + P_PEER_SUBSCRIBE_REPLY_MSG *pResults; +} P_PEER_SUBSCRIBE_MSG; + +typedef struct _P_PEER_UNSUBSCRIBE_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + XUID qwUserID; +} P_PEER_UNSUBSCRIBE_MSG; + +typedef struct _P_PRESENCE_ENUM_CREATE_MSG +{ + DWORD dwUserIndex; + DWORD cPeers; + XUID *pPeers; + DWORD dwStartingIndex; + DWORD dwPeersToReturn; + DWORD pcbBuffer[1]; + HANDLE ph[1]; +} P_PRESENCE_ENUM_CREATE_MSG; + +typedef struct _P_PRESENCE_SUBSCRIBE_MSG +{ + DWORD dwUserIndex; + DWORD cPeers; + XUID *pPeers; +} P_PRESENCE_SUBSCRIBE_MSG; + +typedef struct _P_PRESENCE_INITIALIZE_MSG +{ + DWORD cPeerSubscriptions; +} P_PRESENCE_INITIALIZE_MSG; + +typedef struct _SET_USER_SETTINGS2_REQUEST_STRUCT +{ + XUID qwUserId; + WORD bTier; + WORD dwUserFlags; + DWORD rgPrivileges[8]; +} SET_USER_SETTINGS2_REQUEST_STRUCT; + +typedef struct _UPDATE_PARENTAL_CONTROLS_STRUCT +{ + XUID qwUserId; + DWORD rgGrantPrivileges[8]; + DWORD rgRestrictPrivileges[8]; + WORD wSourceLength; + WCHAR *wszSource; +} UPDATE_PARENTAL_CONTROLS_STRUCT; + +typedef struct _GET_POINTS_BALANCE_RESPONSE +{ + DWORD dwPointsBalance; + BYTE bDMPAccountStatus; + BYTE bResponseFlags; +} GET_POINTS_BALANCE_RESPONSE; + +typedef struct _GET_POINTS_BALANCE_REQUEST +{ + XUID qwUserId; + ULONGLONG qwMachineId; + GET_POINTS_BALANCE_RESPONSE *pResults; +} GET_POINTS_BALANCE_REQUEST; + +typedef struct _PHONE_INFO +{ + WORD wPhonePrefixLength; + WCHAR *wszPhonePrefix; + WORD wPhoneNumberLength; + WCHAR *wszPhoneNumber; + WORD wPhoneExtensionLength; + WCHAR *wszPhoneExtension; +} PHONE_INFO; + +typedef struct _CREDIT_CARD_INFO +{ + BYTE bCardTypeId; + WORD wAccountHolderNameLength; + WCHAR *wszAccountHolderName; + WORD wAccountNumberLength; + WCHAR *wszAccountNumber; + WORD wCCVNumberLength; + WCHAR *wszCCVNumber; + FILETIME ftExpirationDate; +} CREDIT_CARD_INFO; + +typedef struct _DIRECT_DEBIT_INFO +{ + WORD wAccountHolderNameLength; + WCHAR *wszAccountHolderName; + WORD wAccountNumberLength; + WCHAR *wszAccountNumber; + WORD wBankCodeLength; + WCHAR *wszBankCode; + WORD wBranchCodeLength; + WCHAR *wszBranchCode; + WORD wCheckDigitsLength; + WCHAR *wszCheckDigits; +} DIRECT_DEBIT_INFO; + +typedef struct _CREATE_LIVE_ACCOUNT_RESPONSE +{ + ULONGLONG qwUserId; + BYTE abXboxKey[16]; + BYTE abXenonKey[16]; +} CREATE_LIVE_ACCOUNT_RESPONSE; + +typedef struct _CREATE_LIVE_ACCOUNT_REQUEST_OLD +{ + ULONGLONG qwMachineId; + ULONGLONG qwTitleId; + WORD wFirstNameLength; + WCHAR *wszFirstName; + WORD wLastNameLength; + WCHAR *wszLastName; + WORD wGamertagLength; + WCHAR *wszGamertag; + ULONGLONG qwUserPassportPuid; + ULONGLONG qwOwnerPassportPuid; + ULONGLONG qwOfferId; + WORD wBillingTokenLength; + WCHAR *wszBillingToken; + FILETIME ftBirthdate; + WORD wEmailLength; + WCHAR *wszEmail; + WORD wLanguageId; + BYTE bCountryId; + DWORD dwParentalControlGroupId; + BYTE bMsftOptIn; + BYTE bPartnerOptIn; + ADDRESS_INFO address; + PHONE_INFO phone; + BYTE bPaymentTypeId; + CREDIT_CARD_INFO creditCard; + DIRECT_DEBIT_INFO directDebit; + CREATE_LIVE_ACCOUNT_RESPONSE *pResponse; +} CREATE_LIVE_ACCOUNT_REQUEST_OLD; + +typedef struct _CREATE_LIVE_ACCOUNT_REQUEST +{ + ULONGLONG qwMachineId; + ULONGLONG qwOfflineXuid; + DWORD dwTitleId; + WORD wFirstNameLength; + WCHAR *wszFirstName; + WORD wLastNameLength; + WCHAR *wszLastName; + WORD wGamertagLength; + WCHAR *wszGamertag; + BYTE abSignedUserPassportPuid[28]; + BYTE abSignedOwnerPassportPuid[28]; + ULONGLONG qwOfferId; + WORD wBillingTokenLength; + WCHAR *wszBillingToken; + FILETIME ftBirthdate; + WORD wEmailLength; + WCHAR *wszEmail; + WORD wLanguageId; + BYTE bCountryId; + DWORD dwParentalControlGroupId; + BYTE bMsftOptIn; + BYTE bPartnerOptIn; + ADDRESS_INFO address; + PHONE_INFO phone; + BYTE bPaymentTypeId; + CREDIT_CARD_INFO creditCard; + DIRECT_DEBIT_INFO directDebit; + WORD wReservedBytesLength; + BYTE *pbReservedBytes; + CREATE_LIVE_ACCOUNT_RESPONSE *pResponse; +} CREATE_LIVE_ACCOUNT_REQUEST; + +typedef struct _GET_USER_INFO_REQUEST +{ + ULONGLONG qwUserId; + ULONGLONG qwMachineId; + DWORD dwTitleId; + GET_USER_INFO_RESPONSE *pResponse; +} GET_USER_INFO_REQUEST; + +typedef struct _RECOVER_ACCOUNT_RESPONSE +{ + ULONGLONG qwUserId; + ULONGLONG qwOfflineXuid; + BYTE pKey[16]; + WORD wGamertagLength; + WCHAR *wszGamertag; + WORD wDomainLength; + WCHAR *wszDomain; + WORD wRealmLength; + WCHAR *wszRealm; +} RECOVER_ACCOUNT_RESPONSE; + +typedef struct _RECOVER_ACCOUNT_REQUEST +{ + ULONGLONG qwMachineId; + BYTE pSignedPuid[28]; + RECOVER_ACCOUNT_RESPONSE *pResponse; +} RECOVER_ACCOUNT_REQUEST; + +typedef struct _PASSPORT_ENCRYPTED_PROXY_PARAMETERS +{ + WORD wLoginTokenRequestLength; + BYTE *pbLoginTokenRequest; + DWORD dwPublicKeyPublicExponent; + WORD wPublicKeyModulusLength; + BYTE *pbPublicKeyModulus; + BYTE abPublicKeyDigest[20]; +} PASSPORT_ENCRYPTED_PROXY_PARAMETERS; + +typedef struct _PASSPORT_GET_ENCRYPTED_PROXY_PARAMETERS_REQUEST +{ + DWORD dwDummy; + PASSPORT_ENCRYPTED_PROXY_PARAMETERS *pResponse; +} PASSPORT_GET_ENCRYPTED_PROXY_PARAMETERS_REQUEST; + +typedef struct _PASSPORT_SESSION_TOKEN +{ + BYTE abSessionToken[28]; +} PASSPORT_SESSION_TOKEN; + +typedef struct _PASSPORT_CREATE_REQUEST +{ + WORD wPassportMemberNameLength; + CHAR *szPassportMemberName; + WORD wSecretQuestionLength; + WCHAR *szSecretQuestion; + WORD wEncryptedPasswordLength; + BYTE *pbEncryptedPassword; + PASSPORT_SESSION_TOKEN *pSessionToken; +} PASSPORT_CREATE_REQUEST; + +typedef struct _PASSPORT_LOGIN_REQUEST +{ + WORD wPassportMemberNameLength; + CHAR *szPassportMemberName; + WORD wEncryptedSessionKeyLength; + BYTE *pbencryptedSessionKey; + WORD wEncryptedPasswordLength; + BYTE *pbEncryptedPassword; + WORD wEncryptedTokenRequestLength; + BYTE *pbEncryptedTokenRequest; + PASSPORT_SESSION_TOKEN *pSessionToken; +} PASSPORT_LOGIN_REQUEST; + +typedef struct _PASSPORT_CHANGE_PASSWORD_REQUEST +{ + PASSPORT_SESSION_TOKEN pSessionToken[1]; + WORD wPassportMemberNameLength; + CHAR *szPassportMemberName; + WORD wEncryptedPasswordLength; + BYTE *pbEncryptedPassword; +} PASSPORT_CHANGE_PASSWORD_REQUEST; + +typedef struct _PAYMENT_INSTRUMENT_INFO +{ + WORD wPaymentInstrumentIdLength; + WCHAR *wszPaymentInstrumentId; + BYTE bPaymentTypeId; + ADDRESS_INFO address; + PHONE_INFO phone; + CREDIT_CARD_INFO creditCard; + DIRECT_DEBIT_INFO directDebit; +} PAYMENT_INSTRUMENT_INFO; + +typedef struct _GET_PAYMENT_INSTRUMENTS_RESPONSE +{ + WORD wCount; + PAYMENT_INSTRUMENT_INFO *pPaymentInstruments; +} GET_PAYMENT_INSTRUMENTS_RESPONSE; + +typedef struct _GET_PAYMENT_INSTRUMENTS_REQUEST +{ + XUID qwUserId; + ULONGLONG qwMachineId; + WORD wMaxResults; + GET_PAYMENT_INSTRUMENTS_RESPONSE *pResponse; +} GET_PAYMENT_INSTRUMENTS_REQUEST; + +typedef struct _ADD_PAYMENT_INSTRUMENT_RESPONSE +{ + WORD wPaymentInstrumentIdLength; + WCHAR *wszPaymentInstrumentId; +} ADD_PAYMENT_INSTRUMENT_RESPONSE; + +typedef struct _ADD_PAYMENT_INSTRUMENT_REQUEST +{ + XUID qwUserId; + ULONGLONG qwMachineId; + ADDRESS_INFO addressInfo; + PHONE_INFO phoneInfo; + BYTE bPaymentTypeId; + CREDIT_CARD_INFO creditCardInfo; + DIRECT_DEBIT_INFO directDebitInfo; + ADD_PAYMENT_INSTRUMENT_RESPONSE *pResponse; +} ADD_PAYMENT_INSTRUMENT_REQUEST; + +typedef struct _REMOVE_PAYMENT_INSTRUMENT_REQUEST +{ + XUID qwUserId; + ULONGLONG qwMachineId; + WORD wPaymentInstrumentIdLength; + WCHAR *wszPaymentInstrumentId; +} REMOVE_PAYMENT_INSTRUMENT_REQUEST; + +typedef struct _UPDATE_PAYMENT_INSTRUMENT_REQUEST +{ + XUID qwUserId; + ULONGLONG qwMachineId; + WORD wPaymentInstrumentIdLength; + WCHAR *wszPaymentInstrumentId; + ADDRESS_INFO addressInfo; + PHONE_INFO phoneInfo; + CREDIT_CARD_INFO creditCardInfo; + DIRECT_DEBIT_INFO directDebitInfo; +} UPDATE_PAYMENT_INSTRUMENT_REQUEST; + +typedef struct _GET_LINKED_GAMERTAG_RESPONSE +{ + XUID qwUserPuid; + WORD wGamertagLength; + WCHAR *wszGamertag; +} GET_LINKED_GAMERTAG_RESPONSE; + +typedef struct _GET_LINKED_GAMERTAG_REQUEST +{ + BYTE pSignedPuid[28]; + GET_LINKED_GAMERTAG_RESPONSE *pResponse; +} GET_LINKED_GAMERTAG_REQUEST; + +typedef struct _PASSPORT_SECRET_QUESTION +{ + WORD wSecretQuestionLength; + WCHAR *szSecretQuestion; +} PASSPORT_SECRET_QUESTION; + +typedef struct _PASSPORT_GET_SECRET_QUESTION_RESPONSE +{ + WORD wSecretQuestionsCount; + PASSPORT_SECRET_QUESTION *pSecretQuestions; +} PASSPORT_GET_SECRET_QUESTION_RESPONSE; + +typedef struct _PASSPORT_GET_SECRET_QUESTIONS_REQUEST +{ + WORD wCountryId; + WORD wLanguageId; + PASSPORT_GET_SECRET_QUESTION_RESPONSE *pResult; +} PASSPORT_GET_SECRET_QUESTIONS_REQUEST; + +typedef struct _SET_ACCOUNT_INFO_REQUEST +{ + XUID qwUserId; + ULONGLONG qwMachineId; + WORD wFirstNameLength; + WCHAR *wszFirstName; + WORD wLastNameLength; + WCHAR *wszLastName; + FILETIME ftBirthdate; + WORD wEmailLength; + WCHAR *wszEmail; + ADDRESS_INFO address; + PHONE_INFO phone; + WORD wLanguageId; + BYTE bMsftOptIn; + BYTE bParterOptIn; +} SET_ACCOUNT_INFO_REQUEST; + +typedef struct _GET_ACCOUNT_INFO_RESPONSE +{ + WORD wFirstNameLength; + WCHAR *wszFirstName; + WORD wLastNameLength; + WCHAR *wszLastName; + FILETIME ftBirthdate; + WORD wEmailLength; + WCHAR *wszEmail; + ADDRESS_INFO addressInfo; + PHONE_INFO phoneInfo; + WORD wLanguageId; + BYTE bCountryId; + BYTE bMsftOptIn; + BYTE bParterOptIn; +} GET_ACCOUNT_INFO_RESPONSE; + +typedef struct _GET_ACCOUNT_INFO_REQUEST +{ + XUID qwUserId; + ULONGLONG qwMachineId; + DWORD dwTitleId; + GET_ACCOUNT_INFO_RESPONSE *pResponse; +} GET_ACCOUNT_INFO_REQUEST; + +typedef struct _PASSPORT_GET_USER_DATA_RESPONSE +{ + WORD wFirstNameLength; + WCHAR *wszFirstName; + WORD wLastNameLength; + WCHAR *wszLastName; + FILETIME ftBirthdate; + ADDRESS_INFO address; + PHONE_INFO phone; + BYTE bCountryId; + WORD wEmailLength; + WCHAR *wszEmail; +} PASSPORT_GET_USER_DATA_RESPONSE; + +typedef struct _PASSPORT_GET_USER_DATA_REQUEST +{ + PASSPORT_SESSION_TOKEN pSessionToken[1]; + PASSPORT_GET_USER_DATA_RESPONSE *pResult; +} PASSPORT_GET_USER_DATA_REQUEST; + +typedef struct _PASSPORT_GET_MEMBER_NAME_RESPONSE +{ + WORD wUserPmnLength; + WCHAR *wszUserPmn; + WORD wParentPmnLength; + WCHAR *wszParentPmn; +} PASSPORT_GET_MEMBER_NAME_RESPONSE; + +typedef struct _PASSPORT_GET_MEMBER_NAME_REQUEST +{ + ULONGLONG qwUserId; + PASSPORT_GET_MEMBER_NAME_RESPONSE *pResult; +} PASSPORT_GET_MEMBER_NAME_REQUEST; + +typedef struct _POSTAL_CODE_MATCH +{ + WORD wPostalCodeLength; + WCHAR *wszPostalCode; + WORD wStateLength; + WCHAR *wszState; + WORD wCityLength; + WCHAR *wszCity; + WORD wStreetLength; + WCHAR *wszStreet; +} POSTAL_CODE_MATCH; + +typedef struct _GET_POSTAL_CODE_RESPONSE +{ + BYTE bCount; + POSTAL_CODE_MATCH *pMatches; +} GET_POSTAL_CODE_RESPONSE; + +typedef struct _GET_POSTAL_CODE_REQUEST +{ + BYTE bCountryId; + WORD wPostalCodeLength; + WCHAR *wszPostalCode; + GET_POSTAL_CODE_RESPONSE *pResponse; +} GET_POSTAL_CODE_REQUEST; + +typedef struct _GET_USER_SUBSCRIPTION_DETAILS_DATA +{ + DWORD dwWholePart; + BYTE bFractionalPart; + BYTE bCurrencyFormat; + WORD wISOCodeLength; + WCHAR *wszISOCode; + WORD wFormattedPriceLength; + WCHAR *wszFormattedPrice; + DWORD dwOfferingDetails; +} GET_USER_SUBSCRIPTION_DETAILS_DATA; + +typedef struct _GET_USER_SUBSCRIPTION_DETAILS_RESPONSE +{ + WORD wSubscriptionIdLength; + WCHAR *wszSubscriptionId; + WORD wDescriptionLength; + WCHAR *wszDescription; + BYTE bCurrentOfferStatus; + WORD wFriendlyNameLength; + WCHAR *wszFriendlyName; + BYTE bAnniversaryDate; + FILETIME ftPurchaseDate; + FILETIME ftActivationDate; + FILETIME ftEndDate; + BYTE bHasViolations; + DWORD dwRenewalGracePeriod; + BYTE bRenewalOfferStatus; + ULONGLONG qwRenewalOfferId; + GET_USER_SUBSCRIPTION_DETAILS_DATA currentOfferDetails; + GET_USER_SUBSCRIPTION_DETAILS_DATA renewalOfferDetails; + PAYMENT_INSTRUMENT_INFO paymentInstrument; +} GET_USER_SUBSCRIPTION_DETAILS_RESPONSE; + +typedef struct _GET_USER_SUBSCRIPTION_DETAILS_REQUEST +{ + XUID qwUserId; + ULONGLONG qwMachineId; + ULONGLONG qwOfferId; + WORD wInstanceIdLength; + WCHAR *wszInstanceId; + GET_USER_SUBSCRIPTION_DETAILS_RESPONSE *pResponse; +} GET_USER_SUBSCRIPTION_DETAILS_REQUEST; + +typedef struct _VERIFY_BILLING_TOKEN_RESPONSE +{ + ULONGLONG qwOfferId; + DWORD dwOfferTypeId; +} VERIFY_BILLING_TOKEN_RESPONSE; + +typedef struct _VERIFY_BILLING_TOKEN_REQUEST +{ + BYTE bCountryId; + WORD wBillingTokenLength; + WCHAR *wszBillingToken; + VERIFY_BILLING_TOKEN_RESPONSE *pResponse; +} VERIFY_BILLING_TOKEN_REQUEST; + +typedef struct _MIGRATE_XBOX1_USER_RESPONSE +{ + ULONGLONG qwUserId; + BYTE abXenonKey[16]; + WORD wGamertagLength; + WCHAR *wszGamertag; + WORD wDomainLength; + WCHAR *wszDomain; + WORD wRealmLength; + WCHAR *wszRealm; + DWORD dwParentalControlGroupId; + DWORD dwCultureId; +} MIGRATE_XBOX1_USER_RESPONSE; + +typedef struct _MIGRATE_XBOX1_USER_REQUEST +{ + PASSPORT_SESSION_TOKEN pUserSessionToken[1]; + PASSPORT_SESSION_TOKEN pParentSessionToken[1]; + ULONGLONG qwOfflineXuid; + WORD wUserPassportMemberNameLength; + CHAR *szUserPassportMemberName; + DWORD dwTitleId; + ULONGLONG qwMachineId; + WORD wLanguageId; + WORD wReservedBytesLength; + BYTE *pbReservedBytes; + MIGRATE_XBOX1_USER_RESPONSE *pResponse; +} MIGRATE_XBOX1_USER_REQUEST; + +typedef struct _OFFER_PRICE +{ + DWORD dwPaymentType; + BYTE bTaxType; + DWORD dwWholePrice; + DWORD dwFractionalPrice; + WORD wPriceTextLength; + WCHAR *wszPriceText; +} OFFER_PRICE; + +typedef struct _ACCOUNT_SUGGESTED_GAMERTAG +{ + WORD wGamertagLength; + WCHAR *wszGamertag; +} ACCOUNT_SUGGESTED_GAMERTAG; + +typedef struct _ACCOUNT_RESERVE_GAMERTAG_RESPONSE +{ + DWORD dwHresult; + WORD wGamertagCount; + ACCOUNT_SUGGESTED_GAMERTAG *pGamertags; +} ACCOUNT_RESERVE_GAMERTAG_RESPONSE; + +typedef struct _ACCOUNT_RESERVE_GAMERTAG_REQUEST +{ + ULONGLONG qwMachineId; + BYTE bCountryId; + WORD wMaxSuggestedNames; + WORD wGamertagLength; + WCHAR *wszGamertag; + ACCOUNT_RESERVE_GAMERTAG_RESPONSE *pResponse; +} ACCOUNT_RESERVE_GAMERTAG_REQUEST; + +typedef struct _ACCOUNT_CHANGE_GAMERTAG_RESPONSE +{ + BYTE abKey[16]; +} ACCOUNT_CHANGE_GAMERTAG_RESPONSE; + +typedef struct _ACCOUNT_CHANGE_GAMERTAG_REQUEST +{ + ULONGLONG qwMachineId; + ULONGLONG qwUserId; + WORD wGamertagLength; + WCHAR *wszGamertag; + ACCOUNT_CHANGE_GAMERTAG_RESPONSE *pResponse; +} ACCOUNT_CHANGE_GAMERTAG_REQUEST; + +typedef struct _CHANGE_SUBSCRIPTION_PAYMENT_INSTRUMENT_REQUEST +{ + XUID qwUserId; + ULONGLONG qwMachineId; + WORD wInstanceIdLength; + WCHAR *wszInstanceId; + WORD wPaymentInstrumentIdLength; + WCHAR *wszPaymentInstrumentId; +} CHANGE_SUBSCRIPTION_PAYMENT_INSTRUMENT_REQUEST; + +typedef struct _VERIFY_PARENT_CREDIT_CARD_REQUEST +{ + ULONGLONG qwMachineId; + DWORD dwTitleId; + PASSPORT_SESSION_TOKEN pParentSessionToken[1]; + WORD wParentPassportMemberNameLength; + CHAR *szParentPassportMemberName; + WORD wLanguageId; + BYTE bCountryId; + WORD wFirstNameLength; + WCHAR *wszFirstName; + WORD wLastNameLength; + WCHAR *wszLastName; + WORD wEmailLength; + WCHAR *wszEmail; + ADDRESS_INFO address; + PHONE_INFO phone; + CREDIT_CARD_INFO creditCardInfo; +} VERIFY_PARENT_CREDIT_CARD_REQUEST; + +typedef struct _ACCOUNT_TROUBLESHOOT_RESPONSE +{ + BOOL fNewTOS; + BOOL fNameChangeRequired; + BOOL fDowngraded; + FILETIME suspendedUntil; + WORD wTotalDaysSuspended; + FILETIME voiceBannedUntil; + WORD wTotalDaysVoiceBanned; + DWORD dwBillingHr; + WORD wReservedBytesLength; + BYTE *pbReservedBytes; +} ACCOUNT_TROUBLESHOOT_RESPONSE; + +typedef struct _ACCOUNT_TROUBLESHOOT_REQUEST +{ + ULONGLONG qwUserId; + ULONGLONG qwMachineId; + WORD wReservedBytesLength; + BYTE *pbReservedBytes; + ACCOUNT_TROUBLESHOOT_RESPONSE *pResponse; +} ACCOUNT_TROUBLESHOOT_REQUEST; + +typedef struct _ACCOUNT_ACKNOWLEDGE_DOWNGRADE_REQUEST +{ + ULONGLONG qwUserId; +} ACCOUNT_ACKNOWLEDGE_DOWNGRADE_REQUEST; + +typedef struct _ACCOUNT_QUERY_RESPONSE +{ + WORD wResponseBytesLength; + BYTE *pbResponseBytes; +} ACCOUNT_QUERY_RESPONSE; + +typedef struct _ACCOUNT_QUERY_REQUEST +{ + DWORD dwRequestType; + WORD wRequestBytesLength; + BYTE *pbRequestBytes; + ACCOUNT_QUERY_RESPONSE *pResults; +} ACCOUNT_QUERY_REQUEST; + +typedef struct _ACCOUNT_ACCEPT_TOU_REQUEST +{ + XUID qwUserId; + ULONGLONG qwMachineId; +} ACCOUNT_ACCEPT_TOU_REQUEST; + +typedef struct _ACCOUNT_SET_STATUS_REQUEST +{ + XUID qwUserId; + DWORD dwNewTermsOfService; + DWORD dwForceNameChangeRequired; + FILETIME ftSuspendedUntil; + WORD wTotalDaysSuspended; + FILETIME ftVoiceBannedUntil; + WORD wTotalDaysVoiceBanned; + DWORD dwBillingHr; + DWORD dwResetPassword; +} ACCOUNT_SET_STATUS_REQUEST; + +typedef struct _ACCOUNT_VERIFY_BILLING_INFO_RESPONSE +{ + XUID qwUserPuid; + WORD wFirstNameLength; + WCHAR *wszFirstName; + WORD wLastNameLength; + WCHAR *wszLastName; + FILETIME ftBirthdate; + WORD wEmailLength; + WCHAR *wszEmail; + ADDRESS_INFO addressInfo; + PHONE_INFO phoneInfo; + WORD wLanguageId; + BYTE bCountryId; + BYTE bMsftOptIn; + BYTE bParterOptIn; +} ACCOUNT_VERIFY_BILLING_INFO_RESPONSE; + +typedef struct _ACCOUNT_VERIFY_BILLING_INFO_REQUEST +{ + ULONGLONG qwMachineId; + WORD wGamertagLength; + WCHAR *wszGamertag; + PHONE_INFO phone; + WORD wPostalCodeLength; + WCHAR *wszPostalCode; + WORD wAccountHolderNameLength; + WCHAR *wszAccountHolderName; + WORD wAccountNumberLength; + WCHAR *wszAccountNumber; + ACCOUNT_VERIFY_BILLING_INFO_RESPONSE *pResponse; +} ACCOUNT_VERIFY_BILLING_INFO_REQUEST; + +typedef struct _ACCOUNT_GET_USER_TYPE_RESPONSE +{ + BYTE bUserType; +} ACCOUNT_GET_USER_TYPE_RESPONSE; + +typedef struct _ACCOUNT_GET_USER_TYPE_REQUEST +{ + ULONGLONG qwMachineId; + WORD wGamertagLength; + WCHAR *wszGamertag; + ACCOUNT_GET_USER_TYPE_RESPONSE *pResponse; +} ACCOUNT_GET_USER_TYPE_REQUEST; + +typedef struct _ACCOUNT_LINK_XBOX1_ACCOUNT_REQUEST +{ + ULONGLONG qwMachineId; + DWORD dwTitleId; + WORD wGamertagLength; + WCHAR *wszGamertag; + PASSPORT_SESSION_TOKEN pUserSessionToken[1]; + PASSPORT_SESSION_TOKEN pParentSessionToken[1]; + PHONE_INFO phoneInfo; + WORD wPostalCodeLength; + WCHAR *wszPostalCode; + WORD wAccountHolderNameLength; + WCHAR *wszAccountHolderName; + WORD wAccountNumberLength; + WCHAR *wszAccountNumber; +} ACCOUNT_LINK_XBOX1_ACCOUNT_REQUEST; + +typedef struct _MIGRATE_XBOX_COM_USER_RESPONSE +{ + ULONGLONG qwUserId; + BYTE abXenonKey[16]; + WORD wGamertagLength; + WCHAR *wszGamertag; + WORD wDomainLength; + WCHAR *wszDomain; + WORD wRealmLength; + WCHAR *wszRealm; + DWORD dwParentalControlGroupId; + DWORD dwCultureId; +} MIGRATE_XBOX_COM_USER_RESPONSE; + +typedef struct _MIGRATE_XBOX_COM_USER_REQUEST +{ + PASSPORT_SESSION_TOKEN pUserSessionToken[1]; + ULONGLONG qwOfflineXuid; + DWORD dwTitleId; + ULONGLONG qwMachineId; + BYTE bCountryId; + WORD wLanguageId; + ULONGLONG qwOfferId; + WORD wBillingTokenLength; + WCHAR *wszBillingToken; + WORD wFirstNameLength; + WCHAR *wszFirstName; + WORD wLastNameLength; + WCHAR *wszLastName; + WORD wEmailLength; + WCHAR *wszEmail; + ADDRESS_INFO address; + PHONE_INFO phone; + BYTE bPaymentTypeId; + CREDIT_CARD_INFO creditCard; + DIRECT_DEBIT_INFO directDebit; + MIGRATE_XBOX_COM_USER_RESPONSE *pResponse; +} MIGRATE_XBOX_COM_USER_REQUEST; + +typedef struct _GET_ACCOUNT_INFO_FROM_PASSPORT_REQUEST +{ + PASSPORT_SESSION_TOKEN pSessionToken[1]; + ULONGLONG qwMachineId; + DWORD dwTitleId; + GET_ACCOUNT_INFO_RESPONSE *pResponse; +} GET_ACCOUNT_INFO_FROM_PASSPORT_REQUEST; + +typedef struct _BASIC_CONTENT_INFO +{ + ULONGLONG qwOfferID; + WORD wOfferNameLength; + WCHAR *wszOfferName; + DWORD dwOfferType; + BYTE contentId[20]; + DWORD dwTitleID; + DWORD dwTitleCategory; + WORD wTitleNameLength; + WCHAR *wszTitleName; + BYTE bTierRequired; + WORD wGameRating; + WORD wResponseFlags; + DWORD dwPackageSize; + DWORD dwInstallSize; + DWORD dwSellTextLength; + WCHAR *wszSellText; + BYTE bPricesLength; + OFFER_PRICE *pPrices; +} BASIC_CONTENT_INFO; + +typedef struct _CONTENT_ENUMERATE_RESPONSE +{ + WORD wOffersReturned; + BASIC_CONTENT_INFO *pInfos; + DWORD dwOffersTotal; +} CONTENT_ENUMERATE_RESPONSE; + +typedef struct _CONTENT_ENUMERATE_REQUEST +{ + XUID qwUserId; + BYTE bCountryId; + WORD wLanguageId; + WORD wGameRating; + DWORD dwOfferType; + DWORD dwPaymentType; + BYTE bTier; + DWORD dwTitleId; + DWORD dwTitleCategories; + BYTE bRequestFlags; + DWORD dwStartingIndex; + DWORD dwMaxResults; + CONTENT_ENUMERATE_RESPONSE *pResults; +} CONTENT_ENUMERATE_REQUEST; + +typedef struct _CONTENT_DETAILS_RESPONSE +{ + BASIC_CONTENT_INFO basicInfo; +} CONTENT_DETAILS_RESPONSE; + +typedef struct _CONTENT_DETAILS_REQUEST +{ + XUID qwUserId; + BYTE bCountryId; + WORD wLanguageId; + ULONGLONG qwOfferID; + DWORD dwPaymentType; + BYTE bTierRequired; + BYTE bRatingSystem; + CONTENT_DETAILS_RESPONSE *pResults; +} CONTENT_DETAILS_REQUEST; + +typedef struct _CONTENT_AVAILABLE_RESPONSE +{ + BYTE bNewOffersLength; + DWORD *pdwNewOffers; + BYTE bTotalOffersLength; + DWORD *pdwTotalOffers; +} CONTENT_AVAILABLE_RESPONSE; + +typedef struct _CONTENT_AVAILABLE_REQUEST +{ + XUID qwUserId; + BYTE bCountryId; + BYTE bTier; + DWORD dwTitleId; + CONTENT_AVAILABLE_RESPONSE *pResults; +} CONTENT_AVAILABLE_REQUEST; + +typedef struct _UPDATE_ACCESS_TIMES_REQUEST +{ + XUID qwUserId; + DWORD dwTitleId; + DWORD dwTitleCategories; +} UPDATE_ACCESS_TIMES_REQUEST; + +typedef struct _BASIC_SUBSCRIPTION_INFO +{ + ULONGLONG qwOfferID; + WORD wOfferNameLength; + WCHAR *wszOfferName; + DWORD dwOfferType; + BYTE bRelationType; + BYTE bConvertMode; + WORD wInstanceIdLength; + WCHAR *wszInstanceId; + DWORD dwTitleID; + DWORD dwTitleCategories; + WORD wTitleNameLength; + WCHAR *wszTitleName; + WORD wGameRating; + BYTE bDuration; + BYTE bFrequency; + BYTE bTierProvided; + BYTE bTierRequired; + DWORD dwSellTextLength; + WCHAR *wszSellText; + ULONGLONG qwRelatedOfferID; + WORD wResponseFlags; + BYTE bPricesLength; + OFFER_PRICE *pPrices; +} BASIC_SUBSCRIPTION_INFO; + +typedef struct _SUBSCRIPTION_ENUMERATE_RESPONSE +{ + WORD wOffersReturned; + BASIC_SUBSCRIPTION_INFO *pInfos; + DWORD dwOffersTotal; +} SUBSCRIPTION_ENUMERATE_RESPONSE; + +typedef struct _SUBSCRIPTION_ENUMERATE_REQUEST +{ + XUID qwUserId; + ULONGLONG qwMachineId; + BYTE bUserTier; + BYTE bCountryId; + WORD wLanguageId; + WORD wGameRating; + DWORD dwOfferType; + DWORD dwPaymentType; + DWORD dwTitleId; + DWORD dwTitleCategories; + WORD wRequestFlags; + DWORD dwStartingIndex; + DWORD dwMaxResults; + SUBSCRIPTION_ENUMERATE_RESPONSE *pResults; +} SUBSCRIPTION_ENUMERATE_REQUEST; + +typedef struct _SUBSCRIPTION_DETAILS_RESPONSE +{ + BASIC_SUBSCRIPTION_INFO basicInfo; +} SUBSCRIPTION_DETAILS_RESPONSE; + +typedef struct _SUBSCRIPTION_DETAILS_REQUEST +{ + XUID qwUserId; + ULONGLONG qwMachineId; + BYTE bCountryId; + WORD wLanguageId; + ULONGLONG qwOfferID; + DWORD dwPaymentType; + BYTE bUserTier; + BYTE bRatingSystem; + SUBSCRIPTION_DETAILS_RESPONSE *pResults; +} SUBSCRIPTION_DETAILS_REQUEST; + +typedef struct _OFFER_PURCHASE_REQUEST +{ + XUID qwUserId; + BYTE bCountryId; + WORD wLanguageId; + BYTE bUserTier; + ULONGLONG qwMachineId; + ULONGLONG qwOfferID; + DWORD dwPaymentType; + WORD wPaymentInstrumentId; + WCHAR *wszPaymentInstrumentId; + WORD wTokenLength; + WCHAR *wszToken; +} OFFER_PURCHASE_REQUEST; + +typedef struct _OFFER_PURCHASE_GAMERTAG_RESPONSE +{ + BYTE bNewKeyLength; + BYTE *pbNewKey; +} OFFER_PURCHASE_GAMERTAG_RESPONSE; + +typedef struct _OFFER_PURCHASE_GAMERTAG_REQUEST +{ + XUID qwUserId; + BYTE bCountryId; + WORD wLanguageId; + BYTE bUserTier; + ULONGLONG qwMachineId; + ULONGLONG qwOfferID; + DWORD dwPaymentType; + WORD wTokenLength; + WCHAR *wszToken; + WORD wGamertagLength; + WCHAR *wszGamertag; + OFFER_PURCHASE_GAMERTAG_RESPONSE *pResults; +} OFFER_PURCHASE_GAMERTAG_REQUEST; + +typedef struct _TITLE_DETAILS_RESPONSE +{ + WORD wGameRating; + WORD wTitleLength; + WCHAR *wszTitle; + WORD wSellTextLength; + WCHAR *wszSellText; + WORD wDeveloperLength; + WCHAR *wszDeveloper; + WORD wPublisherLength; + WCHAR *wszPublisher; + WORD wGenreLength; + WCHAR *wszGenre; + BYTE bSubscriptionContent; + BYTE bThemeContent; + BYTE bDemoContent; + BYTE bTrailerContent; + BYTE bPlayed; +} TITLE_DETAILS_RESPONSE; + +typedef struct _TITLE_DETAILS_REQUEST +{ + XUID qwUserId; + DWORD dwTitleId; + BYTE bCountryId; + WORD wLanguageId; + BYTE bTierRequired; + TITLE_DETAILS_RESPONSE *pResults; +} TITLE_DETAILS_REQUEST; + +typedef struct _BASIC_TITLE_INFO +{ + WORD wTitleLength; + WCHAR *wszTitle; + DWORD dwTitleId; + BYTE bPlayed; + DWORD dwPurchasedContentCount; + DWORD dwTotalContentCount; + BYTE bNewContentExists; +} BASIC_TITLE_INFO; + +typedef struct _ENUMERATE_TITLES_BY_FILTER_RESPONSE +{ + DWORD dwTitlesReturned; + BASIC_TITLE_INFO *pInfos; + DWORD dwTotalTitleCount; +} ENUMERATE_TITLES_BY_FILTER_RESPONSE; + +typedef struct _ENUMERATE_TITLES_BY_FILTER_REQUEST +{ + XUID qwUserId; + BYTE bCountryId; + WORD wLanguageId; + DWORD dwStartingIndex; + DWORD dwMaxResults; + WORD wGameRating; + BYTE bTierRequired; + DWORD dwGenreId; + DWORD dwOfferType; + WORD wRequestFlags; + ENUMERATE_TITLES_BY_FILTER_RESPONSE *pResults; +} ENUMERATE_TITLES_BY_FILTER_REQUEST; + +typedef struct _BASIC_GENRE_INFO +{ + DWORD dwGenreId; + WORD wGenreNameLength; + WCHAR *wszGenreName; +} BASIC_GENRE_INFO; + +typedef struct _ENUMERATE_GENRES_RESPONSE +{ + WORD wGenresReturned; + BASIC_GENRE_INFO *pInfos; + DWORD dwTotalGenreCount; +} ENUMERATE_GENRES_RESPONSE; + +typedef struct _ENUMERATE_GENRES_REQUEST +{ + BYTE bCountryId; + WORD wLanguageId; + DWORD dwStartingIndex; + DWORD dwMaxResults; + WORD wGameRating; + BYTE bTierRequired; + DWORD dwOfferType; + DWORD dwParentGenreId; + ENUMERATE_GENRES_RESPONSE *pResults; +} ENUMERATE_GENRES_REQUEST; + +typedef struct _BANNER_LIST_ENTRY +{ + BYTE bBannerType; + BYTE isMyGame; + WORD wWidth; + WORD wHeight; + WORD cbPath; + WCHAR *wszPath; +} BANNER_LIST_ENTRY; + +typedef struct _BANNER_LIST_RESULT +{ + FILETIME ftExpiry; + DWORD dwCultureId; + WORD wBannerCountTotal; + WORD wCount; + BANNER_LIST_ENTRY *bannerList; +} BANNER_LIST_RESULT; + +typedef struct _BANNER_GET_LIST_REQUEST +{ + ULONGLONG qwUserId; + DWORD dwLangId; + BYTE bLevel; + DWORD dwStartingIndex; + DWORD dwMaxResults; + BANNER_LIST_RESULT *pResult; +} BANNER_GET_LIST_REQUEST; + +typedef struct _BANNER_HOTLIST_ENTRY +{ + BYTE bBannerType; + BYTE isMyGame; + WORD wWidth; + WORD wHeight; + WORD cbPath; + WCHAR *wszPath; + DWORD dwTitleId; + WORD cbTitleName; + WCHAR *wszTitleName; + ULONGLONG qwOfferId; + WORD cbOfferName; + WCHAR *wszOfferName; + OFFER_PRICE offerPrice; + FILETIME ftDateApproved; +} BANNER_HOTLIST_ENTRY; + +typedef struct _BANNER_HOTLIST_RESULT +{ + FILETIME ftExpiry; + DWORD dwCultureId; + WORD wBannerCountTotal; + WORD wCount; + BANNER_HOTLIST_ENTRY *bannerList; +} BANNER_HOTLIST_RESULT; + +typedef struct _BANNER_GET_HOTLIST_REQUEST +{ + ULONGLONG qwUserId; + DWORD dwLangId; + BYTE bLevel; + DWORD dwStartingIndex; + DWORD dwMaxResults; + BANNER_HOTLIST_RESULT *pResult; +} BANNER_GET_HOTLIST_REQUEST; + +typedef struct _P_BLOCK_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + XUID qwUserID; + XUID qwBlockID; +} P_BLOCK_MSG; + +typedef struct _P_UNBLOCK_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + XUID qwUserID; + XUID qwBlockID; +} P_UNBLOCK_MSG; + +typedef struct _P_FIND_USER_REPLY_MSG +{ + ULONGLONG qwFoundID; + CHAR szGamerTag[16]; +} P_FIND_USER_REPLY_MSG; + +typedef struct _P_FIND_USER_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + XUID qwUserID; + XUID qwFindID; + CHAR szSenderName[16]; + P_FIND_USER_REPLY_MSG *pResults; +} P_FIND_USER_MSG; + +typedef struct _XONLINE_QUERY_ATTRIBUTE_INTEGER +{ + DWORD Length; + ULONGLONG qwValue; +} XONLINE_QUERY_ATTRIBUTE_INTEGER, *PXONLINE_QUERY_ATTRIBUTE_INTEGER; + +typedef struct _XONLINE_QUERY_ATTRIBUTE_STRING +{ + DWORD Length; + WCHAR *lpValue; +} XONLINE_QUERY_ATTRIBUTE_STRING, *PXONLINE_QUERY_ATTRIBUTE_STRING; + +typedef struct _XONLINE_QUERY_ATTRIBUTE_BLOB +{ + DWORD Length; + BYTE *pbValue; +} XONLINE_QUERY_ATTRIBUTE_BLOB, *PXONLINE_QUERY_ATTRIBUTE_BLOB; + +typedef union _XONLINE_QUERY_ATTRIBUTE_DATA +{ + XONLINE_QUERY_ATTRIBUTE_INTEGER integer; + XONLINE_QUERY_ATTRIBUTE_STRING string; + XONLINE_QUERY_ATTRIBUTE_BLOB blob; +} XONLINE_QUERY_ATTRIBUTE_DATA, *PXONLINE_QUERY_ATTRIBUTE_DATA; + +typedef struct _XONLINE_QUERY_ATTRIBUTE +{ + DWORD dwAttributeID; + XONLINE_QUERY_ATTRIBUTE_DATA info; +} XONLINE_QUERY_ATTRIBUTE, *PXONLINE_QUERY_ATTRIBUTE; + +typedef struct _XONLINE_QUERY_ATTRIBUTE_SPEC +{ + DWORD dwType; + DWORD dwLength; +} XONLINE_QUERY_ATTRIBUTE_SPEC, *PXONLINE_QUERY_ATTRIBUTE_SPEC; + +typedef struct _QUERY_ADD_RESULT +{ + ULONGLONG entityId; +} QUERY_ADD_RESULT, *PQUERY_ADD_RESULT; + +typedef struct _QUERY_ADD_REQUEST +{ + DWORD dwTitleId; + XUID qwUserId; + ULONGLONG qwTeamId; + DWORD dwDatasetId; + DWORD dwNumAttributes; + XONLINE_QUERY_ATTRIBUTE *pAttributes; + QUERY_ADD_RESULT *pEntityId; +} QUERY_ADD_REQUEST; + +typedef struct _QUERY_REMOVE_REQUEST +{ + DWORD dwTitleId; + XUID qwUserId; + ULONGLONG qwTeamId; + DWORD dwDatasetId; + DWORD dwProcIndex; + DWORD dwNumAttributes; + XONLINE_QUERY_ATTRIBUTE *pAttributes; +} QUERY_REMOVE_REQUEST; + +typedef struct _QUERY_REMOVEID_REQUEST +{ + DWORD dwTitleId; + XUID qwUserId; + ULONGLONG qwTeamId; + DWORD dwDatasetId; + ULONGLONG qwEntityId; +} QUERY_REMOVEID_REQUEST; + +typedef struct _QUERY_UPDATE_REQUEST +{ + DWORD dwTitleId; + XUID qwUserId; + ULONGLONG qwTeamId; + DWORD dwDatasetId; + DWORD dwProcIndex; + DWORD dwNumAttributes; + XONLINE_QUERY_ATTRIBUTE *pAttributes; +} QUERY_UPDATE_REQUEST; + +typedef struct _QUERY_UPDATEID_REQUEST +{ + DWORD dwTitleId; + XUID qwUserId; + ULONGLONG qwTeamId; + DWORD dwDatasetId; + DWORD dwProcIndex; + ULONGLONG qwEntityId; + DWORD dwNumAttributes; + XONLINE_QUERY_ATTRIBUTE *pAttributes; +} QUERY_UPDATEID_REQUEST; + +typedef struct _QUERY_SEARCH_RESULT +{ + DWORD dwTotalResults; + DWORD dwReturnedResults; + DWORD dwNumResultAttributes; + XONLINE_QUERY_ATTRIBUTE *pAttributes; +} QUERY_SEARCH_RESULT, *PQUERY_SEARCH_RESULT; + +typedef struct _QUERY_SEARCH_REQUEST +{ + DWORD dwTitleId; + DWORD dwDatasetId; + DWORD dwProcIndex; + DWORD dwPage; + DWORD dwResultsPerPage; + DWORD dwNumResultSpecs; + DWORD dwNumAttributes; + XONLINE_QUERY_ATTRIBUTE_SPEC *pSpecs; + XONLINE_QUERY_ATTRIBUTE *pAttributes; + QUERY_SEARCH_RESULT *pResults; +} QUERY_SEARCH_REQUEST; + +typedef struct _QUERY_FINDFROMIDS_RESULT +{ + DWORD dwReturnedResults; + DWORD dwNumResultAttributes; + XONLINE_QUERY_ATTRIBUTE *pAttributes; +} QUERY_FINDFROMIDS_RESULT, *PQUERY_FINDFROMIDS_RESULT; + +typedef struct _QUERY_FINDFROMIDS_REQUEST +{ + DWORD dwTitleId; + DWORD dwDatasetId; + DWORD dwProcIndex; + DWORD dwNumResultSpecs; + DWORD dwNumIds; + XONLINE_QUERY_ATTRIBUTE_SPEC *pSpecs; + ULONGLONG *pqwEntityIds; + QUERY_FINDFROMIDS_RESULT *pResults; +} QUERY_FINDFROMIDS_REQUEST; + +typedef struct _QUERY_SELECT_REQUEST +{ + DWORD dwTitleId; + XUID qwUserId; + ULONGLONG qwTeamId; + DWORD dwDatasetId; + ULONGLONG qwEntityId; + DWORD dwActionId; + DWORD dwNumAttributes; + XONLINE_QUERY_ATTRIBUTE *pAttributes; +} QUERY_SELECT_REQUEST; + +typedef struct _XONLINE_TEAM +{ + ULONGLONG qwTeamID; + DWORD dwNumMembers; + WORD cbTeamName; + WORD cbTeamDescription; + WORD cbTeamMotto; + WORD cbTeamURL; + WORD cbTeamData; + ULONGLONG ftCreated; + WCHAR *wszTeamName; + WCHAR *wszTeamDescription; + WCHAR *wszTeamMotto; + WCHAR *wszTeamURL; + BYTE *pbTeamData; +} XONLINE_TEAM, *PXONLINE_TEAM; + +typedef struct _XONLINE_USER_TEAM +{ + ULONGLONG qwTeamID; + BOOL fMember; + WORD cbTeamName; + WCHAR *wszTeamName; +} XONLINE_USER_TEAM, *PXONLINE_USER_TEAM; + +typedef struct _XONLINE_TEAM_MEMBER +{ + ULONGLONG qwMemberID; + BYTE cbMemberName; + BOOL fMember; + DWORD dwMemberPriv; + WORD cbMemberData; + ULONGLONG ftJoined; + CHAR *szMemberName; + BYTE *pbMemberData; +} XONLINE_TEAM_MEMBER; + +typedef struct _TEAM_ENUM_RESULTS +{ + DWORD cTeams; + XONLINE_TEAM *rgsTeams; +} TEAM_ENUM_RESULTS, *PTEAM_ENUM_RESULTS; + +typedef struct _TEAM_ENUM_BY_XUID_RESULTS +{ + DWORD cTeams; + XONLINE_USER_TEAM *rgsTeams; +} TEAM_ENUM_BY_XUID_RESULTS, *PTEAM_ENUM_BY_XUID_RESULTS; + +typedef struct _P_TEAM_LIST_TEAMS_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + XUID qwUserID; + DWORD dwTitleID; + DWORD dwTeamCount; + ULONGLONG *rgqwTeamIDs; + TEAM_ENUM_RESULTS *pvResults; +} P_TEAM_LIST_TEAMS_MSG; + +typedef struct _P_TEAM_LIST_TEAMS_MSG_XUID +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + XUID qwUserID; + DWORD dwTitleID; + TEAM_ENUM_BY_XUID_RESULTS *pvResults; +} P_TEAM_LIST_TEAMS_MSG_XUID; + +typedef struct _TEAM_MEM_ENUM_RESULTS +{ + ULONGLONG qwTeamID; + WORD cMembers; + XONLINE_TEAM_MEMBER *rgsMembers; +} TEAM_MEM_ENUM_RESULTS, *PTEAM_MEM_ENUM_RESULTS; + +typedef struct _P_TEAM_LIST_MEMBERS_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + XUID qwUserID; + DWORD dwTitleID; + ULONGLONG qwTeamID; + BOOL fShowRecruits; + TEAM_MEM_ENUM_RESULTS *pvResults; +} P_TEAM_LIST_MEMBERS_MSG; + +typedef struct _TEAM_CREATE_RESULTS +{ + ULONGLONG qwTeamID; + ULONGLONG ftCreated; +} TEAM_CREATE_RESULTS, *PTEAM_CREATE_RESULTS; + +typedef struct _P_TEAM_CREATE_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + XUID qwUserID; + DWORD dwTitleID; + DWORD dwMaxMembers; + WORD cbTeamName; + WORD cbTeamDescription; + WORD cbTeamMotto; + WORD cbTeamURL; + WORD cbTeamData; + WORD cbCreatorData; + WCHAR *wszTeamName; + WCHAR *wszTeamDescription; + WCHAR *wszTeamMotto; + WCHAR *wszTeamURL; + BYTE *pbTeamData; + BYTE *pbCreatorData; + TEAM_CREATE_RESULTS *pvResults; +} P_TEAM_CREATE_MSG; + +typedef struct _P_TEAM_DELETE_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + XUID qwUserID; + DWORD dwTitleID; + ULONGLONG qwTeamID; +} P_TEAM_DELETE_MSG; + +typedef struct _P_TEAM_REMOVE_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + XUID qwUserID; + DWORD dwTitleID; + ULONGLONG qwTeamID; + XUID qwMemberID; +} P_TEAM_REMOVE_MSG; + +typedef struct _P_TEAM_MANAGE_TEAM_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + XUID qwUserID; + DWORD dwTitleID; + ULONGLONG qwTeamID; + WORD cbTeamName; + WORD cbTeamDescription; + WORD cbTeamMotto; + WORD cbTeamURL; + WORD cbTeamData; + WCHAR *wszTeamName; + WCHAR *wszTeamDescription; + WCHAR *wszTeamMotto; + WCHAR *wszTeamURL; + BYTE *pbTeamData; +} P_TEAM_MANAGE_TEAM_MSG; + +typedef struct _P_TEAM_MANAGE_MEMBER_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + XUID qwUserID; + DWORD dwTitleID; + ULONGLONG qwTeamID; + XUID qwMemberID; + DWORD dwMemberPriv; + WORD cbMemberData; + BYTE *pbMemberData; +} P_TEAM_MANAGE_MEMBER_MSG; + +typedef struct _P_TEAM_RECRUIT_MSG_XUID +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + XUID qwUserID; + DWORD dwTitleID; + ULONGLONG qwTeamID; + XUID qwMemberID; + CHAR szMemberName[16]; + DWORD dwMemberPriv; + DWORD dwMessageFlags; + WORD cbMemberData; + WORD cbDetails; + BYTE *pbMemberData; +} P_TEAM_RECRUIT_MSG_XUID; + +typedef struct _P_TEAM_RECRUIT_MSG_NAME +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + XUID qwUserID; + DWORD dwTitleID; + ULONGLONG qwTeamID; + ULONGLONG qwMemberID; + CHAR szMemberName[16]; + DWORD dwMemberPriv; + DWORD dwMessageFlags; + WORD cbMemberData; + WORD cbDetails; + BYTE *pbMemberData; +} P_TEAM_RECRUIT_MSG_NAME; + +typedef struct _P_TEAM_JOIN_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + XUID qwUserID; + DWORD dwTitleID; + ULONGLONG qwTeamID; + DWORD dwRecruitMsgID; + BYTE bAnswer; +} P_TEAM_JOIN_MSG; + +typedef struct _XUSER_ONLINE_PROFILE_SETTING +{ + DWORD source; + ULONGLONG qwUserId; + DWORD dwSettingId; + WORD cbSize; + BYTE *pbValue; +} XUSER_ONLINE_PROFILE_SETTING, *PXUSER_ONLINE_PROFILE_SETTING; + +typedef struct _XPROFILE_SETTING_SYNC_RESULT +{ + FILETIME ftVersion; + WORD wTotalSettings; + WORD wSettingsLen; + XUSER_ONLINE_PROFILE_SETTING *pSettings; +} XPROFILE_SETTING_SYNC_RESULT, *PXPROFILE_SETTING_SYNC_RESULT; + +typedef struct _XPROFILE_SETTING_SYNC_REQUEST +{ + DWORD dwTitleId; + XUID qwUserId; + FILETIME ftVersion; + WORD wStartingIndex; + WORD wSettingsLen; + XUSER_ONLINE_PROFILE_SETTING *pSettings; + XPROFILE_SETTING_SYNC_RESULT *pResults; +} XPROFILE_SETTING_SYNC_REQUEST; + +typedef struct _XPROFILE_SETTING_READ_RESULT +{ + WORD wSettingsLen; + XUSER_ONLINE_PROFILE_SETTING *pSettings; +} XPROFILE_SETTING_READ_RESULT, *PXPROFILE_SETTING_READ_RESULT; + +typedef struct _XPROFILE_SETTING_READ_REQUEST +{ + DWORD dwTitleId; + XUID qwUserId; + WORD wForUserIdsLen; + ULONGLONG *pqwUserIds; + WORD wSettingIdsLen; + DWORD *pdwSettingIds; + XPROFILE_SETTING_READ_RESULT *pResults; +} XPROFILE_SETTING_READ_REQUEST; + +typedef union _XSTAT_PROC_DATA +{ + BYTE bNull; + BYTE bData; + SHORT sData; + LONG nData; + LONGLONG i64Data; + __XLIVEGEN_DOUBLE dblData; + ULONGLONG qwPuid; +} XSTAT_PROC_DATA; + +typedef struct _XSTAT_PROC_PARAM +{ + BYTE bType; + XSTAT_PROC_DATA Value; +} XSTAT_PROC_PARAM; + +typedef struct _XSTAT_PROC +{ + WORD wProcId; + WORD wParamCount; + XSTAT_PROC_PARAM *pParams; +} XSTAT_PROC; + +typedef struct _XSTATS_POST_REQUEST +{ + DWORD dwTitleId; + WORD wNumProcs; + XSTAT_PROC *pProcs; +} XSTATS_POST_REQUEST; + +typedef struct _XONLINE_STATS_SPEC +{ + DWORD dwViewId; + DWORD dwNumColumnIds; + WORD *pAttrId; +} XONLINE_STATS_SPEC; + +typedef struct _XONLINE_STATS_COLUMN +{ + WORD wColumnId; + BYTE bType; + XSTAT_PROC_DATA Value; +} XONLINE_STATS_COLUMN; + +typedef struct _XONLINE_STATS_ROW +{ + XUID xuid; + DWORD dwRank; + LONGLONG i64Rating; + DWORD cbGamerTag; + CHAR *pszGamerTag; + DWORD dwNumColumns; + XONLINE_STATS_COLUMN *pColumns; +} XONLINE_STATS_ROW; + +typedef struct _XONLINE_STATS_VIEW +{ + ULONGLONG qwViewId; + DWORD dwViewSize; + DWORD dwRowCount; + XONLINE_STATS_ROW *pRows; +} XONLINE_STATS_VIEW; + +typedef struct _XONLINE_STATS_READ_RESULTS +{ + DWORD dwNumViews; + XONLINE_STATS_VIEW *pViews; +} XONLINE_STATS_READ_RESULTS; + +typedef struct _XONLINE_STATS_READ_REQUEST +{ + DWORD dwTitleId; + DWORD dwNumXuids; + XUID *pXuids; + DWORD dwNumSpecs; + XONLINE_STATS_SPEC *pSpecs; + XONLINE_STATS_READ_RESULTS *pResults; +} XONLINE_STATS_READ_REQUEST; + +typedef struct _XONLINE_STATS_ENUM_RESULTS +{ + WORD wNumViews; + XONLINE_STATS_VIEW *pViews; +} XONLINE_STATS_ENUM_RESULTS; + +typedef struct _XONLINE_STATS_ENUM_BY_USER_REQUEST +{ + DWORD dwTitleId; + XUID Xuid; + DWORD dwPageSize; + DWORD dwNumSpecs; + XONLINE_STATS_SPEC *pSpecs; + XONLINE_STATS_ENUM_RESULTS *pResults; +} XONLINE_STATS_ENUM_BY_USER_REQUEST; + +typedef struct _XONLINE_STATS_ENUM_BY_RANK_REQUEST +{ + DWORD dwTitleId; + ULONGLONG qwRank; + DWORD dwPageSize; + DWORD dwNumSpecs; + XONLINE_STATS_SPEC *pSpecs; + XONLINE_STATS_ENUM_RESULTS *pResults; +} XONLINE_STATS_ENUM_BY_RANK_REQUEST; + +typedef struct _XONLINE_STATS_ENUM_BY_RATING_REQUEST +{ + DWORD dwTitleId; + LONGLONG i64Rating; + DWORD dwPageSize; + DWORD dwNumSpecs; + XONLINE_STATS_SPEC *pSpecs; + XONLINE_STATS_ENUM_RESULTS *pResults; +} XONLINE_STATS_ENUM_BY_RATING_REQUEST; + +typedef struct _XSTATS_RESET_REQUEST +{ + DWORD dwTitleId; + ULONGLONG qwUserId; + DWORD dwLeaderBoardId; +} XSTATS_RESET_REQUEST; + +typedef struct _XPROFILE_TITLE +{ + DWORD dwTitleId; + WORD cbTitleName; + WCHAR *pszTitleName; + FILETIME ftLastPlayed; + DWORD dwCredEarned; + WORD wAchievementsEarned; + WORD wAchievementsPossible; + DWORD dwCredPossible; + DWORD dwSequence; + DWORD dwMinutesPlayedOnline; +} XPROFILE_TITLE; + +typedef struct _XPROFILE_SYNC_TITLES_RESULT +{ + FILETIME ftVersion; + WORD wTotalTitles; + WORD wNumTitles; + XPROFILE_TITLE *pTitles; +} XPROFILE_SYNC_TITLES_RESULT; + +typedef struct _XPROFILE_SYNC_TITLES_REQUEST +{ + XUID qwUserId; + WORD wLocaleId; + WORD wStartingIndex; + FILETIME ftLastSync; + WORD wNumTitles; + XPROFILE_TITLE *pTitles; + XPROFILE_SYNC_TITLES_RESULT *pResults; +} XPROFILE_SYNC_TITLES_REQUEST; + +typedef struct +{ + WORD wNumTitles; + XPROFILE_TITLE *pTitles; +} XPROFILE_ENUM_TITLES_RESULT, XPROFILE_ENUM_TITLES_RESULT; + +typedef struct _XPROFILE_ENUM_TITLES_REQUEST +{ + XUID qwUserId; + XUID qwForUserId; + WORD wLocaleId; + WORD wStartingIndex; + WORD wMaxTitles; + XPROFILE_ENUM_TITLES_RESULT *pResults; +} XPROFILE_ENUM_TITLES_REQUEST; + +typedef struct _XPROFILE_CLEAR_TITLE_REQUEST +{ + XUID qwUserId; + DWORD dwTitleId; +} XPROFILE_CLEAR_TITLE_REQUEST; + +typedef struct _XPROFILE_ACHIEVEMENT +{ + DWORD dwAchievementId; + FILETIME ftAchieved; + DWORD dwSequence; + DWORD dwFlags; + BYTE bType; + DWORD dwCred; + DWORD dwImageId; + BYTE cbTitleLen; + WCHAR *pszTitle; + BYTE cbDescriptionLen; + WCHAR *pszDescription; + BYTE cbHowToLen; + WCHAR *pszHowTo; + BYTE bNextIdsLen; + DWORD *pdwNextIds; + BYTE bReplaceIdsLen; + DWORD *pdwReplaceIds; +} XPROFILE_ACHIEVEMENT; + +typedef struct _XPROFILE_ACHIEVEMENT_SYNC_REQUEST +{ + DWORD dwAchievementId; + FILETIME ftAchieved; + DWORD dwSequence; + DWORD dwFlags; + BYTE bType; + DWORD dwCred; + DWORD dwImageId; + BYTE cbTitleLen; + WCHAR *pszTitle; + BYTE cbDescriptionLen; + WCHAR *pszDescription; + BYTE cbHowToLen; + WCHAR *pszHowTo; + BYTE bNextIdsLen; + DWORD *pdwNextIds; + BYTE bReplaceIdsLen; + DWORD *pdwReplaceIds; +} XPROFILE_ACHIEVEMENT_SYNC_REQUEST; + +typedef struct _XPROFILE_SYNC_ACHIEVEMENTS_RESULT +{ + FILETIME ftVersion; + WORD wTotalAchievements; + WORD wAchievementCount; + XPROFILE_ACHIEVEMENT *pAchievements; +} XPROFILE_SYNC_ACHIEVEMENTS_RESULT; + +typedef struct _XPROFILE_SYNC_ACHIEVEMENTS_REQUEST +{ + DWORD dwTitleId; + XUID qwUserId; + FILETIME ftVersion; + WORD wLocaleId; + WORD wStartingIndex; + WORD wAchievementCount; + XPROFILE_ACHIEVEMENT_SYNC_REQUEST *pAchievements; + XPROFILE_SYNC_ACHIEVEMENTS_RESULT *pResult; +} XPROFILE_SYNC_ACHIEVEMENTS_REQUEST; + +typedef struct _XPROFILE_ENUM_ACHIEVEMENTS_RESULT +{ + WORD wAchievementsCount; + XPROFILE_ACHIEVEMENT *pAchievements; +} XPROFILE_ENUM_ACHIEVEMENTS_RESULT; + +typedef struct _XPROFILE_ENUM_ACHIEVEMENTS_REQUEST +{ + DWORD dwTitleId; + XUID qwUserId; + ULONGLONG qwForPuid; + WORD wLocaleId; + WORD wStartingIndex; + WORD wMaxAchievements; + XPROFILE_ENUM_ACHIEVEMENTS_RESULT *pResult; +} XPROFILE_ENUM_ACHIEVEMENTS_REQUEST; + +typedef struct _XMSG_DETAILS +{ + WORD wPropCount; + WORD cbData; + XMSG_PROPERTY *rgProperties; + BYTE *rgbData; +} XMSG_DETAILS, *PXMSG_DETAILS; + +typedef struct _Q_MESSAGE_SUMMARY +{ + ULONGLONG qwSenderID; + ULONGLONG qwSenderContext; + MSGTIME mtSentTime; + DWORD dwMessageID; + DWORD dwMessageFlags; + DWORD dwSenderTitleID; + WORD wExpireMinutes; + WORD cbDetails; + BYTE bMessageType; + CHAR szSenderName[15]; +} Q_MESSAGE_SUMMARY; + +typedef struct _Q_MESSAGE_SUMMARY_2 +{ + ULONGLONG qwSenderID; + ULONGLONG qwSenderContext; + MSGTIME mtSentTime; + DWORD dwMessageID; + DWORD dwMessageFlags; + DWORD dwSenderTitleID; + WORD wExpireMinutes; + WORD cbDetails; + BYTE bMessageType; + CHAR szSenderName[15]; + WCHAR szSubject[20]; +} Q_MESSAGE_SUMMARY_2; + +typedef struct _XMSG_SUMMARY +{ + ULONGLONG qwSenderID; + ULONGLONG qwMessageContext; + FILETIME ftSentTime; + DWORD dwMessageID; + DWORD dwMessageFlags; + DWORD dwSenderTitleID; + WORD wExpireMinutes; + WORD cbDetails; + BYTE bMsgType; + CHAR szSenderName[15]; + WCHAR szSubject[20]; +} XMSG_SUMMARY, *PXMSG_SUMMARY; + +typedef struct _XMSG_SEND_RECIPIENT_RESULT +{ + ULONGLONG qwUserID; + DWORD dwResult; +} XMSG_SEND_RECIPIENT_RESULT, *PXMSG_SEND_RECIPIENT_RESULT; + +typedef struct _XMSG_ENUMERATE_REQUEST +{ + XUID XuidUser; + DWORD pcMsgSummaries[1]; + XMSG_SUMMARY pMsgSummaries[1]; +} XMSG_ENUMERATE_REQUEST; + +typedef struct _XMSG_SUMMARY_REQUEST +{ + XUID XuidUser; + DWORD dwMessageID; + XMSG_SUMMARY pMsgSummary[1]; +} XMSG_SUMMARY_REQUEST, *PXMSG_SUMMARY_REQUEST; + +typedef struct _XMSG_CREATE_REQUEST +{ + DWORD dwMsgType; + DWORD cProperties; + ULONGLONG qwMessageContext; + DWORD dwMessageFlags; + DWORD dwExpireMinutes; + XMSG_HANDLE phMsg[1]; +} XMSG_CREATE_REQUEST, *PXMSG_CREATE_REQUEST; + +typedef struct _XMSG_DESTROY +{ + XMSG_HANDLE hMsg; +} XMSG_DESTROY, *PXMSG_DESTROY; + +typedef struct _XMSG_SET_PROP_REQUEST +{ + XMSG_HANDLE hMsg; + WORD wPropTag; + DWORD dwPropValueSize; + BYTE pbPropValue[1]; + DWORD dwAttachmentFlags; +} XMSG_SET_PROP_REQUEST, *PXMSG_SET_PROP_REQUEST; + +typedef struct _XMSG_GET_PROP_REQUEST +{ + XMSG_HANDLE hMsg; + WORD wPropTag; + DWORD dwPropValueBufferSize; + BYTE pbPropValue[1]; + DWORD pcbPropValue[1]; + DWORD pdwAttachmentFlags[1]; +} XMSG_GET_PROP_REQUEST, *PXMSG_GET_PROP_REQUEST; + +typedef struct _XMSG_ENUM_RESULTS +{ + WORD cMessages; + Q_MESSAGE_SUMMARY_2 *pMessages; +} XMSG_ENUM_RESULTS, *PXMSG_ENUM_RESULTS; + +typedef struct _Q_ENUM_MESSAGES_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + ULONGLONG qwUserID; + XMSG_ENUM_RESULTS *pResults; +} Q_ENUM_MESSAGES_MSG; + +typedef struct _Q_MESSAGE_SUMMARY_REPLY_MSG +{ + Q_MESSAGE_SUMMARY_2 summary; +} Q_MESSAGE_SUMMARY_REPLY_MSG; + +typedef struct _Q_MESSAGE_SUMMARY_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + ULONGLONG qwUserID; + DWORD dwMessageID; + Q_MESSAGE_SUMMARY_REPLY_MSG *pResults; +} Q_MESSAGE_SUMMARY_MSG; + +typedef struct _XMSG_DETAILS_RESULTS +{ + Q_MESSAGE_SUMMARY summary; + XMSG_DETAILS details; +} XMSG_DETAILS_RESULTS, *PXMSG_DETAILS_RESULTS; + +typedef struct _XMSG_DETAILS_BLOB +{ + BYTE rgbDetailsBlob[4096]; +} XMSG_DETAILS_BLOB, *PXMSG_DETAILS_BLOB; + +typedef struct _XMSG_DETAILS_REQUEST +{ + XUID XuidUser; + DWORD dwMessageID; + DWORD dwFlagsToSet; + DWORD dwFlagsToClear; + DWORD cbResults; + XMSG_DETAILS_BLOB pResults[1]; + XOVERLAPPED pXOverlapped[1]; +} XMSG_DETAILS_REQUEST; + +typedef struct _Q_MESSAGE_DETAILS_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + XUID qwUserID; + DWORD dwMessageID; + DWORD dwFlagsToSet; + DWORD dwFlagsToClear; + XMSG_DETAILS_BLOB *pResults; +} Q_MESSAGE_DETAILS_MSG; + +typedef struct _XMSG_DETAILS_GET_SUMMARY +{ + XMSG_DETAILS_BLOB pDetails[1]; + XMSG_SUMMARY pMsgSummary[1]; + DWORD pcProperties[1]; + ULONGLONG pqwAttachmentsSize[1]; +} XMSG_DETAILS_GET_SUMMARY; + +typedef struct _XMSG_DETAILS_GET_PROPERTY +{ + XMSG_DETAILS_BLOB pDetails[1]; + WORD wPropTag; + DWORD cbPropValueBuffer; + BYTE pbPropValue[1]; + DWORD pcbPropValue[1]; + DWORD pdwAttachmentFlags[1]; +} XMSG_DETAILS_GET_PROPERTY; + +typedef struct _XMSG_DELETE_REQUEST +{ + XUID XuidUser; + DWORD dwMessageID; + BOOL fBlockSender; + XOVERLAPPED pXOverlapped[1]; +} XMSG_DELETE_REQUEST; + +typedef struct _Q_DELETE_MESSAGE_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + XUID qwUserID; + DWORD dwMessageID; + DWORD dwFlags; +} Q_DELETE_MESSAGE_MSG; + +typedef struct _XMSG_SEND_RESULT +{ + WORD cRecipients; + XMSG_SEND_RECIPIENT_RESULT *pRecipients; +} XMSG_SEND_RESULT; + +typedef struct _Q_SEND_MESSAGE_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + ULONGLONG qwUserID; + ULONGLONG qwSenderContext; + DWORD dwMessageFlags; + DWORD dwSenderTitleID; + WORD wExpireMinutes; + WORD cbDetails; + WORD cRecipients; + BYTE bMessageType; + CHAR szSenderName[15]; + ULONGLONG *qwRecipientIDs; + XMSG_DETAILS *pDetails; + XMSG_SEND_RESULT *pResults; +} Q_SEND_MESSAGE_MSG; + +typedef struct _Q_REVOKE_MESSAGE_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + XUID qwUserID; + ULONGLONG qwSenderContext; + WORD cRecipients; + BYTE bMessageType; + XMSG_SEND_RECIPIENT_RESULT *pRecipients; +} Q_REVOKE_MESSAGE_MSG; + +typedef struct _XMSG_FLAGS_REQUEST +{ + XUID XuidUser; + DWORD dwMessageID; + DWORD dwFlagsToSet; + DWORD dwFlagsToClear; + XOVERLAPPED pXOverlapped[1]; +} XMSG_FLAGS_REQUEST; + +typedef struct _Q_MESSAGE_FLAGS_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + XUID qwUserID; + DWORD dwMessageID; + DWORD dwSetFlags; + DWORD dwUnsetFlags; +} Q_MESSAGE_FLAGS_MSG; + +typedef struct _P_ADD_2_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + ULONGLONG qwSenderID; + ULONGLONG qwBuddyID; + DWORD dwMessageFlags; + WORD cbDetails; + CHAR *szBuddyAcctName; + XMSG_DETAILS *pDetails; +} P_ADD_2_MSG; + +typedef struct _P_DELETE_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + XUID qwSenderID; + XUID qwBuddyID; +} P_DELETE_MSG; + +typedef struct _P_ACCEPT_REQUEST_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + XUID qwSenderID; + XUID qwBuddyID; +} P_ACCEPT_REQUEST_MSG; + +typedef struct _P_REJECT_REQUEST_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + XUID qwSenderID; + XUID qwBuddyID; + BOOL Block; +} P_REJECT_REQUEST_MSG; + +typedef struct _P_FRIENDS_ENUM_CREATE_MSG +{ + DWORD dwUserIndex; + DWORD dwStartingIndex; + DWORD dwFriendsToReturn; + DWORD pcbBuffer[1]; + HANDLE ph[1]; +} P_FRIENDS_ENUM_CREATE_MSG; + +typedef struct _P_INVITE_2_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + ULONGLONG qwUserID; + ULONGLONG qwSenderContext; + DWORD dwTitleID; + DWORD dwMessageFlags; + WORD cInvitees; + WORD cbDetails; + ULONGLONG *pqwInviteeIDs; + XMSG_DETAILS *pDetails; +} P_INVITE_2_MSG; + +typedef struct _XMSG_GAME_INVITE_CANCEL +{ + XUID XuidUser; + WORD cInvitees; + XUID *pXuidInvitees; + XNKID SessionID; + XOVERLAPPED pXOverlapped[1]; +} XMSG_GAME_INVITE_CANCEL; + +typedef struct _P_CANCEL_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + ULONGLONG qwUserID; + XNKID SessionID; + WORD cInvitees; + ULONGLONG *pqwInviteeIDs; +} P_CANCEL_MSG; + +typedef struct _XMSG_GAMEINVITE_ANSWER_INFO +{ + XUID xuidInvitingUser; + DWORD dwTitleID; + XNKID sessionID; + XNADDR xnaddrHost; + XNKEY xnkeyHost; +} XMSG_GAMEINVITE_ANSWER_INFO, *PXMSG_GAMEINVITE_ANSWER_INFO; + +typedef struct _XMSG_GAME_INVITE_ANSWER +{ + XUID XuidUser; + XMSG_GAMEINVITE_ANSWER_INFO pAnswerInfo[1]; + XMSG_INVITE_ANSWER_TYPE Answer; + BOOL fFromGameInvite; + XOVERLAPPED pXOverlapped[1]; +} XMSG_GAME_INVITE_ANSWER; + +typedef struct _P_INVITE_ANSWER_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + ULONGLONG qwUserID; + ULONGLONG qwHostID; + XNKID MatchSessionID; + WORD wAnswer; +} P_INVITE_ANSWER_MSG; + +typedef struct _XMSG_GAME_INVITE_GET_ACCEPTED +{ + DWORD dwUserIndex; + XINVITE_INFO pInfo[1]; +} XMSG_GAME_INVITE_GET_ACCEPTED; + +typedef struct _P_ADD_AFFILIATES_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + ULONGLONG qwUserID; + DWORD dwListFlags; + DWORD dwTitleID; + WORD cwAffiliates; + ULONGLONG *pqwAfilliateIDs; +} P_ADD_AFFILIATES_MSG; + +typedef struct _P_IS_AFFILIATE_REPLY_MSG +{ + HRESULT hr; + ULONGLONG qwAffiliateID; + DWORD dwListFlags; +} P_IS_AFFILIATE_REPLY_MSG; + +typedef struct _P_IS_AFFILIATE_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + ULONGLONG qwUserID; + ULONGLONG qwAffiliateID; + P_IS_AFFILIATE_REPLY_MSG *pReply; +} P_IS_AFFILIATE_MSG; + +typedef struct _P_QUERY_AFFILIATES_REPLY_DATA_MSG +{ + ULONGLONG qwAffiliateID; + DWORD dwListFlags; + DWORD dwTitleID; + ULONGLONG qwSessionID; + MSGTIME mtDateUpdated; + CHAR szGamerTag[16]; +} P_QUERY_AFFILIATES_REPLY_DATA_MSG; + +typedef struct _P_QUERY_AFFILIATES_REPLY_MSG +{ + HRESULT hr; + DWORD cdwResults; + P_QUERY_AFFILIATES_REPLY_DATA_MSG *rgResults; +} P_QUERY_AFFILIATES_REPLY_MSG; + +typedef struct _P_QUERY_AFFILIATES_MSG +{ + DWORD dwMsgType; + DWORD dwMsgLen; + DWORD dwSeqNum; + SGADDR sgaddr; + ULONGLONG qwUserID; + DWORD dwListFlags; + DWORD cdwLimit; + DWORD dwOnlineTitleID; + P_QUERY_AFFILIATES_REPLY_MSG *pReply; +} P_QUERY_AFFILIATES_MSG; + +typedef struct _XSIGNATURE_TO_VERIFY +{ + BYTE rgbDigest[20]; + BYTE rgbOnlineSignature[100]; +} XSIGNATURE_TO_VERIFY; + +typedef struct _XSIGNATURE_VERIFY_RESPONSE +{ + HRESULT hrResult; +} XSIGNATURE_VERIFY_RESPONSE; + +typedef struct _XSIGNATURE_VERIFY_REQUEST +{ + XSIGNATURE_TO_VERIFY *pSignaturesToVerify; + XSIGNATURE_VERIFY_RESPONSE *pResponse; +} XSIGNATURE_VERIFY_REQUEST; + +typedef struct _XSIGNATURE_CONTENT_TUPLE +{ + DWORD dwTitleId; + DWORD dwTitleVersion; + ULONGLONG qwConsolePuid; + BYTE pConsoleId[5]; + ULONGLONG pUserPuids[4]; + BYTE pDigest[20]; +} XSIGNATURE_CONTENT_TUPLE; + +typedef struct _XSIGNATURE_CHECK_REVOCATION_RESPONSE +{ + DWORD dwNumHrs; + HRESULT *pHrs; +} XSIGNATURE_CHECK_REVOCATION_RESPONSE; + +typedef struct _XSIGNATURE_CHECK_REVOCATION_REQUEST +{ + DWORD dwNumContentTuples; + XSIGNATURE_CONTENT_TUPLE *pTuples; + XSIGNATURE_CHECK_REVOCATION_RESPONSE *pResponse; +} XSIGNATURE_CHECK_REVOCATION_REQUEST; + +typedef struct _XSTORAGE_ENDPOINT +{ + IN_ADDR inaPrimaryAddress; + WORD wPrimaryPort; + IN_ADDR inaAlternateAddress; + WORD wAlternatePort; +} XSTORAGE_ENDPOINT; + +typedef struct _XRESOLVE_DOMAIN_STRING +{ + WORD wNumStringChars; + WCHAR *pwszString; +} XRESOLVE_DOMAIN_STRING; + +typedef struct _XRESOLVE_NAME_RESPONSE +{ + XSTORAGE_ENDPOINT StorageEndpoint; + FILETIME ftExpiration; + XRESOLVE_DOMAIN_STRING ResolveDomainStringRule; +} XRESOLVE_NAME_RESPONSE; + +typedef struct _XRESOLVE_NAME_REQUEST +{ + XRESOLVE_DOMAIN_STRING pResolveString[1]; + XRESOLVE_NAME_RESPONSE *pResponse; +} XRESOLVE_NAME_REQUEST; + +typedef struct _XSTORAGE_PATH_STRING +{ + WORD wNumPathChars; + WCHAR *pwszPath; +} XSTORAGE_PATH_STRING; + +typedef struct _XSTORAGE_ACCESS_TOKEN +{ + WORD wOperation; + WORD wAccessTokenVersion; + DWORD dwServiceId; + DWORD dwFlags; + ULONGLONG qwUserId; + ULONGLONG qwXboxId; +} XSTORAGE_ACCESS_TOKEN; + +typedef struct _XSTORAGE_ACCESS_TOKEN_READ +{ + FILETIME ftTokenExpirationDate; + WORD wSignatureSize; + BYTE *prgbSignature; +} XSTORAGE_ACCESS_TOKEN_READ; + +typedef struct _XSTORAGE_ACCESS_TOKEN_WRITE +{ + FILETIME ftTokenExpirationDate; + FILETIME ftFileExpirationDate; + DWORD dwMaxFileSize; + WORD wSignatureSize; + BYTE *prgbSignature; +} XSTORAGE_ACCESS_TOKEN_WRITE; + +typedef struct _XSTORAGE_DOWNLOAD_RESPONSE +{ + DWORD dwTitleId; + DWORD dwTitleVersion; + ULONGLONG qwOwnerId; + BYTE bCountryId; + ULONGLONG qwXboxId; + BYTE bCompressionType; + DWORD dwContentType; + BYTE rgbLiveSignature[100]; + DWORD dwInstallSize; + FILETIME ftCreated; + WORD wAttributesSize; + DWORD dwPackageSize; + BYTE *prgbAttributes; +} XSTORAGE_DOWNLOAD_RESPONSE; + +typedef struct _XSTORAGE_DOWNLOAD_REQUEST +{ + XSTORAGE_ACCESS_TOKEN pStorageAccessToken[1]; + XSTORAGE_PATH_STRING pStoragePathString[1]; + XSTORAGE_ACCESS_TOKEN_READ pStorageAccessTokenRead[1]; + DWORD dwTitleId; + DWORD dwTitleVersion; + BYTE bCountryId; + DWORD dwRangeStart; + DWORD dwRangeEnd; + FILETIME pftLastModified[1]; + XSTORAGE_DOWNLOAD_RESPONSE *pResponse; +} XSTORAGE_DOWNLOAD_REQUEST; + +typedef struct _XSTORAGE_UPLOAD_REQUEST +{ + XSTORAGE_ACCESS_TOKEN pStorageAccessToken[1]; + XSTORAGE_PATH_STRING pStoragePathString[1]; + XSTORAGE_ACCESS_TOKEN_WRITE pStorageAccessTokenWrite[1]; + DWORD dwTitleId; + DWORD dwTitleVersion; + BYTE bCountryId; + BYTE bCompressionType; + DWORD dwContentType; + BYTE *prgbDigest; + BYTE *prgbLiveSignature; + DWORD dwInstallSize; + WORD wAttributesSize; + DWORD dwPackageSize; + BYTE *prgbAttributes; +} XSTORAGE_UPLOAD_REQUEST; + +typedef struct _XSTORAGE_ENUMERATE_REQUEST +{ + XSTORAGE_ACCESS_TOKEN pStorageAccessToken[1]; + XSTORAGE_PATH_STRING pStoragePathString[1]; + XSTORAGE_ACCESS_TOKEN_READ pStorageAccessTokenRead[1]; + DWORD dwTitleId; + DWORD dwTitleVersion; + BYTE bCountryId; + DWORD dwStartingIndex; + DWORD dwEndingIndex; + FILETIME ftLastModified; + XSTORAGE_ENUMERATE_RESULTS *pResults; +} XSTORAGE_ENUMERATE_REQUEST; + +typedef struct _XSTORAGE_DELETE_REQUEST +{ + XSTORAGE_ACCESS_TOKEN pStorageAccessToken[1]; + XSTORAGE_PATH_STRING pStoragePathString[1]; + XSTORAGE_ACCESS_TOKEN_READ pStorageAccessTokenRead[1]; + DWORD dwTitleId; + DWORD dwTitleVersion; +} XSTORAGE_DELETE_REQUEST; + +typedef struct _XSTORAGE_DOWNLOAD_TO_DIRECTORY_RESULTS_INTERNAL +{ + XCONTENT_DATA ContentData; +} XSTORAGE_DOWNLOAD_TO_DIRECTORY_RESULTS_INTERNAL; + +typedef struct _XSTORAGE_DOWNLOAD_TO_DIRECTORY_PARAMS_INTERNAL +{ + DWORD dwUserIndex; + DWORD dwServerPathLength; + WCHAR *wszServerPath; + DWORD dwDisplayNameLength; + WCHAR *wszDisplayName; + XCONTENTDEVICEID DeviceID; + XSTORAGE_DOWNLOAD_TO_DIRECTORY_RESULTS_INTERNAL *pResults; +} XSTORAGE_DOWNLOAD_TO_DIRECTORY_PARAMS_INTERNAL; + +typedef struct _XSTORAGE_DOWNLOAD_TO_MEMORY_PARAMS +{ + DWORD dwUserIndex; + DWORD dwServerPathLength; + WCHAR *wszServerPath; + DWORD dwBufferSize; + DWORD dwBufferPointer; + XSTORAGE_DOWNLOAD_TO_MEMORY_RESULTS *pResults; +} XSTORAGE_DOWNLOAD_TO_MEMORY_PARAMS; + +typedef struct _XSTORAGE_UPLOAD_FROM_DIRECTORY_PARAMS_INTERNAL +{ + DWORD dwUserIndex; + DWORD dwServerPathLength; + WCHAR *wszServerPath; + DWORD dwLocalPathLength; + CHAR *szLocalPath; +} XSTORAGE_UPLOAD_FROM_DIRECTORY_PARAMS_INTERNAL; + +typedef struct _XSTORAGE_UPLOAD_FROM_MEMORY_PARAMS +{ + DWORD dwUserIndex; + DWORD dwServerPathLength; + WCHAR *wszServerPath; + DWORD dwBufferSize; + DWORD dwBufferPointer; +} XSTORAGE_UPLOAD_FROM_MEMORY_PARAMS; + +typedef struct _XSTORAGE_ENUMERATE_PARAMS +{ + DWORD dwUserIndex; + DWORD dwServerPathLength; + WCHAR *wszServerPath; + DWORD dwStartingIndex; + DWORD dwMaxResultsToReturn; + XSTORAGE_ENUMERATE_RESULTS *pResults; +} XSTORAGE_ENUMERATE_PARAMS; + +typedef struct _XSTORAGE_DELETE_PARAMS +{ + DWORD dwUserIndex; + DWORD dwServerPathLength; + WCHAR *wszServerPath; +} XSTORAGE_DELETE_PARAMS; + +typedef struct _XMSG_SEND_PARAMS +{ + XUID XuidSender; + XMSG_HANDLE hMsg; + DWORD cRecipients; + XUID *pXuidRecipients; + XMSG_SEND_RESULT *pResults; +} XMSG_SEND_PARAMS; + +typedef struct _XMSG_DOWNLOAD_ATTACH_TO_MEM_PARAMS +{ + XUID XuidUser; + DWORD dwDetailsBlobsPointer; + DWORD dwPropTag; + DWORD dwBufferSize; + DWORD dwBufferPointer; +} XMSG_DOWNLOAD_ATTACH_TO_MEM_PARAMS; + +typedef struct _XFRIENDS_REQUEST_PARAMS +{ + XUID XuidFromUser; + XUID qwBuddyID; + DWORD dwUserNameSize; + XMSG_HANDLE hMsg; +} XFRIENDS_REQUEST_PARAMS; + +typedef struct _XFRIENDS_REQUEST_BY_NAME_PARAMS +{ + XUID XuidFromUser; + XUID qwBuddyID; + DWORD dwUserNameSize; + CHAR *szUserName; + XMSG_HANDLE hMsg; +} XFRIENDS_REQUEST_BY_NAME_PARAMS; + +typedef struct _XMSG_INVITE_SEND_PARAMS +{ + DWORD dwUserIndex; + DWORD dwNumInvitees; + XUID *pXuidInvitees; + DWORD cchText; + WCHAR *pszText; + XMSG_HANDLE hMsg; +} XMSG_INVITE_SEND_PARAMS; + +typedef struct _XMSG_INVITE_SEND_MESSAGE_PARAMS +{ + DWORD dwUserIndex; + DWORD dwNumInvitees; + XUID *pXuidInvitees; + DWORD cchText; + WCHAR *pszText; + XMSG_HANDLE hMsg; +} XMSG_INVITE_SEND_MESSAGE_PARAMS; + +typedef struct _XREFERRAL_LOCATION +{ + WORD wRank; + WORD wUrlSize; + CHAR *pszUrl; +} XREFERRAL_LOCATION; + +typedef struct _XCONTENT_REFERRAL_RESPONSE +{ + DWORD dwPackageSize; + DWORD dwInstallSize; + BYTE rgbSymKey[16]; + BYTE rgbPubKey[284]; + WORD wNumLocations; + XREFERRAL_LOCATION *pReferralLocations; +} XCONTENT_REFERRAL_RESPONSE; + +typedef struct _XCONTENT_REFERRAL_REQUEST +{ + ULONGLONG qwUserId; + BYTE abContentId[20]; + XCONTENT_REFERRAL_RESPONSE *pResults; +} XCONTENT_REFERRAL_REQUEST; + +typedef struct _XCONTENT_REFRESH_LICENSE_RESPONSE +{ + WORD wContentHeaderLength; + BYTE *pbContentHeader; +} XCONTENT_REFRESH_LICENSE_RESPONSE; + +typedef struct _XCONTENT_REFRESH_LICENSE_REQUEST +{ + ULONGLONG qwUserId; + ULONGLONG qwMachineId; + WORD wContentHeaderLength; + BYTE *pbContentHeader; + XCONTENT_REFRESH_LICENSE_RESPONSE *pResults; +} XCONTENT_REFRESH_LICENSE_REQUEST; + +typedef struct _XCONTENT_DOWNLOAD_PARAMS +{ + DWORD dwUserIndex; + BYTE *pbContentId; + DWORD dwTargetDirectoryLength; + CHAR *szTargetDirectory; + DWORD dwFlags; +} XCONTENT_DOWNLOAD_PARAMS; + +typedef struct _XCONTENT_DOWNLOAD_GET_INPROGRESS_METADATA +{ + DWORD dwUserIndex; + BYTE *pbContentId; + DWORD dwTargetDirectoryLength; + CHAR *szTargetDirectory; + BYTE pContentHeader[1]; + BYTE pContentMetaData[1]; + BYTE pbOtherMetaData[1]; + DWORD pdwOtherMetaDataSize[1]; +} XCONTENT_DOWNLOAD_GET_INPROGRESS_METADATA; + +typedef struct _XUPDATE_REFERRAL_RESPONSE +{ + WORD wFlags; + WORD wNumLocations; + DWORD dwPackageSize; + DWORD dwInstallSize; + DWORD dwVersion; + BYTE rgbSymKey[16]; + BYTE rgbPubKey[284]; + XREFERRAL_LOCATION *pReferralLocations; +} XUPDATE_REFERRAL_RESPONSE; + +typedef struct _XUPDATE_REFERRAL_REQUEST +{ + ULONGLONG qwMachineId; + DWORD dwTitleId; + DWORD dwVersion; + XUPDATE_REFERRAL_RESPONSE *pResults; +} XUPDATE_REFERRAL_REQUEST; + +typedef struct _XUPDATE_DOWNLOAD_RESULTS +{ + CHAR szPackagePath[260]; +} XUPDATE_DOWNLOAD_RESULTS; + +typedef struct _XUPDATE_DOWNLOAD_PARAMS +{ + DWORD dwTitleId; + DWORD dwVersion; + XUPDATE_DOWNLOAD_RESULTS *pResults; +} XUPDATE_DOWNLOAD_PARAMS; + +typedef struct _XUID_AND_FLAGS +{ + XUID xuid; + DWORD dwUserFlags; +} XUID_AND_FLAGS; + +typedef struct _XARB_REGISTRANT +{ + ULONGLONG qwMachineID; + BYTE bTrustworthiness; + BYTE bNumUsers; + XUID_AND_FLAGS *rgUsers; +} XARB_REGISTRANT; + +typedef struct _XARB_REGISTER_REPLY +{ + WORD wNumRegistrants; + XARB_REGISTRANT *rgRegistrants; +} XARB_REGISTER_REPLY; + +typedef struct _XARB_REGISTER_REQUEST +{ + WORD wProtocolVersion; + WORD wFlags; + DWORD dwTitleId; + ULONGLONG qwSessionId; + ULONGLONG qwSessionNonce; + WORD wMaxSessionSeconds; + XARB_REGISTER_REPLY *pReply; +} XARB_REGISTER_REQUEST; + +typedef struct _XARB_TIMEEXTEND_REQUEST +{ + WORD wProtocolVersion; + WORD wRequestFlags; + DWORD dwTitleID; + ULONGLONG qwSessionID; + ULONGLONG qwSessionNonce; + WORD wMaxSessionSecondsFromNow; +} XARB_TIMEEXTEND_REQUEST; + +typedef struct _XARB_REPORT_LOST_MACHINES +{ + BYTE bNumLostConnectivityMachineIDs; + ULONGLONG *pLostConnectivityMachineIDs; +} XARB_REPORT_LOST_MACHINES; + +typedef struct _XARB_REPORT_SUSPICIOUS_INFO +{ + BYTE bMessageLength; + CHAR *pszMessage; + BYTE bNumRelatedMachineIDs; + ULONGLONG *pRelatedMachineIDs; + BYTE bNumRelatedUsers; + ULONGLONG *pRelatedUsers; +} XARB_REPORT_SUSPICIOUS_INFO; + +typedef struct _XARB_REPORT_BYTE_BUNDLE +{ + DWORD cbBundle; + BYTE *pBundle; +} XARB_REPORT_BYTE_BUNDLE; + +typedef struct _XARB_REPORT_STATS_BUNDLE +{ + DWORD cbStats; + XSTATS_POST_REQUEST Stats; +} XARB_REPORT_STATS_BUNDLE; + +typedef struct _XARB_REPORT_REQUEST +{ + WORD wProtocolVersion; + WORD wFlags; + DWORD dwTitleID; + ULONGLONG qwSessionID; + ULONGLONG qwSessionNonce; + XARB_REPORT_LOST_MACHINES *pLostMachines; + XARB_REPORT_SUSPICIOUS_INFO *pSuspiciousInfo; + XARB_REPORT_STATS_BUNDLE *pStatsBundle; + XARB_REPORT_BYTE_BUNDLE *pCompsBundle; +} XARB_REPORT_REQUEST; + +typedef struct _FB_PLAYER_REVIEW +{ + ULONGLONG qwSenderID; + ULONGLONG qwTargetID; + DWORD dwTitleID; + DWORD dwType; + ULONGLONG qwContext; + ULONGLONG ftSubmitted; +} FB_PLAYER_REVIEW; + +typedef struct _FB_AGGREGATE_REVIEW +{ + ULONGLONG qwTargetID; + DWORD dwCount; + DWORD dwType; +} FB_AGGREGATE_REVIEW; + +typedef struct _FB_PLAYER_REVIEW_REQUEST +{ + ULONGLONG qwSenderID; + ULONGLONG qwTargetID; + DWORD dwTitleID; + DWORD dwType; + ULONGLONG qwContext; +} FB_PLAYER_REVIEW_REQUEST; + +typedef struct _FB_ENUM_REVIEWS_RESPONSE +{ + DWORD hr; + DWORD cReviews; + FB_PLAYER_REVIEW *pReviews; +} FB_ENUM_REVIEWS_RESPONSE; + +typedef struct _FB_ENUM_SENT_REVIEWS_REQUEST +{ + ULONGLONG qwSenderID; + DWORD dwPageID; + DWORD dwResultsPerPage; + FB_ENUM_REVIEWS_RESPONSE *pResults; +} FB_ENUM_SENT_REVIEWS_REQUEST; + +typedef struct _FB_ENUM_RECD_REVIEWS_REQUEST +{ + ULONGLONG qwTargetID; + DWORD dwPageID; + DWORD dwResultsPerPage; + FB_ENUM_REVIEWS_RESPONSE *pResults; +} FB_ENUM_RECD_REVIEWS_REQUEST; + +typedef struct _FB_GET_AGG_REVIEWS_RESPONSE +{ + DWORD hr; + DWORD cAggReviews; + FB_AGGREGATE_REVIEW *pAggReviews; +} FB_GET_AGG_REVIEWS_RESPONSE; + +typedef struct _FB_GET_AGG_REVIEWS_REQUEST +{ + ULONGLONG qwTargetID; + FB_GET_AGG_REVIEWS_RESPONSE *pResults; +} FB_GET_AGG_REVIEWS_REQUEST; + +typedef struct _FB_SUBMIT_COMPAINT_REQUEST +{ + ULONGLONG qwSenderID; + ULONGLONG qwTargetID; + DWORD dwTitleID; + DWORD dwType; + ULONGLONG qwContext; +} FB_SUBMIT_COMPAINT_REQUEST; + +#pragma pack(pop) + + +XBOXAPI +DWORD +WINAPI +_XOfferingUpdateAccessTimes( + IN DWORD dwUserIndex, + IN DWORD dwTitleId, + IN DWORD dwTitleContentCategories, + OUT XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XOfferingExpireMarketplaceCountsCache( + IN DWORD dwUserIndex, + OUT XOVERLAPPED *pXOverlapped + ); + +XAMINLINE +WORD +WINAPI +_XOfferConstructRating(WORD wRatingSystem, WORD wRating) +{ + return (WORD) ((wRatingSystem << 8) | wRating); +} + +XAMINLINE +DWORD +WINAPI +_XOfferPriceSizeMax() +{ + return sizeof(OFFER_PRICE) + + (XONLINE_XBOS_MAX_OFFER_PRICE_TEXT_LENGTH * sizeof(WCHAR)); +} + +XAMINLINE +DWORD +WINAPI +_XOfferBasicContentInfoSizeMax(DWORD dwNumPrices) +{ + return sizeof(BASIC_CONTENT_INFO) + + (XONLINE_XBOS_MAX_OFFER_NAME_LENGTH * sizeof(WCHAR)) + + (XONLINE_XBOS_MAX_TITLE_NAME_LENGTH * sizeof(WCHAR)) + + (XONLINE_XBOS_MAX_OFFER_SELL_TEXT_LENGTH * sizeof(WCHAR)) + + (dwNumPrices * _XOfferPriceSizeMax()); +} + +XAMINLINE +DWORD +WINAPI +_XOfferBasicSubscriptionInfoSizeMax(DWORD dwNumPrices) +{ + return sizeof(BASIC_SUBSCRIPTION_INFO) + + (XONLINE_XBOS_MAX_OFFER_NAME_LENGTH * sizeof(WCHAR)) + + (XONLINE_XBOS_MAX_TITLE_NAME_LENGTH * sizeof(WCHAR)) + + (XONLINE_XBOS_MAX_OFFER_SELL_TEXT_LENGTH * sizeof(WCHAR)) + + (dwNumPrices * _XOfferPriceSizeMax()); +} + +XAMINLINE +DWORD +WINAPI +_XOfferContentEnumerateResponseSize(DWORD dwMaxOffersReturned, DWORD dwNumPrices) +{ + return sizeof(CONTENT_ENUMERATE_RESPONSE) + + (dwMaxOffersReturned * _XOfferBasicContentInfoSizeMax(dwNumPrices)); +} + +XAMINLINE +DWORD +WINAPI +_XOfferSubscriptionEnumerateResponseSize(DWORD dwMaxOffersReturned, DWORD dwNumPrices) +{ + return sizeof(SUBSCRIPTION_ENUMERATE_RESPONSE) + + (dwMaxOffersReturned * _XOfferBasicSubscriptionInfoSizeMax(dwNumPrices)); +} + +XAMINLINE +DWORD +WINAPI +_XOfferContentDetailsResponseSize(DWORD dwNumPrices) +{ + return sizeof(CONTENT_DETAILS_RESPONSE) + _XOfferBasicContentInfoSizeMax(dwNumPrices); +} + +XAMINLINE +DWORD +WINAPI +_XOfferSubscriptionDetailsResponseSize(DWORD dwNumPrices) +{ + return sizeof(SUBSCRIPTION_DETAILS_RESPONSE) + _XOfferBasicSubscriptionInfoSizeMax(dwNumPrices); +} + +XAMINLINE +DWORD +WINAPI +_XOfferBasicTitleInfoResponseSize() +{ + return sizeof(BASIC_TITLE_INFO) + + (XONLINE_XBOS_MAX_TITLE_TITLE_LENGTH * sizeof(WCHAR)); +} + +XAMINLINE +DWORD +WINAPI +_XOfferEnumerateTitlesByFilterResponseSize(DWORD dwNumResults) +{ + return sizeof(ENUMERATE_TITLES_BY_FILTER_RESPONSE) + (dwNumResults * _XOfferBasicTitleInfoResponseSize()); +} + +XAMINLINE +DWORD +WINAPI +_XOfferGetTitleDetailsResponseSize() +{ + return sizeof(TITLE_DETAILS_RESPONSE) + + (XONLINE_XBOS_MAX_TITLE_TITLE_LENGTH * sizeof(WCHAR)) + + (XONLINE_XBOS_MAX_TITLE_SELL_TEXT_LENGTH * sizeof(WCHAR)) + + (XONLINE_XBOS_MAX_TITLE_DEVELOPER_LENGTH * sizeof(WCHAR)) + + (XONLINE_XBOS_MAX_TITLE_PUBLISHER_LENGTH * sizeof(WCHAR)) + + (XONLINE_XBOS_MAX_TITLE_GENRE_LENGTH * sizeof(WCHAR)); +} + +XAMINLINE +DWORD +WINAPI +_XOfferBasicGenreInfoResponseSize() +{ + return sizeof(BASIC_GENRE_INFO) + + (XONLINE_XBOS_MAX_GENRE_NAME_LENGTH * sizeof(WCHAR)); +} + +XAMINLINE +DWORD +WINAPI +_XBannerGetListResponseSize(int entries) +{ + const int cbEntrySizeMax = sizeof(BANNER_LIST_ENTRY) + + XONLINE_BANNER_MAX_PATH * sizeof(WCHAR); // wszPath + + return sizeof(BANNER_LIST_RESULT) + + entries * cbEntrySizeMax; // bannerList +} + +XAMINLINE +DWORD +WINAPI +_XBannerGetHotListResponseSize(int entries) +{ + const int cbEntrySizeMax = sizeof(BANNER_HOTLIST_ENTRY) + + XONLINE_BANNER_MAX_PATH * sizeof(WCHAR) // wszPath + + XONLINE_BANNER_MAX_TITLE_NAME * sizeof(WCHAR) // wszTitleName + + XONLINE_BANNER_MAX_OFFER_NAME * sizeof(WCHAR) // wszOfferName + + XONLINE_XBOS_MAX_OFFER_PRICE_TEXT_LENGTH * sizeof(WCHAR); // offerPrice.wszPriceText + + return sizeof(BANNER_HOTLIST_RESULT) + + entries * cbEntrySizeMax; // bannerList +} + +XAMINLINE +DWORD +WINAPI +_XAccountGetPointsBalanceResponseSize() +{ + return sizeof(GET_POINTS_BALANCE_RESPONSE); +} + +XAMINLINE +DWORD +WINAPI +_XOfferPurchaseGamertagResponseSize() +{ + return sizeof(OFFER_PURCHASE_GAMERTAG_RESPONSE) + (XONLINE_KEY_LENGTH * sizeof(BYTE)); +} + +XAMINLINE +DWORD +WINAPI +_XOfferEnumerateGenresResponseSize(DWORD dwNumResults) +{ + return sizeof(ENUMERATE_GENRES_RESPONSE) + (dwNumResults * _XOfferBasicGenreInfoResponseSize()); +} + +XAMINLINE +DWORD +WINAPI +_XAccountGetCreateLiveAccountResponseSize() +{ + return sizeof(CREATE_LIVE_ACCOUNT_RESPONSE); +} + +XAMINLINE +DWORD +WINAPI +_XAccountGetUserInfoResponseSize() +{ + return sizeof(GET_USER_INFO_RESPONSE) + + (MAX_FIRSTNAME_SIZE * sizeof(WCHAR)) + + (MAX_LASTNAME_SIZE * sizeof(WCHAR)) + + (MAX_EMAIL_SIZE * sizeof(WCHAR)) + + (MAX_STREET_SIZE * sizeof(WCHAR)) + // street1 + (MAX_STREET_SIZE * sizeof(WCHAR)) + // street2 + (MAX_CITY_SIZE * sizeof(WCHAR)) + + (MAX_DISTRICT_SIZE * sizeof(WCHAR)) + + (MAX_STATE_SIZE * sizeof(WCHAR)) + + (MAX_POSTALCODE_SIZE * sizeof(WCHAR)); +} + +XAMINLINE +DWORD +WINAPI +_XAccountRecoverAccountResponseSize() +{ + return sizeof(RECOVER_ACCOUNT_RESPONSE) + + (XONLINE_KEY_LENGTH * sizeof(BYTE)) + + (XONLINE_GAMERTAG_SIZE * sizeof(WCHAR)) + + (XONLINE_USERDOMAIN_SIZE * sizeof(WCHAR)) + + (XONLINE_REALM_NAME_SIZE * sizeof(WCHAR)); +} + +XAMINLINE +DWORD +WINAPI +_XAccountGetAddPaymentInstrumentResponseSize() +{ + return sizeof(ADD_PAYMENT_INSTRUMENT_RESPONSE) + + ((MAX_INSTANCE_ID_LENGTH) * sizeof(WCHAR)); +} + +XAMINLINE +DWORD +WINAPI +_XAccountGetPaymentInstrumentsResponseSize() +{ + return sizeof(GET_PAYMENT_INSTRUMENTS_RESPONSE) + + (XONLINE_XUACS_MAX_PAYMENT_INSTRUMENTS * + (sizeof(PAYMENT_INSTRUMENT_INFO) + + (MAX_INSTANCE_ID_LENGTH * sizeof(WCHAR)) + + // ADDRESS_INFO strings + (MAX_STREET_SIZE * sizeof(WCHAR)) + // street1 + (MAX_STREET_SIZE * sizeof(WCHAR)) + // street2 + (MAX_CITY_SIZE * sizeof(WCHAR)) + + (MAX_DISTRICT_SIZE * sizeof(WCHAR)) + + (MAX_STATE_SIZE * sizeof(WCHAR)) + + (MAX_POSTALCODE_SIZE * sizeof(WCHAR)) + + // PHONE_INFO strings + (MAX_PHONE_PREFIX_SIZE * sizeof(WCHAR)) + + (MAX_PHONE_NUMBER_SIZE * sizeof(WCHAR)) + + (MAX_PHONE_EXTENSION_SIZE * sizeof(WCHAR)) + + // CREDIT_CARD_INFO strings + (MAX_CC_NAME_SIZE * sizeof(WCHAR)) + + (MAX_CC_NUMBER_SIZE * sizeof(WCHAR)) + + (MAX_CC_CCV_NUMBER_SIZE * sizeof(WCHAR)) + + // DIRECT_DEBIT_INFO strings + (MAX_DD_NAME_SIZE * sizeof(WCHAR)) + + (MAX_DD_NUMBER_SIZE * sizeof(WCHAR)) + + (MAX_DD_BANK_CODE_SIZE * sizeof(WCHAR)) + + (MAX_DD_BRANCH_CODE_SIZE * sizeof(WCHAR)) + + (MAX_DD_CHECK_DIGITS_SIZE * sizeof(WCHAR)) + )); +} + +XAMINLINE +DWORD +WINAPI +_XAccountGetAccountInfoResponseSize() +{ + return sizeof(GET_ACCOUNT_INFO_RESPONSE) + + (MAX_FIRSTNAME_SIZE * sizeof(WCHAR)) + + (MAX_LASTNAME_SIZE * sizeof(WCHAR)) + + (MAX_EMAIL_SIZE * sizeof(WCHAR)) + + (MAX_STREET_SIZE * sizeof(WCHAR)) + // street1 + (MAX_STREET_SIZE * sizeof(WCHAR)) + // street2 + (MAX_CITY_SIZE * sizeof(WCHAR)) + + (MAX_DISTRICT_SIZE * sizeof(WCHAR)) + + (MAX_STATE_SIZE * sizeof(WCHAR)) + + (MAX_POSTALCODE_SIZE * sizeof(WCHAR)) + + (MAX_PHONE_PREFIX_SIZE * sizeof(WCHAR)) + + (MAX_PHONE_NUMBER_SIZE * sizeof(WCHAR)) + + (MAX_PHONE_EXTENSION_SIZE * sizeof(WCHAR)); +} + +XAMINLINE +DWORD +WINAPI +_XAccountGetAccountInfoFromPassportResponseSize() +{ + return sizeof(GET_ACCOUNT_INFO_RESPONSE) + + (MAX_FIRSTNAME_SIZE * sizeof(WCHAR)) + + (MAX_LASTNAME_SIZE * sizeof(WCHAR)) + + (MAX_EMAIL_SIZE * sizeof(WCHAR)) + + (MAX_STREET_SIZE * sizeof(WCHAR)) + // street1 + (MAX_STREET_SIZE * sizeof(WCHAR)) + // street2 + (MAX_CITY_SIZE * sizeof(WCHAR)) + + (MAX_DISTRICT_SIZE * sizeof(WCHAR)) + + (MAX_STATE_SIZE * sizeof(WCHAR)) + + (MAX_POSTALCODE_SIZE * sizeof(WCHAR)) + + (MAX_PHONE_PREFIX_SIZE * sizeof(WCHAR)) + + (MAX_PHONE_NUMBER_SIZE * sizeof(WCHAR)) + + (MAX_PHONE_EXTENSION_SIZE * sizeof(WCHAR)); +} + +XAMINLINE +DWORD +WINAPI +_XAccountGetPostalCodeResponseSize() +{ + return sizeof(GET_POSTAL_CODE_RESPONSE) + + (XONLINE_XUACS_MAX_POSTAL_CODE_MATCHES * + (sizeof(POSTAL_CODE_MATCH) + + (MAX_POSTALCODE_SIZE * sizeof(WCHAR)) + + (MAX_STATE_SIZE * sizeof(WCHAR)) + + (MAX_CITY_SIZE * sizeof(WCHAR)) + + (MAX_STREET_SIZE * sizeof(WCHAR)))); +} + +XAMINLINE +DWORD +WINAPI +_XAccountGetUserSubscriptionDetailsResponseSize() +{ + return sizeof(GET_USER_SUBSCRIPTION_DETAILS_RESPONSE) + + (MAX_INSTANCE_ID_LENGTH * sizeof(WCHAR)) + + (XONLINE_XUACS_MAX_SUBSCRIPTION_DESCRIPTION_LENGTH * sizeof(WCHAR)) + + (XONLINE_XUACS_MAX_SUBSCRIPTION_FRIENDLY_NAME_LENGTH * sizeof(WCHAR)) + + // GET_USER_SUBSCRIPTION_DETAILS_DATA strings + (XONLINE_XUACS_MAX_ISO_CODE_LENGTH * sizeof(WCHAR)) + + (XONLINE_XUACS_MAX_FORMATTED_PRICE_LENGTH * sizeof(WCHAR)) + + // GET_USER_SUBSCRIPTION_DETAILS_DATA strings + (XONLINE_XUACS_MAX_ISO_CODE_LENGTH * sizeof(WCHAR)) + + (XONLINE_XUACS_MAX_FORMATTED_PRICE_LENGTH * sizeof(WCHAR)) + + // PAYMENT_INSTRUMENT_INFO strings + (MAX_INSTANCE_ID_LENGTH * sizeof(WCHAR)) + + // ADDRESS_INFO strings + (MAX_STREET_SIZE * sizeof(WCHAR)) + // street1 + (MAX_STREET_SIZE * sizeof(WCHAR)) + // street2 + (MAX_CITY_SIZE * sizeof(WCHAR)) + + (MAX_DISTRICT_SIZE * sizeof(WCHAR)) + + (MAX_STATE_SIZE * sizeof(WCHAR)) + + (MAX_POSTALCODE_SIZE * sizeof(WCHAR)) + + // PHONE_INFO strings + (MAX_PHONE_PREFIX_SIZE * sizeof(WCHAR)) + + (MAX_PHONE_NUMBER_SIZE * sizeof(WCHAR)) + + (MAX_PHONE_EXTENSION_SIZE * sizeof(WCHAR)) + + // CREDIT_CARD_INFO strings + (MAX_CC_NAME_SIZE * sizeof(WCHAR)) + + (MAX_CC_NUMBER_SIZE * sizeof(WCHAR)) + + (MAX_CC_CCV_NUMBER_SIZE * sizeof(WCHAR)) + + // DIRECT_DEBIT_INFO strings + (MAX_DD_NAME_SIZE * sizeof(WCHAR)) + + (MAX_DD_NUMBER_SIZE * sizeof(WCHAR)) + + (MAX_DD_BANK_CODE_SIZE * sizeof(WCHAR)) + + (MAX_DD_BRANCH_CODE_SIZE * sizeof(WCHAR)) + + (MAX_DD_CHECK_DIGITS_SIZE * sizeof(WCHAR)); +} + +XAMINLINE +DWORD +WINAPI +_XAccountGetVerifyBillingTokenResponseSize() +{ + return sizeof(VERIFY_BILLING_TOKEN_RESPONSE); +} + +XAMINLINE +DWORD +WINAPI +_XAccountGetMigrateXbox1UserResponseSize() +{ + return sizeof(MIGRATE_XBOX1_USER_RESPONSE) + + (MAX_GAMERTAG_SIZE * sizeof(WCHAR)) + + (XONLINE_USERDOMAIN_SIZE * sizeof(WCHAR)) + + (XONLINE_REALM_NAME_SIZE * sizeof(WCHAR)); +} + +XAMINLINE +DWORD +WINAPI +_XAccountGetMigrateXboxComUserResponseSize() +{ + return sizeof(MIGRATE_XBOX_COM_USER_RESPONSE) + + (MAX_GAMERTAG_SIZE * sizeof(WCHAR)) + + (XONLINE_USERDOMAIN_SIZE * sizeof(WCHAR)) + + (XONLINE_REALM_NAME_SIZE * sizeof(WCHAR)); +} + +XAMINLINE +DWORD +WINAPI +_XAccountReserveGamertagResponseSize(DWORD dwNumResults) +{ + return sizeof(ACCOUNT_RESERVE_GAMERTAG_RESPONSE) + + (dwNumResults * (sizeof(ACCOUNT_SUGGESTED_GAMERTAG) + + ((MAX_GAMERTAG_SIZE+1) * sizeof(WCHAR)))); +} + +XAMINLINE +DWORD +WINAPI +_XAccountVerifyBillingInfoResponseSize() +{ + return sizeof(ACCOUNT_VERIFY_BILLING_INFO_RESPONSE) + + (MAX_FIRSTNAME_SIZE * sizeof(WCHAR)) + + (MAX_LASTNAME_SIZE * sizeof(WCHAR)) + + (MAX_EMAIL_SIZE * sizeof(WCHAR)) + + (MAX_STREET_SIZE * sizeof(WCHAR)) + // street1 + (MAX_STREET_SIZE * sizeof(WCHAR)) + // street2 + (MAX_CITY_SIZE * sizeof(WCHAR)) + + (MAX_DISTRICT_SIZE * sizeof(WCHAR)) + + (MAX_STATE_SIZE * sizeof(WCHAR)) + + (MAX_POSTALCODE_SIZE * sizeof(WCHAR)) + + (MAX_PHONE_PREFIX_SIZE * sizeof(WCHAR)) + + (MAX_PHONE_NUMBER_SIZE * sizeof(WCHAR)) + + (MAX_PHONE_EXTENSION_SIZE * sizeof(WCHAR)); +} + +XAMINLINE +DWORD +WINAPI +_XPassportGetEncryptedProxyParametersResponseSize() +{ + return sizeof(PASSPORT_ENCRYPTED_PROXY_PARAMETERS) + + (XONLINE_PASSPORT_LOGIN_TOKEN_REQUEST_MAX_LEN * sizeof(BYTE)) + + (XONLINE_PASSPORT_PUBLIC_KEY_MODULUS_MAX_LEN * sizeof(BYTE)); +} + +XAMINLINE +DWORD +WINAPI +_XPassportGetSecretQuestionsResponseSize() +{ + return sizeof(PASSPORT_GET_SECRET_QUESTION_RESPONSE) + + (XONLINE_PASSPORT_SECRET_QUESTION_MAX_COUNT * + (sizeof(PASSPORT_SECRET_QUESTION) + + (XONLINE_PASSPORT_SECRET_QUESTION_MAX_LEN+1) * sizeof(WCHAR)) + ); +} + +XAMINLINE +DWORD +WINAPI +_XPassportGetUserDataResponseSize() +{ + return sizeof(PASSPORT_GET_USER_DATA_RESPONSE) + + ((MAX_FIRSTNAME_SIZE+1) * sizeof(WCHAR)) + + ((MAX_LASTNAME_SIZE+1) * sizeof(WCHAR)) + + ((MAX_STREET_SIZE+1) * sizeof(WCHAR)) + + ((MAX_STREET_SIZE+1) * sizeof(WCHAR)) + + ((MAX_CITY_SIZE+1) * sizeof(WCHAR)) + + ((MAX_DISTRICT_SIZE+1) * sizeof(WCHAR)) + + ((MAX_STATE_SIZE+1) * sizeof(WCHAR)) + + ((MAX_POSTALCODE_SIZE+1) * sizeof(WCHAR)) + + ((MAX_PHONE_PREFIX_SIZE+1) * sizeof(WCHAR)) + + ((MAX_PHONE_NUMBER_SIZE+1) * sizeof(WCHAR)) + + ((MAX_PHONE_EXTENSION_SIZE+1) * sizeof(WCHAR)); +} + +XAMINLINE +DWORD +WINAPI +_XPassportGetMemberNameResponseSize() +{ + return sizeof(PASSPORT_GET_MEMBER_NAME_RESPONSE) + + ((XONLINE_PASSPORT_MEMBER_NAME_MAX_LEN+1) * sizeof(CHAR)) + + ((XONLINE_PASSPORT_MEMBER_NAME_MAX_LEN+1) * sizeof(CHAR)); +} + +XBOXAPI +DWORD +WINAPI +_XPassportCreate( + IN PASSPORT_ENCRYPTED_PROXY_PARAMETERS* pProxyParameters, + IN CHAR *szPassportMemberName, + IN CHAR *szPassword, + IN WCHAR *szSecretQuestion, + IN WCHAR *szSecretAnswer, + IN DWORD cbSessionToken, + OUT PASSPORT_SESSION_TOKEN *pSessionToken, + IN OPTIONAL XOVERLAPPED *pXOverlapped); + +XBOXAPI +DWORD +WINAPI +_XPassportChangePassword( + IN PASSPORT_ENCRYPTED_PROXY_PARAMETERS* pProxyParameters, + IN PASSPORT_SESSION_TOKEN* pSessionToken, + IN CHAR *szPassportMemberName, + IN CHAR *szOldPassword, + IN CHAR *szPassword, + IN WCHAR *szSecretQuestion, + IN WCHAR *szSecretAnswer, + IN OPTIONAL XOVERLAPPED *pXOverlapped); + +XBOXAPI +DWORD +WINAPI +_XPassportLogin( + IN PASSPORT_ENCRYPTED_PROXY_PARAMETERS* pProxyParameters, + IN CHAR* szPassportMemberName, + IN CHAR* szPassword, + OUT PASSPORT_SESSION_TOKEN *pSessionToken, + IN OPTIONAL XOVERLAPPED *pXOverlapped); + +#define XONLINE_LOGON_FLAG_TICKETS_ONLY 0x00000001 +#define XONLINE_LOGON_FLAG_UPDATE_SERVICE_ONLY 0x00000002 + +XBOXAPI +DWORD +XOnlineLogon( + IN const XNET_LOGON_USER *rgLogonUsers, + IN DWORD dwFlags, + OUT XOVERLAPPED *pXOverlapped OPTIONAL + ); + +XBOXAPI +DWORD +XOnlineLogoff( + OUT XOVERLAPPED *pXOverlapped OPTIONAL + ); + +XAMINLINE +HRESULT +WINAPI +XOnlineGetLogonHR( + VOID + ) +{ + return XMsgInProcessCall(HXAMAPP_XLIVEBASE, XM_LIVEBASE_LOGONGETHR, + (UINT_PTR)NULL, (UINT_PTR)NULL); +} + +XAMINLINE +HRESULT +WINAPI +XOnlineGetLogonUsers(PXNET_LOGON_USER pUsers) +{ + return XMsgInProcessCall(HXAMAPP_XLIVEBASE, XM_LIVEBASE_LOGONGETUSERS, (UINT_PTR)pUsers, (UINT_PTR)NULL); +} + + +XAMINLINE +DWORD +WINAPI +XOnlineGetLogonID( + VOID + ) +{ + DWORD dwID; + if (FAILED(XMsgInProcessCall(HXAMAPP_XLIVEBASE, XM_LIVEBASE_LOGONGETID, (UINT_PTR)&dwID, (UINT_PTR)NULL))) + { + dwID = 0; + } + return dwID; +} + +XBOXAPI +DWORD +WINAPI +XStorageDownloadToDirectoryGetProgress( + IN XOVERLAPPED *pXOverlapped, + OUT OPTIONAL DWORD *pdwPercentComplete, + OUT OPTIONAL ULONGLONG *pqwNumerator, + OUT OPTIONAL ULONGLONG *pqwDenominator + ); + +XBOXAPI +DWORD +WINAPI +XStorageUploadFromDirectoryGetProgress( + IN XOVERLAPPED *pXOverlapped, + OUT OPTIONAL DWORD *pdwPercentComplete, + OUT OPTIONAL ULONGLONG *pqwNumerator, + OUT OPTIONAL ULONGLONG *pqwDenominator + ); + + +XBOXAPI +DWORD +WINAPI +XMessageSendGetProgress( + IN XOVERLAPPED *pXOverlapped, + OUT OPTIONAL DWORD *pdwPercentComplete, + OUT OPTIONAL ULONGLONG *pqwNumerator, + OUT OPTIONAL ULONGLONG *pqwDenominator + ); + +XBOXAPI +DWORD +WINAPI +XMessageDownloadAttachmentToMemoryGetProgress( + IN XOVERLAPPED *pXOverlapped, + OUT OPTIONAL DWORD *pdwPercentComplete, + OUT OPTIONAL ULONGLONG *pqwNumerator, + OUT OPTIONAL ULONGLONG *pqwDenominator + ); + +XBOXAPI +DWORD +WINAPI +XContentDownloadGetProgress( + IN XOVERLAPPED *pXOverlapped, + OUT OPTIONAL DWORD *pdwPercentComplete, + OUT OPTIONAL ULONGLONG *pqwNumerator, + OUT OPTIONAL ULONGLONG *pqwDenominator + ); + +XBOXAPI +DWORD +WINAPI +XUpdateDownloadGetProgress( + IN XOVERLAPPED *pXOverlapped, + OUT OPTIONAL DWORD *pdwPercentComplete, + OUT OPTIONAL ULONGLONG *pqwNumerator, + OUT OPTIONAL ULONGLONG *pqwDenominator + ); + +// +// Generic online task progress monitoring +// +XBOXAPI +DWORD +WINAPI +XOnlineGetTaskProgress( + IN XOVERLAPPED *pXOverlapped, + OUT OPTIONAL DWORD *pdwPercentComplete, + OUT OPTIONAL ULONGLONG *pqwNumerator, + OUT OPTIONAL ULONGLONG *pqwDenominator + ); + + +// +// Throttle setting access (debug only) +// + +XBOXAPI +DWORD +WINAPI +XOnlineGetRequestThrottleSettings( + IN DWORD dwOrdinal, + OUT XONLINE_REQUEST_THROTTLE_SETTINGS *pRequestThrottleSettings + ); + +XBOXAPI +DWORD +WINAPI +XOnlineSetRequestThrottleSettings( + IN DWORD dwOrdinal, + IN const XONLINE_REQUEST_THROTTLE_SETTINGS *pRequestThrottleSettings + ); + + +// +// Privileges +// + +XAMINLINE +BOOL +WINAPI +XOnlineCheckUserPrivilege( + IN XUID xuidUser, + IN DWORD dwPrivilege + ) +{ + XUSER_PRIVILEGE_MSG Msg; + + ZeroMemory(&Msg, sizeof(XUSER_PRIVILEGE_MSG)); + Msg.xuidUser = xuidUser; + Msg.dwPrivilege = dwPrivilege; + + if (FAILED(XMsgInProcessCall(HXAMAPP_XLIVEBASE, XM_LIVEBASE_LOGONCHECKUSERPRIVILEGE, + (UINT_PTR)&Msg, (UINT_PTR)NULL) )) + { + Msg.fResult = FALSE; + } + + return Msg.fResult; +} + + +XAMINLINE +BOOL +WINAPI +XOnlineAreUsersFriends( + IN XUID xuidUser, + IN PXUID pXuids, + IN DWORD dwXuidCount, + IN OUT PXOVERLAPPED pOverlapped OPTIONAL + ) +{ + XUSER_PRIVILEGE_MSG Msg; + + ZeroMemory(&Msg, sizeof(XUSER_PRIVILEGE_MSG)); + Msg.xuidUser = xuidUser; + Msg.pXuids = pXuids; + Msg.dwXuidCount = dwXuidCount; + Msg.pOverlapped = pOverlapped; + + if (FAILED(XMsgInProcessCall(HXAMAPP_XLIVEBASE, XM_LIVEBASE_AREUSERSFRIENDS, + (UINT_PTR)&Msg, (UINT_PTR)NULL) )) + { + Msg.fResult = FALSE; + } + + return Msg.fResult; +} + + +// +// UACS helper functions +// + +BOOL +WINAPI +XOnlinepGetPrivilegeBit( + DWORD *rgPrivileges, + DWORD dwPrivilegeBit + ); + +void +WINAPI +XOnlinepSetPrivilegeBit( + DWORD *rgPrivileges, + DWORD dwPrivilegeBit, + BOOL bValue + ); + +XBOXAPI +DWORD +WINAPI +XContentDownload( + IN DWORD dwUserIndex, + IN const BYTE *pbContentId, + IN const CHAR *szTargetDirectory, + IN DWORD dwFlags, + IN PBYTE pbWorkspaceToUse, + IN OUT DWORD * pcbWorkspaceToUse, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XContentDownloadGetInProgressMetadata( + IN DWORD dwUserIndex, + IN const BYTE *pbContentId, + IN const CHAR *szTargetDirectory, + OUT BYTE *pContentHeader, + OUT BYTE *pContentMetaData, + OUT BYTE *pbOtherMetaData, + OUT DWORD *pdwOtherMetaDataSize + ); + +XBOXAPI +HRESULT +WINAPI +XContentGetReferral_GetContextSize( + OUT DWORD *pcbContextSize, + OUT DWORD *pcbRequestWireBuffer, + OUT DWORD *pcbResponseWireBuffer + ); + +XBOXAPI +HRESULT +WINAPI +XContentGetReferral_Setup( + IN ULONGLONG qwUserId, + IN const BYTE *abContentId, + IN DWORD cbResults, + OUT XCONTENT_REFERRAL_RESPONSE *pResults, + IN PVOID pvParentTask, + IN PBYTE pbSubTask, + IN DWORD cbSubTask, + IN PBYTE pbRequestWireBuffer, + IN DWORD cbRequestWireBuffer, + IN PBYTE pbResponseWireBuffer, + IN DWORD cbResponseWireBuffer + ); + +XBOXAPI +DWORD +WINAPI +XContentRefreshLicense( + IN ULONGLONG qwUserId, + IN WORD wContentHeaderLength, + IN const BYTE *pbContentHeader, + IN DWORD cbResults, + OUT XCONTENT_REFRESH_LICENSE_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +HRESULT +WINAPI +XContentRefreshLicenseSubTask_GetContextSize( + OUT DWORD *pcbContextSize, + OUT DWORD *pcbRequestWireBuffer, + OUT DWORD *pcbResponseWireBuffer + ); + +XBOXAPI +HRESULT +WINAPI +XContentRefreshLicenseSubTask_Setup( + IN ULONGLONG qwUserId, + IN WORD wContentHeaderLength, + IN const BYTE *pbContentHeader, + IN DWORD cbResults, + OUT XCONTENT_REFRESH_LICENSE_RESPONSE *pResults, + IN PVOID pvParentTask, + IN PBYTE pbSubTask, + IN DWORD cbSubTask, + IN PBYTE pbRequestWireBuffer, + IN DWORD cbRequestWireBuffer, + IN PBYTE pbResponseWireBuffer, + IN DWORD cbResponseWireBuffer + ); + +XBOXAPI +HRESULT +WINAPI +XFriendsRequestWorker_GetContextSize( + OUT DWORD *pcbContextSize, + OUT DWORD *pcbRequestWireBuffer, + OUT DWORD *pcbResponseWireBuffer + ); + +XBOXAPI +HRESULT +WINAPI +XFriendsRequestWorker_Setup( + IN ULONGLONG qwSenderID, + IN ULONGLONG qwBuddyID, + IN DWORD dwMessageFlags, + IN WORD cbDetails, + IN DWORD dwBuddyAcctNameSize, + IN const CHAR *szBuddyAcctName, + IN const XMSG_DETAILS *pDetails, + IN PVOID pvParentTask, + IN PBYTE pbSubTask, + IN DWORD cbSubTask, + IN PBYTE pbRequestWireBuffer, + IN DWORD cbRequestWireBuffer, + IN PBYTE pbResponseWireBuffer, + IN DWORD cbResponseWireBuffer + ); + +XBOXAPI +DWORD +WINAPI +XInviteAnswer( + IN XUID XuidUser, + IN const XMSG_GAMEINVITE_ANSWER_INFO *pAnswerInfo, + IN XMSG_INVITE_ANSWER_TYPE Answer, + IN BOOL fFromGameInvite, + OUT XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XInviteRevoke( + IN XUID XuidUser, + IN WORD cInvitees, + IN const XUID *pXuidInvitees, + IN XNKID SessionID, + OUT XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XInviteSendMessage( + IN DWORD dwUserIndex, + IN DWORD dwNumInvitees, + IN const XUID *pXuidInvitees, + IN const WCHAR *pszText, + IN XMSG_HANDLE hMsg, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XLookupTitleName( + IN DWORD dwType, + IN DWORD dwNumTitles, + IN const DWORD *pTitleIDs, + IN DWORD dwLanguage, + IN DWORD cbResults, + OUT STRING_LOOKUP_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XMessageCreate( + IN DWORD dwMsgType, + IN DWORD cProperties, + IN ULONGLONG qwMessageContext, + IN DWORD dwMessageFlags, + IN DWORD dwExpireMinutes, + OUT XMSG_HANDLE *phMsg + ); + +XBOXAPI +DWORD +WINAPI +XMessageDelete( + IN XUID XuidUser, + IN DWORD dwMessageID, + IN BOOL fBlockSender, + OUT XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XMessageDeleteWorker( + IN XUID qwUserID, + IN DWORD dwMessageID, + IN DWORD dwFlags, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XMessageDestroy( + IN XMSG_HANDLE hMsg + ); + +XBOXAPI +DWORD +WINAPI +XMessageDetailsGetProperty( + IN const XMSG_DETAILS_BLOB *pDetails, + IN WORD wPropTag, + IN DWORD cbPropValueBuffer, + OUT BYTE *pbPropValue, + OUT DWORD *pcbPropValue, + OUT DWORD *pdwAttachmentFlags + ); + +XBOXAPI +DWORD +WINAPI +XMessageDetailsGetSummary( + IN const XMSG_DETAILS_BLOB *pDetails, + OUT XMSG_SUMMARY *pMsgSummary, + OUT DWORD *pcProperties, + OUT ULONGLONG *pqwAttachmentsSize + ); + +XBOXAPI +DWORD +WINAPI +XMessageDownloadAttachmentToMemory( + IN XUID XuidUser, + IN const XMSG_DETAILS_BLOB *pDetailsBlob, + IN DWORD dwPropTag, + IN DWORD dwBufferSize, + IN const BYTE *pbBuffer, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XMessageEnumerate( + IN XUID XuidUser, + OUT DWORD *pcMsgSummaries, + OUT XMSG_SUMMARY *pMsgSummaries + ); + +XBOXAPI +DWORD +WINAPI +XMessageEnumerateWorker( + IN ULONGLONG qwUserID, + IN DWORD cbResults, + OUT XMSG_ENUM_RESULTS *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XMessageGetDetails( + IN XUID XuidUser, + IN DWORD dwMessageID, + IN DWORD dwFlagsToSet, + IN DWORD dwFlagsToClear, + IN DWORD cbResults, + OUT XMSG_DETAILS_BLOB *pResults, + OUT XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XMessageGetDetailsWorker( + IN XUID qwUserID, + IN DWORD dwMessageID, + IN DWORD dwFlagsToSet, + IN DWORD dwFlagsToClear, + IN DWORD cbResults, + OUT XMSG_DETAILS_BLOB *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XMessageGetProperty( + IN XMSG_HANDLE hMsg, + IN WORD wPropTag, + IN DWORD dwPropValueBufferSize, + OUT BYTE *pbPropValue, + OUT DWORD *pcbPropValue, + OUT DWORD *pdwAttachmentFlags + ); + +XBOXAPI +DWORD +WINAPI +XMessageGetSummary( + IN XUID XuidUser, + IN DWORD dwMessageID, + OUT XMSG_SUMMARY *pMsgSummary + ); + +XBOXAPI +DWORD +WINAPI +XMessageGetSummaryWorker( + IN ULONGLONG qwUserID, + IN DWORD dwMessageID, + IN DWORD cbResults, + OUT Q_MESSAGE_SUMMARY_REPLY_MSG *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XMessageInviteAnswerWorker( + IN DWORD dwMsgLen, + IN ULONGLONG qwUserID, + IN ULONGLONG qwHostID, + IN XNKID MatchSessionID, + IN WORD wAnswer, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XMessageInviteRevokeWorker( + IN DWORD dwMsgLen, + IN ULONGLONG qwUserID, + IN XNKID SessionID, + IN WORD cInvitees, + IN const ULONGLONG *pqwInviteeIDs, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +HRESULT +WINAPI +XMessageInviteSendWorker_GetContextSize( + OUT DWORD *pcbContextSize, + OUT DWORD *pcbRequestWireBuffer, + OUT DWORD *pcbResponseWireBuffer + ); + +XBOXAPI +HRESULT +WINAPI +XMessageInviteSendWorker_Setup( + IN DWORD dwMsgLen, + IN ULONGLONG qwUserID, + IN ULONGLONG qwSenderContext, + IN DWORD dwMessageFlags, + IN WORD cInvitees, + IN WORD cbDetails, + IN const ULONGLONG *pqwInviteeIDs, + IN const XMSG_DETAILS *pDetails, + IN PVOID pvParentTask, + IN PBYTE pbSubTask, + IN DWORD cbSubTask, + IN PBYTE pbRequestWireBuffer, + IN DWORD cbRequestWireBuffer, + IN PBYTE pbResponseWireBuffer, + IN DWORD cbResponseWireBuffer + ); + +XBOXAPI +DWORD +WINAPI +XMessageRevoke( + IN XUID qwUserID, + IN WORD cRecipients, + IN const XMSG_SEND_RECIPIENT_RESULT *pRecipients, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XMessageSend( + IN XUID XuidSender, + IN XMSG_HANDLE hMsg, + IN DWORD cRecipients, + IN const XUID *pXuidRecipients, + IN DWORD cbResults, + OUT XMSG_SEND_RESULT *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +HRESULT +WINAPI +XMessageSendWorker_GetContextSize( + OUT DWORD *pcbContextSize, + OUT DWORD *pcbRequestWireBuffer, + OUT DWORD *pcbResponseWireBuffer + ); + +XBOXAPI +HRESULT +WINAPI +XMessageSendWorker_Setup( + IN DWORD dwMsgLen, + IN ULONGLONG qwUserID, + IN ULONGLONG qwSenderContext, + IN DWORD dwMessageFlags, + IN WORD wExpireMinutes, + IN WORD cbDetails, + IN WORD cRecipients, + IN BYTE bMessageType, + IN const CHAR *szSenderName, + IN const ULONGLONG *qwRecipientIDs, + IN const XMSG_DETAILS *pDetails, + IN DWORD cbResults, + OUT XMSG_SEND_RESULT *pResults, + IN PVOID pvParentTask, + IN PBYTE pbSubTask, + IN DWORD cbSubTask, + IN PBYTE pbRequestWireBuffer, + IN DWORD cbRequestWireBuffer, + IN PBYTE pbResponseWireBuffer, + IN DWORD cbResponseWireBuffer + ); + +XBOXAPI +DWORD +WINAPI +XMessageSetFlags( + IN XUID XuidUser, + IN DWORD dwMessageID, + IN DWORD dwFlagsToSet, + IN DWORD dwFlagsToClear, + OUT XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XMessageSetFlagsWorker( + IN XUID qwUserID, + IN DWORD dwMessageID, + IN DWORD dwSetFlags, + IN DWORD dwUnsetFlags, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XMessageSetProperty( + IN XMSG_HANDLE hMsg, + IN WORD wPropTag, + IN DWORD dwPropValueSize, + IN const BYTE *pbPropValue, + IN DWORD dwAttachmentFlags + ); + +XBOXAPI +DWORD +WINAPI +XOnlineMatchCreate( + IN DWORD dwPublicFilled, + IN DWORD dwPublicOpen, + IN DWORD dwPrivateFilled, + IN DWORD dwPrivateOpen, + IN DWORD dwNumAttributes, + IN const XONLINE_ATTRIBUTE *pAttributes, + IN DWORD cbMinRequest, + IN DWORD cbResults, + OUT XONLINE_MATCH_SESSION_INFO *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlineMatchDelete( + IN XNKID SessionID, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlineMatchRegisterSession( + IN XUID UserXuid, + IN XNKID sessionID + ); + +XBOXAPI +DWORD +WINAPI +XOnlineMatchSearch( + IN DWORD dwProcedureIndex, + IN DWORD dwNumResults, + IN DWORD dwNumAttributes, + IN const XONLINE_ATTRIBUTE *pAttributes, + IN DWORD cbMinRequest, + IN WORD wNumUsers, + IN DWORD cbResults, + OUT XONLINE_MATCH_SEARCHRESULT_HEADER *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlineMatchUpdate( + IN XNKID SessionID, + IN DWORD dwPublicFilled, + IN DWORD dwPublicOpen, + IN DWORD dwPrivateFilled, + IN DWORD dwPrivateOpen, + IN DWORD dwNumAttributes, + IN const XONLINE_ATTRIBUTE *pAttributes, + IN DWORD cbMinRequest, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlineQueryAdd( + IN XUID qwUserId, + IN ULONGLONG qwTeamId, + IN DWORD dwDatasetId, + IN DWORD dwNumAttributes, + IN const XONLINE_QUERY_ATTRIBUTE *pAttributes, + IN DWORD cbResults, + OUT QUERY_ADD_RESULT *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlineQueryFindFromIds( + IN DWORD dwDatasetId, + IN DWORD dwProcIndex, + IN DWORD dwNumResultSpecs, + IN const XONLINE_QUERY_ATTRIBUTE_SPEC *pSpecs, + IN DWORD dwNumIds, + IN const ULONGLONG *pqwEntityIds, + IN DWORD cbResults, + OUT QUERY_FINDFROMIDS_RESULT *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlineQueryRemove( + IN XUID qwUserId, + IN ULONGLONG qwTeamId, + IN DWORD dwDatasetId, + IN DWORD dwProcIndex, + IN DWORD dwNumAttributes, + IN const XONLINE_QUERY_ATTRIBUTE *pAttributes, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlineQueryRemoveId( + IN XUID qwUserId, + IN ULONGLONG qwTeamId, + IN DWORD dwDatasetId, + IN ULONGLONG qwEntityId, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlineQuerySearch( + IN DWORD dwDatasetId, + IN DWORD dwProcIndex, + IN DWORD dwPage, + IN DWORD dwResultsPerPage, + IN DWORD dwNumResultSpecs, + IN const XONLINE_QUERY_ATTRIBUTE_SPEC *pSpecs, + IN DWORD dwNumAttributes, + IN const XONLINE_QUERY_ATTRIBUTE *pAttributes, + IN DWORD cbResults, + OUT QUERY_SEARCH_RESULT *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlineQuerySelect( + IN XUID qwUserId, + IN ULONGLONG qwTeamId, + IN DWORD dwDatasetId, + IN ULONGLONG qwEntityId, + IN DWORD dwActionId, + IN DWORD dwNumAttributes, + IN const XONLINE_QUERY_ATTRIBUTE *pAttributes, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlineQueryUpdate( + IN XUID qwUserId, + IN ULONGLONG qwTeamId, + IN DWORD dwDatasetId, + IN DWORD dwProcIndex, + IN DWORD dwNumAttributes, + IN const XONLINE_QUERY_ATTRIBUTE *pAttributes, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlineQueryUpdateId( + IN XUID qwUserId, + IN ULONGLONG qwTeamId, + IN DWORD dwDatasetId, + IN DWORD dwProcIndex, + IN ULONGLONG qwEntityId, + IN DWORD dwNumAttributes, + IN const XONLINE_QUERY_ATTRIBUTE *pAttributes, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlineTeamCreate( + IN XUID qwUserID, + IN const WCHAR *wszTeamName, + IN const WCHAR *wszTeamDescription, + IN const WCHAR *wszTeamMotto, + IN const WCHAR *wszTeamURL, + IN WORD cbTeamData, + IN const BYTE *pbTeamData, + IN WORD cbCreatorData, + IN const BYTE *pbCreatorData, + IN DWORD cbResults, + OUT TEAM_CREATE_RESULTS *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlineTeamDelete( + IN XUID qwUserID, + IN ULONGLONG qwTeamID, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlineTeamEnumerate( + IN XUID qwUserID, + IN DWORD dwTeamCount, + IN const ULONGLONG *rgqwTeamIDs, + IN DWORD cbResults, + OUT TEAM_ENUM_RESULTS *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlineTeamEnumerateByUserXUID( + IN XUID qwUserID, + IN DWORD cbResults, + OUT TEAM_ENUM_BY_XUID_RESULTS *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlineTeamJoin( + IN XUID qwUserID, + IN ULONGLONG qwTeamID, + IN BYTE bAnswer, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlineTeamMemberRecruit( + IN XUID qwUserID, + IN ULONGLONG qwTeamID, + IN XUID qwMemberID, + IN DWORD dwMemberPriv, + IN WORD cbMemberData, + IN const BYTE *pbMemberData, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlineTeamMemberRecruitByName( + IN XUID qwUserID, + IN ULONGLONG qwTeamID, + IN const CHAR *szMemberName, + IN DWORD dwMemberPriv, + IN WORD cbMemberData, + IN const BYTE *pbMemberData, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlineTeamMemberRemove( + IN XUID qwUserID, + IN ULONGLONG qwTeamID, + IN XUID qwMemberID, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlineTeamMemberSetProperties( + IN XUID qwUserID, + IN ULONGLONG qwTeamID, + IN XUID qwMemberID, + IN DWORD dwMemberPriv, + IN WORD cbMemberData, + IN const BYTE *pbMemberData, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlineTeamMembersEnumerate( + IN XUID qwUserID, + IN ULONGLONG qwTeamID, + IN BOOL fShowRecruits, + IN DWORD cbResults, + OUT TEAM_MEM_ENUM_RESULTS *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlineTeamSetProperties( + IN XUID qwUserID, + IN ULONGLONG qwTeamID, + IN const WCHAR *wszTeamName, + IN const WCHAR *wszTeamDescription, + IN const WCHAR *wszTeamMotto, + IN const WCHAR *wszTeamURL, + IN WORD cbTeamData, + IN const BYTE *pbTeamData, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlinepFriendsAcceptRequest( + IN XUID qwSenderID, + IN XUID qwBuddyID, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlinepFriendsRejectRequest( + IN XUID qwSenderID, + IN XUID qwBuddyID, + IN BOOL Block, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlinepFriendsRemove( + IN XUID qwSenderID, + IN XUID qwBuddyID, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlinepFriendsRequest( + IN XUID XuidFromUser, + IN XUID qwBuddyID, + IN XMSG_HANDLE hMsg, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlinepFriendsRequestByName( + IN XUID XuidFromUser, + IN const CHAR *szUserName, + IN XMSG_HANDLE hMsg, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlinepMuteListAdd( + IN XUID qwUserID, + IN XUID qwBlockID, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlinepMuteListRemove( + IN XUID qwUserID, + IN XUID qwBlockID, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlinepNotificationSendDequeue( + IN const Q_DEQUEUE_MSG *pDequeueMsg, + IN DWORD cbResults, + OUT Q_LIST_REPLY_MSG *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlinepPeerSubscribe( + IN XUID qwUserID, + IN WORD cSrcUserIDs, + IN const ULONGLONG *rgqwSrcUserIDs, + IN DWORD cbResults, + OUT P_PEER_SUBSCRIBE_REPLY_MSG *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlinepPeerUnsubscribe( + IN XUID qwUserID, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XOnlinepSetUserSettings2( + IN XUID qwUserId, + IN WORD bTier, + IN WORD dwUserFlags, + IN const DWORD *rgPrivileges, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XPresenceGetLocalSession( + IN DWORD cbResults, + OUT GET_SESSION_RESULTS *pResults + ); + +XBOXAPI +DWORD +WINAPI +XPresenceGetPeerSession( + IN XUID qwUserID, + IN XUID qwHostUserID, + IN DWORD cbResults, + OUT GET_SESSION_RESULTS *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XPresenceGetState( + IN XUID UserXuid, + OUT DWORD *pdwStateFlags, + OUT XNKID *pSessionID + ); + +XBOXAPI +DWORD +WINAPI +XPresenceSendAlives( + IN DWORD cAlivesToSend, + IN const P_ALIVE_2_MSG *pAlives, + IN DWORD cbResults, + OUT XPRESENCE_ALIVE_REPLY *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XPresenceSendDeadUsers( + IN DWORD cDeadUsersToSend, + IN const P_DEAD_USER_MSG *pDeadUsers, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XPresenceSetState( + IN XUID UserXuid, + IN DWORD dwStateFlags, + IN XNKID sessionID, + IN DWORD cbState, + IN const BYTE *pbState + ); + +XBOXAPI +DWORD +WINAPI +XPresenceUpdateStateFlags( + IN XUID UserXuid, + IN DWORD dwStateFlagsSet, + IN DWORD dwStateFlagsClear + ); + +XBOXAPI +HRESULT +WINAPI +XResolveName_GetContextSize( + OUT DWORD *pcbContextSize, + OUT DWORD *pcbRequestWireBuffer, + OUT DWORD *pcbResponseWireBuffer + ); + +XBOXAPI +HRESULT +WINAPI +XResolveName_Setup( + IN const XRESOLVE_DOMAIN_STRING *pResolveString, + IN DWORD cbResults, + OUT XRESOLVE_NAME_RESPONSE *pResults, + IN PVOID pvParentTask, + IN PBYTE pbSubTask, + IN DWORD cbSubTask, + IN PBYTE pbRequestWireBuffer, + IN DWORD cbRequestWireBuffer, + IN PBYTE pbResponseWireBuffer, + IN DWORD cbResponseWireBuffer + ); + +XBOXAPI +DWORD +WINAPI +XSignatureCheckRevocation( + IN DWORD dwNumContentTuples, + IN const XSIGNATURE_CONTENT_TUPLE *pTuples, + IN DWORD cbResults, + OUT XSIGNATURE_CHECK_REVOCATION_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +HRESULT +WINAPI +XSignatureVerify_GetContextSize( + OUT DWORD *pcbContextSize, + OUT DWORD *pcbRequestWireBuffer, + OUT DWORD *pcbResponseWireBuffer + ); + +XBOXAPI +HRESULT +WINAPI +XSignatureVerify_Setup( + IN DWORD dwNumSignaturesToVerify, + IN const XSIGNATURE_TO_VERIFY *pSignaturesToVerify, + IN DWORD cbResults, + OUT XSIGNATURE_VERIFY_RESPONSE *pResults, + IN PVOID pvParentTask, + IN PBYTE pbSubTask, + IN DWORD cbSubTask, + IN PBYTE pbRequestWireBuffer, + IN DWORD cbRequestWireBuffer, + IN PBYTE pbResponseWireBuffer, + IN DWORD cbResponseWireBuffer + ); + +XBOXAPI +HRESULT +WINAPI +XStorageDeleteWorker_GetContextSize( + OUT DWORD *pcbContextSize, + OUT DWORD *pcbRequestWireBuffer, + OUT DWORD *pcbResponseWireBuffer + ); + +XBOXAPI +HRESULT +WINAPI +XStorageDeleteWorker_Setup( + IN XUID UserXuid, + IN const XSTORAGE_ACCESS_TOKEN *pStorageAccessToken, + IN const XSTORAGE_PATH_STRING *pStoragePathString, + IN const XSTORAGE_ACCESS_TOKEN_READ *pStorageAccessTokenRead, + IN PVOID pvParentTask, + IN PBYTE pbSubTask, + IN DWORD cbSubTask, + IN PBYTE pbRequestWireBuffer, + IN DWORD cbRequestWireBuffer, + IN PBYTE pbResponseWireBuffer, + IN DWORD cbResponseWireBuffer + ); + +XBOXAPI +DWORD +WINAPI +XStorageDownloadToDirectoryInternal( + IN DWORD dwUserIndex, + IN const WCHAR *wszServerPath, + IN const WCHAR *wszDisplayName, + IN XCONTENTDEVICEID DeviceID, + IN DWORD cbResults, + OUT XSTORAGE_DOWNLOAD_TO_DIRECTORY_RESULTS_INTERNAL *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +HRESULT +WINAPI +XStorageDownloadWorker_GetContextSize( + OUT DWORD *pcbContextSize, + OUT DWORD *pcbRequestWireBuffer, + OUT DWORD *pcbResponseWireBuffer + ); + +XBOXAPI +HRESULT +WINAPI +XStorageDownloadWorker_Setup( + IN XUID UserXuid, + IN const XSTORAGE_ACCESS_TOKEN *pStorageAccessToken, + IN const XSTORAGE_PATH_STRING *pStoragePathString, + IN const XSTORAGE_ACCESS_TOKEN_READ *pStorageAccessTokenRead, + IN DWORD dwRangeStart, + IN DWORD dwRangeEnd, + IN const FILETIME *pftLastModified, + IN DWORD cbResults, + OUT XSTORAGE_DOWNLOAD_RESPONSE *pResults, + IN PVOID pvParentTask, + IN PBYTE pbSubTask, + IN DWORD cbSubTask, + IN PBYTE pbRequestWireBuffer, + IN DWORD cbRequestWireBuffer, + IN PBYTE pbResponseWireBuffer, + IN DWORD cbResponseWireBuffer + ); + +XBOXAPI +HRESULT +WINAPI +XStorageEnumerateWorker_GetContextSize( + OUT DWORD *pcbContextSize, + OUT DWORD *pcbRequestWireBuffer, + OUT DWORD *pcbResponseWireBuffer + ); + +XBOXAPI +HRESULT +WINAPI +XStorageEnumerateWorker_Setup( + IN XUID UserXuid, + IN const XSTORAGE_ACCESS_TOKEN *pStorageAccessToken, + IN const XSTORAGE_PATH_STRING *pStoragePathString, + IN const XSTORAGE_ACCESS_TOKEN_READ *pStorageAccessTokenRead, + IN DWORD dwStartingIndex, + IN DWORD dwEndingIndex, + IN DWORD cbResults, + OUT XSTORAGE_ENUMERATE_RESULTS *pResults, + IN PVOID pvParentTask, + IN PBYTE pbSubTask, + IN DWORD cbSubTask, + IN PBYTE pbRequestWireBuffer, + IN DWORD cbRequestWireBuffer, + IN PBYTE pbResponseWireBuffer, + IN DWORD cbResponseWireBuffer + ); + +XBOXAPI +DWORD +WINAPI +XStorageUploadFromDirectoryInternal( + IN DWORD dwUserIndex, + IN const WCHAR *wszServerPath, + IN const CHAR *szLocalPath, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +HRESULT +WINAPI +XStorageUploadWorker_GetContextSize( + OUT DWORD *pcbContextSize, + OUT DWORD *pcbRequestWireBuffer, + OUT DWORD *pcbResponseWireBuffer + ); + +XBOXAPI +HRESULT +WINAPI +XStorageUploadWorker_Setup( + IN XUID UserXuid, + IN const XSTORAGE_ACCESS_TOKEN *pStorageAccessToken, + IN const XSTORAGE_PATH_STRING *pStoragePathString, + IN const XSTORAGE_ACCESS_TOKEN_WRITE *pStorageAccessTokenWrite, + IN BYTE bCompressionType, + IN DWORD dwContentType, + IN DWORD dwDigestSize, + IN const BYTE *prgbDigest, + IN DWORD dwLiveSignatureSize, + IN const BYTE *prgbLiveSignature, + IN DWORD dwInstallSize, + IN WORD wAttributesSize, + IN DWORD dwPackageSize, + IN const BYTE *prgbAttributes, + IN PVOID pvParentTask, + IN PBYTE pbSubTask, + IN DWORD cbSubTask, + IN PBYTE pbRequestWireBuffer, + IN DWORD cbRequestWireBuffer, + IN PBYTE pbResponseWireBuffer, + IN DWORD cbResponseWireBuffer + ); + +XBOXAPI +DWORD +WINAPI +XStringLookup( + IN DWORD dwTitleID, + IN const CHAR *szLocale, + IN DWORD dwNumStrings, + IN const DWORD *pStringIDs, + IN DWORD cbResults, + OUT STRING_LOOKUP_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XUpdateDownload( + IN DWORD dwTitleId, + IN DWORD dwVersion, + IN DWORD cbResults, + OUT XUPDATE_DOWNLOAD_RESULTS *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +HRESULT +WINAPI +XUpdateGetReferral_GetContextSize( + OUT DWORD *pcbContextSize, + OUT DWORD *pcbRequestWireBuffer, + OUT DWORD *pcbResponseWireBuffer + ); + +XBOXAPI +HRESULT +WINAPI +XUpdateGetReferral_Setup( + IN DWORD dwTitleId, + IN DWORD dwVersion, + IN DWORD cbResults, + OUT XUPDATE_REFERRAL_RESPONSE *pResults, + IN PVOID pvParentTask, + IN PBYTE pbSubTask, + IN DWORD cbSubTask, + IN PBYTE pbRequestWireBuffer, + IN DWORD cbRequestWireBuffer, + IN PBYTE pbResponseWireBuffer, + IN DWORD cbResponseWireBuffer + ); + +XBOXAPI +DWORD +WINAPI +XUserAddAffiliate( + IN ULONGLONG qwUserID, + IN DWORD dwListFlags, + IN DWORD dwTitleID, + IN WORD cwAffiliates, + IN const ULONGLONG *pqwAfilliateIDs, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XUserEnumerateReceivedReviews( + IN ULONGLONG qwTargetID, + IN DWORD dwPageID, + IN DWORD dwResultsPerPage, + IN DWORD cbResults, + OUT FB_ENUM_REVIEWS_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XUserEnumerateSentReviews( + IN ULONGLONG qwSenderID, + IN DWORD dwPageID, + IN DWORD dwResultsPerPage, + IN DWORD cbResults, + OUT FB_ENUM_REVIEWS_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XUserFindUser( + IN XUID qwUserID, + IN XUID qwFindID, + IN const CHAR *szSenderName, + IN DWORD cbResults, + OUT P_FIND_USER_REPLY_MSG *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XUserGetAggregateReviews( + IN ULONGLONG qwTargetID, + IN DWORD cbResults, + OUT FB_GET_AGG_REVIEWS_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XUserIsAffiliate( + IN ULONGLONG qwUserID, + IN ULONGLONG qwAffiliateID, + IN DWORD cbResults, + OUT P_IS_AFFILIATE_REPLY_MSG *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XUserQueryAffiliate( + IN ULONGLONG qwUserID, + IN DWORD dwListFlags, + IN DWORD cdwLimit, + IN DWORD dwOnlineTitleID, + IN DWORD cbResults, + OUT P_QUERY_AFFILIATES_REPLY_MSG *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XUserSubmitComplaint( + IN ULONGLONG qwSenderID, + IN ULONGLONG qwTargetID, + IN DWORD dwTitleID, + IN DWORD dwType, + IN ULONGLONG qwContext, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +XUserSubmitPlayerReview( + IN ULONGLONG qwSenderID, + IN ULONGLONG qwTargetID, + IN DWORD dwTitleID, + IN DWORD dwType, + IN ULONGLONG qwContext, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountAcceptTermsOfUse( + IN XUID qwUserId, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountAcknowledgeDowngrade( + IN ULONGLONG qwUserId, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountAddPaymentInstrument( + IN XUID qwUserId, + IN ADDRESS_INFO addressInfo, + IN PHONE_INFO phoneInfo, + IN BYTE bPaymentTypeId, + IN CREDIT_CARD_INFO creditCardInfo, + IN DIRECT_DEBIT_INFO directDebitInfo, + IN DWORD cbResults, + OUT ADD_PAYMENT_INSTRUMENT_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountChangeGamertag( + IN DWORD dwUserIndex, + IN const WCHAR *wszGamertag, + IN DWORD cbResults, + OUT ACCOUNT_CHANGE_GAMERTAG_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountChangeSubscriptionPaymentInstrument( + IN XUID qwUserId, + IN const WCHAR *wszInstanceId, + IN const WCHAR *wszPaymentInstrumentId, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountCreateLiveAccount( + IN ULONGLONG qwOfflineXuid, + IN const WCHAR *wszFirstName, + IN const WCHAR *wszLastName, + IN const WCHAR *wszGamertag, + IN const BYTE *abSignedUserPassportPuid, + IN const BYTE *abSignedOwnerPassportPuid, + IN ULONGLONG qwOfferId, + IN const WCHAR *wszBillingToken, + IN FILETIME ftBirthdate, + IN const WCHAR *wszEmail, + IN WORD wLanguageId, + IN BYTE bCountryId, + IN DWORD dwParentalControlGroupId, + IN BYTE bMsftOptIn, + IN BYTE bPartnerOptIn, + IN ADDRESS_INFO address, + IN PHONE_INFO phone, + IN BYTE bPaymentTypeId, + IN CREDIT_CARD_INFO creditCard, + IN DIRECT_DEBIT_INFO directDebit, + IN WORD wReservedBytesLength, + IN const BYTE *pbReservedBytes, + IN DWORD cbResults, + OUT CREATE_LIVE_ACCOUNT_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountCreateLiveAccountOld( + IN const WCHAR *wszFirstName, + IN const WCHAR *wszLastName, + IN const WCHAR *wszGamertag, + IN ULONGLONG qwUserPassportPuid, + IN ULONGLONG qwOwnerPassportPuid, + IN ULONGLONG qwOfferId, + IN const WCHAR *wszBillingToken, + IN FILETIME ftBirthdate, + IN const WCHAR *wszEmail, + IN WORD wLanguageId, + IN BYTE bCountryId, + IN DWORD dwParentalControlGroupId, + IN BYTE bMsftOptIn, + IN BYTE bPartnerOptIn, + IN ADDRESS_INFO address, + IN PHONE_INFO phone, + IN BYTE bPaymentTypeId, + IN CREDIT_CARD_INFO creditCard, + IN DIRECT_DEBIT_INFO directDebit, + IN DWORD cbResults, + OUT CREATE_LIVE_ACCOUNT_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountGetAccountInfo( + IN XUID qwUserId, + IN DWORD cbResults, + OUT GET_ACCOUNT_INFO_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountGetAccountInfoFromPassport( + IN const PASSPORT_SESSION_TOKEN *pSessionToken, + IN DWORD cbResults, + OUT GET_ACCOUNT_INFO_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountGetLinkedGamertag( + IN const BYTE *pSignedPuid, + IN DWORD cbResults, + OUT GET_LINKED_GAMERTAG_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountGetPaymentInstruments( + IN XUID qwUserId, + IN DWORD cbResults, + OUT GET_PAYMENT_INSTRUMENTS_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountGetPointsBalance( + IN XUID qwUserId, + IN DWORD cbResults, + OUT GET_POINTS_BALANCE_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountGetPostalCode( + IN BYTE bCountryId, + IN const WCHAR *wszPostalCode, + IN DWORD cbResults, + OUT GET_POSTAL_CODE_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountGetUserInfo( + IN DWORD dwUserIndex, + IN DWORD cbResults, + OUT GET_USER_INFO_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountGetUserSubscriptionDetails( + IN XUID qwUserId, + IN ULONGLONG qwOfferId, + IN const WCHAR *wszInstanceId, + IN DWORD cbResults, + OUT GET_USER_SUBSCRIPTION_DETAILS_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountGetUserType( + IN const WCHAR *wszGamertag, + IN DWORD cbResults, + OUT ACCOUNT_GET_USER_TYPE_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountLinkXbox1Account( + IN const WCHAR *wszGamertag, + IN const PASSPORT_SESSION_TOKEN *pUserSessionToken, + IN const PASSPORT_SESSION_TOKEN *pParentSessionToken, + IN PHONE_INFO phoneInfo, + IN const WCHAR *wszPostalCode, + IN const WCHAR *wszAccountHolderName, + IN const WCHAR *wszAccountNumber, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountMigrateXbox1User( + IN const PASSPORT_SESSION_TOKEN *pUserSessionToken, + IN const PASSPORT_SESSION_TOKEN *pParentSessionToken, + IN ULONGLONG qwOfflineXuid, + IN const CHAR *szUserPassportMemberName, + IN WORD wLanguageId, + IN WORD wReservedBytesLength, + IN const BYTE *pbReservedBytes, + IN DWORD cbResults, + OUT MIGRATE_XBOX1_USER_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountMigrateXboxComUser( + IN const PASSPORT_SESSION_TOKEN *pUserSessionToken, + IN ULONGLONG qwOfflineXuid, + IN BYTE bCountryId, + IN WORD wLanguageId, + IN ULONGLONG qwOfferId, + IN const WCHAR *wszBillingToken, + IN const WCHAR *wszFirstName, + IN const WCHAR *wszLastName, + IN const WCHAR *wszEmail, + IN ADDRESS_INFO address, + IN PHONE_INFO phone, + IN BYTE bPaymentTypeId, + IN CREDIT_CARD_INFO creditCard, + IN DIRECT_DEBIT_INFO directDebit, + IN DWORD cbResults, + OUT MIGRATE_XBOX_COM_USER_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountQuery( + IN DWORD dwRequestType, + IN WORD wRequestBytesLength, + IN const BYTE *pbRequestBytes, + IN DWORD cbResults, + OUT ACCOUNT_QUERY_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountRecoverAccount( + IN const BYTE *pSignedPuid, + IN DWORD cbResults, + OUT RECOVER_ACCOUNT_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountRemovePaymentInstrument( + IN XUID qwUserId, + IN const WCHAR *wszPaymentInstrumentId, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountReserveGamertag( + IN BYTE bCountryId, + IN WORD wMaxSuggestedNames, + IN const WCHAR *wszGamertag, + IN DWORD cbResults, + OUT ACCOUNT_RESERVE_GAMERTAG_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountSetAccountInfo( + IN XUID qwUserId, + IN const WCHAR *wszFirstName, + IN const WCHAR *wszLastName, + IN FILETIME ftBirthdate, + IN const WCHAR *wszEmail, + IN ADDRESS_INFO address, + IN PHONE_INFO phone, + IN WORD wLanguageId, + IN BYTE bMsftOptIn, + IN BYTE bParterOptIn, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountSetStatus( + IN XUID qwUserId, + IN DWORD dwNewTermsOfService, + IN DWORD dwForceNameChangeRequired, + IN FILETIME ftSuspendedUntil, + IN WORD wTotalDaysSuspended, + IN FILETIME ftVoiceBannedUntil, + IN WORD wTotalDaysVoiceBanned, + IN DWORD dwBillingHr, + IN DWORD dwResetPassword, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountTroubleshoot( + IN ULONGLONG qwUserId, + IN WORD wReservedBytesLength, + IN const BYTE *pbReservedBytes, + IN DWORD cbResults, + OUT ACCOUNT_TROUBLESHOOT_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountUpdateParentalControls( + IN XUID qwUserId, + IN const DWORD *rgGrantPrivileges, + IN const DWORD *rgRestrictPrivileges, + IN const WCHAR *wszSource, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountUpdatePaymentInstrument( + IN XUID qwUserId, + IN const WCHAR *wszPaymentInstrumentId, + IN ADDRESS_INFO addressInfo, + IN PHONE_INFO phoneInfo, + IN CREDIT_CARD_INFO creditCardInfo, + IN DIRECT_DEBIT_INFO directDebitInfo, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountVerifyBillingInfo( + IN const WCHAR *wszGamertag, + IN PHONE_INFO phone, + IN const WCHAR *wszPostalCode, + IN const WCHAR *wszAccountHolderName, + IN const WCHAR *wszAccountNumber, + IN DWORD cbResults, + OUT ACCOUNT_VERIFY_BILLING_INFO_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountVerifyBillingToken( + IN BYTE bCountryId, + IN const WCHAR *wszBillingToken, + IN DWORD cbResults, + OUT VERIFY_BILLING_TOKEN_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XAccountVerifyParentCreditCard( + IN const PASSPORT_SESSION_TOKEN *pParentSessionToken, + IN const CHAR *szParentPassportMemberName, + IN WORD wLanguageId, + IN BYTE bCountryId, + IN const WCHAR *wszFirstName, + IN const WCHAR *wszLastName, + IN const WCHAR *wszEmail, + IN ADDRESS_INFO address, + IN PHONE_INFO phone, + IN CREDIT_CARD_INFO creditCardInfo, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XBannerGetHotList( + IN ULONGLONG qwUserId, + IN DWORD dwLangId, + IN DWORD dwStartingIndex, + IN DWORD dwMaxResults, + IN DWORD cbResults, + OUT BANNER_HOTLIST_RESULT *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XBannerGetList( + IN ULONGLONG qwUserId, + IN DWORD dwLangId, + IN DWORD cbResults, + OUT BANNER_LIST_RESULT *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XOfferingContentAvailable( + IN XUID qwUserId, + IN BYTE bTier, + IN DWORD dwTitleId, + IN DWORD cbResults, + OUT CONTENT_AVAILABLE_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XOfferingContentDetails( + IN XUID qwUserId, + IN WORD wLanguageId, + IN ULONGLONG qwOfferID, + IN DWORD dwPaymentType, + IN BYTE bRatingSystem, + IN DWORD cbResults, + OUT CONTENT_DETAILS_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XOfferingContentEnumerate( + IN XUID qwUserId, + IN WORD wLanguageId, + IN WORD wGameRating, + IN DWORD dwOfferType, + IN DWORD dwPaymentType, + IN BYTE bTier, + IN DWORD dwTitleId, + IN DWORD dwTitleCategories, + IN BYTE bRequestFlags, + IN DWORD dwStartingIndex, + IN DWORD dwMaxResults, + IN DWORD cbResults, + OUT CONTENT_ENUMERATE_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XOfferingEnumerateGenres( + IN XUID UserXuid, + IN WORD wLanguageId, + IN DWORD dwStartingIndex, + IN DWORD dwMaxResults, + IN WORD wGameRating, + IN BYTE bTierRequired, + IN DWORD dwOfferType, + IN DWORD dwParentGenreId, + IN DWORD cbResults, + OUT ENUMERATE_GENRES_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XOfferingEnumerateTitlesByFilter( + IN XUID qwUserId, + IN WORD wLanguageId, + IN DWORD dwStartingIndex, + IN DWORD dwMaxResults, + IN WORD wGameRating, + IN BYTE bTierRequired, + IN DWORD dwGenreId, + IN DWORD dwOfferType, + IN WORD wRequestFlags, + IN DWORD cbResults, + OUT ENUMERATE_TITLES_BY_FILTER_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XOfferingGetTitleDetails( + IN XUID qwUserId, + IN DWORD dwTitleId, + IN BYTE bCountryId, + IN WORD wLanguageId, + IN BYTE bTierRequired, + IN DWORD cbResults, + OUT TITLE_DETAILS_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XOfferingInternalUpdateAccessTimes( + IN XUID qwUserId, + IN DWORD dwTitleId, + IN DWORD dwTitleCategories, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XOfferingPurchase( + IN XUID qwUserId, + IN WORD wLanguageId, + IN BYTE bUserTier, + IN ULONGLONG qwOfferID, + IN DWORD dwPaymentType, + IN const WCHAR *wszPaymentInstrumentId, + IN const WCHAR *wszToken, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XOfferingPurchaseGamertag( + IN XUID qwUserId, + IN WORD wLanguageId, + IN BYTE bUserTier, + IN ULONGLONG qwOfferID, + IN DWORD dwPaymentType, + IN const WCHAR *wszToken, + IN const WCHAR *wszGamertag, + IN DWORD cbResults, + OUT OFFER_PURCHASE_GAMERTAG_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XOfferingSubscriptionDetails( + IN XUID qwUserId, + IN BYTE bCountryId, + IN WORD wLanguageId, + IN ULONGLONG qwOfferID, + IN DWORD dwPaymentType, + IN BYTE bUserTier, + IN BYTE bRatingSystem, + IN DWORD cbResults, + OUT SUBSCRIPTION_DETAILS_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XOfferingSubscriptionEnumerate( + IN XUID qwUserId, + IN BYTE bUserTier, + IN BYTE bCountryId, + IN WORD wLanguageId, + IN WORD wGameRating, + IN DWORD dwOfferType, + IN DWORD dwPaymentType, + IN DWORD dwTitleId, + IN DWORD dwTitleCategories, + IN WORD wRequestFlags, + IN DWORD dwStartingIndex, + IN DWORD dwMaxResults, + IN DWORD cbResults, + OUT SUBSCRIPTION_ENUMERATE_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XOnlineArbitrationRegister( + IN WORD wFlags, + IN ULONGLONG qwSessionId, + IN ULONGLONG qwSessionNonce, + IN WORD wMaxSessionSeconds, + IN DWORD cbResults, + OUT XARB_REGISTER_REPLY *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XOnlineArbitrationReportResult( + IN WORD wFlags, + IN ULONGLONG qwSessionID, + IN ULONGLONG qwSessionNonce, + IN BYTE bReportLostMachines, + IN const XARB_REPORT_LOST_MACHINES *pLostMachines, + IN BYTE cSuspiciousInfo, + IN const XARB_REPORT_SUSPICIOUS_INFO *pSuspiciousInfo, + IN BYTE bSubmitStatsBundle, + IN const XARB_REPORT_STATS_BUNDLE *pStatsBundle, + IN BYTE bSubmitCompsBundle, + IN const XARB_REPORT_BYTE_BUNDLE *pCompsBundle, + IN DWORD cbMinRequest, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XOnlineArbitrationTimeExtend( + IN ULONGLONG qwSessionID, + IN ULONGLONG qwSessionNonce, + IN WORD wMaxSessionSecondsFromNow, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XOnlineStatsEnumerateByRank( + IN DWORD dwTitleId, + IN ULONGLONG qwRank, + IN DWORD dwPageSize, + IN DWORD dwNumSpecs, + IN const XONLINE_STATS_SPEC *pSpecs, + IN DWORD cbResults, + OUT XONLINE_STATS_ENUM_RESULTS *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XOnlineStatsEnumerateByRating( + IN DWORD dwTitleId, + IN LONGLONG i64Rating, + IN DWORD dwPageSize, + IN DWORD dwNumSpecs, + IN const XONLINE_STATS_SPEC *pSpecs, + IN DWORD cbResults, + OUT XONLINE_STATS_ENUM_RESULTS *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XOnlineStatsEnumerateByXuid( + IN DWORD dwTitleId, + IN XUID Xuid, + IN DWORD dwPageSize, + IN DWORD dwNumSpecs, + IN const XONLINE_STATS_SPEC *pSpecs, + IN DWORD cbResults, + OUT XONLINE_STATS_ENUM_RESULTS *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XOnlineStatsPost( + IN WORD wNumProcs, + IN const XSTAT_PROC *pProcs, + IN DWORD cbMinRequest, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XOnlineStatsRead( + IN DWORD dwTitleId, + IN DWORD dwNumXuids, + IN const XUID *pXuids, + IN DWORD dwNumSpecs, + IN const XONLINE_STATS_SPEC *pSpecs, + IN DWORD cbResults, + OUT XONLINE_STATS_READ_RESULTS *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XOnlineStatsReset( + IN DWORD dwTitleId, + IN ULONGLONG qwUserId, + IN DWORD dwLeaderBoardId, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XPassportChangePasswordInternal( + IN const PASSPORT_SESSION_TOKEN *pSessionToken, + IN const CHAR *szPassportMemberName, + IN WORD wEncryptedPasswordLength, + IN const BYTE *pbEncryptedPassword, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XPassportCreateInternal( + IN const CHAR *szPassportMemberName, + IN const WCHAR *szSecretQuestion, + IN WORD wEncryptedPasswordLength, + IN const BYTE *pbEncryptedPassword, + IN DWORD cbResults, + OUT PASSPORT_SESSION_TOKEN *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XPassportGetEncryptedProxyParameters( + IN DWORD dwDummy, + IN DWORD cbResults, + OUT PASSPORT_ENCRYPTED_PROXY_PARAMETERS *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XPassportGetMemberName( + IN DWORD dwUserIndex, + IN DWORD cbResults, + OUT PASSPORT_GET_MEMBER_NAME_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XPassportGetSecretQuestions( + IN WORD wCountryId, + IN WORD wLanguageId, + IN DWORD cbResults, + OUT PASSPORT_GET_SECRET_QUESTION_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XPassportGetUserData( + IN const PASSPORT_SESSION_TOKEN *pSessionToken, + IN DWORD cbResults, + OUT PASSPORT_GET_USER_DATA_RESPONSE *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XPassportLoginInternal( + IN const CHAR *szPassportMemberName, + IN WORD wEncryptedSessionKeyLength, + IN const BYTE *pbencryptedSessionKey, + IN WORD wEncryptedPasswordLength, + IN const BYTE *pbEncryptedPassword, + IN WORD wEncryptedTokenRequestLength, + IN const BYTE *pbEncryptedTokenRequest, + IN DWORD cbResults, + OUT PASSPORT_SESSION_TOKEN *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XProfileClearTitle( + IN XUID qwUserId, + IN DWORD dwTitleId, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XProfileEnumAchievements( + IN DWORD dwTitleId, + IN XUID qwUserId, + IN ULONGLONG qwForPuid, + IN WORD wLocaleId, + IN WORD wStartingIndex, + IN WORD wMaxAchievements, + IN DWORD cbResults, + OUT XPROFILE_ENUM_ACHIEVEMENTS_RESULT *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XProfileEnumTitles( + IN XUID qwUserId, + IN XUID qwForUserId, + IN WORD wLocaleId, + IN WORD wStartingIndex, + IN WORD wMaxTitles, + IN DWORD cbResults, + OUT XPROFILE_ENUM_TITLES_RESULT *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XProfileReadOnlineSettings( + IN XUID qwUserId, + IN WORD wForUserIdsLen, + IN const ULONGLONG *pqwUserIds, + IN WORD wSettingIdsLen, + IN const DWORD *pdwSettingIds, + IN DWORD cbResults, + OUT XPROFILE_SETTING_READ_RESULT *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XProfileSyncAchievements( + IN DWORD dwTitleId, + IN XUID qwUserId, + IN FILETIME ftVersion, + IN WORD wLocaleId, + IN WORD wStartingIndex, + IN WORD wAchievementCount, + IN const XPROFILE_ACHIEVEMENT_SYNC_REQUEST *pAchievements, + IN DWORD cbResults, + OUT XPROFILE_SYNC_ACHIEVEMENTS_RESULT *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XProfileSyncOnlineSettings( + IN DWORD dwTitleId, + IN XUID qwUserId, + IN FILETIME ftVersion, + IN WORD wStartingIndex, + IN WORD wSettingsLen, + IN const XUSER_ONLINE_PROFILE_SETTING *pSettings, + IN DWORD cbMinRequest, + IN DWORD cbResults, + OUT XPROFILE_SETTING_SYNC_RESULT *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + +XBOXAPI +DWORD +WINAPI +_XProfileSyncTitles( + IN XUID qwUserId, + IN WORD wLocaleId, + IN WORD wStartingIndex, + IN FILETIME ftLastSync, + IN WORD wNumTitles, + IN const XPROFILE_TITLE *pTitles, + IN DWORD cbResults, + OUT XPROFILE_SYNC_TITLES_RESULT *pResults, + IN OUT OPTIONAL XOVERLAPPED *pXOverlapped + ); + + + +// +// Statistics +// + +#define XUSER_STATS_SYSTEM_ATTRIBUTE_MASK 0x8000 +#define XUSER_STATS_RANK ((WORD)0xFFFF) +#define XUSER_STATS_RATING ((WORD)0xFFFE) +#define XUSER_STATS_GAMERTAG ((WORD)0xFFFD) + +#define XONLINE_STAT_COMPTYPE_EQUAL 1 // if the current stored stat value equals the specified value +#define XONLINE_STAT_COMPTYPE_GREATER 2 // if the current stored stat value is greater than the specified value +#define XONLINE_STAT_COMPTYPE_GREATER_OR_EQUAL 3 // if the current stored stat value is greater than or equal to the specified value +#define XONLINE_STAT_COMPTYPE_LESS 4 // if the current stored stat value is less than the specified value +#define XONLINE_STAT_COMPTYPE_LESS_OR_EQUAL 5 // if the current stored stat value is less than or equal to the specified value +#define XONLINE_STAT_COMPTYPE_EXISTS 6 // if the current stored stat value exists (specified value is ignored) +#define XONLINE_STAT_COMPTYPE_NOT_EXISTS 7 // if the current stored stat value does not exist (specified value is ignored) +#define XONLINE_STAT_COMPTYPE_NOT_EQUAL 8 // if the current stored stat value does not equal the specified value + +#define XONLINE_STAT_PROCID_REPLACE 0x8001 // use XONLINE_STAT_UPDATE structure +#define XONLINE_STAT_PROCID_ADD 0x8003 // use XONLINE_STAT_UPDATE structure +#define XONLINE_STAT_PROCID_CONDITIONAL 0x8007 // use XONLINE_STAT_CONDITIONAL structure +#define XONLINE_STAT_PROCID_MIN 0x8009 +#define XONLINE_STAT_PROCID_MAX 0x800B +#define XONLINE_STAT_PROCID_MUSIGMA 0x800D // use XONLINE_STAT_CONDITIONAL structure + +// Internal helper functions + +DWORD XOnlinepStatsPostMinRequestSize(WORD wNumProcs, const XSTAT_PROC *pProcs); + +DWORD XOnlinepArbReportMinRequestSize( + int bReportLostMachines, + XARB_REPORT_LOST_MACHINES *pLostMachines, + int cSuspiciousInfo, + XARB_REPORT_SUSPICIOUS_INFO *pSuspiciousInfo, + int bSubmitStatsBundle, + XARB_REPORT_STATS_BUNDLE *pStatsBundle, + int bSubmitCompsBundle, + XARB_REPORT_BYTE_BUNDLE *pCompsBundle); + + +// +// Competitions +// +// +// Attribute IDs +// +#define XONLINE_QUERY_ENTITY_ID 0x80000000 +#define XONLINE_QUERY_OWNER_PUID 0x80000001 + +#define XONLINE_COMP_ATTR_ID 0x80010000 +#define XONLINE_COMP_ATTR_REG_OPEN 0x80010001 +#define XONLINE_COMP_ATTR_REG_CLOSE 0x80010002 +#define XONLINE_COMP_ATTR_COMP_START 0x80010003 +#define XONLINE_COMP_ATTR_COMP_CLEANUP 0x80010004 +#define XONLINE_COMP_ATTR_COMP_CLEANUP_DAYS 0x80010004 +#define XONLINE_COMP_ATTR_ROUND_FREQUENCY 0x80010005 +#define XONLINE_COMP_ATTR_ROUND_INTERVAL 0x80010006 +#define XONLINE_COMP_ATTR_ROUND_DAY_MASK 0x80010007 +#define XONLINE_COMP_ATTR_ROUNDS 0x80010008 +#define XONLINE_COMP_ATTR_CURRENT_ROUND 0x80010009 +#define XONLINE_COMP_ATTR_CURRENT_ROUND_START 0x8001000A +#define XONLINE_COMP_ATTR_CURRENT_ROUND_END 0x8001000B +#define XONLINE_COMP_ATTR_ROUND_DURATION_MIN 0x8001000B +#define XONLINE_COMP_ATTR_ROUND_ONE_START 0x8001000C +#define XONLINE_COMP_ATTR_ROUND_ONE_END 0x8001000D +#define XONLINE_COMP_ATTR_AUTOPROGRESS_DEADLINE 0x8001000F +#define XONLINE_COMP_ATTR_IS_TEAM_COMP 0x80010010 +#define XONLINE_COMP_ATTR_TEAM_SIZE 0x80010011 +#define XONLINE_COMP_ATTR_MAX_PUBLIC_SLOTS 0x80010012 +#define XONLINE_COMP_ATTR_MAX_PRIVATE_SLOTS 0x80010013 +#define XONLINE_COMP_ATTR_MIN_SLOTS 0x80010014 +#define XONLINE_COMP_ATTR_BYES 0x80010016 +#define XONLINE_COMP_ATTR_BYES_GRANTED 0x80010017 +#define XONLINE_COMP_ATTR_PUBLIC_ENTRANTS 0x80010018 +#define XONLINE_COMP_ATTR_PRIVATE_ENTRANTS 0x80010019 +#define XONLINE_COMP_ATTR_REMINDER_MIN 0x8001001A +#define XONLINE_COMP_ATTR_PLAY_BEFORE_MIN 0x8001001B +#define XONLINE_COMP_ATTR_PLAY_AFTER_MIN 0x8001001C +#define XONLINE_COMP_ATTR_STATUS 0x8001001D +#define XONLINE_COMP_ATTR_ROUND0_LEADERBOARD_ID 0x80010020 +#define XONLINE_COMP_ATTR_DEBUG_ADVANCE_TIME 0x80010023 + +#define XONLINE_COMP_ATTR_NAME 0x8011000E + +#define XONLINE_COMP_ATTR_RESULTS 0x80210000 + + +#define XONLINE_COMP_ATTR_ENTRANT_PUID 0x80020000 +#define XONLINE_COMP_ATTR_ENTRANT_STATUS 0x80020001 +#define XONLINE_COMP_ATTR_ENTRANT_TRUST 0x80020002 +#define XONLINE_COMP_ATTR_ENTRANT_CURRENT_ROUND 0x80020003 +#define XONLINE_COMP_ATTR_ENTRANT_PRIVATE_SLOT 0x80020004 +#define XONLINE_COMP_ATTR_ENTRANT_SEED 0x80020005 +#define XONLINE_COMP_ATTR_ENTRANT_ELIMINATED 0x80020006 +#define XONLINE_COMP_ATTR_ENTRANT_CURRENT_EVENT 0x80020007 +#define XONLINE_COMP_ATTR_ENTRANT_CURRENT_START 0x80020008 +#define XONLINE_COMP_ATTR_ENTRANT_COMP_SORT 0x80020009 +#define XONLINE_COMP_ATTR_ENTRANT_CURRENT_INDEX 0x8002000a +#define XONLINE_COMP_ATTR_ENTRANT_HRESULT 0x8002000b +#define XONLINE_COMP_ATTR_ENTRANT_SCORE 0x8002000c + + +#define XONLINE_COMP_ATTR_EVENT_ENTITY_ID 0x80030000 +#define XONLINE_COMP_ATTR_EVENT_TOPOLOGY_ID 0x80030001 +#define XONLINE_COMP_ATTR_EVENT_ROUND 0x80030002 +#define XONLINE_COMP_ATTR_EVENT_START 0x80030003 +#define XONLINE_COMP_ATTR_EVENT_NEXT_ENTITY 0x80030006 +#define XONLINE_COMP_ATTR_EVENT_NEXT_START 0x80030007 +#define XONLINE_COMP_ATTR_EVENT_P1 0x80030008 +#define XONLINE_COMP_ATTR_EVENT_P1_GAMERTAG 0x81130008 +#define XONLINE_COMP_ATTR_EVENT_P1_CHECKIN 0x80030009 +#define XONLINE_COMP_ATTR_EVENT_P1_TRUST 0x8023000A +#define XONLINE_COMP_ATTR_EVENT_P2 0x8003000B +#define XONLINE_COMP_ATTR_EVENT_P2_GAMERTAG 0x8113000B +#define XONLINE_COMP_ATTR_EVENT_P2_CHECKIN 0x8003000C +#define XONLINE_COMP_ATTR_EVENT_P2_TRUST 0x8023000D +#define XONLINE_COMP_ATTR_EVENT_WINNER 0x8003000E +#define XONLINE_COMP_ATTR_EVENT_LOSER 0x8003000F +#define XONLINE_COMP_ATTR_EVENT_MIN 0x80030010 +#define XONLINE_COMP_ATTR_EVENT_MAX 0x80030011 + + +#define XONLINE_COMP_ATTR_BRACKET_ID 0x80040001 +#define XONLINE_COMP_ATTR_BRACKET_SLOTS 0x80040002 +#define XONLINE_COMP_ATTR_BRACKET_ENTRANTS 0x80040003 +#define XONLINE_COMP_ATTR_BRACKET_BYES 0x80040004 +#define XONLINE_COMP_ATTR_BRACKET_BYES_GRANTED 0x80040005 +#define XONLINE_COMP_ATTR_BRACKET_ROUND_START 0x80040006 +#define XONLINE_COMP_ATTR_BRACKET_END 0x80040008 +#define XONLINE_COMP_ATTR_BRACKET_START 0x80040009 +#define XONLINE_COMP_ATTR_BRACKET_STATUS 0x8004000A +#define XONLINE_COMP_ATTR_BRACKET_APD 0x8004000B +#define XONLINE_COMP_ATTR_BRACKET_LEADERBOARD 0x8004000C + +#define XONLINE_COMP_ATTR_BRACKET_MIN_ROUND 0x820400F0 +#define XONLINE_COMP_ATTR_BRACKET_MAX_ROUND 0x820400F1 + + +// +// Competition status codes +// +#define XONLINE_COMP_STATUS_PRE_INIT 0 +#define XONLINE_COMP_STATUS_ACTIVE 1 +#define XONLINE_COMP_STATUS_COMPLETE 2 +#define XONLINE_COMP_STATUS_CANCELED 0xFFFFFFFF + +// +// Entrant status codes +// +#define XONLINE_COMP_STATUS_ENTRANT_REGISTERED 0 +#define XONLINE_COMP_STATUS_ENTRANT_PLAYING 1 +#define XONLINE_COMP_STATUS_ENTRANT_FORFEIT 2 +#define XONLINE_COMP_STATUS_ENTRANT_PASS 4 +#define XONLINE_COMP_STATUS_ENTRANT_FINAL 5 +#define XONLINE_COMP_STATUS_ENTRANT_ELIMINATED 0xFFFFFFFF + +// +// Multilevel constants +// + +// Use this value for the Entity ID when calling XOnlineCompeitionSubmitResults for a multi-level competition +#define XONLINE_COMP_MULTILEVEL_ENTITY_ID 0xffffffff + +// +// Multilevel bracket status Codes +// +#define XONLINE_COMP_STATUS_BRACKET_PRE_INIT 0 +#define XONLINE_COMP_STATUS_BRACKET_CHECKIN 1 +#define XONLINE_COMP_STATUS_BRACKET_IN_PROGRESS 2 +#define XONLINE_COMP_STATUS_BRACKET_COMPLETE 3 +#define XONLINE_COMP_STATUS_BRACKET_FINAL 4 + +// +// Multilevel entrant procs +// +#define XONLINE_COMP_ML_ENTRANTS_SEARCH_ONE 0x10001 +#define XONLINE_COMP_ML_ENTRANTS_SEARCH_PUID 0x10001 +#define XONLINE_COMP_ML_ENTRANTS_SEARCH_STATUS 0x10002 + +// +// Multilevel update procs +// +#define XONLINE_COMP_ML_ENTRANTS_UPDATE_ROUND 0x10001 +#define XONLINE_COMP_ML_ENTRANTS_UPDATE_STATUS 0x10002 + +// +// Multilevel bracket procs +// +#define XONLINE_COMP_ML_BRACKET_SEARCH_ROUND 0x10001 +#define XONLINE_COMP_ML_BRACKET_UPDATEID_SLOT_INFO 0x10001 + +// +// Action IDs +// +#define XONLINE_COMP_ACTION_JOIN 1 +#define XONLINE_COMP_ACTION_JOIN_PRIVATE 2 +#define XONLINE_COMP_ACTION_WITHDRAW 3 +#define XONLINE_COMP_ACTION_CHECKIN 4 +#define XONLINE_COMP_ACTION_REQUEST_BYE 5 +#define XONLINE_COMP_ACTION_REQUEST_PASS 6 +#define XONLINE_COMP_ACTION_SUBMIT_RESULTS 7 +#define XONLINE_COMP_ACTION_FORFEIT 8 +#define XONLINE_COMP_ACTION_CANCEL 9 +#define XONLINE_COMP_ACTION_EJECT 10 +#define XONLINE_COMP_ACTION_DEBUG_ADVANCE_TIME 99 + + +// +// Limits +// +#define XONLINE_COMP_MAX_FREQUENCY 60 +#define XONLINE_COMP_MIN_DURATION_MINS 5 +#define XONLINE_COMP_MIN_JOB_DELAY 1 +#define XONLINE_COMP_CHECKIN_WIN_SECS 5 * 60 +#define XONLINE_COMP_MIN_CLEANUP_DAYS 1 +#define XONLINE_COMP_MAX_CLEANUP_DAYS 365 +#define XONLINE_COMP_DEFAULT_CLEANUP_DAYS 5 + + +// +// Defined types of competition intervals +// +typedef enum +{ + XONLINE_COMP_INTERVAL_MINUTE = 2, + XONLINE_COMP_INTERVAL_HOUR = 3, + XONLINE_COMP_INTERVAL_DAILY = 4, + XONLINE_COMP_INTERVAL_WEEKLY = 5 + +} XONLINE_COMP_INTERVAL_UNIT; + +// Day mask data type +typedef DWORD XONLINE_COMP_DAY_MASK; + +// +// Day Mask Constants +// +#define XONLINE_COMP_DAY_MASK_ALL 0x007F +#define XONLINE_COMP_DAY_MASK_SUNDAY 0x0001 +#define XONLINE_COMP_DAY_MASK_MONDAY 0x0002 +#define XONLINE_COMP_DAY_MASK_TUESDAY 0x0004 +#define XONLINE_COMP_DAY_MASK_WEDNESDAY 0x0008 +#define XONLINE_COMP_DAY_MASK_THURSDAY 0x0010 +#define XONLINE_COMP_DAY_MASK_FRIDAY 0x0020 +#define XONLINE_COMP_DAY_MASK_SATURDAY 0x0040 + +typedef union +{ + DWORD dwUnitsOfTime; + XONLINE_COMP_DAY_MASK DayMask; + +} XONLINE_COMP_UNITS_OR_MASK; + +// +// User-friendly structure for Single Eliminations +// +typedef struct +{ + DWORD dwPrivateSlots; + DWORD dwPublicSlots; + DWORD dwMinimumPlayers; + + FILETIME ftRegistrationOpen; + FILETIME ftRegistrationClose; + FILETIME ftCompetitionStart; + FILETIME ftRoundOneStart; + FILETIME ftRoundOneEnd; + + DWORD dwMatchReminderAdvanceMinutes; + + XONLINE_COMP_INTERVAL_UNIT Interval; + XONLINE_COMP_UNITS_OR_MASK UnitOrMask; // Mask when Interval = Day, otherwise Units of time of type Interval + + BOOL fTeamCompetition; + DWORD dwTeamSize; + +} XONLINE_COMP_SINGLE_ELIMINATION_ATTRIBUTES; + +typedef XONLINE_COMP_SINGLE_ELIMINATION_ATTRIBUTES *PXONLINE_COMP_SINGLE_ELIMINATION_ATTRIBUTES; + +// +// Structure returning results for a created competition +// +typedef struct +{ + ULONGLONG qwCompetitionID; + +} XONLINE_COMP_CREATE_RESULTS; + +typedef XONLINE_COMP_CREATE_RESULTS *PXONLINE_COMP_CREATE_RESULTS; + +// +// Topology results structure +// +typedef struct +{ + DWORD dwBaseWidth; + DWORD dwRoundsReturned; + DWORD dwTotalResultEntries; + DWORD dwResultsSize; + PBYTE pbResults; + DWORD dwNumResultAttributeSpecs; + PXONLINE_QUERY_ATTRIBUTE_SPEC pResultAttributeSpecs; + +} XONLINE_COMP_TOPOLOGY_SE_RESULTS; + +typedef XONLINE_COMP_TOPOLOGY_SE_RESULTS *PXONLINE_COMP_TOPOLOGY_SE_RESULTS; + +#define TOPOLOGY_ID(roundNumber, eventNumber) (((roundNumber) << 16) + (eventNumber)) + + +XBOXAPI +DWORD +WINAPI +XOnlineCompetitionCreate( + XUID UserXuid, + DWORD dwTemplate, + ULONGLONG qwTeamID, + DWORD dwNumCompetitionAttributes, + XONLINE_QUERY_ATTRIBUTE *pCompetitionAttributes, + PXONLINE_COMP_CREATE_RESULTS *ppEntityId, + PXOVERLAPPED pXOverlapped + ); + + +XBOXAPI +DWORD +WINAPI +XOnlineCompetitionCreateSingleElimination( + XUID UserXuid, + DWORD dwTemplate, + ULONGLONG qwTeamID, + const XONLINE_COMP_SINGLE_ELIMINATION_ATTRIBUTES *pDefaultAttributes, + DWORD dwNumAdditionalAttributes, + const XONLINE_QUERY_ATTRIBUTE *pAdditionalAttributes, + PXONLINE_COMP_CREATE_RESULTS *ppEntityId, + PXOVERLAPPED pXOverlapped + ); + + + +XBOXAPI +DWORD +WINAPI +XOnlineCompetitionSearch( + DWORD dwQueryID, + DWORD dwDatasetID, + DWORD dwPage, + DWORD dwResultsPerPage, + DWORD dwNumSearchAttributes, + XONLINE_QUERY_ATTRIBUTE *pSearchAttributes, + DWORD dwNumResultAttributeSpecs, + XONLINE_QUERY_ATTRIBUTE_SPEC *pResultAttributeSpecs, + PQUERY_SEARCH_RESULT *ppResults, + PXOVERLAPPED pXOverlapped + ); + + +XBOXAPI +DWORD +WINAPI +XOnlineCompetitionManageEntrant( + DWORD dwAction, + XUID UserId, + DWORD dwDatasetID, + ULONGLONG qwTeamID, + ULONGLONG qwCompetitionID, + DWORD dwNumAttributes, + XONLINE_QUERY_ATTRIBUTE *pAttributes, + PVOID *ppvResults, + PXOVERLAPPED pXOverlapped + ); + + +XBOXAPI +DWORD +WINAPI +XOnlineCompetitionCheckin( + XUID UserXuid, + DWORD dwDatasetID, + ULONGLONG qwTeamID, + ULONGLONG qwCompetitionID, + ULONGLONG qwEventID, + PVOID *ppvResults, + PXOVERLAPPED pXOverlapped + ); + + + +XBOXAPI +DWORD +WINAPI +XOnlineCompetitionCancel( + XUID UserXuid, + DWORD dwDatasetID, + ULONGLONG qwTeamID, + ULONGLONG qwCompetitionID, + PVOID *ppvResults, + PXOVERLAPPED pXOverlapped + ); + + + +XBOXAPI +DWORD +WINAPI +XOnlineCompetitionSubmitResults( + XUID UserId, + DWORD dwDatasetID, + ULONGLONG qwTeamId, + ULONGLONG qwCompetitionID, + ULONGLONG qwEventId, + XUID WinnerXuid, + XUID LoserXuid, + PVOID *ppvResults, + PXOVERLAPPED pXOverlapped + ); + + + +XBOXAPI +DWORD +WINAPI +XOnlineCompetitionTopology( + DWORD dwTemplate, + ULONGLONG qwCompetitionID, + DWORD dwPage, + DWORD dwResultsPerPage, + DWORD dwStartingEventTopologyID, + DWORD dwEndingEventTopologyID, + DWORD dwNumResultAttributeSpecs, + XONLINE_QUERY_ATTRIBUTE_SPEC *pResultAttributeSpecs, + PQUERY_SEARCH_RESULT *ppResults, + PXOVERLAPPED pXOverlapped + ); + + +// +// Messaging +// + +//DECLARE_HANDLE(XMSG_HANDLE); +//typedef XMSG_HANDLE* PXMSG_HANDLE; + +// +// Message Flags +// +#define XONLINE_MSG_FLAG_REQUIRED 0x00000001 // The user is required to read this message +#define XONLINE_MSG_FLAG_RECOMMENDED 0x00000002 // The user has a system recommended message +#define XONLINE_MSG_FLAG_HAS_VOICE 0x00000004 // This message contains a voice attachment +#define XONLINE_MSG_FLAG_HAS_TEXT 0x00000008 // This message contains a text body +#define XONLINE_MSG_FLAG_READ 0x00000010 // This message has been read +#define XONLINE_MSG_FLAG_NON_EXPORTABLE 0x00000020 // This message should only be displayed on Xbox consoles, not the web +#define XONLINE_MSG_FLAG_TEAM_CONTEXT 0x00000040 // This message's sender context refers to a team ID +#define XONLINE_MSG_FLAG_COMP_CONTEXT 0x00000080 // This message's sender context refers to a competition event or entity ID +#define XONLINE_MSG_FLAG_ALTERNATE_TITLE 0x00000100 // This message is from an alternate Title of the currently logged on title (only available on Xbox consoles) +#define XONLINE_MSG_FLAG_MARKETING 0x00000200 // Used on title-sent messages to indicate the message is marketing-related and opt-in settings should be checked +#define XONLINE_MSG_FLAGS_TITLE_RESERVED 0xFF000000 // Flags reserved for title custom messages +#define XONLINE_MSG_FLAG_SENDER_IS_FRIEND 0x00800000 // Used by Notification to detect invites that should go to V1 clients, also used by clients to allow cross-title invites +#define XONLINE_MSG_FLAG_RECV_DETAILS_NEEDED 0x00200000 // Used by the client on received summaries to indicate that the title has requested downloading details +#define XONLINE_MSG_FLAG_SEND_MSG_OWNED 0x00200000 // Used by the client on message sends to indicate that the message handle is owned by the Send operation +#define XONLINE_MSG_FLAGS_RESERVED 0x005FFC00 // Flags reserved for future use +#define XONLINE_MSG_FLAGS_VALID_SEND_MASK ( XONLINE_MSG_FLAGS_TITLE_RESERVED | \ + XONLINE_MSG_FLAG_NON_EXPORTABLE | \ + XONLINE_MSG_FLAG_REQUIRED | \ + XONLINE_MSG_FLAG_RECOMMENDED | \ + XONLINE_MSG_FLAG_HAS_VOICE | \ + XONLINE_MSG_FLAG_HAS_TEXT | \ + XONLINE_MSG_FLAG_TEAM_CONTEXT | \ + XONLINE_MSG_FLAG_COMP_CONTEXT | \ + XONLINE_MSG_FLAG_MARKETING ) // Flags valid in a call to send a message +#define XONLINE_MSG_FLAGS_TITLE_SETABLE ( XONLINE_MSG_FLAG_READ | \ + XONLINE_MSG_FLAGS_TITLE_RESERVED ) // Flags a title is allowed to set on an already sent message +#define XONLINE_MSG_FLAGS_TITLE_CLEARABLE ( XONLINE_MSG_FLAGS_TITLE_RESERVED ) // Flags a title is allowed to clear on an already sent message + +// +// Message Property Types +// +#define XONLINE_MSG_PROP_TYPE_NULL ((BYTE) 1) // The property contains no data +#define XONLINE_MSG_PROP_TYPE_I1 ((BYTE) 2) // The property value points to 8-bits of data +#define XONLINE_MSG_PROP_TYPE_I2 ((BYTE) 3) // The property value points to 16-bits of data +#define XONLINE_MSG_PROP_TYPE_I4 ((BYTE) 4) // The property value points to 32-bits of data +#define XONLINE_MSG_PROP_TYPE_I8 ((BYTE) 5) // The property value points to 64-bits of data +#define XONLINE_MSG_PROP_TYPE_STRING ((BYTE) 6) // The property value points to a NULL-terminated wide character string +#define XONLINE_MSG_PROP_TYPE_FILETIME ((BYTE) 7) // The property value points to a time value +#define XONLINE_MSG_PROP_TYPE_BINARY ((BYTE) 8) // The property value points to a binary blob that fits in the message details +#define XONLINE_MSG_PROP_TYPE_ATTACHMENT ((BYTE) 9) // The property value points to a binary blob (or directory path, depending on attachment flags) that will be uploaded to storage during XOnlineMessageSend +#define XONLINE_MSG_PROP_TYPE_BOOL ((BYTE) 10) // The property value points to a boolean value (1=TRUE, 0=FALSE) +#define XONLINE_MSG_PROP_TYPE_STRING_ID ((BYTE) 11) // The property value contains a string ID whose text can be requested from the string service + +// +// Attachment Flags +// +#define XONLINE_MSG_ATTACHMENT_FLAG_NON_EXPORTABLE 0x00000001 // This attachment should not be visible when the message is displayed on the web +#define XONLINE_MSG_ATTACHMENT_FLAG_DIRECTORY 0x00000002 // The property value points to an ANSI path string to a local directory that will be uploaded to storage, instead of a binary blob +#define XONLINE_MSG_ATTACHMENT_FLAGS_RESERVED 0xFFFFFFFC // Flags reserved for future use + + +// +// Message Property Tags +// Property tags occupy a word where the upper byte indicates the property's data type, and +// the lower byte indicates a unique identifier for the property. Property identifiers only +// need to be unique within a given message type. +// +#define XONLINE_MSG_PROP_TAG(type, id) ((BYTE)(type) << 8 | (BYTE)(id)) +#define XOnlineMessageGetPropId(tag) (BYTE)((WORD)(tag) & 0xFF) +#define XOnlineMessageGetPropType(tag) (BYTE)((WORD)(tag) >> 8) + +// +// Message Property IDs +// Property IDs should adhere to the following ranges: +// +// Range Purpose +// 0x00-0x7F Reserved for use by titles +// 0x80-0xBF Reserved for use by Microsoft for non-global properties +// 0xC0-0xFF Reserved for use by Microsoft for properties that span all message types +#define XONLINE_MSG_PROP_ID_BUILTIN 0x80 // Used for properties defined by Microsoft +#define XONLINE_MSG_PROP_ID_GLOBAL 0x40 // Used for properties that can span all message types + +// +// Message IDs +// +#define XONLINE_MSG_ID_SEND_FAILED 0x80000000 // NOTE: This high bit must not be used so that send can use it to return failed HRESULTs +#define XONLINE_MSG_ID_SYSTEM_MESSAGE 0x40000000 // A message sent by the Live service or a publisher +#define XONLINE_MSG_ID_TRANSIENT_MESSAGE 0x20000000 // A special type of message that goes away when the sender goes offline +#define XONLINE_MSG_ID_BASE_MASK 0x00FFFFFF +#define XONLINE_MSG_ID_RESERVED_MASK 0x1F000000 + +#define IsMsgTransient( msgid ) ( ( msgid ) & XONLINE_MSG_ID_TRANSIENT_MESSAGE ) + +// +// Message Notifications (Internal) +// +#define XONLINE_MSG_NOTIFICATION_FLAG_SAME_TITLE 0x000001 +#define XONLINE_MSG_NOTIFICATION_FLAG_SAME_PUBLISHER 0x000002 +#define XONLINE_MSG_NOTIFICATION_FLAG_INVITE_FROM_FRIEND 0x000004 +#define XONLINE_MSG_NOTIFICATION_FLAG_HAS_VOICE 0x000008 +#define XONLINE_MSG_NOTIFICATION_FLAG_HAS_TEXT 0x000010 +#define XONLINE_MSG_NOTIFICATION_FLAG_ALT_TITLE 0x000020 +#define XONLINE_MSG_NOTIFICATION_FLAG_TITLE_RESERVED 0xFF0000 +#define XONLINE_MSG_NOTIFICATION_FLAG_RESERVED 0x00FFC0 + +#pragma pack(push, 1) +struct Q_MESSAGE_NOTIFICATION +{ + DWORD dwTypeAndFlags; // The upper byte is the message type +}; + +#define XOnlineMessageNotificationGetMsgType( dwTypeAndFlags ) (BYTE)( ( dwTypeAndFlags ) >> 24 ) +#define XOnlineMessageNotificationGetFlags( dwTypeAndFlags ) (DWORD)( ( dwTypeAndFlags ) & 0x00FFFFFF ) + +typedef struct Q_MESSAGE_NOTIFICATION XONLINE_MESSAGE_NOTIFICATION; +#pragma pack(pop) + +// +// Message Types +// +// A message type establishes the purpose of the message and the properties that +// are required for a message of that type. +// +#define XONLINE_MSG_TYPE_TITLE_CUSTOM ((BYTE) 1) // context: title defined; required props: title defined +#define XONLINE_MSG_TYPE_FRIEND_REQUEST ((BYTE) 2) // context: 0; required props: none +#define XONLINE_MSG_TYPE_GAME_INVITE ((BYTE) 3) // context: see msg flags; required props: XONLINE_MSG_PROP_SESSION_ID +#define XONLINE_MSG_TYPE_TEAM_RECRUIT ((BYTE) 4) // context: inviting team ID; required props: none +#define XONLINE_MSG_TYPE_COMP_REMINDER ((BYTE) 5) // context: comp event ID; required props: XONLINE_MSG_PROP_COMP_NAME, XONLINE_MSG_PROP_COMP_EVENT_START +#define XONLINE_MSG_TYPE_COMP_REQUEST ((BYTE) 6) // context: comp entity ID; required props: XONLINE_MSG_PROP_COMP_NAME, XONLINE_MSG_PROP_COMP_START, XONLINE_MSG_PROP_COMP_REG_CLOSE +#define XONLINE_MSG_TYPE_LIVE_MESSAGE ((BYTE) 7) // context: 0 required props: XONLINE_MSG_PROP_SYSTEM_TEXT +#define XONLINE_MSG_TYPE_PERSONAL_MESSAGE ((BYTE) 8) // context: 0 required props: XONLINE_MSG_PROP_TEXT, XONLINE_MSG_PROP_VOICE_DATA. +#define XONLINE_MSG_TYPE_VIDEO_MESSAGE ((BYTE) 9) // context: 0 required props: XONLINE_MSG_PROP_TEXT, XONLINE_MSG_PROP_VIDEO_DATA +#define XONLINE_MSG_TYPE_QUICK_CHAT_INVITE ((BYTE) 10) // context: 0 + +// +// Global property tags, allowed in any message type +// + +// All message types can contain a voice attachment specified in the following properties. All three +// of the following properties should be specified together. The XONLINE_MSG_FLAG_HAS_VOICE message +// flag can be used to test for the presence of these properties before the message details have been +// retrieved. +#define XONLINE_MSG_PROP_VOICE_DATA XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_ATTACHMENT, XONLINE_MSG_PROP_ID_GLOBAL | XONLINE_MSG_PROP_ID_BUILTIN | 1) +#define XONLINE_MSG_PROP_VOICE_DATA_CODEC XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_I2, XONLINE_MSG_PROP_ID_GLOBAL | XONLINE_MSG_PROP_ID_BUILTIN | 2) +#define XONLINE_MSG_PROP_VOICE_DATA_DURATION XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_I4, XONLINE_MSG_PROP_ID_GLOBAL | XONLINE_MSG_PROP_ID_BUILTIN | 3) + +// All message types can contain a text summary specified in the following properties. Both +// of the following properties should be specified together. The XONLINE_MSG_FLAG_HAS_TEXT message +// flag can be used to test for the presence of these properties before the message details have been +// retrieved. The text should be 256 characters or less and may be used by Live anywhere that a text +// summary of the message is useful, such as in a Messenger Alert, on the web, or in the Dashboard. +#define XONLINE_MSG_PROP_TEXT XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_STRING, XONLINE_MSG_PROP_ID_GLOBAL | XONLINE_MSG_PROP_ID_BUILTIN | 4) +#define XONLINE_MSG_PROP_TEXT_LANGUAGE XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_I4, XONLINE_MSG_PROP_ID_GLOBAL | XONLINE_MSG_PROP_ID_BUILTIN | 5) + + +// +//Video Message Properties +// +#define XONLINE_MSG_PROP_VIDEO_FRAME_DATA XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_ATTACHMENT, XONLINE_MSG_PROP_ID_BUILTIN | 1) +#define XONLINE_MSG_PROP_VIDEO_FRAME_CODEC XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_I2, XONLINE_MSG_PROP_ID_BUILTIN | 2) //This defines the First Frame of the Video as JPG, BMP...etc if we wanted to show the First Frame of the Video in the HUD. +#define XONLINE_MSG_PROP_VIDEO_DATA XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_ATTACHMENT, XONLINE_MSG_PROP_ID_BUILTIN | 3) +#define XONLINE_MSG_PROP_VIDEO_DATA_CODEC XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_I2, XONLINE_MSG_PROP_ID_BUILTIN | 4) +#define XONLINE_MSG_PROP_VIDEO_DATA_DURATION XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_I4, XONLINE_MSG_PROP_ID_BUILTIN | 5) + +// +// Invite message properties +// +#define XONLINE_MSG_PROP_SESSION_ID XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_I8, XONLINE_MSG_PROP_ID_BUILTIN | 1) +#define XONLINE_MSG_PROP_SESSION_DESCRIPTION XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_STRING, XONLINE_MSG_PROP_ID_BUILTIN | 2) +#define XONLINE_MSG_PROP_SESSION_HOST_XNADDR XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_BINARY, XONLINE_MSG_PROP_ID_BUILTIN | 3) +#define XONLINE_MSG_PROP_SESSION_HOST_KEY XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_BINARY, XONLINE_MSG_PROP_ID_BUILTIN | 4) + +// +// Live system message properties +// +#define XONLINE_MSG_PROP_SYSTEM_TEXT XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_STRING_ID, XONLINE_MSG_PROP_ID_BUILTIN | 1) + +// +// Team Recruit message properties +// +#define XONLINE_MSG_PROP_TEAM_NAME XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_STRING, XONLINE_MSG_PROP_ID_BUILTIN | 1) + +// +// Competitions message properties +// +#define XONLINE_MSG_PROP_COMP_DATASET XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_I4, XONLINE_MSG_PROP_ID_BUILTIN | 0x1 ) +#define XONLINE_MSG_PROP_COMP_NAME XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_STRING, XONLINE_MSG_PROP_ID_BUILTIN | 0x2 ) +#define XONLINE_MSG_PROP_COMP_START XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_FILETIME, XONLINE_MSG_PROP_ID_BUILTIN | 0x3 ) +#define XONLINE_MSG_PROP_COMP_ROUND XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_I2, XONLINE_MSG_PROP_ID_BUILTIN | 0x4 ) +#define XONLINE_MSG_PROP_COMP_OPPONENT XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_STRING_ID, XONLINE_MSG_PROP_ID_BUILTIN | 0x5 ) +#define XONLINE_MSG_PROP_COMP_ADMIN XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_I8, XONLINE_MSG_PROP_ID_BUILTIN | 0x6 ) +#define XONLINE_MSG_PROP_COMP_REG_CLOSE XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_FILETIME, XONLINE_MSG_PROP_ID_BUILTIN | 0x7 ) +#define XONLINE_MSG_PROP_COMP_PRIVATE_SLOTS XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_I2, XONLINE_MSG_PROP_ID_BUILTIN | 0x8 ) +#define XONLINE_MSG_PROP_COMP_PUBLIC_SLOTS XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_I2, XONLINE_MSG_PROP_ID_BUILTIN | 0x9 ) +#define XONLINE_MSG_PROP_COMP_UNITS XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_I2, XONLINE_MSG_PROP_ID_BUILTIN | 0xA ) +#define XONLINE_MSG_PROP_COMP_INTERVAL XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_I2, XONLINE_MSG_PROP_ID_BUILTIN | 0xB ) +#define XONLINE_MSG_PROP_COMP_DAYMASK XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_I2, XONLINE_MSG_PROP_ID_BUILTIN | 0xC ) +#define XONLINE_MSG_PROP_COMP_DESCRIPTION XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_STRING, XONLINE_MSG_PROP_ID_BUILTIN | 0xD ) +#define XONLINE_MSG_PROP_COMP_URL XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_STRING, XONLINE_MSG_PROP_ID_BUILTIN | 0xE ) +#define XONLINE_MSG_PROP_COMP_EVENT_ID XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_I8, XONLINE_MSG_PROP_ID_BUILTIN | 0x10 ) +#define XONLINE_MSG_PROP_COMP_EVENT_START XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_FILETIME, XONLINE_MSG_PROP_ID_BUILTIN | 0x11 ) + +// +// HUD message properties. These properties act the same as game invite +// properties. This is so that some day they may be merged. +// +#define XONLINE_HUD_MSG_PROP_SESSION_ID XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_I8, XONLINE_MSG_PROP_ID_BUILTIN | 1) +#define XONLINE_HUD_MSG_PROP_SESSION_DESCRIPTION XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_STRING, XONLINE_MSG_PROP_ID_BUILTIN | 2) +#define XONLINE_HUD_MSG_PROP_SESSION_HOST_XNADDR XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_BINARY, XONLINE_MSG_PROP_ID_BUILTIN | 3) +#define XONLINE_HUD_MSG_PROP_SESSION_HOST_KEY XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_BINARY, XONLINE_MSG_PROP_ID_BUILTIN | 4) +#define XONLINE_HUD_MSG_PROP_VOICECHAT_PORT XONLINE_MSG_PROP_TAG(XONLINE_MSG_PROP_TYPE_I2, XONLINE_MSG_PROP_ID_BUILTIN | 5) + +// +// Voice Codec types (values for XONLINE_MSG_PROP_VOICE_DATA_CODEC) +// +#define XONLINE_PROP_VOICE_DATA_CODEC_WMAVOICE_V90 1 +#define XONLINE_PROP_VOICE_DATA_CODEC_SASE3200 2 + + +// Write to the global settings rather than title-specific settings. +// We use the Dash titleid for mysteries having to do with xbox.com. +#define XPROFILE_TITLEID_GLOBAL_SETTINGS XENON_DASH_TITLE_ID + +// Values for the stored Profile: User State +typedef enum _XPROFILE_GAMER_PRESENCE_USER_STATE_VALUE +{ + XPROFILE_GAMER_PRESENCE_USER_STATE_VALUE_ONLINE = 0, + XPROFILE_GAMER_PRESENCE_USER_STATE_VALUE_AWAY, + XPROFILE_GAMER_PRESENCE_USER_STATE_VALUE_BUSY, + XPROFILE_GAMER_PRESENCE_USER_STATE_VALUE_APPEAROFFLINE + +} XPROFILE_GAMER_PRESENCE_USER_STATE_VALUE; + + +typedef struct +{ + XOVERLAPPED* pXOverlapped; + DWORD dwTitleId; // A title in your family or 0 for the current title + DWORD dwUserIndex; // User index of the requesting user + DWORD dwNumFor; // Number of users (indexes or XUIDs) whose setings are read + const XUID* pxuidFor; // Pointer to array of XUIDs to request settings for + DWORD dwNumSettingIds; // Number of settings in pSettingIds + const DWORD* pSettingIds; // Settings to retrieve for list of users + DWORD cbResults; + PXUSER_READ_PROFILE_SETTING_RESULT pResults; +} XGI_READSETTINGS_MSG; + + +typedef struct +{ + XOVERLAPPED* pXOverlapped; + DWORD dwTitleId; + DWORD dwUserIndex; // User index of the player whose settings are written + DWORD dwNumSettings; // Number of settings in pSettings + const XUSER_PROFILE_SETTING* pSettings; // Settings to set +} XGI_WRITESETTINGS_MSG; + + +//----------------------------------------------------------------------------- +// XBOS API structs +//----------------------------------------------------------------------------- + +typedef struct +{ + DWORD dwUserIndex; + DWORD dwTitleId; + DWORD dwContentCategories; + XOFFERING_CONTENTAVAILABLE_RESULT *pResults; +} LIVEBASE_CONTENTAVAILABLE_MSG; + + +//----------------------------------------------------------------------------- +// XM_LIVEBASE_PRESENCESET message structures +//----------------------------------------------------------------------------- + +typedef struct +{ + DWORD dwContextId; + DWORD dwContextValue; +} PRESENCE_CONTEXT; + + +typedef struct +{ + DWORD dwPropertyId; // Includes type; use XPROPERTYTYPEFROMID + DWORD cbData; // Count of bytes in pbData + // BYTE pbData; // Property value starts here + // Strings and binary are prefixed with a WORD length. + // Strings are wide chars (UTF-16) and are not NULL-terminated. +} PRESENCE_PROPERTY; + +// This is the maximum total number of bytes for contexts and properties +// that LiveBase will accept, cache and send up to the servers. +#define MAX_LIVEBASE_PRESENCE 256 + +typedef struct +{ + XUID xuidUser; // UserID + DWORD dwPresenceMode; // The value of the presence mode context (X_CONTEXT_PRESENCE) + DWORD dwNumContexts; // Number PRESENCE_CONTEXTs at beginning of rgbPayload + DWORD dwNumProperties; // Number PRESENCE_PROPERTY after contexts in rgbPayload + BYTE rgbPayload[MAX_LIVEBASE_PRESENCE]; +} LIVEBASE_SETPRESENCE_MSG; + +#ifdef __cplusplus +} +#endif + +#endif // __XONLINEP__ + diff --git a/xbdm/ini.c b/xbdm/ini.c new file mode 100644 index 0000000..d0172b3 --- /dev/null +++ b/xbdm/ini.c @@ -0,0 +1,161 @@ +/* + Copyright (c) 2013 Nathan LeRoux + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#include "dmincludes.h" + +//extern DMCMD rgbcmd[]; +//extern int cchcmd; + +void FLoadGlobals() +{ + HANDLE hFile; + NTSTATUS st; + char szBuf[0x200]; + char sz[0x200]; + int cch, i; + + st = FCreateFile(&hFile, GENERIC_READ | SYNCHRONIZE, "Hdd:\\xbdm.ini", NULL, 0, FILE_SHARE_READ, FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT); + if(FAILED(st)) + st = FCreateFile(&hFile, GENERIC_READ | SYNCHRONIZE, "IntUsb:\\xbdm.ini", NULL, 0, FILE_SHARE_READ, FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT); + + if(NT_SUCCESS(st)) + { + ZeroMemory(szBuf, sizeof(szBuf)); + ZeroMemory(sz, sizeof(sz)); + + cch = 0; + while(NT_SUCCESS(st)) + { + st = FReadFile(hFile, szBuf + cch, 1); + + if(FAILED(st) || szBuf[cch] == '\n') // FAILED(st) == END_OF_FILE + { + szBuf[cch] = 0; + cch = 0; + + for(i = 0;szBuf[i];i++) + { + if(szBuf[i] == ' ') + break; + } + + if(szBuf[i] == ' ') + for(cch = 0;cch < cchcmd;cch++) + if(!strnicmp(rgbcmd[cch].szName, szBuf, i)) + rgbcmd[cch].pdmcp(szBuf, sz, sizeof(sz), NULL); // The ini settings is basically just a list of commands to execute + + cch = 0; + } + else if(szBuf[cch] != '\r') // dont include \r + cch++; + + if(cch == 0) + { + ZeroMemory(szBuf, sizeof(szBuf)); + ZeroMemory(sz, sizeof(sz)); + } + + if(cch == sizeof(szBuf)) + { + DbgPrint("[xbdm] Line too long!\n"); + st = E_INVALIDARG; + } + } + + NtClose(hFile); + } + else + { + DbgPrint("[xbdm] unable to open settings file for reading, result 0x%08x\n", st); + + if(st != STATUS_OBJECT_NAME_NOT_FOUND) + DebugBreak(); + } +} + +void FWriteGlobals() +{ + HANDLE hFile; + NTSTATUS st; + INF inf; + + inf.cbBuf = 0x1000; + inf.cbUsed = 0; + inf.pbBuf = ExAllocatePoolWithTag(0x1000, 'Xbdm'); + + if(!inf.pbBuf) + { + DbgPrint("[xbdm] unable to allocate memory for settings write\n"); + return; + } + + st = FCreateFile(&hFile, GENERIC_WRITE | SYNCHRONIZE, "Hdd:\\xbdm.ini", NULL, 0, 0, FILE_OVERWRITE_IF, FILE_SYNCHRONOUS_IO_NONALERT); + if(FAILED(st)) + st = FCreateFile(&hFile, GENERIC_WRITE | SYNCHRONIZE, "IntUsb:\\xbdm.ini", NULL, 0, 0, FILE_OVERWRITE_IF, FILE_SYNCHRONOUS_IO_NONALERT); + + if(NT_SUCCESS(st)) + { + // Debug name + FWriteText(hFile, &inf, "dbgname name=\"%s\"\r\n", g_dmGlobals.rgchDbgName); + + // FLASH:\\ in Neighborhood + if(g_dmGlobals.bDriveMap) + FWriteText(hFile, &inf, "drivemap internal\r\n"); + + // Console image in Neighborhood + FWriteText(hFile, &inf, "setcolor name=\""); + + switch(g_dmGlobals.dwConsoleColor) + { + case CONSOLE_COLOR_FLAG_BLACK: + FWriteText(hFile, &inf, "black"); // Black + break; + case CONSOLE_COLOR_FLAG_BLUE: + FWriteText(hFile, &inf, "grayblue"); // Gray Blue + break; + case (CONSOLE_COLOR_FLAG_BLACK | CONSOLE_COLOR_FLAG_BLUE): + FWriteText(hFile, &inf, "blue"); // Blue + break; + case CONSOLE_COLOR_FLAG_WHITE: + FWriteText(hFile, &inf, "white"); // White + break; + default: + FWriteText(hFile, &inf, "nosidecar"); + break; + } + + FWriteText(hFile, &inf, "\"\r\n"); + + // The debug dump mode + FWriteText(hFile, &inf, "dumpmode %s\r\n", rgszDumpMode[g_dmGlobals.dwDumpMode]); + + // Close and flush to disk + FCloseFile(hFile, &inf); + } + else + { + DbgPrint("[xbdm] unable to open settings file for writing, result 0x%08x\n", st); + DebugBreak(); + } + + ExFreePool(inf.pbBuf); +} \ No newline at end of file diff --git a/xbdm/ini.h b/xbdm/ini.h new file mode 100644 index 0000000..7fd2a30 --- /dev/null +++ b/xbdm/ini.h @@ -0,0 +1,29 @@ +/* + Copyright (c) 2013 Nathan LeRoux + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +#ifndef _INI_H +#define _INI_H + +void FLoadGlobals(); +void FWriteGlobals(); + +#endif \ No newline at end of file diff --git a/xbdm/ntstatus.h b/xbdm/ntstatus.h new file mode 100644 index 0000000..dddf388 --- /dev/null +++ b/xbdm/ntstatus.h @@ -0,0 +1,37025 @@ +/*++ BUILD Version: 0005 // Increment this if a change has global effects + +Copyright (c) Microsoft Corporation. All rights reserved. + +Module Name: + + ntstatus.h + +Abstract: + + Constant definitions for the NTSTATUS values. + +Author: + + Portable Systems Group 30-Mar-1989 + +Revision History: + +Notes: + + This file is generated by the MC tool from the ntstatus.mc file. + + Please add new error values to the end of the file. To do otherwise + will jumble the error values. + +--*/ + +#ifndef _NTSTATUS_ +#define _NTSTATUS_ + +#if defined (_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +#ifndef WIN32_NO_STATUS // winnt +// begin_ntsecapi + +/*lint -save -e767 */ // Don't complain about different definitions // winnt + + +///////////////////////////////////////////////////////////////////////// +// +// Please update FACILITY_MAXIMUM_VALUE when adding new facility values. +// (This value should be greater than the highest value above) +// +// Facility 0x17 is reserved and used in isolation lib as +// PIE=0x17:FACILITY_MANIFEST_ERROR_CODE +// +// +///////////////////////////////////////////////////////////////////////// + +///////////////////////////////////////////////////////////////////////// +// +// Standard Success values +// +// +///////////////////////////////////////////////////////////////////////// + + +// +// The success status codes 0 - 63 are reserved for wait completion status. +// FacilityCodes 0x5 - 0xF have been allocated by various drivers. +// +#define STATUS_SUCCESS ((NTSTATUS)0x00000000L) // ntsubauth + +// +// Values are 32 bit values laid out as follows: +// +// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 +// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 +// +---+-+-+-----------------------+-------------------------------+ +// |Sev|C|R| Facility | Code | +// +---+-+-+-----------------------+-------------------------------+ +// +// where +// +// Sev - is the severity code +// +// 00 - Success +// 01 - Informational +// 10 - Warning +// 11 - Error +// +// C - is the Customer code flag +// +// R - is a reserved bit +// +// Facility - is the facility code +// +// Code - is the facility's status code +// +// +// Define the facility codes +// +#define FACILITY_VOLMGR 0x38 +#define FACILITY_VIRTUALIZATION 0x37 +#define FACILITY_VIDEO 0x1B +#define FACILITY_USB_ERROR_CODE 0x10 +#define FACILITY_TRANSACTION 0x19 +#define FACILITY_TERMINAL_SERVER 0xA +#define FACILITY_SXS_ERROR_CODE 0x15 +#define FACILITY_NTSSPI 0x9 +#define FACILITY_RPC_STUBS 0x3 +#define FACILITY_RPC_RUNTIME 0x2 +#define FACILITY_NTWIN32 0x7 +#define FACILITY_WIN32K_NTUSER 0x3E +#define FACILITY_WIN32K_NTGDI 0x3F +#define FACILITY_NDIS_ERROR_CODE 0x23 +#define FACILTIY_MUI_ERROR_CODE 0xB +#define FACILITY_MONITOR 0x1D +#define FACILITY_MAXIMUM_VALUE 0x3F +#define FACILITY_IPSEC 0x36 +#define FACILITY_IO_ERROR_CODE 0x4 +#define FACILITY_HYPERVISOR 0x35 +#define FACILITY_HID_ERROR_CODE 0x11 +#define FACILITY_GRAPHICS_KERNEL 0x1E +#define FACILITY_FWP_ERROR_CODE 0x22 +#define FACILITY_FVE_ERROR_CODE 0x21 +#define FACILITY_FIREWIRE_ERROR_CODE 0x12 +#define FACILITY_FILTER_MANAGER 0x1C +#define FACILITY_DRIVER_FRAMEWORK 0x20 +#define FACILITY_DIS 0x3C +#define FACILITY_DEBUGGER 0x1 +#define FACILITY_COMMONLOG 0x1A +#define FACILITY_CLUSTER_ERROR_CODE 0x13 +#define FACILITY_NTCERT 0x8 +#define FACILITY_BCD_ERROR_CODE 0x39 +#define FACILITY_ACPI_ERROR_CODE 0x14 + + +// +// Define the severity codes +// +#define STATUS_SEVERITY_WARNING 0x2 +#define STATUS_SEVERITY_SUCCESS 0x0 +#define STATUS_SEVERITY_INFORMATIONAL 0x1 +#define STATUS_SEVERITY_ERROR 0x3 + +// +// MessageId: STATUS_WAIT_1 +// +// MessageText: +// +// STATUS_WAIT_1 +// +#define STATUS_WAIT_1 ((NTSTATUS)0x00000001L) + +// +// MessageId: STATUS_WAIT_2 +// +// MessageText: +// +// STATUS_WAIT_2 +// +#define STATUS_WAIT_2 ((NTSTATUS)0x00000002L) + +// +// MessageId: STATUS_WAIT_3 +// +// MessageText: +// +// STATUS_WAIT_3 +// +#define STATUS_WAIT_3 ((NTSTATUS)0x00000003L) + +// +// MessageId: STATUS_WAIT_63 +// +// MessageText: +// +// STATUS_WAIT_63 +// +#define STATUS_WAIT_63 ((NTSTATUS)0x0000003FL) + + +// +// The success status codes 128 - 191 are reserved for wait completion +// status with an abandoned mutant object. +// +#define STATUS_ABANDONED ((NTSTATUS)0x00000080L) + +// +// MessageId: STATUS_ABANDONED_WAIT_63 +// +// MessageText: +// +// STATUS_ABANDONED_WAIT_63 +// +#define STATUS_ABANDONED_WAIT_63 ((NTSTATUS)0x000000BFL) + +// +// MessageId: STATUS_KERNEL_APC +// +// MessageText: +// +// STATUS_KERNEL_APC +// +#define STATUS_KERNEL_APC ((NTSTATUS)0x00000100L) + +// +// MessageId: STATUS_ALERTED +// +// MessageText: +// +// STATUS_ALERTED +// +#define STATUS_ALERTED ((NTSTATUS)0x00000101L) + +// +// MessageId: STATUS_REPARSE +// +// MessageText: +// +// A reparse should be performed by the Object Manager since the name of the file resulted in a symbolic link. +// +#define STATUS_REPARSE ((NTSTATUS)0x00000104L) + +// +// MessageId: STATUS_MORE_ENTRIES +// +// MessageText: +// +// Returned by enumeration APIs to indicate more information is available to successive calls. +// +#define STATUS_MORE_ENTRIES ((NTSTATUS)0x00000105L) + +// +// MessageId: STATUS_NOT_ALL_ASSIGNED +// +// MessageText: +// +// Indicates not all privileges or groups referenced are assigned to the caller. +// This allows, for example, all privileges to be disabled without having to know exactly which privileges are assigned. +// +#define STATUS_NOT_ALL_ASSIGNED ((NTSTATUS)0x00000106L) + +// +// MessageId: STATUS_SOME_NOT_MAPPED +// +// MessageText: +// +// Some of the information to be translated has not been translated. +// +#define STATUS_SOME_NOT_MAPPED ((NTSTATUS)0x00000107L) + +// +// MessageId: STATUS_OPLOCK_BREAK_IN_PROGRESS +// +// MessageText: +// +// An open/create operation completed while an oplock break is underway. +// +#define STATUS_OPLOCK_BREAK_IN_PROGRESS ((NTSTATUS)0x00000108L) + +// +// MessageId: STATUS_VOLUME_MOUNTED +// +// MessageText: +// +// A new volume has been mounted by a file system. +// +#define STATUS_VOLUME_MOUNTED ((NTSTATUS)0x00000109L) + +// +// MessageId: STATUS_RXACT_COMMITTED +// +// MessageText: +// +// This success level status indicates that the transaction state already exists for the registry sub-tree, but that a transaction commit was previously aborted. The commit has now been completed. +// +#define STATUS_RXACT_COMMITTED ((NTSTATUS)0x0000010AL) + +// +// MessageId: STATUS_NOTIFY_CLEANUP +// +// MessageText: +// +// This indicates that a notify change request has been completed due to closing the handle which made the notify change request. +// +#define STATUS_NOTIFY_CLEANUP ((NTSTATUS)0x0000010BL) + +// +// MessageId: STATUS_NOTIFY_ENUM_DIR +// +// MessageText: +// +// This indicates that a notify change request is being completed and that the information is not being returned in the caller's buffer. +// The caller now needs to enumerate the files to find the changes. +// +#define STATUS_NOTIFY_ENUM_DIR ((NTSTATUS)0x0000010CL) + +// +// MessageId: STATUS_NO_QUOTAS_FOR_ACCOUNT +// +// MessageText: +// +// {No Quotas} +// No system quota limits are specifically set for this account. +// +#define STATUS_NO_QUOTAS_FOR_ACCOUNT ((NTSTATUS)0x0000010DL) + +// +// MessageId: STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED +// +// MessageText: +// +// {Connect Failure on Primary Transport} +// An attempt was made to connect to the remote server %hs on the primary transport, but the connection failed. +// The computer WAS able to connect on a secondary transport. +// +#define STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED ((NTSTATUS)0x0000010EL) + +// +// MessageId: STATUS_PAGE_FAULT_TRANSITION +// +// MessageText: +// +// Page fault was a transition fault. +// +#define STATUS_PAGE_FAULT_TRANSITION ((NTSTATUS)0x00000110L) + +// +// MessageId: STATUS_PAGE_FAULT_DEMAND_ZERO +// +// MessageText: +// +// Page fault was a demand zero fault. +// +#define STATUS_PAGE_FAULT_DEMAND_ZERO ((NTSTATUS)0x00000111L) + +// +// MessageId: STATUS_PAGE_FAULT_COPY_ON_WRITE +// +// MessageText: +// +// Page fault was a demand zero fault. +// +#define STATUS_PAGE_FAULT_COPY_ON_WRITE ((NTSTATUS)0x00000112L) + +// +// MessageId: STATUS_PAGE_FAULT_GUARD_PAGE +// +// MessageText: +// +// Page fault was a demand zero fault. +// +#define STATUS_PAGE_FAULT_GUARD_PAGE ((NTSTATUS)0x00000113L) + +// +// MessageId: STATUS_PAGE_FAULT_PAGING_FILE +// +// MessageText: +// +// Page fault was satisfied by reading from a secondary storage device. +// +#define STATUS_PAGE_FAULT_PAGING_FILE ((NTSTATUS)0x00000114L) + +// +// MessageId: STATUS_CACHE_PAGE_LOCKED +// +// MessageText: +// +// Cached page was locked during operation. +// +#define STATUS_CACHE_PAGE_LOCKED ((NTSTATUS)0x00000115L) + +// +// MessageId: STATUS_CRASH_DUMP +// +// MessageText: +// +// Crash dump exists in paging file. +// +#define STATUS_CRASH_DUMP ((NTSTATUS)0x00000116L) + +// +// MessageId: STATUS_BUFFER_ALL_ZEROS +// +// MessageText: +// +// Specified buffer contains all zeros. +// +#define STATUS_BUFFER_ALL_ZEROS ((NTSTATUS)0x00000117L) + +// +// MessageId: STATUS_REPARSE_OBJECT +// +// MessageText: +// +// A reparse should be performed by the Object Manager since the name of the file resulted in a symbolic link. +// +#define STATUS_REPARSE_OBJECT ((NTSTATUS)0x00000118L) + +// +// MessageId: STATUS_RESOURCE_REQUIREMENTS_CHANGED +// +// MessageText: +// +// The device has succeeded a query-stop and its resource requirements have changed. +// +#define STATUS_RESOURCE_REQUIREMENTS_CHANGED ((NTSTATUS)0x00000119L) + +// +// MessageId: STATUS_TRANSLATION_COMPLETE +// +// MessageText: +// +// The translator has translated these resources into the global space and no further translations should be performed. +// +#define STATUS_TRANSLATION_COMPLETE ((NTSTATUS)0x00000120L) + +// +// MessageId: STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY +// +// MessageText: +// +// The directory service evaluated group memberships locally, as it was unable to contact a global catalog server. +// +#define STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY ((NTSTATUS)0x00000121L) + +// +// MessageId: STATUS_NOTHING_TO_TERMINATE +// +// MessageText: +// +// A process being terminated has no threads to terminate. +// +#define STATUS_NOTHING_TO_TERMINATE ((NTSTATUS)0x00000122L) + +// +// MessageId: STATUS_PROCESS_NOT_IN_JOB +// +// MessageText: +// +// The specified process is not part of a job. +// +#define STATUS_PROCESS_NOT_IN_JOB ((NTSTATUS)0x00000123L) + +// +// MessageId: STATUS_PROCESS_IN_JOB +// +// MessageText: +// +// The specified process is part of a job. +// +#define STATUS_PROCESS_IN_JOB ((NTSTATUS)0x00000124L) + +// +// MessageId: STATUS_VOLSNAP_HIBERNATE_READY +// +// MessageText: +// +// {Volume Shadow Copy Service} +// The system is now ready for hibernation. +// +#define STATUS_VOLSNAP_HIBERNATE_READY ((NTSTATUS)0x00000125L) + +// +// MessageId: STATUS_FSFILTER_OP_COMPLETED_SUCCESSFULLY +// +// MessageText: +// +// A file system or file system filter driver has successfully completed an FsFilter operation. +// +#define STATUS_FSFILTER_OP_COMPLETED_SUCCESSFULLY ((NTSTATUS)0x00000126L) + +// +// MessageId: STATUS_INTERRUPT_VECTOR_ALREADY_CONNECTED +// +// MessageText: +// +// The specified interrupt vector was already connected. +// +#define STATUS_INTERRUPT_VECTOR_ALREADY_CONNECTED ((NTSTATUS)0x00000127L) + +// +// MessageId: STATUS_INTERRUPT_STILL_CONNECTED +// +// MessageText: +// +// The specified interrupt vector is still connected. +// +#define STATUS_INTERRUPT_STILL_CONNECTED ((NTSTATUS)0x00000128L) + +// +// MessageId: STATUS_PROCESS_CLONED +// +// MessageText: +// +// The current process is a cloned process. +// +#define STATUS_PROCESS_CLONED ((NTSTATUS)0x00000129L) + +// +// MessageId: STATUS_FILE_LOCKED_WITH_ONLY_READERS +// +// MessageText: +// +// The file was locked and all users of the file can only read. +// +#define STATUS_FILE_LOCKED_WITH_ONLY_READERS ((NTSTATUS)0x0000012AL) + +// +// MessageId: STATUS_FILE_LOCKED_WITH_WRITERS +// +// MessageText: +// +// The file was locked and at least one user of the file can write. +// +#define STATUS_FILE_LOCKED_WITH_WRITERS ((NTSTATUS)0x0000012BL) + +// +// MessageId: STATUS_RESOURCEMANAGER_READ_ONLY +// +// MessageText: +// +// The specified ResourceManager made no changes or updates to the resource under this transaction. +// +#define STATUS_RESOURCEMANAGER_READ_ONLY ((NTSTATUS)0x00000202L) + +// +// MessageId: STATUS_RING_PREVIOUSLY_EMPTY +// +// MessageText: +// +// The specified ring buffer was empty before the packet was successfully inserted. +// +#define STATUS_RING_PREVIOUSLY_EMPTY ((NTSTATUS)0x00000210L) + +// +// MessageId: STATUS_RING_PREVIOUSLY_FULL +// +// MessageText: +// +// The specified ring buffer was full before the packet was successfully removed. +// +#define STATUS_RING_PREVIOUSLY_FULL ((NTSTATUS)0x00000211L) + +// +// MessageId: STATUS_RING_PREVIOUSLY_ABOVE_QUOTA +// +// MessageText: +// +// The specified ring buffer has dropped below its quota of outstanding transactions. +// +#define STATUS_RING_PREVIOUSLY_ABOVE_QUOTA ((NTSTATUS)0x00000212L) + +// +// MessageId: STATUS_RING_NEWLY_EMPTY +// +// MessageText: +// +// The specified ring buffer has, with the removal of the current packet, now become empty. +// +#define STATUS_RING_NEWLY_EMPTY ((NTSTATUS)0x00000213L) + +// +// MessageId: STATUS_RING_SIGNAL_OPPOSITE_ENDPOINT +// +// MessageText: +// +// The specified ring buffer was either previously empty or previously full which implies that the caller should signal the opposite endpoint. +// +#define STATUS_RING_SIGNAL_OPPOSITE_ENDPOINT ((NTSTATUS)0x00000214L) + +// +// MessageId: STATUS_OPLOCK_SWITCHED_TO_NEW_HANDLE +// +// MessageText: +// +// The oplock that was associated with this handle is now associated with a different handle. +// +#define STATUS_OPLOCK_SWITCHED_TO_NEW_HANDLE ((NTSTATUS)0x00000215L) + +// +// MessageId: STATUS_OPLOCK_HANDLE_CLOSED +// +// MessageText: +// +// The handle with which this oplock was associated has been closed. The oplock is now broken. +// +#define STATUS_OPLOCK_HANDLE_CLOSED ((NTSTATUS)0x00000216L) + +// +// MessageId: STATUS_WAIT_FOR_OPLOCK +// +// MessageText: +// +// An operation is blocked waiting for an oplock. +// +#define STATUS_WAIT_FOR_OPLOCK ((NTSTATUS)0x00000367L) + +// +// MessageId: DBG_EXCEPTION_HANDLED +// +// MessageText: +// +// Debugger handled exception +// +#define DBG_EXCEPTION_HANDLED ((NTSTATUS)0x00010001L) // winnt + +// +// MessageId: STATUS_FLT_IO_COMPLETE +// +// MessageText: +// +// The IO was completed by a filter. +// +#define STATUS_FLT_IO_COMPLETE ((NTSTATUS)0x001C0001L) + +// +// MessageId: STATUS_DIS_ATTRIBUTE_BUILT +// +// MessageText: +// +// An attribute was successfully built. +// +#define STATUS_DIS_ATTRIBUTE_BUILT ((NTSTATUS)0x003C0001L) + + + +///////////////////////////////////////////////////////////////////////// +// +// Standard Information values +// +///////////////////////////////////////////////////////////////////////// + +// +// MessageId: STATUS_OBJECT_NAME_EXISTS +// +// MessageText: +// +// {Object Exists} +// An attempt was made to create an object and the object name already existed. +// +#define STATUS_OBJECT_NAME_EXISTS ((NTSTATUS)0x40000000L) + +// +// MessageId: STATUS_THREAD_WAS_SUSPENDED +// +// MessageText: +// +// {Thread Suspended} +// A thread termination occurred while the thread was suspended. The thread was resumed, and termination proceeded. +// +#define STATUS_THREAD_WAS_SUSPENDED ((NTSTATUS)0x40000001L) + +// +// MessageId: STATUS_WORKING_SET_LIMIT_RANGE +// +// MessageText: +// +// {Working Set Range Error} +// An attempt was made to set the working set minimum or maximum to values which are outside of the allowable range. +// +#define STATUS_WORKING_SET_LIMIT_RANGE ((NTSTATUS)0x40000002L) + +// +// MessageId: STATUS_IMAGE_NOT_AT_BASE +// +// MessageText: +// +// {Image Relocated} +// An image file could not be mapped at the address specified in the image file. Local fixups must be performed on this image. +// +#define STATUS_IMAGE_NOT_AT_BASE ((NTSTATUS)0x40000003L) + +// +// MessageId: STATUS_RXACT_STATE_CREATED +// +// MessageText: +// +// This informational level status indicates that a specified registry sub-tree transaction state did not yet exist and had to be created. +// +#define STATUS_RXACT_STATE_CREATED ((NTSTATUS)0x40000004L) + +// +// MessageId: STATUS_SEGMENT_NOTIFICATION +// +// MessageText: +// +// {Segment Load} +// A virtual DOS machine (VDM) is loading, unloading, or moving an MS-DOS or Win16 program segment image. +// An exception is raised so a debugger can load, unload or track symbols and breakpoints within these 16-bit segments. +// +#define STATUS_SEGMENT_NOTIFICATION ((NTSTATUS)0x40000005L) // winnt + +// +// MessageId: STATUS_LOCAL_USER_SESSION_KEY +// +// MessageText: +// +// {Local Session Key} +// A user session key was requested for a local RPC connection. The session key returned is a constant value and not unique to this connection. +// +#define STATUS_LOCAL_USER_SESSION_KEY ((NTSTATUS)0x40000006L) + +// +// MessageId: STATUS_BAD_CURRENT_DIRECTORY +// +// MessageText: +// +// {Invalid Current Directory} +// The process cannot switch to the startup current directory %hs. +// Select OK to set current directory to %hs, or select CANCEL to exit. +// +#define STATUS_BAD_CURRENT_DIRECTORY ((NTSTATUS)0x40000007L) + +// +// MessageId: STATUS_SERIAL_MORE_WRITES +// +// MessageText: +// +// {Serial IOCTL Complete} +// A serial I/O operation was completed by another write to a serial port. +// (The IOCTL_SERIAL_XOFF_COUNTER reached zero.) +// +#define STATUS_SERIAL_MORE_WRITES ((NTSTATUS)0x40000008L) + +// +// MessageId: STATUS_REGISTRY_RECOVERED +// +// MessageText: +// +// {Registry Recovery} +// One of the files containing the system's Registry data had to be recovered by use of a log or alternate copy. The recovery was successful. +// +#define STATUS_REGISTRY_RECOVERED ((NTSTATUS)0x40000009L) + +// +// MessageId: STATUS_FT_READ_RECOVERY_FROM_BACKUP +// +// MessageText: +// +// {Redundant Read} +// To satisfy a read request, the NT fault-tolerant file system successfully read the requested data from a redundant copy. +// This was done because the file system encountered a failure on a member of the fault-tolerant volume, but was unable to reassign the failing area of the device. +// +#define STATUS_FT_READ_RECOVERY_FROM_BACKUP ((NTSTATUS)0x4000000AL) + +// +// MessageId: STATUS_FT_WRITE_RECOVERY +// +// MessageText: +// +// {Redundant Write} +// To satisfy a write request, the NT fault-tolerant file system successfully wrote a redundant copy of the information. +// This was done because the file system encountered a failure on a member of the fault-tolerant volume, but was not able to reassign the failing area of the device. +// +#define STATUS_FT_WRITE_RECOVERY ((NTSTATUS)0x4000000BL) + +// +// MessageId: STATUS_SERIAL_COUNTER_TIMEOUT +// +// MessageText: +// +// {Serial IOCTL Timeout} +// A serial I/O operation completed because the time-out period expired. (The IOCTL_SERIAL_XOFF_COUNTER had not reached zero.) +// +#define STATUS_SERIAL_COUNTER_TIMEOUT ((NTSTATUS)0x4000000CL) + +// +// MessageId: STATUS_NULL_LM_PASSWORD +// +// MessageText: +// +// {Password Too Complex} +// The Windows password is too complex to be converted to a LAN Manager password. The LAN Manager password returned is a NULL string. +// +#define STATUS_NULL_LM_PASSWORD ((NTSTATUS)0x4000000DL) + +// +// MessageId: STATUS_IMAGE_MACHINE_TYPE_MISMATCH +// +// MessageText: +// +// {Machine Type Mismatch} +// The image file %hs is valid, but is for a machine type other than the current machine. Select OK to continue, or CANCEL to fail the DLL load. +// +#define STATUS_IMAGE_MACHINE_TYPE_MISMATCH ((NTSTATUS)0x4000000EL) + +// +// MessageId: STATUS_RECEIVE_PARTIAL +// +// MessageText: +// +// {Partial Data Received} +// The network transport returned partial data to its client. The remaining data will be sent later. +// +#define STATUS_RECEIVE_PARTIAL ((NTSTATUS)0x4000000FL) + +// +// MessageId: STATUS_RECEIVE_EXPEDITED +// +// MessageText: +// +// {Expedited Data Received} +// The network transport returned data to its client that was marked as expedited by the remote system. +// +#define STATUS_RECEIVE_EXPEDITED ((NTSTATUS)0x40000010L) + +// +// MessageId: STATUS_RECEIVE_PARTIAL_EXPEDITED +// +// MessageText: +// +// {Partial Expedited Data Received} +// The network transport returned partial data to its client and this data was marked as expedited by the remote system. The remaining data will be sent later. +// +#define STATUS_RECEIVE_PARTIAL_EXPEDITED ((NTSTATUS)0x40000011L) + +// +// MessageId: STATUS_EVENT_DONE +// +// MessageText: +// +// {TDI Event Done} +// The TDI indication has completed successfully. +// +#define STATUS_EVENT_DONE ((NTSTATUS)0x40000012L) + +// +// MessageId: STATUS_EVENT_PENDING +// +// MessageText: +// +// {TDI Event Pending} +// The TDI indication has entered the pending state. +// +#define STATUS_EVENT_PENDING ((NTSTATUS)0x40000013L) + +// +// MessageId: STATUS_CHECKING_FILE_SYSTEM +// +// MessageText: +// +// Checking file system on %wZ +// +#define STATUS_CHECKING_FILE_SYSTEM ((NTSTATUS)0x40000014L) + +// +// MessageId: STATUS_FATAL_APP_EXIT +// +// MessageText: +// +// {Fatal Application Exit} +// %hs +// +#define STATUS_FATAL_APP_EXIT ((NTSTATUS)0x40000015L) + +// +// MessageId: STATUS_PREDEFINED_HANDLE +// +// MessageText: +// +// The specified registry key is referenced by a predefined handle. +// +#define STATUS_PREDEFINED_HANDLE ((NTSTATUS)0x40000016L) + +// +// MessageId: STATUS_WAS_UNLOCKED +// +// MessageText: +// +// {Page Unlocked} +// The page protection of a locked page was changed to 'No Access' and the page was unlocked from memory and from the process. +// +#define STATUS_WAS_UNLOCKED ((NTSTATUS)0x40000017L) + +// +// MessageId: STATUS_SERVICE_NOTIFICATION +// +// MessageText: +// +// %hs +// +#define STATUS_SERVICE_NOTIFICATION ((NTSTATUS)0x40000018L) + +// +// MessageId: STATUS_WAS_LOCKED +// +// MessageText: +// +// {Page Locked} +// One of the pages to lock was already locked. +// +#define STATUS_WAS_LOCKED ((NTSTATUS)0x40000019L) + +// +// MessageId: STATUS_LOG_HARD_ERROR +// +// MessageText: +// +// Application popup: %1 : %2 +// +#define STATUS_LOG_HARD_ERROR ((NTSTATUS)0x4000001AL) + +// +// MessageId: STATUS_ALREADY_WIN32 +// +// MessageText: +// +// STATUS_ALREADY_WIN32 +// +#define STATUS_ALREADY_WIN32 ((NTSTATUS)0x4000001BL) + +// +// MessageId: STATUS_WX86_UNSIMULATE +// +// MessageText: +// +// Exception status code used by Win32 x86 emulation subsystem. +// +#define STATUS_WX86_UNSIMULATE ((NTSTATUS)0x4000001CL) + +// +// MessageId: STATUS_WX86_CONTINUE +// +// MessageText: +// +// Exception status code used by Win32 x86 emulation subsystem. +// +#define STATUS_WX86_CONTINUE ((NTSTATUS)0x4000001DL) + +// +// MessageId: STATUS_WX86_SINGLE_STEP +// +// MessageText: +// +// Exception status code used by Win32 x86 emulation subsystem. +// +#define STATUS_WX86_SINGLE_STEP ((NTSTATUS)0x4000001EL) + +// +// MessageId: STATUS_WX86_BREAKPOINT +// +// MessageText: +// +// Exception status code used by Win32 x86 emulation subsystem. +// +#define STATUS_WX86_BREAKPOINT ((NTSTATUS)0x4000001FL) + +// +// MessageId: STATUS_WX86_EXCEPTION_CONTINUE +// +// MessageText: +// +// Exception status code used by Win32 x86 emulation subsystem. +// +#define STATUS_WX86_EXCEPTION_CONTINUE ((NTSTATUS)0x40000020L) + +// +// MessageId: STATUS_WX86_EXCEPTION_LASTCHANCE +// +// MessageText: +// +// Exception status code used by Win32 x86 emulation subsystem. +// +#define STATUS_WX86_EXCEPTION_LASTCHANCE ((NTSTATUS)0x40000021L) + +// +// MessageId: STATUS_WX86_EXCEPTION_CHAIN +// +// MessageText: +// +// Exception status code used by Win32 x86 emulation subsystem. +// +#define STATUS_WX86_EXCEPTION_CHAIN ((NTSTATUS)0x40000022L) + +// +// MessageId: STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE +// +// MessageText: +// +// {Machine Type Mismatch} +// The image file %hs is valid, but is for a machine type other than the current machine. +// +#define STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE ((NTSTATUS)0x40000023L) + +// +// MessageId: STATUS_NO_YIELD_PERFORMED +// +// MessageText: +// +// A yield execution was performed and no thread was available to run. +// +#define STATUS_NO_YIELD_PERFORMED ((NTSTATUS)0x40000024L) + +// +// MessageId: STATUS_TIMER_RESUME_IGNORED +// +// MessageText: +// +// The resumable flag to a timer API was ignored. +// +#define STATUS_TIMER_RESUME_IGNORED ((NTSTATUS)0x40000025L) + +// +// MessageId: STATUS_ARBITRATION_UNHANDLED +// +// MessageText: +// +// The arbiter has deferred arbitration of these resources to its parent +// +#define STATUS_ARBITRATION_UNHANDLED ((NTSTATUS)0x40000026L) + +// +// MessageId: STATUS_CARDBUS_NOT_SUPPORTED +// +// MessageText: +// +// The device "%hs" has detected a CardBus card in its slot, but the firmware on this system is not configured to allow the CardBus controller to be run in CardBus mode. +// The operating system will currently accept only 16-bit (R2) pc-cards on this controller. +// +#define STATUS_CARDBUS_NOT_SUPPORTED ((NTSTATUS)0x40000027L) + +// +// MessageId: STATUS_WX86_CREATEWX86TIB +// +// MessageText: +// +// Exception status code used by Win32 x86 emulation subsystem. +// +#define STATUS_WX86_CREATEWX86TIB ((NTSTATUS)0x40000028L) + +// +// MessageId: STATUS_MP_PROCESSOR_MISMATCH +// +// MessageText: +// +// The CPUs in this multiprocessor system are not all the same revision level. To use all processors the operating system restricts itself to the features of the least capable processor in the system. Should problems occur with this system, contact the CPU manufacturer to see if this mix of processors is supported. +// +#define STATUS_MP_PROCESSOR_MISMATCH ((NTSTATUS)0x40000029L) + +// +// MessageId: STATUS_HIBERNATED +// +// MessageText: +// +// The system was put into hibernation. +// +#define STATUS_HIBERNATED ((NTSTATUS)0x4000002AL) + +// +// MessageId: STATUS_RESUME_HIBERNATION +// +// MessageText: +// +// The system was resumed from hibernation. +// +#define STATUS_RESUME_HIBERNATION ((NTSTATUS)0x4000002BL) + +// +// MessageId: STATUS_FIRMWARE_UPDATED +// +// MessageText: +// +// Windows has detected that the system firmware (BIOS) was updated [previous firmware date = %2, current firmware date %3]. +// +#define STATUS_FIRMWARE_UPDATED ((NTSTATUS)0x4000002CL) + +// +// MessageId: STATUS_DRIVERS_LEAKING_LOCKED_PAGES +// +// MessageText: +// +// A device driver is leaking locked I/O pages causing system degradation. The system has automatically enabled tracking code in order to try and catch the culprit. +// +#define STATUS_DRIVERS_LEAKING_LOCKED_PAGES ((NTSTATUS)0x4000002DL) + +// +// MessageId: STATUS_MESSAGE_RETRIEVED +// +// MessageText: +// +// The ALPC message being canceled has already been retrieved from the queue on the other side. +// +#define STATUS_MESSAGE_RETRIEVED ((NTSTATUS)0x4000002EL) + +// +// MessageId: STATUS_SYSTEM_POWERSTATE_TRANSITION +// +// MessageText: +// +// The system power state is transitioning from %2 to %3. +// +#define STATUS_SYSTEM_POWERSTATE_TRANSITION ((NTSTATUS)0x4000002FL) + +// +// MessageId: STATUS_ALPC_CHECK_COMPLETION_LIST +// +// MessageText: +// +// The receive operation was successful. Check the ALPC completion list for the received message. +// +#define STATUS_ALPC_CHECK_COMPLETION_LIST ((NTSTATUS)0x40000030L) + +// +// MessageId: STATUS_SYSTEM_POWERSTATE_COMPLEX_TRANSITION +// +// MessageText: +// +// The system power state is transitioning from %2 to %3 but could enter %4. +// +#define STATUS_SYSTEM_POWERSTATE_COMPLEX_TRANSITION ((NTSTATUS)0x40000031L) + +// +// MessageId: STATUS_ACCESS_AUDIT_BY_POLICY +// +// MessageText: +// +// Access to %1 is monitored by policy rule %2. +// +#define STATUS_ACCESS_AUDIT_BY_POLICY ((NTSTATUS)0x40000032L) + +// +// MessageId: STATUS_ABANDON_HIBERFILE +// +// MessageText: +// +// A valid hibernation file has been invalidated and should be abandoned. +// +#define STATUS_ABANDON_HIBERFILE ((NTSTATUS)0x40000033L) + +// +// MessageId: STATUS_BIZRULES_NOT_ENABLED +// +// MessageText: +// +// Business rule scripts are disabled for the calling application. +// +#define STATUS_BIZRULES_NOT_ENABLED ((NTSTATUS)0x40000034L) + +// +// MessageId: DBG_REPLY_LATER +// +// MessageText: +// +// Debugger will reply later. +// +#define DBG_REPLY_LATER ((NTSTATUS)0x40010001L) + +// +// MessageId: DBG_UNABLE_TO_PROVIDE_HANDLE +// +// MessageText: +// +// Debugger cannot provide handle. +// +#define DBG_UNABLE_TO_PROVIDE_HANDLE ((NTSTATUS)0x40010002L) + +// +// MessageId: DBG_PRINTEXCEPTION_C +// +// MessageText: +// +// Debugger printed exception on control C. +// +#define DBG_PRINTEXCEPTION_C ((NTSTATUS)0x40010006L) // winnt + +// +// MessageId: DBG_RIPEXCEPTION +// +// MessageText: +// +// Debugger received RIP exception. +// +#define DBG_RIPEXCEPTION ((NTSTATUS)0x40010007L) // winnt + +// +// MessageId: DBG_COMMAND_EXCEPTION +// +// MessageText: +// +// Debugger command communication exception. +// +#define DBG_COMMAND_EXCEPTION ((NTSTATUS)0x40010009L) // winnt + +// +// MessageId: STATUS_HEURISTIC_DAMAGE_POSSIBLE +// +// MessageText: +// +// The attempt to commit the Transaction completed, but it is possible that some portion of the transaction tree did not commit successfully due to heuristics. Therefore it is possible that some data modified in the transaction may not have committed, resulting in transactional inconsistency. If possible, check the consistency of the associated data. +// +#define STATUS_HEURISTIC_DAMAGE_POSSIBLE ((NTSTATUS)0x40190001L) + + + +///////////////////////////////////////////////////////////////////////// +// +// Standard Warning values +// +// +// Note: Do NOT use the value 0x80000000L, as this is a non-portable value +// for the NT_SUCCESS macro. Warning values start with a code of 1. +// +///////////////////////////////////////////////////////////////////////// + +// +// MessageId: STATUS_BUFFER_OVERFLOW +// +// MessageText: +// +// {Buffer Overflow} +// The data was too large to fit into the specified buffer. +// +#define STATUS_BUFFER_OVERFLOW ((NTSTATUS)0x80000005L) + +// +// MessageId: STATUS_NO_MORE_FILES +// +// MessageText: +// +// {No More Files} +// No more files were found which match the file specification. +// +#define STATUS_NO_MORE_FILES ((NTSTATUS)0x80000006L) + +// +// MessageId: STATUS_WAKE_SYSTEM_DEBUGGER +// +// MessageText: +// +// {Kernel Debugger Awakened} +// the system debugger was awakened by an interrupt. +// +#define STATUS_WAKE_SYSTEM_DEBUGGER ((NTSTATUS)0x80000007L) + +// +// MessageId: STATUS_HANDLES_CLOSED +// +// MessageText: +// +// {Handles Closed} +// Handles to objects have been automatically closed as a result of the requested operation. +// +#define STATUS_HANDLES_CLOSED ((NTSTATUS)0x8000000AL) + +// +// MessageId: STATUS_NO_INHERITANCE +// +// MessageText: +// +// {Non-Inheritable ACL} +// An access control list (ACL) contains no components that can be inherited. +// +#define STATUS_NO_INHERITANCE ((NTSTATUS)0x8000000BL) + +// +// MessageId: STATUS_GUID_SUBSTITUTION_MADE +// +// MessageText: +// +// {GUID Substitution} +// During the translation of a global identifier (GUID) to a Windows security ID (SID), no administratively-defined GUID prefix was found. A substitute prefix was used, which will not compromise system security. However, this may provide a more restrictive access than intended. +// +#define STATUS_GUID_SUBSTITUTION_MADE ((NTSTATUS)0x8000000CL) + +// +// MessageId: STATUS_PARTIAL_COPY +// +// MessageText: +// +// {Partial Copy} +// Due to protection conflicts not all the requested bytes could be copied. +// +#define STATUS_PARTIAL_COPY ((NTSTATUS)0x8000000DL) + +// +// MessageId: STATUS_DEVICE_PAPER_EMPTY +// +// MessageText: +// +// {Out of Paper} +// The printer is out of paper. +// +#define STATUS_DEVICE_PAPER_EMPTY ((NTSTATUS)0x8000000EL) + +// +// MessageId: STATUS_DEVICE_POWERED_OFF +// +// MessageText: +// +// {Device Power Is Off} +// The printer power has been turned off. +// +#define STATUS_DEVICE_POWERED_OFF ((NTSTATUS)0x8000000FL) + +// +// MessageId: STATUS_DEVICE_OFF_LINE +// +// MessageText: +// +// {Device Offline} +// The printer has been taken offline. +// +#define STATUS_DEVICE_OFF_LINE ((NTSTATUS)0x80000010L) + +// +// MessageId: STATUS_DEVICE_BUSY +// +// MessageText: +// +// {Device Busy} +// The device is currently busy. +// +#define STATUS_DEVICE_BUSY ((NTSTATUS)0x80000011L) + +// +// MessageId: STATUS_NO_MORE_EAS +// +// MessageText: +// +// {No More EAs} +// No more extended attributes (EAs) were found for the file. +// +#define STATUS_NO_MORE_EAS ((NTSTATUS)0x80000012L) + +// +// MessageId: STATUS_INVALID_EA_NAME +// +// MessageText: +// +// {Illegal EA} +// The specified extended attribute (EA) name contains at least one illegal character. +// +#define STATUS_INVALID_EA_NAME ((NTSTATUS)0x80000013L) + +// +// MessageId: STATUS_EA_LIST_INCONSISTENT +// +// MessageText: +// +// {Inconsistent EA List} +// The extended attribute (EA) list is inconsistent. +// +#define STATUS_EA_LIST_INCONSISTENT ((NTSTATUS)0x80000014L) + +// +// MessageId: STATUS_INVALID_EA_FLAG +// +// MessageText: +// +// {Invalid EA Flag} +// An invalid extended attribute (EA) flag was set. +// +#define STATUS_INVALID_EA_FLAG ((NTSTATUS)0x80000015L) + +// +// MessageId: STATUS_VERIFY_REQUIRED +// +// MessageText: +// +// {Verifying Disk} +// The media has changed and a verify operation is in progress so no reads or writes may be performed to the device, except those used in the verify operation. +// +#define STATUS_VERIFY_REQUIRED ((NTSTATUS)0x80000016L) + +// +// MessageId: STATUS_EXTRANEOUS_INFORMATION +// +// MessageText: +// +// {Too Much Information} +// The specified access control list (ACL) contained more information than was expected. +// +#define STATUS_EXTRANEOUS_INFORMATION ((NTSTATUS)0x80000017L) + +// +// MessageId: STATUS_RXACT_COMMIT_NECESSARY +// +// MessageText: +// +// This warning level status indicates that the transaction state already exists for the registry sub-tree, but that a transaction commit was previously aborted. +// The commit has NOT been completed, but has not been rolled back either (so it may still be committed if desired). +// +#define STATUS_RXACT_COMMIT_NECESSARY ((NTSTATUS)0x80000018L) + +// +// MessageId: STATUS_NO_MORE_ENTRIES +// +// MessageText: +// +// {No More Entries} +// No more entries are available from an enumeration operation. +// +#define STATUS_NO_MORE_ENTRIES ((NTSTATUS)0x8000001AL) + +// +// MessageId: STATUS_FILEMARK_DETECTED +// +// MessageText: +// +// {Filemark Found} +// A filemark was detected. +// +#define STATUS_FILEMARK_DETECTED ((NTSTATUS)0x8000001BL) + +// +// MessageId: STATUS_MEDIA_CHANGED +// +// MessageText: +// +// {Media Changed} +// The media may have changed. +// +#define STATUS_MEDIA_CHANGED ((NTSTATUS)0x8000001CL) + +// +// MessageId: STATUS_BUS_RESET +// +// MessageText: +// +// {I/O Bus Reset} +// An I/O bus reset was detected. +// +#define STATUS_BUS_RESET ((NTSTATUS)0x8000001DL) + +// +// MessageId: STATUS_END_OF_MEDIA +// +// MessageText: +// +// {End of Media} +// The end of the media was encountered. +// +#define STATUS_END_OF_MEDIA ((NTSTATUS)0x8000001EL) + +// +// MessageId: STATUS_BEGINNING_OF_MEDIA +// +// MessageText: +// +// Beginning of tape or partition has been detected. +// +#define STATUS_BEGINNING_OF_MEDIA ((NTSTATUS)0x8000001FL) + +// +// MessageId: STATUS_MEDIA_CHECK +// +// MessageText: +// +// {Media Changed} +// The media may have changed. +// +#define STATUS_MEDIA_CHECK ((NTSTATUS)0x80000020L) + +// +// MessageId: STATUS_SETMARK_DETECTED +// +// MessageText: +// +// A tape access reached a setmark. +// +#define STATUS_SETMARK_DETECTED ((NTSTATUS)0x80000021L) + +// +// MessageId: STATUS_NO_DATA_DETECTED +// +// MessageText: +// +// During a tape access, the end of the data written is reached. +// +#define STATUS_NO_DATA_DETECTED ((NTSTATUS)0x80000022L) + +// +// MessageId: STATUS_REDIRECTOR_HAS_OPEN_HANDLES +// +// MessageText: +// +// The redirector is in use and cannot be unloaded. +// +#define STATUS_REDIRECTOR_HAS_OPEN_HANDLES ((NTSTATUS)0x80000023L) + +// +// MessageId: STATUS_SERVER_HAS_OPEN_HANDLES +// +// MessageText: +// +// The server is in use and cannot be unloaded. +// +#define STATUS_SERVER_HAS_OPEN_HANDLES ((NTSTATUS)0x80000024L) + +// +// MessageId: STATUS_ALREADY_DISCONNECTED +// +// MessageText: +// +// The specified connection has already been disconnected. +// +#define STATUS_ALREADY_DISCONNECTED ((NTSTATUS)0x80000025L) + +// +// MessageId: STATUS_LONGJUMP +// +// MessageText: +// +// A long jump has been executed. +// +#define STATUS_LONGJUMP ((NTSTATUS)0x80000026L) // winnt + +// +// MessageId: STATUS_CLEANER_CARTRIDGE_INSTALLED +// +// MessageText: +// +// A cleaner cartridge is present in the tape library. +// +#define STATUS_CLEANER_CARTRIDGE_INSTALLED ((NTSTATUS)0x80000027L) + +// +// MessageId: STATUS_PLUGPLAY_QUERY_VETOED +// +// MessageText: +// +// The Plug and Play query operation was not successful. +// +#define STATUS_PLUGPLAY_QUERY_VETOED ((NTSTATUS)0x80000028L) + +// +// MessageId: STATUS_UNWIND_CONSOLIDATE +// +// MessageText: +// +// A frame consolidation has been executed. +// +#define STATUS_UNWIND_CONSOLIDATE ((NTSTATUS)0x80000029L) // winnt + +// +// MessageId: STATUS_REGISTRY_HIVE_RECOVERED +// +// MessageText: +// +// {Registry Hive Recovered} +// Registry hive (file): +// %hs +// was corrupted and it has been recovered. Some data might have been lost. +// +#define STATUS_REGISTRY_HIVE_RECOVERED ((NTSTATUS)0x8000002AL) + +// +// MessageId: STATUS_DLL_MIGHT_BE_INSECURE +// +// MessageText: +// +// The application is attempting to run executable code from the module %hs. This may be insecure. An alternative, %hs, is available. Should the application use the secure module %hs? +// +#define STATUS_DLL_MIGHT_BE_INSECURE ((NTSTATUS)0x8000002BL) + +// +// MessageId: STATUS_DLL_MIGHT_BE_INCOMPATIBLE +// +// MessageText: +// +// The application is loading executable code from the module %hs. This is secure, but may be incompatible with previous releases of the operating system. An alternative, %hs, is available. Should the application use the secure module %hs? +// +#define STATUS_DLL_MIGHT_BE_INCOMPATIBLE ((NTSTATUS)0x8000002CL) + +// +// MessageId: STATUS_STOPPED_ON_SYMLINK +// +// MessageText: +// +// The create operation stopped after reaching a symbolic link. +// +#define STATUS_STOPPED_ON_SYMLINK ((NTSTATUS)0x8000002DL) + +// +// MessageId: STATUS_CANNOT_GRANT_REQUESTED_OPLOCK +// +// MessageText: +// +// An oplock of the requested level cannot be granted. An oplock of a lower level may be available. +// +#define STATUS_CANNOT_GRANT_REQUESTED_OPLOCK ((NTSTATUS)0x8000002EL) + +// +// MessageId: STATUS_NO_ACE_CONDITION +// +// MessageText: +// +// {No ACE Condition} +// The specified access control entry (ACE) does not contain a condition. +// +#define STATUS_NO_ACE_CONDITION ((NTSTATUS)0x8000002FL) + +// +// MessageId: STATUS_CLUSTER_NODE_ALREADY_UP +// +// MessageText: +// +// The cluster node is already up. +// +#define STATUS_CLUSTER_NODE_ALREADY_UP ((NTSTATUS)0x80130001L) + +// +// MessageId: STATUS_CLUSTER_NODE_ALREADY_DOWN +// +// MessageText: +// +// The cluster node is already down. +// +#define STATUS_CLUSTER_NODE_ALREADY_DOWN ((NTSTATUS)0x80130002L) + +// +// MessageId: STATUS_CLUSTER_NETWORK_ALREADY_ONLINE +// +// MessageText: +// +// The cluster network is already online. +// +#define STATUS_CLUSTER_NETWORK_ALREADY_ONLINE ((NTSTATUS)0x80130003L) + +// +// MessageId: STATUS_CLUSTER_NETWORK_ALREADY_OFFLINE +// +// MessageText: +// +// The cluster network is already offline. +// +#define STATUS_CLUSTER_NETWORK_ALREADY_OFFLINE ((NTSTATUS)0x80130004L) + +// +// MessageId: STATUS_CLUSTER_NODE_ALREADY_MEMBER +// +// MessageText: +// +// The cluster node is already a member of the cluster. +// +#define STATUS_CLUSTER_NODE_ALREADY_MEMBER ((NTSTATUS)0x80130005L) + +// +// MessageId: STATUS_FLT_BUFFER_TOO_SMALL +// +// MessageText: +// +// {Buffer too small} +// The buffer is too small to contain the entry. No information has been written to the buffer. +// +#define STATUS_FLT_BUFFER_TOO_SMALL ((NTSTATUS)0x801C0001L) + +// +// MessageId: STATUS_FVE_PARTIAL_METADATA +// +// MessageText: +// +// Volume Metadata read or write is incomplete. +// +#define STATUS_FVE_PARTIAL_METADATA ((NTSTATUS)0x80210001L) + +// +// MessageId: STATUS_FVE_TRANSIENT_STATE +// +// MessageText: +// +// BitLocker encryption keys were ignored because the volume was in a transient state. +// +#define STATUS_FVE_TRANSIENT_STATE ((NTSTATUS)0x80210002L) + + + +///////////////////////////////////////////////////////////////////////// +// +// Standard Error values +// +///////////////////////////////////////////////////////////////////////// + +// +// MessageId: STATUS_UNSUCCESSFUL +// +// MessageText: +// +// {Operation Failed} +// The requested operation was unsuccessful. +// +#define STATUS_UNSUCCESSFUL ((NTSTATUS)0xC0000001L) + +// +// MessageId: STATUS_NOT_IMPLEMENTED +// +// MessageText: +// +// {Not Implemented} +// The requested operation is not implemented. +// +#define STATUS_NOT_IMPLEMENTED ((NTSTATUS)0xC0000002L) + +// +// MessageId: STATUS_INVALID_INFO_CLASS +// +// MessageText: +// +// {Invalid Parameter} +// The specified information class is not a valid information class for the specified object. +// +#define STATUS_INVALID_INFO_CLASS ((NTSTATUS)0xC0000003L) // ntsubauth + +// +// MessageId: STATUS_INFO_LENGTH_MISMATCH +// +// MessageText: +// +// The specified information record length does not match the length required for the specified information class. +// +#define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS)0xC0000004L) + +// +// MessageId: STATUS_PAGEFILE_QUOTA +// +// MessageText: +// +// The pagefile quota for the process has been exhausted. +// +#define STATUS_PAGEFILE_QUOTA ((NTSTATUS)0xC0000007L) + +// +// MessageId: STATUS_BAD_INITIAL_STACK +// +// MessageText: +// +// An invalid initial stack was specified in a call to NtCreateThread. +// +#define STATUS_BAD_INITIAL_STACK ((NTSTATUS)0xC0000009L) + +// +// MessageId: STATUS_BAD_INITIAL_PC +// +// MessageText: +// +// An invalid initial start address was specified in a call to NtCreateThread. +// +#define STATUS_BAD_INITIAL_PC ((NTSTATUS)0xC000000AL) + +// +// MessageId: STATUS_INVALID_CID +// +// MessageText: +// +// An invalid Client ID was specified. +// +#define STATUS_INVALID_CID ((NTSTATUS)0xC000000BL) + +// +// MessageId: STATUS_TIMER_NOT_CANCELED +// +// MessageText: +// +// An attempt was made to cancel or set a timer that has an associated APC and the subject thread is not the thread that originally set the timer with an associated APC routine. +// +#define STATUS_TIMER_NOT_CANCELED ((NTSTATUS)0xC000000CL) + +// +// MessageId: STATUS_INVALID_PARAMETER +// +// MessageText: +// +// An invalid parameter was passed to a service or function. +// +#define STATUS_INVALID_PARAMETER ((NTSTATUS)0xC000000DL) // winnt + +// +// MessageId: STATUS_NO_SUCH_DEVICE +// +// MessageText: +// +// A device which does not exist was specified. +// +#define STATUS_NO_SUCH_DEVICE ((NTSTATUS)0xC000000EL) + +// +// MessageId: STATUS_NO_SUCH_FILE +// +// MessageText: +// +// {File Not Found} +// The file %hs does not exist. +// +#define STATUS_NO_SUCH_FILE ((NTSTATUS)0xC000000FL) + +// +// MessageId: STATUS_INVALID_DEVICE_REQUEST +// +// MessageText: +// +// The specified request is not a valid operation for the target device. +// +#define STATUS_INVALID_DEVICE_REQUEST ((NTSTATUS)0xC0000010L) + +// +// MessageId: STATUS_END_OF_FILE +// +// MessageText: +// +// The end-of-file marker has been reached. There is no valid data in the file beyond this marker. +// +#define STATUS_END_OF_FILE ((NTSTATUS)0xC0000011L) + +// +// MessageId: STATUS_WRONG_VOLUME +// +// MessageText: +// +// {Wrong Volume} +// The wrong volume is in the drive. +// Please insert volume %hs into drive %hs. +// +#define STATUS_WRONG_VOLUME ((NTSTATUS)0xC0000012L) + +// +// MessageId: STATUS_NO_MEDIA_IN_DEVICE +// +// MessageText: +// +// {No Disk} +// There is no disk in the drive. +// Please insert a disk into drive %hs. +// +#define STATUS_NO_MEDIA_IN_DEVICE ((NTSTATUS)0xC0000013L) + +// +// MessageId: STATUS_UNRECOGNIZED_MEDIA +// +// MessageText: +// +// {Unknown Disk Format} +// The disk in drive %hs is not formatted properly. +// Please check the disk, and reformat if necessary. +// +#define STATUS_UNRECOGNIZED_MEDIA ((NTSTATUS)0xC0000014L) + +// +// MessageId: STATUS_NONEXISTENT_SECTOR +// +// MessageText: +// +// {Sector Not Found} +// The specified sector does not exist. +// +#define STATUS_NONEXISTENT_SECTOR ((NTSTATUS)0xC0000015L) + +// +// MessageId: STATUS_MORE_PROCESSING_REQUIRED +// +// MessageText: +// +// {Still Busy} +// The specified I/O request packet (IRP) cannot be disposed of because the I/O operation is not complete. +// +#define STATUS_MORE_PROCESSING_REQUIRED ((NTSTATUS)0xC0000016L) + +// +// MessageId: STATUS_CONFLICTING_ADDRESSES +// +// MessageText: +// +// {Conflicting Address Range} +// The specified address range conflicts with the address space. +// +#define STATUS_CONFLICTING_ADDRESSES ((NTSTATUS)0xC0000018L) + +// +// MessageId: STATUS_NOT_MAPPED_VIEW +// +// MessageText: +// +// Address range to unmap is not a mapped view. +// +#define STATUS_NOT_MAPPED_VIEW ((NTSTATUS)0xC0000019L) + +// +// MessageId: STATUS_UNABLE_TO_FREE_VM +// +// MessageText: +// +// Virtual memory cannot be freed. +// +#define STATUS_UNABLE_TO_FREE_VM ((NTSTATUS)0xC000001AL) + +// +// MessageId: STATUS_UNABLE_TO_DELETE_SECTION +// +// MessageText: +// +// Specified section cannot be deleted. +// +#define STATUS_UNABLE_TO_DELETE_SECTION ((NTSTATUS)0xC000001BL) + +// +// MessageId: STATUS_INVALID_SYSTEM_SERVICE +// +// MessageText: +// +// An invalid system service was specified in a system service call. +// +#define STATUS_INVALID_SYSTEM_SERVICE ((NTSTATUS)0xC000001CL) + +// +// MessageId: STATUS_INVALID_LOCK_SEQUENCE +// +// MessageText: +// +// {Invalid Lock Sequence} +// An attempt was made to execute an invalid lock sequence. +// +#define STATUS_INVALID_LOCK_SEQUENCE ((NTSTATUS)0xC000001EL) + +// +// MessageId: STATUS_INVALID_VIEW_SIZE +// +// MessageText: +// +// {Invalid Mapping} +// An attempt was made to create a view for a section which is bigger than the section. +// +#define STATUS_INVALID_VIEW_SIZE ((NTSTATUS)0xC000001FL) + +// +// MessageId: STATUS_INVALID_FILE_FOR_SECTION +// +// MessageText: +// +// {Bad File} +// The attributes of the specified mapping file for a section of memory cannot be read. +// +#define STATUS_INVALID_FILE_FOR_SECTION ((NTSTATUS)0xC0000020L) + +// +// MessageId: STATUS_ALREADY_COMMITTED +// +// MessageText: +// +// {Already Committed} +// The specified address range is already committed. +// +#define STATUS_ALREADY_COMMITTED ((NTSTATUS)0xC0000021L) + +// +// MessageId: STATUS_ACCESS_DENIED +// +// MessageText: +// +// {Access Denied} +// A process has requested access to an object, but has not been granted those access rights. +// +#define STATUS_ACCESS_DENIED ((NTSTATUS)0xC0000022L) + +// +// MessageId: STATUS_BUFFER_TOO_SMALL +// +// MessageText: +// +// {Buffer Too Small} +// The buffer is too small to contain the entry. No information has been written to the buffer. +// +#define STATUS_BUFFER_TOO_SMALL ((NTSTATUS)0xC0000023L) + +// +// MessageId: STATUS_OBJECT_TYPE_MISMATCH +// +// MessageText: +// +// {Wrong Type} +// There is a mismatch between the type of object required by the requested operation and the type of object that is specified in the request. +// +#define STATUS_OBJECT_TYPE_MISMATCH ((NTSTATUS)0xC0000024L) + +// +// MessageId: STATUS_UNWIND +// +// MessageText: +// +// Unwind exception code. +// +#define STATUS_UNWIND ((NTSTATUS)0xC0000027L) + +// +// MessageId: STATUS_BAD_STACK +// +// MessageText: +// +// An invalid or unaligned stack was encountered during an unwind operation. +// +#define STATUS_BAD_STACK ((NTSTATUS)0xC0000028L) + +// +// MessageId: STATUS_INVALID_UNWIND_TARGET +// +// MessageText: +// +// An invalid unwind target was encountered during an unwind operation. +// +#define STATUS_INVALID_UNWIND_TARGET ((NTSTATUS)0xC0000029L) + +// +// MessageId: STATUS_NOT_LOCKED +// +// MessageText: +// +// An attempt was made to unlock a page of memory which was not locked. +// +#define STATUS_NOT_LOCKED ((NTSTATUS)0xC000002AL) + +// +// MessageId: STATUS_PARITY_ERROR +// +// MessageText: +// +// Device parity error on I/O operation. +// +#define STATUS_PARITY_ERROR ((NTSTATUS)0xC000002BL) + +// +// MessageId: STATUS_UNABLE_TO_DECOMMIT_VM +// +// MessageText: +// +// An attempt was made to decommit uncommitted virtual memory. +// +#define STATUS_UNABLE_TO_DECOMMIT_VM ((NTSTATUS)0xC000002CL) + +// +// MessageId: STATUS_NOT_COMMITTED +// +// MessageText: +// +// An attempt was made to change the attributes on memory that has not been committed. +// +#define STATUS_NOT_COMMITTED ((NTSTATUS)0xC000002DL) + +// +// MessageId: STATUS_INVALID_PORT_ATTRIBUTES +// +// MessageText: +// +// Invalid Object Attributes specified to NtCreatePort or invalid Port Attributes specified to NtConnectPort +// +#define STATUS_INVALID_PORT_ATTRIBUTES ((NTSTATUS)0xC000002EL) + +// +// MessageId: STATUS_PORT_MESSAGE_TOO_LONG +// +// MessageText: +// +// Length of message passed to NtRequestPort or NtRequestWaitReplyPort was longer than the maximum message allowed by the port. +// +#define STATUS_PORT_MESSAGE_TOO_LONG ((NTSTATUS)0xC000002FL) + +// +// MessageId: STATUS_INVALID_PARAMETER_MIX +// +// MessageText: +// +// An invalid combination of parameters was specified. +// +#define STATUS_INVALID_PARAMETER_MIX ((NTSTATUS)0xC0000030L) + +// +// MessageId: STATUS_INVALID_QUOTA_LOWER +// +// MessageText: +// +// An attempt was made to lower a quota limit below the current usage. +// +#define STATUS_INVALID_QUOTA_LOWER ((NTSTATUS)0xC0000031L) + +// +// MessageId: STATUS_DISK_CORRUPT_ERROR +// +// MessageText: +// +// {Corrupt Disk} +// The file system structure on the disk is corrupt and unusable. +// Please run the Chkdsk utility on the volume %hs. +// +#define STATUS_DISK_CORRUPT_ERROR ((NTSTATUS)0xC0000032L) + +// +// MessageId: STATUS_OBJECT_NAME_INVALID +// +// MessageText: +// +// Object Name invalid. +// +#define STATUS_OBJECT_NAME_INVALID ((NTSTATUS)0xC0000033L) + +// +// MessageId: STATUS_OBJECT_NAME_NOT_FOUND +// +// MessageText: +// +// Object Name not found. +// +#define STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS)0xC0000034L) + +// +// MessageId: STATUS_OBJECT_NAME_COLLISION +// +// MessageText: +// +// Object Name already exists. +// +#define STATUS_OBJECT_NAME_COLLISION ((NTSTATUS)0xC0000035L) + +// +// MessageId: STATUS_PORT_DISCONNECTED +// +// MessageText: +// +// Attempt to send a message to a disconnected communication port. +// +#define STATUS_PORT_DISCONNECTED ((NTSTATUS)0xC0000037L) + +// +// MessageId: STATUS_DEVICE_ALREADY_ATTACHED +// +// MessageText: +// +// An attempt was made to attach to a device that was already attached to another device. +// +#define STATUS_DEVICE_ALREADY_ATTACHED ((NTSTATUS)0xC0000038L) + +// +// MessageId: STATUS_OBJECT_PATH_INVALID +// +// MessageText: +// +// Object Path Component was not a directory object. +// +#define STATUS_OBJECT_PATH_INVALID ((NTSTATUS)0xC0000039L) + +// +// MessageId: STATUS_OBJECT_PATH_NOT_FOUND +// +// MessageText: +// +// {Path Not Found} +// The path %hs does not exist. +// +#define STATUS_OBJECT_PATH_NOT_FOUND ((NTSTATUS)0xC000003AL) + +// +// MessageId: STATUS_OBJECT_PATH_SYNTAX_BAD +// +// MessageText: +// +// Object Path Component was not a directory object. +// +#define STATUS_OBJECT_PATH_SYNTAX_BAD ((NTSTATUS)0xC000003BL) + +// +// MessageId: STATUS_DATA_OVERRUN +// +// MessageText: +// +// {Data Overrun} +// A data overrun error occurred. +// +#define STATUS_DATA_OVERRUN ((NTSTATUS)0xC000003CL) + +// +// MessageId: STATUS_DATA_LATE_ERROR +// +// MessageText: +// +// {Data Late} +// A data late error occurred. +// +#define STATUS_DATA_LATE_ERROR ((NTSTATUS)0xC000003DL) + +// +// MessageId: STATUS_DATA_ERROR +// +// MessageText: +// +// {Data Error} +// An error in reading or writing data occurred. +// +#define STATUS_DATA_ERROR ((NTSTATUS)0xC000003EL) + +// +// MessageId: STATUS_CRC_ERROR +// +// MessageText: +// +// {Bad CRC} +// A cyclic redundancy check (CRC) checksum error occurred. +// +#define STATUS_CRC_ERROR ((NTSTATUS)0xC000003FL) + +// +// MessageId: STATUS_SECTION_TOO_BIG +// +// MessageText: +// +// {Section Too Large} +// The specified section is too big to map the file. +// +#define STATUS_SECTION_TOO_BIG ((NTSTATUS)0xC0000040L) + +// +// MessageId: STATUS_PORT_CONNECTION_REFUSED +// +// MessageText: +// +// The NtConnectPort request is refused. +// +#define STATUS_PORT_CONNECTION_REFUSED ((NTSTATUS)0xC0000041L) + +// +// MessageId: STATUS_INVALID_PORT_HANDLE +// +// MessageText: +// +// The type of port handle is invalid for the operation requested. +// +#define STATUS_INVALID_PORT_HANDLE ((NTSTATUS)0xC0000042L) + +// +// MessageId: STATUS_SHARING_VIOLATION +// +// MessageText: +// +// A file cannot be opened because the share access flags are incompatible. +// +#define STATUS_SHARING_VIOLATION ((NTSTATUS)0xC0000043L) + +// +// MessageId: STATUS_QUOTA_EXCEEDED +// +// MessageText: +// +// Insufficient quota exists to complete the operation +// +#define STATUS_QUOTA_EXCEEDED ((NTSTATUS)0xC0000044L) + +// +// MessageId: STATUS_INVALID_PAGE_PROTECTION +// +// MessageText: +// +// The specified page protection was not valid. +// +#define STATUS_INVALID_PAGE_PROTECTION ((NTSTATUS)0xC0000045L) + +// +// MessageId: STATUS_MUTANT_NOT_OWNED +// +// MessageText: +// +// An attempt to release a mutant object was made by a thread that was not the owner of the mutant object. +// +#define STATUS_MUTANT_NOT_OWNED ((NTSTATUS)0xC0000046L) + +// +// MessageId: STATUS_SEMAPHORE_LIMIT_EXCEEDED +// +// MessageText: +// +// An attempt was made to release a semaphore such that its maximum count would have been exceeded. +// +#define STATUS_SEMAPHORE_LIMIT_EXCEEDED ((NTSTATUS)0xC0000047L) + +// +// MessageId: STATUS_PORT_ALREADY_SET +// +// MessageText: +// +// An attempt to set a process's DebugPort or ExceptionPort was made, but a port already exists in the process or an attempt to set a file's CompletionPort made, but a port was already set in the file or an attempt to set an ALPC port's associated completion port was made, but it is already set. +// +#define STATUS_PORT_ALREADY_SET ((NTSTATUS)0xC0000048L) + +// +// MessageId: STATUS_SECTION_NOT_IMAGE +// +// MessageText: +// +// An attempt was made to query image information on a section which does not map an image. +// +#define STATUS_SECTION_NOT_IMAGE ((NTSTATUS)0xC0000049L) + +// +// MessageId: STATUS_SUSPEND_COUNT_EXCEEDED +// +// MessageText: +// +// An attempt was made to suspend a thread whose suspend count was at its maximum. +// +#define STATUS_SUSPEND_COUNT_EXCEEDED ((NTSTATUS)0xC000004AL) + +// +// MessageId: STATUS_THREAD_IS_TERMINATING +// +// MessageText: +// +// An attempt was made to access a thread that has begun termination. +// +#define STATUS_THREAD_IS_TERMINATING ((NTSTATUS)0xC000004BL) + +// +// MessageId: STATUS_BAD_WORKING_SET_LIMIT +// +// MessageText: +// +// An attempt was made to set the working set limit to an invalid value (minimum greater than maximum, etc). +// +#define STATUS_BAD_WORKING_SET_LIMIT ((NTSTATUS)0xC000004CL) + +// +// MessageId: STATUS_INCOMPATIBLE_FILE_MAP +// +// MessageText: +// +// A section was created to map a file which is not compatible to an already existing section which maps the same file. +// +#define STATUS_INCOMPATIBLE_FILE_MAP ((NTSTATUS)0xC000004DL) + +// +// MessageId: STATUS_SECTION_PROTECTION +// +// MessageText: +// +// A view to a section specifies a protection which is incompatible with the initial view's protection. +// +#define STATUS_SECTION_PROTECTION ((NTSTATUS)0xC000004EL) + +// +// MessageId: STATUS_EAS_NOT_SUPPORTED +// +// MessageText: +// +// An operation involving EAs failed because the file system does not support EAs. +// +#define STATUS_EAS_NOT_SUPPORTED ((NTSTATUS)0xC000004FL) + +// +// MessageId: STATUS_EA_TOO_LARGE +// +// MessageText: +// +// An EA operation failed because EA set is too large. +// +#define STATUS_EA_TOO_LARGE ((NTSTATUS)0xC0000050L) + +// +// MessageId: STATUS_NONEXISTENT_EA_ENTRY +// +// MessageText: +// +// An EA operation failed because the name or EA index is invalid. +// +#define STATUS_NONEXISTENT_EA_ENTRY ((NTSTATUS)0xC0000051L) + +// +// MessageId: STATUS_NO_EAS_ON_FILE +// +// MessageText: +// +// The file for which EAs were requested has no EAs. +// +#define STATUS_NO_EAS_ON_FILE ((NTSTATUS)0xC0000052L) + +// +// MessageId: STATUS_EA_CORRUPT_ERROR +// +// MessageText: +// +// The EA is corrupt and non-readable. +// +#define STATUS_EA_CORRUPT_ERROR ((NTSTATUS)0xC0000053L) + +// +// MessageId: STATUS_FILE_LOCK_CONFLICT +// +// MessageText: +// +// A requested read/write cannot be granted due to a conflicting file lock. +// +#define STATUS_FILE_LOCK_CONFLICT ((NTSTATUS)0xC0000054L) + +// +// MessageId: STATUS_LOCK_NOT_GRANTED +// +// MessageText: +// +// A requested file lock cannot be granted due to other existing locks. +// +#define STATUS_LOCK_NOT_GRANTED ((NTSTATUS)0xC0000055L) + +// +// MessageId: STATUS_DELETE_PENDING +// +// MessageText: +// +// A non close operation has been requested of a file object with a delete pending. +// +#define STATUS_DELETE_PENDING ((NTSTATUS)0xC0000056L) + +// +// MessageId: STATUS_CTL_FILE_NOT_SUPPORTED +// +// MessageText: +// +// An attempt was made to set the control attribute on a file. This attribute is not supported in the target file system. +// +#define STATUS_CTL_FILE_NOT_SUPPORTED ((NTSTATUS)0xC0000057L) + +// +// MessageId: STATUS_UNKNOWN_REVISION +// +// MessageText: +// +// Indicates a revision number encountered or specified is not one known by the service. It may be a more recent revision than the service is aware of. +// +#define STATUS_UNKNOWN_REVISION ((NTSTATUS)0xC0000058L) + +// +// MessageId: STATUS_REVISION_MISMATCH +// +// MessageText: +// +// Indicates two revision levels are incompatible. +// +#define STATUS_REVISION_MISMATCH ((NTSTATUS)0xC0000059L) + +// +// MessageId: STATUS_INVALID_OWNER +// +// MessageText: +// +// Indicates a particular Security ID may not be assigned as the owner of an object. +// +#define STATUS_INVALID_OWNER ((NTSTATUS)0xC000005AL) + +// +// MessageId: STATUS_INVALID_PRIMARY_GROUP +// +// MessageText: +// +// Indicates a particular Security ID may not be assigned as the primary group of an object. +// +#define STATUS_INVALID_PRIMARY_GROUP ((NTSTATUS)0xC000005BL) + +// +// MessageId: STATUS_NO_IMPERSONATION_TOKEN +// +// MessageText: +// +// An attempt has been made to operate on an impersonation token by a thread that is not currently impersonating a client. +// +#define STATUS_NO_IMPERSONATION_TOKEN ((NTSTATUS)0xC000005CL) + +// +// MessageId: STATUS_CANT_DISABLE_MANDATORY +// +// MessageText: +// +// A mandatory group may not be disabled. +// +#define STATUS_CANT_DISABLE_MANDATORY ((NTSTATUS)0xC000005DL) + +// +// MessageId: STATUS_NO_LOGON_SERVERS +// +// MessageText: +// +// There are currently no logon servers available to service the logon request. +// +#define STATUS_NO_LOGON_SERVERS ((NTSTATUS)0xC000005EL) + +// +// MessageId: STATUS_NO_SUCH_LOGON_SESSION +// +// MessageText: +// +// A specified logon session does not exist. It may already have been terminated. +// +#define STATUS_NO_SUCH_LOGON_SESSION ((NTSTATUS)0xC000005FL) + +// +// MessageId: STATUS_NO_SUCH_PRIVILEGE +// +// MessageText: +// +// A specified privilege does not exist. +// +#define STATUS_NO_SUCH_PRIVILEGE ((NTSTATUS)0xC0000060L) + +// +// MessageId: STATUS_PRIVILEGE_NOT_HELD +// +// MessageText: +// +// A required privilege is not held by the client. +// +#define STATUS_PRIVILEGE_NOT_HELD ((NTSTATUS)0xC0000061L) + +// +// MessageId: STATUS_INVALID_ACCOUNT_NAME +// +// MessageText: +// +// The name provided is not a properly formed account name. +// +#define STATUS_INVALID_ACCOUNT_NAME ((NTSTATUS)0xC0000062L) + +// +// MessageId: STATUS_USER_EXISTS +// +// MessageText: +// +// The specified account already exists. +// +#define STATUS_USER_EXISTS ((NTSTATUS)0xC0000063L) + +// +// MessageId: STATUS_NO_SUCH_USER +// +// MessageText: +// +// The specified account does not exist. +// +#define STATUS_NO_SUCH_USER ((NTSTATUS)0xC0000064L) // ntsubauth + +// +// MessageId: STATUS_GROUP_EXISTS +// +// MessageText: +// +// The specified group already exists. +// +#define STATUS_GROUP_EXISTS ((NTSTATUS)0xC0000065L) + +// +// MessageId: STATUS_NO_SUCH_GROUP +// +// MessageText: +// +// The specified group does not exist. +// +#define STATUS_NO_SUCH_GROUP ((NTSTATUS)0xC0000066L) + +// +// MessageId: STATUS_MEMBER_IN_GROUP +// +// MessageText: +// +// The specified user account is already in the specified group account. Also used to indicate a group cannot be deleted because it contains a member. +// +#define STATUS_MEMBER_IN_GROUP ((NTSTATUS)0xC0000067L) + +// +// MessageId: STATUS_MEMBER_NOT_IN_GROUP +// +// MessageText: +// +// The specified user account is not a member of the specified group account. +// +#define STATUS_MEMBER_NOT_IN_GROUP ((NTSTATUS)0xC0000068L) + +// +// MessageId: STATUS_LAST_ADMIN +// +// MessageText: +// +// Indicates the requested operation would disable or delete the last remaining administration account. +// This is not allowed to prevent creating a situation in which the system cannot be administrated. +// +#define STATUS_LAST_ADMIN ((NTSTATUS)0xC0000069L) + +// +// MessageId: STATUS_WRONG_PASSWORD +// +// MessageText: +// +// When trying to update a password, this return status indicates that the value provided as the current password is not correct. +// +#define STATUS_WRONG_PASSWORD ((NTSTATUS)0xC000006AL) // ntsubauth + +// +// MessageId: STATUS_ILL_FORMED_PASSWORD +// +// MessageText: +// +// When trying to update a password, this return status indicates that the value provided for the new password contains values that are not allowed in passwords. +// +#define STATUS_ILL_FORMED_PASSWORD ((NTSTATUS)0xC000006BL) + +// +// MessageId: STATUS_PASSWORD_RESTRICTION +// +// MessageText: +// +// When trying to update a password, this status indicates that some password update rule has been violated. For example, the password may not meet length criteria. +// +#define STATUS_PASSWORD_RESTRICTION ((NTSTATUS)0xC000006CL) // ntsubauth + +// +// MessageId: STATUS_LOGON_FAILURE +// +// MessageText: +// +// The attempted logon is invalid. This is either due to a bad username or authentication information. +// +#define STATUS_LOGON_FAILURE ((NTSTATUS)0xC000006DL) // ntsubauth + +// +// MessageId: STATUS_ACCOUNT_RESTRICTION +// +// MessageText: +// +// Indicates a referenced user name and authentication information are valid, but some user account restriction has prevented successful authentication (such as time-of-day restrictions). +// +#define STATUS_ACCOUNT_RESTRICTION ((NTSTATUS)0xC000006EL) // ntsubauth + +// +// MessageId: STATUS_INVALID_LOGON_HOURS +// +// MessageText: +// +// The user account has time restrictions and may not be logged onto at this time. +// +#define STATUS_INVALID_LOGON_HOURS ((NTSTATUS)0xC000006FL) // ntsubauth + +// +// MessageId: STATUS_INVALID_WORKSTATION +// +// MessageText: +// +// The user account is restricted such that it may not be used to log on from the source workstation. +// +#define STATUS_INVALID_WORKSTATION ((NTSTATUS)0xC0000070L) // ntsubauth + +// +// MessageId: STATUS_PASSWORD_EXPIRED +// +// MessageText: +// +// The user account's password has expired. +// +#define STATUS_PASSWORD_EXPIRED ((NTSTATUS)0xC0000071L) // ntsubauth + +// +// MessageId: STATUS_ACCOUNT_DISABLED +// +// MessageText: +// +// The referenced account is currently disabled and may not be logged on to. +// +#define STATUS_ACCOUNT_DISABLED ((NTSTATUS)0xC0000072L) // ntsubauth + +// +// MessageId: STATUS_NONE_MAPPED +// +// MessageText: +// +// None of the information to be translated has been translated. +// +#define STATUS_NONE_MAPPED ((NTSTATUS)0xC0000073L) + +// +// MessageId: STATUS_TOO_MANY_LUIDS_REQUESTED +// +// MessageText: +// +// The number of LUIDs requested may not be allocated with a single allocation. +// +#define STATUS_TOO_MANY_LUIDS_REQUESTED ((NTSTATUS)0xC0000074L) + +// +// MessageId: STATUS_LUIDS_EXHAUSTED +// +// MessageText: +// +// Indicates there are no more LUIDs to allocate. +// +#define STATUS_LUIDS_EXHAUSTED ((NTSTATUS)0xC0000075L) + +// +// MessageId: STATUS_INVALID_SUB_AUTHORITY +// +// MessageText: +// +// Indicates the sub-authority value is invalid for the particular use. +// +#define STATUS_INVALID_SUB_AUTHORITY ((NTSTATUS)0xC0000076L) + +// +// MessageId: STATUS_INVALID_ACL +// +// MessageText: +// +// Indicates the ACL structure is not valid. +// +#define STATUS_INVALID_ACL ((NTSTATUS)0xC0000077L) + +// +// MessageId: STATUS_INVALID_SID +// +// MessageText: +// +// Indicates the SID structure is not valid. +// +#define STATUS_INVALID_SID ((NTSTATUS)0xC0000078L) + +// +// MessageId: STATUS_INVALID_SECURITY_DESCR +// +// MessageText: +// +// Indicates the SECURITY_DESCRIPTOR structure is not valid. +// +#define STATUS_INVALID_SECURITY_DESCR ((NTSTATUS)0xC0000079L) + +// +// MessageId: STATUS_PROCEDURE_NOT_FOUND +// +// MessageText: +// +// Indicates the specified procedure address cannot be found in the DLL. +// +#define STATUS_PROCEDURE_NOT_FOUND ((NTSTATUS)0xC000007AL) + +// +// MessageId: STATUS_INVALID_IMAGE_FORMAT +// +// MessageText: +// +// {Bad Image} +// %hs is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vendor for support. +// +#define STATUS_INVALID_IMAGE_FORMAT ((NTSTATUS)0xC000007BL) + +// +// MessageId: STATUS_NO_TOKEN +// +// MessageText: +// +// An attempt was made to reference a token that doesn't exist. +// This is typically done by referencing the token associated with a thread when the thread is not impersonating a client. +// +#define STATUS_NO_TOKEN ((NTSTATUS)0xC000007CL) + +// +// MessageId: STATUS_BAD_INHERITANCE_ACL +// +// MessageText: +// +// Indicates that an attempt to build either an inherited ACL or ACE was not successful. +// This can be caused by a number of things. One of the more probable causes is the replacement of a CreatorId with an SID that didn't fit into the ACE or ACL. +// +#define STATUS_BAD_INHERITANCE_ACL ((NTSTATUS)0xC000007DL) + +// +// MessageId: STATUS_RANGE_NOT_LOCKED +// +// MessageText: +// +// The range specified in NtUnlockFile was not locked. +// +#define STATUS_RANGE_NOT_LOCKED ((NTSTATUS)0xC000007EL) + +// +// MessageId: STATUS_DISK_FULL +// +// MessageText: +// +// An operation failed because the disk was full. +// +#define STATUS_DISK_FULL ((NTSTATUS)0xC000007FL) + +// +// MessageId: STATUS_SERVER_DISABLED +// +// MessageText: +// +// The GUID allocation server is [already] disabled at the moment. +// +#define STATUS_SERVER_DISABLED ((NTSTATUS)0xC0000080L) + +// +// MessageId: STATUS_SERVER_NOT_DISABLED +// +// MessageText: +// +// The GUID allocation server is [already] enabled at the moment. +// +#define STATUS_SERVER_NOT_DISABLED ((NTSTATUS)0xC0000081L) + +// +// MessageId: STATUS_TOO_MANY_GUIDS_REQUESTED +// +// MessageText: +// +// Too many GUIDs were requested from the allocation server at once. +// +#define STATUS_TOO_MANY_GUIDS_REQUESTED ((NTSTATUS)0xC0000082L) + +// +// MessageId: STATUS_GUIDS_EXHAUSTED +// +// MessageText: +// +// The GUIDs could not be allocated because the Authority Agent was exhausted. +// +#define STATUS_GUIDS_EXHAUSTED ((NTSTATUS)0xC0000083L) + +// +// MessageId: STATUS_INVALID_ID_AUTHORITY +// +// MessageText: +// +// The value provided was an invalid value for an identifier authority. +// +#define STATUS_INVALID_ID_AUTHORITY ((NTSTATUS)0xC0000084L) + +// +// MessageId: STATUS_AGENTS_EXHAUSTED +// +// MessageText: +// +// There are no more authority agent values available for the given identifier authority value. +// +#define STATUS_AGENTS_EXHAUSTED ((NTSTATUS)0xC0000085L) + +// +// MessageId: STATUS_INVALID_VOLUME_LABEL +// +// MessageText: +// +// An invalid volume label has been specified. +// +#define STATUS_INVALID_VOLUME_LABEL ((NTSTATUS)0xC0000086L) + +// +// MessageId: STATUS_SECTION_NOT_EXTENDED +// +// MessageText: +// +// A mapped section could not be extended. +// +#define STATUS_SECTION_NOT_EXTENDED ((NTSTATUS)0xC0000087L) + +// +// MessageId: STATUS_NOT_MAPPED_DATA +// +// MessageText: +// +// Specified section to flush does not map a data file. +// +#define STATUS_NOT_MAPPED_DATA ((NTSTATUS)0xC0000088L) + +// +// MessageId: STATUS_RESOURCE_DATA_NOT_FOUND +// +// MessageText: +// +// Indicates the specified image file did not contain a resource section. +// +#define STATUS_RESOURCE_DATA_NOT_FOUND ((NTSTATUS)0xC0000089L) + +// +// MessageId: STATUS_RESOURCE_TYPE_NOT_FOUND +// +// MessageText: +// +// Indicates the specified resource type cannot be found in the image file. +// +#define STATUS_RESOURCE_TYPE_NOT_FOUND ((NTSTATUS)0xC000008AL) + +// +// MessageId: STATUS_RESOURCE_NAME_NOT_FOUND +// +// MessageText: +// +// Indicates the specified resource name cannot be found in the image file. +// +#define STATUS_RESOURCE_NAME_NOT_FOUND ((NTSTATUS)0xC000008BL) + +// +// MessageId: STATUS_TOO_MANY_PAGING_FILES +// +// MessageText: +// +// An attempt was made to install more paging files than the system supports. +// +#define STATUS_TOO_MANY_PAGING_FILES ((NTSTATUS)0xC0000097L) + +// +// MessageId: STATUS_FILE_INVALID +// +// MessageText: +// +// The volume for a file has been externally altered such that the opened file is no longer valid. +// +#define STATUS_FILE_INVALID ((NTSTATUS)0xC0000098L) + +// +// MessageId: STATUS_ALLOTTED_SPACE_EXCEEDED +// +// MessageText: +// +// When a block of memory is allotted for future updates, such as the memory allocated to hold discretionary access control and primary group information, successive updates may exceed the amount of memory originally allotted. +// Since quota may already have been charged to several processes which have handles to the object, it is not reasonable to alter the size of the allocated memory. +// Instead, a request that requires more memory than has been allotted must fail and the STATUS_ALLOTED_SPACE_EXCEEDED error returned. +// +#define STATUS_ALLOTTED_SPACE_EXCEEDED ((NTSTATUS)0xC0000099L) + +// +// MessageId: STATUS_INSUFFICIENT_RESOURCES +// +// MessageText: +// +// Insufficient system resources exist to complete the API. +// +#define STATUS_INSUFFICIENT_RESOURCES ((NTSTATUS)0xC000009AL) // ntsubauth + +// +// MessageId: STATUS_DFS_EXIT_PATH_FOUND +// +// MessageText: +// +// An attempt has been made to open a DFS exit path control file. +// +#define STATUS_DFS_EXIT_PATH_FOUND ((NTSTATUS)0xC000009BL) + +// +// MessageId: STATUS_DEVICE_DATA_ERROR +// +// MessageText: +// +// STATUS_DEVICE_DATA_ERROR +// +#define STATUS_DEVICE_DATA_ERROR ((NTSTATUS)0xC000009CL) + +// +// MessageId: STATUS_DEVICE_NOT_CONNECTED +// +// MessageText: +// +// STATUS_DEVICE_NOT_CONNECTED +// +#define STATUS_DEVICE_NOT_CONNECTED ((NTSTATUS)0xC000009DL) + +// +// MessageId: STATUS_DEVICE_POWER_FAILURE +// +// MessageText: +// +// STATUS_DEVICE_POWER_FAILURE +// +#define STATUS_DEVICE_POWER_FAILURE ((NTSTATUS)0xC000009EL) + +// +// MessageId: STATUS_FREE_VM_NOT_AT_BASE +// +// MessageText: +// +// Virtual memory cannot be freed as base address is not the base of the region and a region size of zero was specified. +// +#define STATUS_FREE_VM_NOT_AT_BASE ((NTSTATUS)0xC000009FL) + +// +// MessageId: STATUS_MEMORY_NOT_ALLOCATED +// +// MessageText: +// +// An attempt was made to free virtual memory which is not allocated. +// +#define STATUS_MEMORY_NOT_ALLOCATED ((NTSTATUS)0xC00000A0L) + +// +// MessageId: STATUS_WORKING_SET_QUOTA +// +// MessageText: +// +// The working set is not big enough to allow the requested pages to be locked. +// +#define STATUS_WORKING_SET_QUOTA ((NTSTATUS)0xC00000A1L) + +// +// MessageId: STATUS_MEDIA_WRITE_PROTECTED +// +// MessageText: +// +// {Write Protect Error} +// The disk cannot be written to because it is write protected. Please remove the write protection from the volume %hs in drive %hs. +// +#define STATUS_MEDIA_WRITE_PROTECTED ((NTSTATUS)0xC00000A2L) + +// +// MessageId: STATUS_DEVICE_NOT_READY +// +// MessageText: +// +// {Drive Not Ready} +// The drive is not ready for use; its door may be open. Please check drive %hs and make sure that a disk is inserted and that the drive door is closed. +// +#define STATUS_DEVICE_NOT_READY ((NTSTATUS)0xC00000A3L) + +// +// MessageId: STATUS_INVALID_GROUP_ATTRIBUTES +// +// MessageText: +// +// The specified attributes are invalid, or incompatible with the attributes for the group as a whole. +// +#define STATUS_INVALID_GROUP_ATTRIBUTES ((NTSTATUS)0xC00000A4L) + +// +// MessageId: STATUS_BAD_IMPERSONATION_LEVEL +// +// MessageText: +// +// A specified impersonation level is invalid. +// Also used to indicate a required impersonation level was not provided. +// +#define STATUS_BAD_IMPERSONATION_LEVEL ((NTSTATUS)0xC00000A5L) + +// +// MessageId: STATUS_CANT_OPEN_ANONYMOUS +// +// MessageText: +// +// An attempt was made to open an Anonymous level token. +// Anonymous tokens may not be opened. +// +#define STATUS_CANT_OPEN_ANONYMOUS ((NTSTATUS)0xC00000A6L) + +// +// MessageId: STATUS_BAD_VALIDATION_CLASS +// +// MessageText: +// +// The validation information class requested was invalid. +// +#define STATUS_BAD_VALIDATION_CLASS ((NTSTATUS)0xC00000A7L) + +// +// MessageId: STATUS_BAD_TOKEN_TYPE +// +// MessageText: +// +// The type of a token object is inappropriate for its attempted use. +// +#define STATUS_BAD_TOKEN_TYPE ((NTSTATUS)0xC00000A8L) + +// +// MessageId: STATUS_BAD_MASTER_BOOT_RECORD +// +// MessageText: +// +// The type of a token object is inappropriate for its attempted use. +// +#define STATUS_BAD_MASTER_BOOT_RECORD ((NTSTATUS)0xC00000A9L) + +// +// MessageId: STATUS_INSTRUCTION_MISALIGNMENT +// +// MessageText: +// +// An attempt was made to execute an instruction at an unaligned address and the host system does not support unaligned instruction references. +// +#define STATUS_INSTRUCTION_MISALIGNMENT ((NTSTATUS)0xC00000AAL) + +// +// MessageId: STATUS_INSTANCE_NOT_AVAILABLE +// +// MessageText: +// +// The maximum named pipe instance count has been reached. +// +#define STATUS_INSTANCE_NOT_AVAILABLE ((NTSTATUS)0xC00000ABL) + +// +// MessageId: STATUS_PIPE_NOT_AVAILABLE +// +// MessageText: +// +// An instance of a named pipe cannot be found in the listening state. +// +#define STATUS_PIPE_NOT_AVAILABLE ((NTSTATUS)0xC00000ACL) + +// +// MessageId: STATUS_INVALID_PIPE_STATE +// +// MessageText: +// +// The named pipe is not in the connected or closing state. +// +#define STATUS_INVALID_PIPE_STATE ((NTSTATUS)0xC00000ADL) + +// +// MessageId: STATUS_PIPE_BUSY +// +// MessageText: +// +// The specified pipe is set to complete operations and there are current I/O operations queued so it cannot be changed to queue operations. +// +#define STATUS_PIPE_BUSY ((NTSTATUS)0xC00000AEL) + +// +// MessageId: STATUS_ILLEGAL_FUNCTION +// +// MessageText: +// +// The specified handle is not open to the server end of the named pipe. +// +#define STATUS_ILLEGAL_FUNCTION ((NTSTATUS)0xC00000AFL) + +// +// MessageId: STATUS_PIPE_DISCONNECTED +// +// MessageText: +// +// The specified named pipe is in the disconnected state. +// +#define STATUS_PIPE_DISCONNECTED ((NTSTATUS)0xC00000B0L) + +// +// MessageId: STATUS_PIPE_CLOSING +// +// MessageText: +// +// The specified named pipe is in the closing state. +// +#define STATUS_PIPE_CLOSING ((NTSTATUS)0xC00000B1L) + +// +// MessageId: STATUS_PIPE_CONNECTED +// +// MessageText: +// +// The specified named pipe is in the connected state. +// +#define STATUS_PIPE_CONNECTED ((NTSTATUS)0xC00000B2L) + +// +// MessageId: STATUS_PIPE_LISTENING +// +// MessageText: +// +// The specified named pipe is in the listening state. +// +#define STATUS_PIPE_LISTENING ((NTSTATUS)0xC00000B3L) + +// +// MessageId: STATUS_INVALID_READ_MODE +// +// MessageText: +// +// The specified named pipe is not in message mode. +// +#define STATUS_INVALID_READ_MODE ((NTSTATUS)0xC00000B4L) + +// +// MessageId: STATUS_IO_TIMEOUT +// +// MessageText: +// +// {Device Timeout} +// The specified I/O operation on %hs was not completed before the time-out period expired. +// +#define STATUS_IO_TIMEOUT ((NTSTATUS)0xC00000B5L) + +// +// MessageId: STATUS_FILE_FORCED_CLOSED +// +// MessageText: +// +// The specified file has been closed by another process. +// +#define STATUS_FILE_FORCED_CLOSED ((NTSTATUS)0xC00000B6L) + +// +// MessageId: STATUS_PROFILING_NOT_STARTED +// +// MessageText: +// +// Profiling not started. +// +#define STATUS_PROFILING_NOT_STARTED ((NTSTATUS)0xC00000B7L) + +// +// MessageId: STATUS_PROFILING_NOT_STOPPED +// +// MessageText: +// +// Profiling not stopped. +// +#define STATUS_PROFILING_NOT_STOPPED ((NTSTATUS)0xC00000B8L) + +// +// MessageId: STATUS_COULD_NOT_INTERPRET +// +// MessageText: +// +// The passed ACL did not contain the minimum required information. +// +#define STATUS_COULD_NOT_INTERPRET ((NTSTATUS)0xC00000B9L) + +// +// MessageId: STATUS_FILE_IS_A_DIRECTORY +// +// MessageText: +// +// The file that was specified as a target is a directory and the caller specified that it could be anything but a directory. +// +#define STATUS_FILE_IS_A_DIRECTORY ((NTSTATUS)0xC00000BAL) + +// +// Network specific errors. +// +// +// +// MessageId: STATUS_NOT_SUPPORTED +// +// MessageText: +// +// The request is not supported. +// +#define STATUS_NOT_SUPPORTED ((NTSTATUS)0xC00000BBL) + +// +// MessageId: STATUS_REMOTE_NOT_LISTENING +// +// MessageText: +// +// This remote computer is not listening. +// +#define STATUS_REMOTE_NOT_LISTENING ((NTSTATUS)0xC00000BCL) + +// +// MessageId: STATUS_DUPLICATE_NAME +// +// MessageText: +// +// A duplicate name exists on the network. +// +#define STATUS_DUPLICATE_NAME ((NTSTATUS)0xC00000BDL) + +// +// MessageId: STATUS_BAD_NETWORK_PATH +// +// MessageText: +// +// The network path cannot be located. +// +#define STATUS_BAD_NETWORK_PATH ((NTSTATUS)0xC00000BEL) + +// +// MessageId: STATUS_NETWORK_BUSY +// +// MessageText: +// +// The network is busy. +// +#define STATUS_NETWORK_BUSY ((NTSTATUS)0xC00000BFL) + +// +// MessageId: STATUS_DEVICE_DOES_NOT_EXIST +// +// MessageText: +// +// This device does not exist. +// +#define STATUS_DEVICE_DOES_NOT_EXIST ((NTSTATUS)0xC00000C0L) + +// +// MessageId: STATUS_TOO_MANY_COMMANDS +// +// MessageText: +// +// The network BIOS command limit has been reached. +// +#define STATUS_TOO_MANY_COMMANDS ((NTSTATUS)0xC00000C1L) + +// +// MessageId: STATUS_ADAPTER_HARDWARE_ERROR +// +// MessageText: +// +// An I/O adapter hardware error has occurred. +// +#define STATUS_ADAPTER_HARDWARE_ERROR ((NTSTATUS)0xC00000C2L) + +// +// MessageId: STATUS_INVALID_NETWORK_RESPONSE +// +// MessageText: +// +// The network responded incorrectly. +// +#define STATUS_INVALID_NETWORK_RESPONSE ((NTSTATUS)0xC00000C3L) + +// +// MessageId: STATUS_UNEXPECTED_NETWORK_ERROR +// +// MessageText: +// +// An unexpected network error occurred. +// +#define STATUS_UNEXPECTED_NETWORK_ERROR ((NTSTATUS)0xC00000C4L) + +// +// MessageId: STATUS_BAD_REMOTE_ADAPTER +// +// MessageText: +// +// The remote adapter is not compatible. +// +#define STATUS_BAD_REMOTE_ADAPTER ((NTSTATUS)0xC00000C5L) + +// +// MessageId: STATUS_PRINT_QUEUE_FULL +// +// MessageText: +// +// The printer queue is full. +// +#define STATUS_PRINT_QUEUE_FULL ((NTSTATUS)0xC00000C6L) + +// +// MessageId: STATUS_NO_SPOOL_SPACE +// +// MessageText: +// +// Space to store the file waiting to be printed is not available on the server. +// +#define STATUS_NO_SPOOL_SPACE ((NTSTATUS)0xC00000C7L) + +// +// MessageId: STATUS_PRINT_CANCELLED +// +// MessageText: +// +// The requested print file has been canceled. +// +#define STATUS_PRINT_CANCELLED ((NTSTATUS)0xC00000C8L) + +// +// MessageId: STATUS_NETWORK_NAME_DELETED +// +// MessageText: +// +// The network name was deleted. +// +#define STATUS_NETWORK_NAME_DELETED ((NTSTATUS)0xC00000C9L) + +// +// MessageId: STATUS_NETWORK_ACCESS_DENIED +// +// MessageText: +// +// Network access is denied. +// +#define STATUS_NETWORK_ACCESS_DENIED ((NTSTATUS)0xC00000CAL) + +// +// MessageId: STATUS_BAD_DEVICE_TYPE +// +// MessageText: +// +// {Incorrect Network Resource Type} +// The specified device type (LPT, for example) conflicts with the actual device type on the remote resource. +// +#define STATUS_BAD_DEVICE_TYPE ((NTSTATUS)0xC00000CBL) + +// +// MessageId: STATUS_BAD_NETWORK_NAME +// +// MessageText: +// +// {Network Name Not Found} +// The specified share name cannot be found on the remote server. +// +#define STATUS_BAD_NETWORK_NAME ((NTSTATUS)0xC00000CCL) + +// +// MessageId: STATUS_TOO_MANY_NAMES +// +// MessageText: +// +// The name limit for the local computer network adapter card was exceeded. +// +#define STATUS_TOO_MANY_NAMES ((NTSTATUS)0xC00000CDL) + +// +// MessageId: STATUS_TOO_MANY_SESSIONS +// +// MessageText: +// +// The network BIOS session limit was exceeded. +// +#define STATUS_TOO_MANY_SESSIONS ((NTSTATUS)0xC00000CEL) + +// +// MessageId: STATUS_SHARING_PAUSED +// +// MessageText: +// +// File sharing has been temporarily paused. +// +#define STATUS_SHARING_PAUSED ((NTSTATUS)0xC00000CFL) + +// +// MessageId: STATUS_REQUEST_NOT_ACCEPTED +// +// MessageText: +// +// No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept. +// +#define STATUS_REQUEST_NOT_ACCEPTED ((NTSTATUS)0xC00000D0L) + +// +// MessageId: STATUS_REDIRECTOR_PAUSED +// +// MessageText: +// +// Print or disk redirection is temporarily paused. +// +#define STATUS_REDIRECTOR_PAUSED ((NTSTATUS)0xC00000D1L) + +// +// MessageId: STATUS_NET_WRITE_FAULT +// +// MessageText: +// +// A network data fault occurred. +// +#define STATUS_NET_WRITE_FAULT ((NTSTATUS)0xC00000D2L) + +// +// MessageId: STATUS_PROFILING_AT_LIMIT +// +// MessageText: +// +// The number of active profiling objects is at the maximum and no more may be started. +// +#define STATUS_PROFILING_AT_LIMIT ((NTSTATUS)0xC00000D3L) + +// +// MessageId: STATUS_NOT_SAME_DEVICE +// +// MessageText: +// +// {Incorrect Volume} +// The target file of a rename request is located on a different device than the source of the rename request. +// +#define STATUS_NOT_SAME_DEVICE ((NTSTATUS)0xC00000D4L) + +// +// MessageId: STATUS_FILE_RENAMED +// +// MessageText: +// +// The file specified has been renamed and thus cannot be modified. +// +#define STATUS_FILE_RENAMED ((NTSTATUS)0xC00000D5L) + +// +// MessageId: STATUS_VIRTUAL_CIRCUIT_CLOSED +// +// MessageText: +// +// {Network Request Timeout} +// The session with a remote server has been disconnected because the time-out interval for a request has expired. +// +#define STATUS_VIRTUAL_CIRCUIT_CLOSED ((NTSTATUS)0xC00000D6L) + +// +// MessageId: STATUS_NO_SECURITY_ON_OBJECT +// +// MessageText: +// +// Indicates an attempt was made to operate on the security of an object that does not have security associated with it. +// +#define STATUS_NO_SECURITY_ON_OBJECT ((NTSTATUS)0xC00000D7L) + +// +// MessageId: STATUS_CANT_WAIT +// +// MessageText: +// +// Used to indicate that an operation cannot continue without blocking for I/O. +// +#define STATUS_CANT_WAIT ((NTSTATUS)0xC00000D8L) + +// +// MessageId: STATUS_PIPE_EMPTY +// +// MessageText: +// +// Used to indicate that a read operation was done on an empty pipe. +// +#define STATUS_PIPE_EMPTY ((NTSTATUS)0xC00000D9L) + +// +// MessageId: STATUS_CANT_ACCESS_DOMAIN_INFO +// +// MessageText: +// +// Configuration information could not be read from the domain controller, either because the machine is unavailable, or access has been denied. +// +#define STATUS_CANT_ACCESS_DOMAIN_INFO ((NTSTATUS)0xC00000DAL) + +// +// MessageId: STATUS_CANT_TERMINATE_SELF +// +// MessageText: +// +// Indicates that a thread attempted to terminate itself by default (called NtTerminateThread with NULL) and it was the last thread in the current process. +// +#define STATUS_CANT_TERMINATE_SELF ((NTSTATUS)0xC00000DBL) + +// +// MessageId: STATUS_INVALID_SERVER_STATE +// +// MessageText: +// +// Indicates the Sam Server was in the wrong state to perform the desired operation. +// +#define STATUS_INVALID_SERVER_STATE ((NTSTATUS)0xC00000DCL) + +// +// MessageId: STATUS_INVALID_DOMAIN_STATE +// +// MessageText: +// +// Indicates the Domain was in the wrong state to perform the desired operation. +// +#define STATUS_INVALID_DOMAIN_STATE ((NTSTATUS)0xC00000DDL) + +// +// MessageId: STATUS_INVALID_DOMAIN_ROLE +// +// MessageText: +// +// This operation is only allowed for the Primary Domain Controller of the domain. +// +#define STATUS_INVALID_DOMAIN_ROLE ((NTSTATUS)0xC00000DEL) + +// +// MessageId: STATUS_NO_SUCH_DOMAIN +// +// MessageText: +// +// The specified Domain did not exist. +// +#define STATUS_NO_SUCH_DOMAIN ((NTSTATUS)0xC00000DFL) + +// +// MessageId: STATUS_DOMAIN_EXISTS +// +// MessageText: +// +// The specified Domain already exists. +// +#define STATUS_DOMAIN_EXISTS ((NTSTATUS)0xC00000E0L) + +// +// MessageId: STATUS_DOMAIN_LIMIT_EXCEEDED +// +// MessageText: +// +// An attempt was made to exceed the limit on the number of domains per server for this release. +// +#define STATUS_DOMAIN_LIMIT_EXCEEDED ((NTSTATUS)0xC00000E1L) + +// +// MessageId: STATUS_OPLOCK_NOT_GRANTED +// +// MessageText: +// +// Error status returned when oplock request is denied. +// +#define STATUS_OPLOCK_NOT_GRANTED ((NTSTATUS)0xC00000E2L) + +// +// MessageId: STATUS_INVALID_OPLOCK_PROTOCOL +// +// MessageText: +// +// Error status returned when an invalid oplock acknowledgment is received by a file system. +// +#define STATUS_INVALID_OPLOCK_PROTOCOL ((NTSTATUS)0xC00000E3L) + +// +// MessageId: STATUS_INTERNAL_DB_CORRUPTION +// +// MessageText: +// +// This error indicates that the requested operation cannot be completed due to a catastrophic media failure or on-disk data structure corruption. +// +#define STATUS_INTERNAL_DB_CORRUPTION ((NTSTATUS)0xC00000E4L) + +// +// MessageId: STATUS_INTERNAL_ERROR +// +// MessageText: +// +// An internal error occurred. +// +#define STATUS_INTERNAL_ERROR ((NTSTATUS)0xC00000E5L) + +// +// MessageId: STATUS_GENERIC_NOT_MAPPED +// +// MessageText: +// +// Indicates generic access types were contained in an access mask which should already be mapped to non-generic access types. +// +#define STATUS_GENERIC_NOT_MAPPED ((NTSTATUS)0xC00000E6L) + +// +// MessageId: STATUS_BAD_DESCRIPTOR_FORMAT +// +// MessageText: +// +// Indicates a security descriptor is not in the necessary format (absolute or self-relative). +// +#define STATUS_BAD_DESCRIPTOR_FORMAT ((NTSTATUS)0xC00000E7L) + +// +// Status codes raised by the Cache Manager which must be considered as +// "expected" by its callers. +// +// +// MessageId: STATUS_INVALID_USER_BUFFER +// +// MessageText: +// +// An access to a user buffer failed at an "expected" point in time. This code is defined since the caller does not want to accept STATUS_ACCESS_VIOLATION in its filter. +// +#define STATUS_INVALID_USER_BUFFER ((NTSTATUS)0xC00000E8L) + +// +// MessageId: STATUS_UNEXPECTED_IO_ERROR +// +// MessageText: +// +// If an I/O error is returned which is not defined in the standard FsRtl filter, it is converted to the following error which is guaranteed to be in the filter. In this case information is lost, however, the filter correctly handles the exception. +// +#define STATUS_UNEXPECTED_IO_ERROR ((NTSTATUS)0xC00000E9L) + +// +// MessageId: STATUS_UNEXPECTED_MM_CREATE_ERR +// +// MessageText: +// +// If an MM error is returned which is not defined in the standard FsRtl filter, it is converted to one of the following errors which is guaranteed to be in the filter. In this case information is lost, however, the filter correctly handles the exception. +// +#define STATUS_UNEXPECTED_MM_CREATE_ERR ((NTSTATUS)0xC00000EAL) + +// +// MessageId: STATUS_UNEXPECTED_MM_MAP_ERROR +// +// MessageText: +// +// If an MM error is returned which is not defined in the standard FsRtl filter, it is converted to one of the following errors which is guaranteed to be in the filter. In this case information is lost, however, the filter correctly handles the exception. +// +#define STATUS_UNEXPECTED_MM_MAP_ERROR ((NTSTATUS)0xC00000EBL) + +// +// MessageId: STATUS_UNEXPECTED_MM_EXTEND_ERR +// +// MessageText: +// +// If an MM error is returned which is not defined in the standard FsRtl filter, it is converted to one of the following errors which is guaranteed to be in the filter. In this case information is lost, however, the filter correctly handles the exception. +// +#define STATUS_UNEXPECTED_MM_EXTEND_ERR ((NTSTATUS)0xC00000ECL) + +// +// MessageId: STATUS_NOT_LOGON_PROCESS +// +// MessageText: +// +// The requested action is restricted for use by logon processes only. The calling process has not registered as a logon process. +// +#define STATUS_NOT_LOGON_PROCESS ((NTSTATUS)0xC00000EDL) + +// +// MessageId: STATUS_LOGON_SESSION_EXISTS +// +// MessageText: +// +// An attempt has been made to start a new session manager or LSA logon session with an ID that is already in use. +// +#define STATUS_LOGON_SESSION_EXISTS ((NTSTATUS)0xC00000EEL) + +// +// MessageId: STATUS_INVALID_PARAMETER_1 +// +// MessageText: +// +// An invalid parameter was passed to a service or function as the first argument. +// +#define STATUS_INVALID_PARAMETER_1 ((NTSTATUS)0xC00000EFL) + +// +// MessageId: STATUS_INVALID_PARAMETER_2 +// +// MessageText: +// +// An invalid parameter was passed to a service or function as the second argument. +// +#define STATUS_INVALID_PARAMETER_2 ((NTSTATUS)0xC00000F0L) + +// +// MessageId: STATUS_INVALID_PARAMETER_3 +// +// MessageText: +// +// An invalid parameter was passed to a service or function as the third argument. +// +#define STATUS_INVALID_PARAMETER_3 ((NTSTATUS)0xC00000F1L) + +// +// MessageId: STATUS_INVALID_PARAMETER_4 +// +// MessageText: +// +// An invalid parameter was passed to a service or function as the fourth argument. +// +#define STATUS_INVALID_PARAMETER_4 ((NTSTATUS)0xC00000F2L) + +// +// MessageId: STATUS_INVALID_PARAMETER_5 +// +// MessageText: +// +// An invalid parameter was passed to a service or function as the fifth argument. +// +#define STATUS_INVALID_PARAMETER_5 ((NTSTATUS)0xC00000F3L) + +// +// MessageId: STATUS_INVALID_PARAMETER_6 +// +// MessageText: +// +// An invalid parameter was passed to a service or function as the sixth argument. +// +#define STATUS_INVALID_PARAMETER_6 ((NTSTATUS)0xC00000F4L) + +// +// MessageId: STATUS_INVALID_PARAMETER_7 +// +// MessageText: +// +// An invalid parameter was passed to a service or function as the seventh argument. +// +#define STATUS_INVALID_PARAMETER_7 ((NTSTATUS)0xC00000F5L) + +// +// MessageId: STATUS_INVALID_PARAMETER_8 +// +// MessageText: +// +// An invalid parameter was passed to a service or function as the eighth argument. +// +#define STATUS_INVALID_PARAMETER_8 ((NTSTATUS)0xC00000F6L) + +// +// MessageId: STATUS_INVALID_PARAMETER_9 +// +// MessageText: +// +// An invalid parameter was passed to a service or function as the ninth argument. +// +#define STATUS_INVALID_PARAMETER_9 ((NTSTATUS)0xC00000F7L) + +// +// MessageId: STATUS_INVALID_PARAMETER_10 +// +// MessageText: +// +// An invalid parameter was passed to a service or function as the tenth argument. +// +#define STATUS_INVALID_PARAMETER_10 ((NTSTATUS)0xC00000F8L) + +// +// MessageId: STATUS_INVALID_PARAMETER_11 +// +// MessageText: +// +// An invalid parameter was passed to a service or function as the eleventh argument. +// +#define STATUS_INVALID_PARAMETER_11 ((NTSTATUS)0xC00000F9L) + +// +// MessageId: STATUS_INVALID_PARAMETER_12 +// +// MessageText: +// +// An invalid parameter was passed to a service or function as the twelfth argument. +// +#define STATUS_INVALID_PARAMETER_12 ((NTSTATUS)0xC00000FAL) + +// +// MessageId: STATUS_REDIRECTOR_NOT_STARTED +// +// MessageText: +// +// An attempt was made to access a network file, but the network software was not yet started. +// +#define STATUS_REDIRECTOR_NOT_STARTED ((NTSTATUS)0xC00000FBL) + +// +// MessageId: STATUS_REDIRECTOR_STARTED +// +// MessageText: +// +// An attempt was made to start the redirector, but the redirector has already been started. +// +#define STATUS_REDIRECTOR_STARTED ((NTSTATUS)0xC00000FCL) + +// +// MessageId: STATUS_NO_SUCH_PACKAGE +// +// MessageText: +// +// A specified authentication package is unknown. +// +#define STATUS_NO_SUCH_PACKAGE ((NTSTATUS)0xC00000FEL) + +// +// MessageId: STATUS_BAD_FUNCTION_TABLE +// +// MessageText: +// +// A malformed function table was encountered during an unwind operation. +// +#define STATUS_BAD_FUNCTION_TABLE ((NTSTATUS)0xC00000FFL) + +// +// MessageId: STATUS_VARIABLE_NOT_FOUND +// +// MessageText: +// +// Indicates the specified environment variable name was not found in the specified environment block. +// +#define STATUS_VARIABLE_NOT_FOUND ((NTSTATUS)0xC0000100L) + +// +// MessageId: STATUS_DIRECTORY_NOT_EMPTY +// +// MessageText: +// +// Indicates that the directory trying to be deleted is not empty. +// +#define STATUS_DIRECTORY_NOT_EMPTY ((NTSTATUS)0xC0000101L) + +// +// MessageId: STATUS_FILE_CORRUPT_ERROR +// +// MessageText: +// +// {Corrupt File} +// The file or directory %hs is corrupt and unreadable. +// Please run the Chkdsk utility. +// +#define STATUS_FILE_CORRUPT_ERROR ((NTSTATUS)0xC0000102L) + +// +// MessageId: STATUS_NOT_A_DIRECTORY +// +// MessageText: +// +// A requested opened file is not a directory. +// +#define STATUS_NOT_A_DIRECTORY ((NTSTATUS)0xC0000103L) + +// +// MessageId: STATUS_BAD_LOGON_SESSION_STATE +// +// MessageText: +// +// The logon session is not in a state that is consistent with the requested operation. +// +#define STATUS_BAD_LOGON_SESSION_STATE ((NTSTATUS)0xC0000104L) + +// +// MessageId: STATUS_LOGON_SESSION_COLLISION +// +// MessageText: +// +// An internal LSA error has occurred. An authentication package has requested the creation of a Logon Session but the ID of an already existing Logon Session has been specified. +// +#define STATUS_LOGON_SESSION_COLLISION ((NTSTATUS)0xC0000105L) + +// +// MessageId: STATUS_NAME_TOO_LONG +// +// MessageText: +// +// A specified name string is too long for its intended use. +// +#define STATUS_NAME_TOO_LONG ((NTSTATUS)0xC0000106L) + +// +// MessageId: STATUS_FILES_OPEN +// +// MessageText: +// +// The user attempted to force close the files on a redirected drive, but there were opened files on the drive, and the user did not specify a sufficient level of force. +// +#define STATUS_FILES_OPEN ((NTSTATUS)0xC0000107L) + +// +// MessageId: STATUS_CONNECTION_IN_USE +// +// MessageText: +// +// The user attempted to force close the files on a redirected drive, but there were opened directories on the drive, and the user did not specify a sufficient level of force. +// +#define STATUS_CONNECTION_IN_USE ((NTSTATUS)0xC0000108L) + +// +// MessageId: STATUS_MESSAGE_NOT_FOUND +// +// MessageText: +// +// RtlFindMessage could not locate the requested message ID in the message table resource. +// +#define STATUS_MESSAGE_NOT_FOUND ((NTSTATUS)0xC0000109L) + +// +// MessageId: STATUS_PROCESS_IS_TERMINATING +// +// MessageText: +// +// An attempt was made to access an exiting process. +// +#define STATUS_PROCESS_IS_TERMINATING ((NTSTATUS)0xC000010AL) + +// +// MessageId: STATUS_INVALID_LOGON_TYPE +// +// MessageText: +// +// Indicates an invalid value has been provided for the LogonType requested. +// +#define STATUS_INVALID_LOGON_TYPE ((NTSTATUS)0xC000010BL) + +// +// MessageId: STATUS_NO_GUID_TRANSLATION +// +// MessageText: +// +// Indicates that an attempt was made to assign protection to a file system file or directory and one of the SIDs in the security descriptor could not be translated into a GUID that could be stored by the file system. +// This causes the protection attempt to fail, which may cause a file creation attempt to fail. +// +#define STATUS_NO_GUID_TRANSLATION ((NTSTATUS)0xC000010CL) + +// +// MessageId: STATUS_CANNOT_IMPERSONATE +// +// MessageText: +// +// Indicates that an attempt has been made to impersonate via a named pipe that has not yet been read from. +// +#define STATUS_CANNOT_IMPERSONATE ((NTSTATUS)0xC000010DL) + +// +// MessageId: STATUS_IMAGE_ALREADY_LOADED +// +// MessageText: +// +// Indicates that the specified image is already loaded. +// +#define STATUS_IMAGE_ALREADY_LOADED ((NTSTATUS)0xC000010EL) + + +// +// ============================================================ +// NOTE: The following ABIOS error code should be reserved on +// non ABIOS kernel. Eventually, I will remove the ifdef +// ABIOS. +// ============================================================ +// +// +// MessageId: STATUS_ABIOS_NOT_PRESENT +// +// MessageText: +// +// STATUS_ABIOS_NOT_PRESENT +// +#define STATUS_ABIOS_NOT_PRESENT ((NTSTATUS)0xC000010FL) + +// +// MessageId: STATUS_ABIOS_LID_NOT_EXIST +// +// MessageText: +// +// STATUS_ABIOS_LID_NOT_EXIST +// +#define STATUS_ABIOS_LID_NOT_EXIST ((NTSTATUS)0xC0000110L) + +// +// MessageId: STATUS_ABIOS_LID_ALREADY_OWNED +// +// MessageText: +// +// STATUS_ABIOS_LID_ALREADY_OWNED +// +#define STATUS_ABIOS_LID_ALREADY_OWNED ((NTSTATUS)0xC0000111L) + +// +// MessageId: STATUS_ABIOS_NOT_LID_OWNER +// +// MessageText: +// +// STATUS_ABIOS_NOT_LID_OWNER +// +#define STATUS_ABIOS_NOT_LID_OWNER ((NTSTATUS)0xC0000112L) + +// +// MessageId: STATUS_ABIOS_INVALID_COMMAND +// +// MessageText: +// +// STATUS_ABIOS_INVALID_COMMAND +// +#define STATUS_ABIOS_INVALID_COMMAND ((NTSTATUS)0xC0000113L) + +// +// MessageId: STATUS_ABIOS_INVALID_LID +// +// MessageText: +// +// STATUS_ABIOS_INVALID_LID +// +#define STATUS_ABIOS_INVALID_LID ((NTSTATUS)0xC0000114L) + +// +// MessageId: STATUS_ABIOS_SELECTOR_NOT_AVAILABLE +// +// MessageText: +// +// STATUS_ABIOS_SELECTOR_NOT_AVAILABLE +// +#define STATUS_ABIOS_SELECTOR_NOT_AVAILABLE ((NTSTATUS)0xC0000115L) + +// +// MessageId: STATUS_ABIOS_INVALID_SELECTOR +// +// MessageText: +// +// STATUS_ABIOS_INVALID_SELECTOR +// +#define STATUS_ABIOS_INVALID_SELECTOR ((NTSTATUS)0xC0000116L) + +// +// MessageId: STATUS_NO_LDT +// +// MessageText: +// +// Indicates that an attempt was made to change the size of the LDT for a process that has no LDT. +// +#define STATUS_NO_LDT ((NTSTATUS)0xC0000117L) + +// +// MessageId: STATUS_INVALID_LDT_SIZE +// +// MessageText: +// +// Indicates that an attempt was made to grow an LDT by setting its size, or that the size was not an even number of selectors. +// +#define STATUS_INVALID_LDT_SIZE ((NTSTATUS)0xC0000118L) + +// +// MessageId: STATUS_INVALID_LDT_OFFSET +// +// MessageText: +// +// Indicates that the starting value for the LDT information was not an integral multiple of the selector size. +// +#define STATUS_INVALID_LDT_OFFSET ((NTSTATUS)0xC0000119L) + +// +// MessageId: STATUS_INVALID_LDT_DESCRIPTOR +// +// MessageText: +// +// Indicates that the user supplied an invalid descriptor when trying to set up Ldt descriptors. +// +#define STATUS_INVALID_LDT_DESCRIPTOR ((NTSTATUS)0xC000011AL) + +// +// MessageId: STATUS_INVALID_IMAGE_NE_FORMAT +// +// MessageText: +// +// The specified image file did not have the correct format. It appears to be NE format. +// +#define STATUS_INVALID_IMAGE_NE_FORMAT ((NTSTATUS)0xC000011BL) + +// +// MessageId: STATUS_RXACT_INVALID_STATE +// +// MessageText: +// +// Indicates that the transaction state of a registry sub-tree is incompatible with the requested operation. For example, a request has been made to start a new transaction with one already in progress, or a request has been made to apply a transaction when one is not currently in progress. +// +#define STATUS_RXACT_INVALID_STATE ((NTSTATUS)0xC000011CL) + +// +// MessageId: STATUS_RXACT_COMMIT_FAILURE +// +// MessageText: +// +// Indicates an error has occurred during a registry transaction commit. The database has been left in an unknown, but probably inconsistent, state. The state of the registry transaction is left as COMMITTING. +// +#define STATUS_RXACT_COMMIT_FAILURE ((NTSTATUS)0xC000011DL) + +// +// MessageId: STATUS_MAPPED_FILE_SIZE_ZERO +// +// MessageText: +// +// An attempt was made to map a file of size zero with the maximum size specified as zero. +// +#define STATUS_MAPPED_FILE_SIZE_ZERO ((NTSTATUS)0xC000011EL) + +// +// MessageId: STATUS_TOO_MANY_OPENED_FILES +// +// MessageText: +// +// Too many files are opened on a remote server. +// This error should only be returned by the Windows redirector on a remote drive. +// +#define STATUS_TOO_MANY_OPENED_FILES ((NTSTATUS)0xC000011FL) + +// +// MessageId: STATUS_CANCELLED +// +// MessageText: +// +// The I/O request was canceled. +// +#define STATUS_CANCELLED ((NTSTATUS)0xC0000120L) + +// +// MessageId: STATUS_CANNOT_DELETE +// +// MessageText: +// +// An attempt has been made to remove a file or directory that cannot be deleted. +// +#define STATUS_CANNOT_DELETE ((NTSTATUS)0xC0000121L) + +// +// MessageId: STATUS_INVALID_COMPUTER_NAME +// +// MessageText: +// +// Indicates a name specified as a remote computer name is syntactically invalid. +// +#define STATUS_INVALID_COMPUTER_NAME ((NTSTATUS)0xC0000122L) + +// +// MessageId: STATUS_FILE_DELETED +// +// MessageText: +// +// An I/O request other than close was performed on a file after it has been deleted, which can only happen to a request which did not complete before the last handle was closed via NtClose. +// +#define STATUS_FILE_DELETED ((NTSTATUS)0xC0000123L) + +// +// MessageId: STATUS_SPECIAL_ACCOUNT +// +// MessageText: +// +// Indicates an operation has been attempted on a built-in (special) SAM account which is incompatible with built-in accounts. For example, built-in accounts cannot be deleted. +// +#define STATUS_SPECIAL_ACCOUNT ((NTSTATUS)0xC0000124L) + +// +// MessageId: STATUS_SPECIAL_GROUP +// +// MessageText: +// +// The operation requested may not be performed on the specified group because it is a built-in special group. +// +#define STATUS_SPECIAL_GROUP ((NTSTATUS)0xC0000125L) + +// +// MessageId: STATUS_SPECIAL_USER +// +// MessageText: +// +// The operation requested may not be performed on the specified user because it is a built-in special user. +// +#define STATUS_SPECIAL_USER ((NTSTATUS)0xC0000126L) + +// +// MessageId: STATUS_MEMBERS_PRIMARY_GROUP +// +// MessageText: +// +// Indicates a member cannot be removed from a group because the group is currently the member's primary group. +// +#define STATUS_MEMBERS_PRIMARY_GROUP ((NTSTATUS)0xC0000127L) + +// +// MessageId: STATUS_FILE_CLOSED +// +// MessageText: +// +// An I/O request other than close and several other special case operations was attempted using a file object that had already been closed. +// +#define STATUS_FILE_CLOSED ((NTSTATUS)0xC0000128L) + +// +// MessageId: STATUS_TOO_MANY_THREADS +// +// MessageText: +// +// Indicates a process has too many threads to perform the requested action. For example, assignment of a primary token may only be performed when a process has zero or one threads. +// +#define STATUS_TOO_MANY_THREADS ((NTSTATUS)0xC0000129L) + +// +// MessageId: STATUS_THREAD_NOT_IN_PROCESS +// +// MessageText: +// +// An attempt was made to operate on a thread within a specific process, but the thread specified is not in the process specified. +// +#define STATUS_THREAD_NOT_IN_PROCESS ((NTSTATUS)0xC000012AL) + +// +// MessageId: STATUS_TOKEN_ALREADY_IN_USE +// +// MessageText: +// +// An attempt was made to establish a token for use as a primary token but the token is already in use. A token can only be the primary token of one process at a time. +// +#define STATUS_TOKEN_ALREADY_IN_USE ((NTSTATUS)0xC000012BL) + +// +// MessageId: STATUS_PAGEFILE_QUOTA_EXCEEDED +// +// MessageText: +// +// Page file quota was exceeded. +// +#define STATUS_PAGEFILE_QUOTA_EXCEEDED ((NTSTATUS)0xC000012CL) + +// +// MessageId: STATUS_COMMITMENT_LIMIT +// +// MessageText: +// +// {Out of Virtual Memory} +// Your system is low on virtual memory. To ensure that Windows runs properly, increase the size of your virtual memory paging file. For more information, see Help. +// +#define STATUS_COMMITMENT_LIMIT ((NTSTATUS)0xC000012DL) + +// +// MessageId: STATUS_INVALID_IMAGE_LE_FORMAT +// +// MessageText: +// +// The specified image file did not have the correct format, it appears to be LE format. +// +#define STATUS_INVALID_IMAGE_LE_FORMAT ((NTSTATUS)0xC000012EL) + +// +// MessageId: STATUS_INVALID_IMAGE_NOT_MZ +// +// MessageText: +// +// The specified image file did not have the correct format, it did not have an initial MZ. +// +#define STATUS_INVALID_IMAGE_NOT_MZ ((NTSTATUS)0xC000012FL) + +// +// MessageId: STATUS_INVALID_IMAGE_PROTECT +// +// MessageText: +// +// The specified image file did not have the correct format, it did not have a proper e_lfarlc in the MZ header. +// +#define STATUS_INVALID_IMAGE_PROTECT ((NTSTATUS)0xC0000130L) + +// +// MessageId: STATUS_INVALID_IMAGE_WIN_16 +// +// MessageText: +// +// The specified image file did not have the correct format, it appears to be a 16-bit Windows image. +// +#define STATUS_INVALID_IMAGE_WIN_16 ((NTSTATUS)0xC0000131L) + +// +// MessageId: STATUS_LOGON_SERVER_CONFLICT +// +// MessageText: +// +// The Netlogon service cannot start because another Netlogon service running in the domain conflicts with the specified role. +// +#define STATUS_LOGON_SERVER_CONFLICT ((NTSTATUS)0xC0000132L) + +// +// MessageId: STATUS_TIME_DIFFERENCE_AT_DC +// +// MessageText: +// +// The time at the Primary Domain Controller is different than the time at the Backup Domain Controller or member server by too large an amount. +// +#define STATUS_TIME_DIFFERENCE_AT_DC ((NTSTATUS)0xC0000133L) + +// +// MessageId: STATUS_SYNCHRONIZATION_REQUIRED +// +// MessageText: +// +// The SAM database on a Windows Server is significantly out of synchronization with the copy on the Domain Controller. A complete synchronization is required. +// +#define STATUS_SYNCHRONIZATION_REQUIRED ((NTSTATUS)0xC0000134L) + +// +// MessageId: STATUS_DLL_NOT_FOUND +// +// MessageText: +// +// The program can't start because %hs is missing from your computer. Try reinstalling the program to fix this problem. +// +#define STATUS_DLL_NOT_FOUND ((NTSTATUS)0xC0000135L) // winnt + +// +// MessageId: STATUS_OPEN_FAILED +// +// MessageText: +// +// The NtCreateFile API failed. This error should never be returned to an application, it is a place holder for the Windows Lan Manager Redirector to use in its internal error mapping routines. +// +#define STATUS_OPEN_FAILED ((NTSTATUS)0xC0000136L) + +// +// MessageId: STATUS_IO_PRIVILEGE_FAILED +// +// MessageText: +// +// {Privilege Failed} +// The I/O permissions for the process could not be changed. +// +#define STATUS_IO_PRIVILEGE_FAILED ((NTSTATUS)0xC0000137L) + +// +// MessageId: STATUS_ORDINAL_NOT_FOUND +// +// MessageText: +// +// {Ordinal Not Found} +// The ordinal %ld could not be located in the dynamic link library %hs. +// +#define STATUS_ORDINAL_NOT_FOUND ((NTSTATUS)0xC0000138L) // winnt + +// +// MessageId: STATUS_ENTRYPOINT_NOT_FOUND +// +// MessageText: +// +// {Entry Point Not Found} +// The procedure entry point %hs could not be located in the dynamic link library %hs. +// +#define STATUS_ENTRYPOINT_NOT_FOUND ((NTSTATUS)0xC0000139L) // winnt + +// +// MessageId: STATUS_LOCAL_DISCONNECT +// +// MessageText: +// +// {Virtual Circuit Closed} +// The network transport on your computer has closed a network connection. There may or may not be I/O requests outstanding. +// +#define STATUS_LOCAL_DISCONNECT ((NTSTATUS)0xC000013BL) + +// +// MessageId: STATUS_REMOTE_DISCONNECT +// +// MessageText: +// +// {Virtual Circuit Closed} +// The network transport on a remote computer has closed a network connection. There may or may not be I/O requests outstanding. +// +#define STATUS_REMOTE_DISCONNECT ((NTSTATUS)0xC000013CL) + +// +// MessageId: STATUS_REMOTE_RESOURCES +// +// MessageText: +// +// {Insufficient Resources on Remote Computer} +// The remote computer has insufficient resources to complete the network request. For instance, there may not be enough memory available on the remote computer to carry out the request at this time. +// +#define STATUS_REMOTE_RESOURCES ((NTSTATUS)0xC000013DL) + +// +// MessageId: STATUS_LINK_FAILED +// +// MessageText: +// +// {Virtual Circuit Closed} +// An existing connection (virtual circuit) has been broken at the remote computer. There is probably something wrong with the network software protocol or the network hardware on the remote computer. +// +#define STATUS_LINK_FAILED ((NTSTATUS)0xC000013EL) + +// +// MessageId: STATUS_LINK_TIMEOUT +// +// MessageText: +// +// {Virtual Circuit Closed} +// The network transport on your computer has closed a network connection because it had to wait too long for a response from the remote computer. +// +#define STATUS_LINK_TIMEOUT ((NTSTATUS)0xC000013FL) + +// +// MessageId: STATUS_INVALID_CONNECTION +// +// MessageText: +// +// The connection handle given to the transport was invalid. +// +#define STATUS_INVALID_CONNECTION ((NTSTATUS)0xC0000140L) + +// +// MessageId: STATUS_INVALID_ADDRESS +// +// MessageText: +// +// The address handle given to the transport was invalid. +// +#define STATUS_INVALID_ADDRESS ((NTSTATUS)0xC0000141L) + +// +// MessageId: STATUS_DLL_INIT_FAILED +// +// MessageText: +// +// {DLL Initialization Failed} +// Initialization of the dynamic link library %hs failed. The process is terminating abnormally. +// +#define STATUS_DLL_INIT_FAILED ((NTSTATUS)0xC0000142L) // winnt + +// +// MessageId: STATUS_MISSING_SYSTEMFILE +// +// MessageText: +// +// {Missing System File} +// The required system file %hs is bad or missing. +// +#define STATUS_MISSING_SYSTEMFILE ((NTSTATUS)0xC0000143L) + +// +// MessageId: STATUS_UNHANDLED_EXCEPTION +// +// MessageText: +// +// {Application Error} +// The exception %s (0x%08lx) occurred in the application at location 0x%08lx. +// +#define STATUS_UNHANDLED_EXCEPTION ((NTSTATUS)0xC0000144L) + +// +// MessageId: STATUS_APP_INIT_FAILURE +// +// MessageText: +// +// {Application Error} +// The application was unable to start correctly (0x%lx). Click OK to close the application. +// +#define STATUS_APP_INIT_FAILURE ((NTSTATUS)0xC0000145L) + +// +// MessageId: STATUS_PAGEFILE_CREATE_FAILED +// +// MessageText: +// +// {Unable to Create Paging File} +// The creation of the paging file %hs failed (%lx). The requested size was %ld. +// +#define STATUS_PAGEFILE_CREATE_FAILED ((NTSTATUS)0xC0000146L) + +// +// MessageId: STATUS_NO_PAGEFILE +// +// MessageText: +// +// {No Paging File Specified} +// No paging file was specified in the system configuration. +// +#define STATUS_NO_PAGEFILE ((NTSTATUS)0xC0000147L) + +// +// MessageId: STATUS_INVALID_LEVEL +// +// MessageText: +// +// {Incorrect System Call Level} +// An invalid level was passed into the specified system call. +// +#define STATUS_INVALID_LEVEL ((NTSTATUS)0xC0000148L) + +// +// MessageId: STATUS_WRONG_PASSWORD_CORE +// +// MessageText: +// +// {Incorrect Password to LAN Manager Server} +// You specified an incorrect password to a LAN Manager 2.x or MS-NET server. +// +#define STATUS_WRONG_PASSWORD_CORE ((NTSTATUS)0xC0000149L) + +// +// MessageId: STATUS_ILLEGAL_FLOAT_CONTEXT +// +// MessageText: +// +// {EXCEPTION} +// A real-mode application issued a floating-point instruction and floating-point hardware is not present. +// +#define STATUS_ILLEGAL_FLOAT_CONTEXT ((NTSTATUS)0xC000014AL) + +// +// MessageId: STATUS_PIPE_BROKEN +// +// MessageText: +// +// The pipe operation has failed because the other end of the pipe has been closed. +// +#define STATUS_PIPE_BROKEN ((NTSTATUS)0xC000014BL) + +// +// MessageId: STATUS_REGISTRY_CORRUPT +// +// MessageText: +// +// {The Registry Is Corrupt} +// The structure of one of the files that contains Registry data is corrupt, or the image of the file in memory is corrupt, or the file could not be recovered because the alternate copy or log was absent or corrupt. +// +#define STATUS_REGISTRY_CORRUPT ((NTSTATUS)0xC000014CL) + +// +// MessageId: STATUS_REGISTRY_IO_FAILED +// +// MessageText: +// +// An I/O operation initiated by the Registry failed unrecoverably. The Registry could not read in, or write out, or flush, one of the files that contain the system's image of the Registry. +// +#define STATUS_REGISTRY_IO_FAILED ((NTSTATUS)0xC000014DL) + +// +// MessageId: STATUS_NO_EVENT_PAIR +// +// MessageText: +// +// An event pair synchronization operation was performed using the thread specific client/server event pair object, but no event pair object was associated with the thread. +// +#define STATUS_NO_EVENT_PAIR ((NTSTATUS)0xC000014EL) + +// +// MessageId: STATUS_UNRECOGNIZED_VOLUME +// +// MessageText: +// +// The volume does not contain a recognized file system. Please make sure that all required file system drivers are loaded and that the volume is not corrupt. +// +#define STATUS_UNRECOGNIZED_VOLUME ((NTSTATUS)0xC000014FL) + +// +// MessageId: STATUS_SERIAL_NO_DEVICE_INITED +// +// MessageText: +// +// No serial device was successfully initialized. The serial driver will unload. +// +#define STATUS_SERIAL_NO_DEVICE_INITED ((NTSTATUS)0xC0000150L) + +// +// MessageId: STATUS_NO_SUCH_ALIAS +// +// MessageText: +// +// The specified local group does not exist. +// +#define STATUS_NO_SUCH_ALIAS ((NTSTATUS)0xC0000151L) + +// +// MessageId: STATUS_MEMBER_NOT_IN_ALIAS +// +// MessageText: +// +// The specified account name is not a member of the group. +// +#define STATUS_MEMBER_NOT_IN_ALIAS ((NTSTATUS)0xC0000152L) + +// +// MessageId: STATUS_MEMBER_IN_ALIAS +// +// MessageText: +// +// The specified account name is already a member of the group. +// +#define STATUS_MEMBER_IN_ALIAS ((NTSTATUS)0xC0000153L) + +// +// MessageId: STATUS_ALIAS_EXISTS +// +// MessageText: +// +// The specified local group already exists. +// +#define STATUS_ALIAS_EXISTS ((NTSTATUS)0xC0000154L) + +// +// MessageId: STATUS_LOGON_NOT_GRANTED +// +// MessageText: +// +// A requested type of logon (e.g., Interactive, Network, Service) is not granted by the target system's local security policy. +// Please ask the system administrator to grant the necessary form of logon. +// +#define STATUS_LOGON_NOT_GRANTED ((NTSTATUS)0xC0000155L) + +// +// MessageId: STATUS_TOO_MANY_SECRETS +// +// MessageText: +// +// The maximum number of secrets that may be stored in a single system has been exceeded. The length and number of secrets is limited to satisfy United States State Department export restrictions. +// +#define STATUS_TOO_MANY_SECRETS ((NTSTATUS)0xC0000156L) + +// +// MessageId: STATUS_SECRET_TOO_LONG +// +// MessageText: +// +// The length of a secret exceeds the maximum length allowed. The length and number of secrets is limited to satisfy United States State Department export restrictions. +// +#define STATUS_SECRET_TOO_LONG ((NTSTATUS)0xC0000157L) + +// +// MessageId: STATUS_INTERNAL_DB_ERROR +// +// MessageText: +// +// The Local Security Authority (LSA) database contains an internal inconsistency. +// +#define STATUS_INTERNAL_DB_ERROR ((NTSTATUS)0xC0000158L) + +// +// MessageId: STATUS_FULLSCREEN_MODE +// +// MessageText: +// +// The requested operation cannot be performed in fullscreen mode. +// +#define STATUS_FULLSCREEN_MODE ((NTSTATUS)0xC0000159L) + +// +// MessageId: STATUS_TOO_MANY_CONTEXT_IDS +// +// MessageText: +// +// During a logon attempt, the user's security context accumulated too many security IDs. This is a very unusual situation. Remove the user from some global or local groups to reduce the number of security ids to incorporate into the security context. +// +#define STATUS_TOO_MANY_CONTEXT_IDS ((NTSTATUS)0xC000015AL) + +// +// MessageId: STATUS_LOGON_TYPE_NOT_GRANTED +// +// MessageText: +// +// A user has requested a type of logon (e.g., interactive or network) that has not been granted. An administrator has control over who may logon interactively and through the network. +// +#define STATUS_LOGON_TYPE_NOT_GRANTED ((NTSTATUS)0xC000015BL) + +// +// MessageId: STATUS_NOT_REGISTRY_FILE +// +// MessageText: +// +// The system has attempted to load or restore a file into the registry, and the specified file is not in the format of a registry file. +// +#define STATUS_NOT_REGISTRY_FILE ((NTSTATUS)0xC000015CL) + +// +// MessageId: STATUS_NT_CROSS_ENCRYPTION_REQUIRED +// +// MessageText: +// +// An attempt was made to change a user password in the security account manager without providing the necessary Windows cross-encrypted password. +// +#define STATUS_NT_CROSS_ENCRYPTION_REQUIRED ((NTSTATUS)0xC000015DL) + +// +// MessageId: STATUS_DOMAIN_CTRLR_CONFIG_ERROR +// +// MessageText: +// +// A Windows Server has an incorrect configuration. +// +#define STATUS_DOMAIN_CTRLR_CONFIG_ERROR ((NTSTATUS)0xC000015EL) + +// +// MessageId: STATUS_FT_MISSING_MEMBER +// +// MessageText: +// +// An attempt was made to explicitly access the secondary copy of information via a device control to the Fault Tolerance driver and the secondary copy is not present in the system. +// +#define STATUS_FT_MISSING_MEMBER ((NTSTATUS)0xC000015FL) + +// +// MessageId: STATUS_ILL_FORMED_SERVICE_ENTRY +// +// MessageText: +// +// A configuration registry node representing a driver service entry was ill-formed and did not contain required value entries. +// +#define STATUS_ILL_FORMED_SERVICE_ENTRY ((NTSTATUS)0xC0000160L) + +// +// MessageId: STATUS_ILLEGAL_CHARACTER +// +// MessageText: +// +// An illegal character was encountered. For a multi-byte character set this includes a lead byte without a succeeding trail byte. For the Unicode character set this includes the characters 0xFFFF and 0xFFFE. +// +#define STATUS_ILLEGAL_CHARACTER ((NTSTATUS)0xC0000161L) + +// +// MessageId: STATUS_UNMAPPABLE_CHARACTER +// +// MessageText: +// +// No mapping for the Unicode character exists in the target multi-byte code page. +// +#define STATUS_UNMAPPABLE_CHARACTER ((NTSTATUS)0xC0000162L) + +// +// MessageId: STATUS_UNDEFINED_CHARACTER +// +// MessageText: +// +// The Unicode character is not defined in the Unicode character set installed on the system. +// +#define STATUS_UNDEFINED_CHARACTER ((NTSTATUS)0xC0000163L) + +// +// MessageId: STATUS_FLOPPY_VOLUME +// +// MessageText: +// +// The paging file cannot be created on a floppy diskette. +// +#define STATUS_FLOPPY_VOLUME ((NTSTATUS)0xC0000164L) + +// +// MessageId: STATUS_FLOPPY_ID_MARK_NOT_FOUND +// +// MessageText: +// +// {Floppy Disk Error} +// While accessing a floppy disk, an ID address mark was not found. +// +#define STATUS_FLOPPY_ID_MARK_NOT_FOUND ((NTSTATUS)0xC0000165L) + +// +// MessageId: STATUS_FLOPPY_WRONG_CYLINDER +// +// MessageText: +// +// {Floppy Disk Error} +// While accessing a floppy disk, the track address from the sector ID field was found to be different than the track address maintained by the controller. +// +#define STATUS_FLOPPY_WRONG_CYLINDER ((NTSTATUS)0xC0000166L) + +// +// MessageId: STATUS_FLOPPY_UNKNOWN_ERROR +// +// MessageText: +// +// {Floppy Disk Error} +// The floppy disk controller reported an error that is not recognized by the floppy disk driver. +// +#define STATUS_FLOPPY_UNKNOWN_ERROR ((NTSTATUS)0xC0000167L) + +// +// MessageId: STATUS_FLOPPY_BAD_REGISTERS +// +// MessageText: +// +// {Floppy Disk Error} +// While accessing a floppy-disk, the controller returned inconsistent results via its registers. +// +#define STATUS_FLOPPY_BAD_REGISTERS ((NTSTATUS)0xC0000168L) + +// +// MessageId: STATUS_DISK_RECALIBRATE_FAILED +// +// MessageText: +// +// {Hard Disk Error} +// While accessing the hard disk, a recalibrate operation failed, even after retries. +// +#define STATUS_DISK_RECALIBRATE_FAILED ((NTSTATUS)0xC0000169L) + +// +// MessageId: STATUS_DISK_OPERATION_FAILED +// +// MessageText: +// +// {Hard Disk Error} +// While accessing the hard disk, a disk operation failed even after retries. +// +#define STATUS_DISK_OPERATION_FAILED ((NTSTATUS)0xC000016AL) + +// +// MessageId: STATUS_DISK_RESET_FAILED +// +// MessageText: +// +// {Hard Disk Error} +// While accessing the hard disk, a disk controller reset was needed, but even that failed. +// +#define STATUS_DISK_RESET_FAILED ((NTSTATUS)0xC000016BL) + +// +// MessageId: STATUS_SHARED_IRQ_BUSY +// +// MessageText: +// +// An attempt was made to open a device that was sharing an IRQ with other devices. +// At least one other device that uses that IRQ was already opened. +// Two concurrent opens of devices that share an IRQ and only work via interrupts is not supported for the particular bus type that the devices use. +// +#define STATUS_SHARED_IRQ_BUSY ((NTSTATUS)0xC000016CL) + +// +// MessageId: STATUS_FT_ORPHANING +// +// MessageText: +// +// {FT Orphaning} +// A disk that is part of a fault-tolerant volume can no longer be accessed. +// +#define STATUS_FT_ORPHANING ((NTSTATUS)0xC000016DL) + +// +// MessageId: STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT +// +// MessageText: +// +// The system bios failed to connect a system interrupt to the device or bus for which the device is connected. +// +#define STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT ((NTSTATUS)0xC000016EL) + +// +// MessageId: STATUS_PARTITION_FAILURE +// +// MessageText: +// +// Tape could not be partitioned. +// +#define STATUS_PARTITION_FAILURE ((NTSTATUS)0xC0000172L) + +// +// MessageId: STATUS_INVALID_BLOCK_LENGTH +// +// MessageText: +// +// When accessing a new tape of a multivolume partition, the current blocksize is incorrect. +// +#define STATUS_INVALID_BLOCK_LENGTH ((NTSTATUS)0xC0000173L) + +// +// MessageId: STATUS_DEVICE_NOT_PARTITIONED +// +// MessageText: +// +// Tape partition information could not be found when loading a tape. +// +#define STATUS_DEVICE_NOT_PARTITIONED ((NTSTATUS)0xC0000174L) + +// +// MessageId: STATUS_UNABLE_TO_LOCK_MEDIA +// +// MessageText: +// +// Attempt to lock the eject media mechanism fails. +// +#define STATUS_UNABLE_TO_LOCK_MEDIA ((NTSTATUS)0xC0000175L) + +// +// MessageId: STATUS_UNABLE_TO_UNLOAD_MEDIA +// +// MessageText: +// +// Unload media fails. +// +#define STATUS_UNABLE_TO_UNLOAD_MEDIA ((NTSTATUS)0xC0000176L) + +// +// MessageId: STATUS_EOM_OVERFLOW +// +// MessageText: +// +// Physical end of tape was detected. +// +#define STATUS_EOM_OVERFLOW ((NTSTATUS)0xC0000177L) + +// +// MessageId: STATUS_NO_MEDIA +// +// MessageText: +// +// {No Media} +// There is no media in the drive. Please insert media into drive %hs. +// +#define STATUS_NO_MEDIA ((NTSTATUS)0xC0000178L) + +// +// MessageId: STATUS_NO_SUCH_MEMBER +// +// MessageText: +// +// A member could not be added to or removed from the local group because the member does not exist. +// +#define STATUS_NO_SUCH_MEMBER ((NTSTATUS)0xC000017AL) + +// +// MessageId: STATUS_INVALID_MEMBER +// +// MessageText: +// +// A new member could not be added to a local group because the member has the wrong account type. +// +#define STATUS_INVALID_MEMBER ((NTSTATUS)0xC000017BL) + +// +// MessageId: STATUS_KEY_DELETED +// +// MessageText: +// +// Illegal operation attempted on a registry key which has been marked for deletion. +// +#define STATUS_KEY_DELETED ((NTSTATUS)0xC000017CL) + +// +// MessageId: STATUS_NO_LOG_SPACE +// +// MessageText: +// +// System could not allocate required space in a registry log. +// +#define STATUS_NO_LOG_SPACE ((NTSTATUS)0xC000017DL) + +// +// MessageId: STATUS_TOO_MANY_SIDS +// +// MessageText: +// +// Too many Sids have been specified. +// +#define STATUS_TOO_MANY_SIDS ((NTSTATUS)0xC000017EL) + +// +// MessageId: STATUS_LM_CROSS_ENCRYPTION_REQUIRED +// +// MessageText: +// +// An attempt was made to change a user password in the security account manager without providing the necessary LM cross-encrypted password. +// +#define STATUS_LM_CROSS_ENCRYPTION_REQUIRED ((NTSTATUS)0xC000017FL) + +// +// MessageId: STATUS_KEY_HAS_CHILDREN +// +// MessageText: +// +// An attempt was made to create a symbolic link in a registry key that already has subkeys or values. +// +#define STATUS_KEY_HAS_CHILDREN ((NTSTATUS)0xC0000180L) + +// +// MessageId: STATUS_CHILD_MUST_BE_VOLATILE +// +// MessageText: +// +// An attempt was made to create a Stable subkey under a Volatile parent key. +// +#define STATUS_CHILD_MUST_BE_VOLATILE ((NTSTATUS)0xC0000181L) + +// +// MessageId: STATUS_DEVICE_CONFIGURATION_ERROR +// +// MessageText: +// +// The I/O device is configured incorrectly or the configuration parameters to the driver are incorrect. +// +#define STATUS_DEVICE_CONFIGURATION_ERROR ((NTSTATUS)0xC0000182L) + +// +// MessageId: STATUS_DRIVER_INTERNAL_ERROR +// +// MessageText: +// +// An error was detected between two drivers or within an I/O driver. +// +#define STATUS_DRIVER_INTERNAL_ERROR ((NTSTATUS)0xC0000183L) + +// +// MessageId: STATUS_INVALID_DEVICE_STATE +// +// MessageText: +// +// The device is not in a valid state to perform this request. +// +#define STATUS_INVALID_DEVICE_STATE ((NTSTATUS)0xC0000184L) + +// +// MessageId: STATUS_IO_DEVICE_ERROR +// +// MessageText: +// +// The I/O device reported an I/O error. +// +#define STATUS_IO_DEVICE_ERROR ((NTSTATUS)0xC0000185L) + +// +// MessageId: STATUS_DEVICE_PROTOCOL_ERROR +// +// MessageText: +// +// A protocol error was detected between the driver and the device. +// +#define STATUS_DEVICE_PROTOCOL_ERROR ((NTSTATUS)0xC0000186L) + +// +// MessageId: STATUS_BACKUP_CONTROLLER +// +// MessageText: +// +// This operation is only allowed for the Primary Domain Controller of the domain. +// +#define STATUS_BACKUP_CONTROLLER ((NTSTATUS)0xC0000187L) + +// +// MessageId: STATUS_LOG_FILE_FULL +// +// MessageText: +// +// Log file space is insufficient to support this operation. +// +#define STATUS_LOG_FILE_FULL ((NTSTATUS)0xC0000188L) + +// +// MessageId: STATUS_TOO_LATE +// +// MessageText: +// +// A write operation was attempted to a volume after it was dismounted. +// +#define STATUS_TOO_LATE ((NTSTATUS)0xC0000189L) + +// +// MessageId: STATUS_NO_TRUST_LSA_SECRET +// +// MessageText: +// +// The workstation does not have a trust secret for the primary domain in the local LSA database. +// +#define STATUS_NO_TRUST_LSA_SECRET ((NTSTATUS)0xC000018AL) + +// +// MessageId: STATUS_NO_TRUST_SAM_ACCOUNT +// +// MessageText: +// +// The SAM database on the Windows Server does not have a computer account for this workstation trust relationship. +// +#define STATUS_NO_TRUST_SAM_ACCOUNT ((NTSTATUS)0xC000018BL) + +// +// MessageId: STATUS_TRUSTED_DOMAIN_FAILURE +// +// MessageText: +// +// The logon request failed because the trust relationship between the primary domain and the trusted domain failed. +// +#define STATUS_TRUSTED_DOMAIN_FAILURE ((NTSTATUS)0xC000018CL) + +// +// MessageId: STATUS_TRUSTED_RELATIONSHIP_FAILURE +// +// MessageText: +// +// The logon request failed because the trust relationship between this workstation and the primary domain failed. +// +#define STATUS_TRUSTED_RELATIONSHIP_FAILURE ((NTSTATUS)0xC000018DL) + +// +// MessageId: STATUS_EVENTLOG_FILE_CORRUPT +// +// MessageText: +// +// The Eventlog log file is corrupt. +// +#define STATUS_EVENTLOG_FILE_CORRUPT ((NTSTATUS)0xC000018EL) + +// +// MessageId: STATUS_EVENTLOG_CANT_START +// +// MessageText: +// +// No Eventlog log file could be opened. The Eventlog service did not start. +// +#define STATUS_EVENTLOG_CANT_START ((NTSTATUS)0xC000018FL) + +// +// MessageId: STATUS_TRUST_FAILURE +// +// MessageText: +// +// The network logon failed. This may be because the validation authority can't be reached. +// +#define STATUS_TRUST_FAILURE ((NTSTATUS)0xC0000190L) + +// +// MessageId: STATUS_MUTANT_LIMIT_EXCEEDED +// +// MessageText: +// +// An attempt was made to acquire a mutant such that its maximum count would have been exceeded. +// +#define STATUS_MUTANT_LIMIT_EXCEEDED ((NTSTATUS)0xC0000191L) + +// +// MessageId: STATUS_NETLOGON_NOT_STARTED +// +// MessageText: +// +// An attempt was made to logon, but the netlogon service was not started. +// +#define STATUS_NETLOGON_NOT_STARTED ((NTSTATUS)0xC0000192L) + +// +// MessageId: STATUS_ACCOUNT_EXPIRED +// +// MessageText: +// +// The user's account has expired. +// +#define STATUS_ACCOUNT_EXPIRED ((NTSTATUS)0xC0000193L) // ntsubauth + +// +// MessageId: STATUS_POSSIBLE_DEADLOCK +// +// MessageText: +// +// {EXCEPTION} +// Possible deadlock condition. +// +#define STATUS_POSSIBLE_DEADLOCK ((NTSTATUS)0xC0000194L) + +// +// MessageId: STATUS_NETWORK_CREDENTIAL_CONFLICT +// +// MessageText: +// +// Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again. +// +#define STATUS_NETWORK_CREDENTIAL_CONFLICT ((NTSTATUS)0xC0000195L) + +// +// MessageId: STATUS_REMOTE_SESSION_LIMIT +// +// MessageText: +// +// An attempt was made to establish a session to a network server, but there are already too many sessions established to that server. +// +#define STATUS_REMOTE_SESSION_LIMIT ((NTSTATUS)0xC0000196L) + +// +// MessageId: STATUS_EVENTLOG_FILE_CHANGED +// +// MessageText: +// +// The log file has changed between reads. +// +#define STATUS_EVENTLOG_FILE_CHANGED ((NTSTATUS)0xC0000197L) + +// +// MessageId: STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT +// +// MessageText: +// +// The account used is an Interdomain Trust account. Use your global user account or local user account to access this server. +// +#define STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT ((NTSTATUS)0xC0000198L) + +// +// MessageId: STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT +// +// MessageText: +// +// The account used is a Computer Account. Use your global user account or local user account to access this server. +// +#define STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT ((NTSTATUS)0xC0000199L) + +// +// MessageId: STATUS_NOLOGON_SERVER_TRUST_ACCOUNT +// +// MessageText: +// +// The account used is an Server Trust account. Use your global user account or local user account to access this server. +// +#define STATUS_NOLOGON_SERVER_TRUST_ACCOUNT ((NTSTATUS)0xC000019AL) + +// +// MessageId: STATUS_DOMAIN_TRUST_INCONSISTENT +// +// MessageText: +// +// The name or SID of the domain specified is inconsistent with the trust information for that domain. +// +#define STATUS_DOMAIN_TRUST_INCONSISTENT ((NTSTATUS)0xC000019BL) + +// +// MessageId: STATUS_FS_DRIVER_REQUIRED +// +// MessageText: +// +// A volume has been accessed for which a file system driver is required that has not yet been loaded. +// +#define STATUS_FS_DRIVER_REQUIRED ((NTSTATUS)0xC000019CL) + +// +// MessageId: STATUS_IMAGE_ALREADY_LOADED_AS_DLL +// +// MessageText: +// +// Indicates that the specified image is already loaded as a DLL. +// +#define STATUS_IMAGE_ALREADY_LOADED_AS_DLL ((NTSTATUS)0xC000019DL) + +// +// MessageId: STATUS_INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING +// +// MessageText: +// +// Short name settings may not be changed on this volume due to the global registry setting. +// +#define STATUS_INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING ((NTSTATUS)0xC000019EL) + +// +// MessageId: STATUS_SHORT_NAMES_NOT_ENABLED_ON_VOLUME +// +// MessageText: +// +// Short names are not enabled on this volume. +// +#define STATUS_SHORT_NAMES_NOT_ENABLED_ON_VOLUME ((NTSTATUS)0xC000019FL) + +// +// MessageId: STATUS_SECURITY_STREAM_IS_INCONSISTENT +// +// MessageText: +// +// The security stream for the given volume is in an inconsistent state. +// Please run CHKDSK on the volume. +// +#define STATUS_SECURITY_STREAM_IS_INCONSISTENT ((NTSTATUS)0xC00001A0L) + +// +// MessageId: STATUS_INVALID_LOCK_RANGE +// +// MessageText: +// +// A requested file lock operation cannot be processed due to an invalid byte range. +// +#define STATUS_INVALID_LOCK_RANGE ((NTSTATUS)0xC00001A1L) + +// +// MessageId: STATUS_INVALID_ACE_CONDITION +// +// MessageText: +// +// {Invalid ACE Condition} +// The specified access control entry (ACE) contains an invalid condition. +// +#define STATUS_INVALID_ACE_CONDITION ((NTSTATUS)0xC00001A2L) + +// +// MessageId: STATUS_IMAGE_SUBSYSTEM_NOT_PRESENT +// +// MessageText: +// +// The subsystem needed to support the image type is not present. +// +#define STATUS_IMAGE_SUBSYSTEM_NOT_PRESENT ((NTSTATUS)0xC00001A3L) + +// +// MessageId: STATUS_NOTIFICATION_GUID_ALREADY_DEFINED +// +// MessageText: +// +// {Invalid ACE Condition} +// The specified file already has a notification GUID associated with it. +// +#define STATUS_NOTIFICATION_GUID_ALREADY_DEFINED ((NTSTATUS)0xC00001A4L) + +// +// Available range of NTSTATUS codes +// +// +// MessageId: STATUS_NETWORK_OPEN_RESTRICTION +// +// MessageText: +// +// A remote open failed because the network open restrictions were not satisfied. +// +#define STATUS_NETWORK_OPEN_RESTRICTION ((NTSTATUS)0xC0000201L) + +// +// MessageId: STATUS_NO_USER_SESSION_KEY +// +// MessageText: +// +// There is no user session key for the specified logon session. +// +#define STATUS_NO_USER_SESSION_KEY ((NTSTATUS)0xC0000202L) + +// +// MessageId: STATUS_USER_SESSION_DELETED +// +// MessageText: +// +// The remote user session has been deleted. +// +#define STATUS_USER_SESSION_DELETED ((NTSTATUS)0xC0000203L) + +// +// MessageId: STATUS_RESOURCE_LANG_NOT_FOUND +// +// MessageText: +// +// Indicates the specified resource language ID cannot be found in the +// image file. +// +#define STATUS_RESOURCE_LANG_NOT_FOUND ((NTSTATUS)0xC0000204L) + +// +// MessageId: STATUS_INSUFF_SERVER_RESOURCES +// +// MessageText: +// +// Insufficient server resources exist to complete the request. +// +#define STATUS_INSUFF_SERVER_RESOURCES ((NTSTATUS)0xC0000205L) + +// +// MessageId: STATUS_INVALID_BUFFER_SIZE +// +// MessageText: +// +// The size of the buffer is invalid for the specified operation. +// +#define STATUS_INVALID_BUFFER_SIZE ((NTSTATUS)0xC0000206L) + +// +// MessageId: STATUS_INVALID_ADDRESS_COMPONENT +// +// MessageText: +// +// The transport rejected the network address specified as invalid. +// +#define STATUS_INVALID_ADDRESS_COMPONENT ((NTSTATUS)0xC0000207L) + +// +// MessageId: STATUS_INVALID_ADDRESS_WILDCARD +// +// MessageText: +// +// The transport rejected the network address specified due to an invalid use of a wildcard. +// +#define STATUS_INVALID_ADDRESS_WILDCARD ((NTSTATUS)0xC0000208L) + +// +// MessageId: STATUS_TOO_MANY_ADDRESSES +// +// MessageText: +// +// The transport address could not be opened because all the available addresses are in use. +// +#define STATUS_TOO_MANY_ADDRESSES ((NTSTATUS)0xC0000209L) + +// +// MessageId: STATUS_ADDRESS_ALREADY_EXISTS +// +// MessageText: +// +// The transport address could not be opened because it already exists. +// +#define STATUS_ADDRESS_ALREADY_EXISTS ((NTSTATUS)0xC000020AL) + +// +// MessageId: STATUS_ADDRESS_CLOSED +// +// MessageText: +// +// The transport address is now closed. +// +#define STATUS_ADDRESS_CLOSED ((NTSTATUS)0xC000020BL) + +// +// MessageId: STATUS_CONNECTION_DISCONNECTED +// +// MessageText: +// +// The transport connection is now disconnected. +// +#define STATUS_CONNECTION_DISCONNECTED ((NTSTATUS)0xC000020CL) + +// +// MessageId: STATUS_CONNECTION_RESET +// +// MessageText: +// +// The transport connection has been reset. +// +#define STATUS_CONNECTION_RESET ((NTSTATUS)0xC000020DL) + +// +// MessageId: STATUS_TOO_MANY_NODES +// +// MessageText: +// +// The transport cannot dynamically acquire any more nodes. +// +#define STATUS_TOO_MANY_NODES ((NTSTATUS)0xC000020EL) + +// +// MessageId: STATUS_TRANSACTION_ABORTED +// +// MessageText: +// +// The transport aborted a pending transaction. +// +#define STATUS_TRANSACTION_ABORTED ((NTSTATUS)0xC000020FL) + +// +// MessageId: STATUS_TRANSACTION_TIMED_OUT +// +// MessageText: +// +// The transport timed out a request waiting for a response. +// +#define STATUS_TRANSACTION_TIMED_OUT ((NTSTATUS)0xC0000210L) + +// +// MessageId: STATUS_TRANSACTION_NO_RELEASE +// +// MessageText: +// +// The transport did not receive a release for a pending response. +// +#define STATUS_TRANSACTION_NO_RELEASE ((NTSTATUS)0xC0000211L) + +// +// MessageId: STATUS_TRANSACTION_NO_MATCH +// +// MessageText: +// +// The transport did not find a transaction matching the specific token. +// +#define STATUS_TRANSACTION_NO_MATCH ((NTSTATUS)0xC0000212L) + +// +// MessageId: STATUS_TRANSACTION_RESPONDED +// +// MessageText: +// +// The transport had previously responded to a transaction request. +// +#define STATUS_TRANSACTION_RESPONDED ((NTSTATUS)0xC0000213L) + +// +// MessageId: STATUS_TRANSACTION_INVALID_ID +// +// MessageText: +// +// The transport does not recognized the transaction request identifier specified. +// +#define STATUS_TRANSACTION_INVALID_ID ((NTSTATUS)0xC0000214L) + +// +// MessageId: STATUS_TRANSACTION_INVALID_TYPE +// +// MessageText: +// +// The transport does not recognize the transaction request type specified. +// +#define STATUS_TRANSACTION_INVALID_TYPE ((NTSTATUS)0xC0000215L) + +// +// MessageId: STATUS_NOT_SERVER_SESSION +// +// MessageText: +// +// The transport can only process the specified request on the server side of a session. +// +#define STATUS_NOT_SERVER_SESSION ((NTSTATUS)0xC0000216L) + +// +// MessageId: STATUS_NOT_CLIENT_SESSION +// +// MessageText: +// +// The transport can only process the specified request on the client side of a session. +// +#define STATUS_NOT_CLIENT_SESSION ((NTSTATUS)0xC0000217L) + +// +// MessageId: STATUS_CANNOT_LOAD_REGISTRY_FILE +// +// MessageText: +// +// {Registry File Failure} +// The registry cannot load the hive (file): +// %hs +// or its log or alternate. +// It is corrupt, absent, or not writable. +// +#define STATUS_CANNOT_LOAD_REGISTRY_FILE ((NTSTATUS)0xC0000218L) + +// +// MessageId: STATUS_DEBUG_ATTACH_FAILED +// +// MessageText: +// +// {Unexpected Failure in DebugActiveProcess} +// An unexpected failure occurred while processing a DebugActiveProcess API request. You may choose OK to terminate the process, or Cancel to ignore the error. +// +#define STATUS_DEBUG_ATTACH_FAILED ((NTSTATUS)0xC0000219L) + +// +// MessageId: STATUS_SYSTEM_PROCESS_TERMINATED +// +// MessageText: +// +// {Fatal System Error} +// The %hs system process terminated unexpectedly with a status of 0x%08x (0x%08x 0x%08x). +// The system has been shut down. +// +#define STATUS_SYSTEM_PROCESS_TERMINATED ((NTSTATUS)0xC000021AL) + +// +// MessageId: STATUS_DATA_NOT_ACCEPTED +// +// MessageText: +// +// {Data Not Accepted} +// The TDI client could not handle the data received during an indication. +// +#define STATUS_DATA_NOT_ACCEPTED ((NTSTATUS)0xC000021BL) + +// +// MessageId: STATUS_NO_BROWSER_SERVERS_FOUND +// +// MessageText: +// +// {Unable to Retrieve Browser Server List} +// The list of servers for this workgroup is not currently available. +// +#define STATUS_NO_BROWSER_SERVERS_FOUND ((NTSTATUS)0xC000021CL) + +// +// MessageId: STATUS_VDM_HARD_ERROR +// +// MessageText: +// +// NTVDM encountered a hard error. +// +#define STATUS_VDM_HARD_ERROR ((NTSTATUS)0xC000021DL) + +// +// MessageId: STATUS_DRIVER_CANCEL_TIMEOUT +// +// MessageText: +// +// {Cancel Timeout} +// The driver %hs failed to complete a cancelled I/O request in the allotted time. +// +#define STATUS_DRIVER_CANCEL_TIMEOUT ((NTSTATUS)0xC000021EL) + +// +// MessageId: STATUS_REPLY_MESSAGE_MISMATCH +// +// MessageText: +// +// {Reply Message Mismatch} +// An attempt was made to reply to an LPC message, but the thread specified by the client ID in the message was not waiting on that message. +// +#define STATUS_REPLY_MESSAGE_MISMATCH ((NTSTATUS)0xC000021FL) + +// +// MessageId: STATUS_MAPPED_ALIGNMENT +// +// MessageText: +// +// {Mapped View Alignment Incorrect} +// An attempt was made to map a view of a file, but either the specified base address or the offset into the file were not aligned on the proper allocation granularity. +// +#define STATUS_MAPPED_ALIGNMENT ((NTSTATUS)0xC0000220L) + +// +// MessageId: STATUS_IMAGE_CHECKSUM_MISMATCH +// +// MessageText: +// +// {Bad Image Checksum} +// The image %hs is possibly corrupt. The header checksum does not match the computed checksum. +// +#define STATUS_IMAGE_CHECKSUM_MISMATCH ((NTSTATUS)0xC0000221L) + +// +// MessageId: STATUS_LOST_WRITEBEHIND_DATA +// +// MessageText: +// +// {Delayed Write Failed} +// Windows was unable to save all the data for the file %hs. The data has been lost. This error may be caused by a failure of your computer hardware or network connection. Please try to save this file elsewhere. +// +#define STATUS_LOST_WRITEBEHIND_DATA ((NTSTATUS)0xC0000222L) + +// +// MessageId: STATUS_CLIENT_SERVER_PARAMETERS_INVALID +// +// MessageText: +// +// The parameter(s) passed to the server in the client/server shared memory window were invalid. Too much data may have been put in the shared memory window. +// +#define STATUS_CLIENT_SERVER_PARAMETERS_INVALID ((NTSTATUS)0xC0000223L) + +// +// MessageId: STATUS_PASSWORD_MUST_CHANGE +// +// MessageText: +// +// The user's password must be changed before logging on the first time. +// +#define STATUS_PASSWORD_MUST_CHANGE ((NTSTATUS)0xC0000224L) // ntsubauth + +// +// MessageId: STATUS_NOT_FOUND +// +// MessageText: +// +// The object was not found. +// +#define STATUS_NOT_FOUND ((NTSTATUS)0xC0000225L) + +// +// MessageId: STATUS_NOT_TINY_STREAM +// +// MessageText: +// +// The stream is not a tiny stream. +// +#define STATUS_NOT_TINY_STREAM ((NTSTATUS)0xC0000226L) + +// +// MessageId: STATUS_RECOVERY_FAILURE +// +// MessageText: +// +// A transaction recover failed. +// +#define STATUS_RECOVERY_FAILURE ((NTSTATUS)0xC0000227L) + +// +// MessageId: STATUS_STACK_OVERFLOW_READ +// +// MessageText: +// +// The request must be handled by the stack overflow code. +// +#define STATUS_STACK_OVERFLOW_READ ((NTSTATUS)0xC0000228L) + +// +// MessageId: STATUS_FAIL_CHECK +// +// MessageText: +// +// A consistency check failed. +// +#define STATUS_FAIL_CHECK ((NTSTATUS)0xC0000229L) + +// +// MessageId: STATUS_DUPLICATE_OBJECTID +// +// MessageText: +// +// The attempt to insert the ID in the index failed because the ID is already in the index. +// +#define STATUS_DUPLICATE_OBJECTID ((NTSTATUS)0xC000022AL) + +// +// MessageId: STATUS_OBJECTID_EXISTS +// +// MessageText: +// +// The attempt to set the object's ID failed because the object already has an ID. +// +#define STATUS_OBJECTID_EXISTS ((NTSTATUS)0xC000022BL) + +// +// MessageId: STATUS_CONVERT_TO_LARGE +// +// MessageText: +// +// Internal OFS status codes indicating how an allocation operation is handled. Either it is retried after the containing onode is moved or the extent stream is converted to a large stream. +// +#define STATUS_CONVERT_TO_LARGE ((NTSTATUS)0xC000022CL) + +// +// MessageId: STATUS_RETRY +// +// MessageText: +// +// The request needs to be retried. +// +#define STATUS_RETRY ((NTSTATUS)0xC000022DL) + +// +// MessageId: STATUS_FOUND_OUT_OF_SCOPE +// +// MessageText: +// +// The attempt to find the object found an object matching by ID on the volume but it is out of the scope of the handle used for the operation. +// +#define STATUS_FOUND_OUT_OF_SCOPE ((NTSTATUS)0xC000022EL) + +// +// MessageId: STATUS_ALLOCATE_BUCKET +// +// MessageText: +// +// The bucket array must be grown. Retry transaction after doing so. +// +#define STATUS_ALLOCATE_BUCKET ((NTSTATUS)0xC000022FL) + +// +// MessageId: STATUS_PROPSET_NOT_FOUND +// +// MessageText: +// +// The property set specified does not exist on the object. +// +#define STATUS_PROPSET_NOT_FOUND ((NTSTATUS)0xC0000230L) + +// +// MessageId: STATUS_MARSHALL_OVERFLOW +// +// MessageText: +// +// The user/kernel marshalling buffer has overflowed. +// +#define STATUS_MARSHALL_OVERFLOW ((NTSTATUS)0xC0000231L) + +// +// MessageId: STATUS_INVALID_VARIANT +// +// MessageText: +// +// The supplied variant structure contains invalid data. +// +#define STATUS_INVALID_VARIANT ((NTSTATUS)0xC0000232L) + +// +// MessageId: STATUS_DOMAIN_CONTROLLER_NOT_FOUND +// +// MessageText: +// +// Could not find a domain controller for this domain. +// +#define STATUS_DOMAIN_CONTROLLER_NOT_FOUND ((NTSTATUS)0xC0000233L) + +// +// MessageId: STATUS_ACCOUNT_LOCKED_OUT +// +// MessageText: +// +// The user account has been automatically locked because too many invalid logon attempts or password change attempts have been requested. +// +#define STATUS_ACCOUNT_LOCKED_OUT ((NTSTATUS)0xC0000234L) // ntsubauth + +// +// MessageId: STATUS_HANDLE_NOT_CLOSABLE +// +// MessageText: +// +// NtClose was called on a handle that was protected from close via NtSetInformationObject. +// +#define STATUS_HANDLE_NOT_CLOSABLE ((NTSTATUS)0xC0000235L) + +// +// MessageId: STATUS_CONNECTION_REFUSED +// +// MessageText: +// +// The transport connection attempt was refused by the remote system. +// +#define STATUS_CONNECTION_REFUSED ((NTSTATUS)0xC0000236L) + +// +// MessageId: STATUS_GRACEFUL_DISCONNECT +// +// MessageText: +// +// The transport connection was gracefully closed. +// +#define STATUS_GRACEFUL_DISCONNECT ((NTSTATUS)0xC0000237L) + +// +// MessageId: STATUS_ADDRESS_ALREADY_ASSOCIATED +// +// MessageText: +// +// The transport endpoint already has an address associated with it. +// +#define STATUS_ADDRESS_ALREADY_ASSOCIATED ((NTSTATUS)0xC0000238L) + +// +// MessageId: STATUS_ADDRESS_NOT_ASSOCIATED +// +// MessageText: +// +// An address has not yet been associated with the transport endpoint. +// +#define STATUS_ADDRESS_NOT_ASSOCIATED ((NTSTATUS)0xC0000239L) + +// +// MessageId: STATUS_CONNECTION_INVALID +// +// MessageText: +// +// An operation was attempted on a nonexistent transport connection. +// +#define STATUS_CONNECTION_INVALID ((NTSTATUS)0xC000023AL) + +// +// MessageId: STATUS_CONNECTION_ACTIVE +// +// MessageText: +// +// An invalid operation was attempted on an active transport connection. +// +#define STATUS_CONNECTION_ACTIVE ((NTSTATUS)0xC000023BL) + +// +// MessageId: STATUS_NETWORK_UNREACHABLE +// +// MessageText: +// +// The remote network is not reachable by the transport. +// +#define STATUS_NETWORK_UNREACHABLE ((NTSTATUS)0xC000023CL) + +// +// MessageId: STATUS_HOST_UNREACHABLE +// +// MessageText: +// +// The remote system is not reachable by the transport. +// +#define STATUS_HOST_UNREACHABLE ((NTSTATUS)0xC000023DL) + +// +// MessageId: STATUS_PROTOCOL_UNREACHABLE +// +// MessageText: +// +// The remote system does not support the transport protocol. +// +#define STATUS_PROTOCOL_UNREACHABLE ((NTSTATUS)0xC000023EL) + +// +// MessageId: STATUS_PORT_UNREACHABLE +// +// MessageText: +// +// No service is operating at the destination port of the transport on the remote system. +// +#define STATUS_PORT_UNREACHABLE ((NTSTATUS)0xC000023FL) + +// +// MessageId: STATUS_REQUEST_ABORTED +// +// MessageText: +// +// The request was aborted. +// +#define STATUS_REQUEST_ABORTED ((NTSTATUS)0xC0000240L) + +// +// MessageId: STATUS_CONNECTION_ABORTED +// +// MessageText: +// +// The transport connection was aborted by the local system. +// +#define STATUS_CONNECTION_ABORTED ((NTSTATUS)0xC0000241L) + +// +// MessageId: STATUS_BAD_COMPRESSION_BUFFER +// +// MessageText: +// +// The specified buffer contains ill-formed data. +// +#define STATUS_BAD_COMPRESSION_BUFFER ((NTSTATUS)0xC0000242L) + +// +// MessageId: STATUS_USER_MAPPED_FILE +// +// MessageText: +// +// The requested operation cannot be performed on a file with a user mapped section open. +// +#define STATUS_USER_MAPPED_FILE ((NTSTATUS)0xC0000243L) + +// +// MessageId: STATUS_AUDIT_FAILED +// +// MessageText: +// +// {Audit Failed} +// An attempt to generate a security audit failed. +// +#define STATUS_AUDIT_FAILED ((NTSTATUS)0xC0000244L) + +// +// MessageId: STATUS_TIMER_RESOLUTION_NOT_SET +// +// MessageText: +// +// The timer resolution was not previously set by the current process. +// +#define STATUS_TIMER_RESOLUTION_NOT_SET ((NTSTATUS)0xC0000245L) + +// +// MessageId: STATUS_CONNECTION_COUNT_LIMIT +// +// MessageText: +// +// A connection to the server could not be made because the limit on the number of concurrent connections for this account has been reached. +// +#define STATUS_CONNECTION_COUNT_LIMIT ((NTSTATUS)0xC0000246L) + +// +// MessageId: STATUS_LOGIN_TIME_RESTRICTION +// +// MessageText: +// +// Attempting to login during an unauthorized time of day for this account. +// +#define STATUS_LOGIN_TIME_RESTRICTION ((NTSTATUS)0xC0000247L) + +// +// MessageId: STATUS_LOGIN_WKSTA_RESTRICTION +// +// MessageText: +// +// The account is not authorized to login from this station. +// +#define STATUS_LOGIN_WKSTA_RESTRICTION ((NTSTATUS)0xC0000248L) + +// +// MessageId: STATUS_IMAGE_MP_UP_MISMATCH +// +// MessageText: +// +// {UP/MP Image Mismatch} +// The image %hs has been modified for use on a uniprocessor system, but you are running it on a multiprocessor machine. +// Please reinstall the image file. +// +#define STATUS_IMAGE_MP_UP_MISMATCH ((NTSTATUS)0xC0000249L) + +// +// MessageId: STATUS_INSUFFICIENT_LOGON_INFO +// +// MessageText: +// +// There is insufficient account information to log you on. +// +#define STATUS_INSUFFICIENT_LOGON_INFO ((NTSTATUS)0xC0000250L) + +// +// MessageId: STATUS_BAD_DLL_ENTRYPOINT +// +// MessageText: +// +// {Invalid DLL Entrypoint} +// The dynamic link library %hs is not written correctly. The stack pointer has been left in an inconsistent state. The entrypoint should be declared as WINAPI or STDCALL. Select YES to fail the DLL load. Select NO to continue execution. Selecting NO may cause the application to operate incorrectly. +// +#define STATUS_BAD_DLL_ENTRYPOINT ((NTSTATUS)0xC0000251L) + +// +// MessageId: STATUS_BAD_SERVICE_ENTRYPOINT +// +// MessageText: +// +// {Invalid Service Callback Entrypoint} +// The %hs service is not written correctly. The stack pointer has been left in an inconsistent state. The callback entrypoint should be declared as WINAPI or STDCALL. Selecting OK will cause the service to continue operation. However, the service process may operate incorrectly. +// +#define STATUS_BAD_SERVICE_ENTRYPOINT ((NTSTATUS)0xC0000252L) + +// +// MessageId: STATUS_LPC_REPLY_LOST +// +// MessageText: +// +// The server received the messages but did not send a reply. +// +#define STATUS_LPC_REPLY_LOST ((NTSTATUS)0xC0000253L) + +// +// MessageId: STATUS_IP_ADDRESS_CONFLICT1 +// +// MessageText: +// +// There is an IP address conflict with another system on the network +// +#define STATUS_IP_ADDRESS_CONFLICT1 ((NTSTATUS)0xC0000254L) + +// +// MessageId: STATUS_IP_ADDRESS_CONFLICT2 +// +// MessageText: +// +// There is an IP address conflict with another system on the network +// +#define STATUS_IP_ADDRESS_CONFLICT2 ((NTSTATUS)0xC0000255L) + +// +// MessageId: STATUS_REGISTRY_QUOTA_LIMIT +// +// MessageText: +// +// {Low On Registry Space} +// The system has reached the maximum size allowed for the system part of the registry. Additional storage requests will be ignored. +// +#define STATUS_REGISTRY_QUOTA_LIMIT ((NTSTATUS)0xC0000256L) + +// +// MessageId: STATUS_PATH_NOT_COVERED +// +// MessageText: +// +// The contacted server does not support the indicated part of the DFS namespace. +// +#define STATUS_PATH_NOT_COVERED ((NTSTATUS)0xC0000257L) + +// +// MessageId: STATUS_NO_CALLBACK_ACTIVE +// +// MessageText: +// +// A callback return system service cannot be executed when no callback is active. +// +#define STATUS_NO_CALLBACK_ACTIVE ((NTSTATUS)0xC0000258L) + +// +// MessageId: STATUS_LICENSE_QUOTA_EXCEEDED +// +// MessageText: +// +// The service being accessed is licensed for a particular number of connections. No more connections can be made to the service at this time because there are already as many connections as the service can accept. +// +#define STATUS_LICENSE_QUOTA_EXCEEDED ((NTSTATUS)0xC0000259L) + +// +// MessageId: STATUS_PWD_TOO_SHORT +// +// MessageText: +// +// The password provided is too short to meet the policy of your user account. Please choose a longer password. +// +#define STATUS_PWD_TOO_SHORT ((NTSTATUS)0xC000025AL) + +// +// MessageId: STATUS_PWD_TOO_RECENT +// +// MessageText: +// +// The policy of your user account does not allow you to change passwords too frequently. This is done to prevent users from changing back to a familiar, but potentially discovered, password. If you feel your password has been compromised then please contact your administrator immediately to have a new one assigned. +// +#define STATUS_PWD_TOO_RECENT ((NTSTATUS)0xC000025BL) + +// +// MessageId: STATUS_PWD_HISTORY_CONFLICT +// +// MessageText: +// +// You have attempted to change your password to one that you have used in the past. The policy of your user account does not allow this. Please select a password that you have not previously used. +// +#define STATUS_PWD_HISTORY_CONFLICT ((NTSTATUS)0xC000025CL) + +// +// MessageId: STATUS_PLUGPLAY_NO_DEVICE +// +// MessageText: +// +// You have attempted to load a legacy device driver while its device instance had been disabled. +// +#define STATUS_PLUGPLAY_NO_DEVICE ((NTSTATUS)0xC000025EL) + +// +// MessageId: STATUS_UNSUPPORTED_COMPRESSION +// +// MessageText: +// +// The specified compression format is unsupported. +// +#define STATUS_UNSUPPORTED_COMPRESSION ((NTSTATUS)0xC000025FL) + +// +// MessageId: STATUS_INVALID_HW_PROFILE +// +// MessageText: +// +// The specified hardware profile configuration is invalid. +// +#define STATUS_INVALID_HW_PROFILE ((NTSTATUS)0xC0000260L) + +// +// MessageId: STATUS_INVALID_PLUGPLAY_DEVICE_PATH +// +// MessageText: +// +// The specified Plug and Play registry device path is invalid. +// +#define STATUS_INVALID_PLUGPLAY_DEVICE_PATH ((NTSTATUS)0xC0000261L) + +// +// MessageId: STATUS_DRIVER_ORDINAL_NOT_FOUND +// +// MessageText: +// +// {Driver Entry Point Not Found} +// The %hs device driver could not locate the ordinal %ld in driver %hs. +// +#define STATUS_DRIVER_ORDINAL_NOT_FOUND ((NTSTATUS)0xC0000262L) + +// +// MessageId: STATUS_DRIVER_ENTRYPOINT_NOT_FOUND +// +// MessageText: +// +// {Driver Entry Point Not Found} +// The %hs device driver could not locate the entry point %hs in driver %hs. +// +#define STATUS_DRIVER_ENTRYPOINT_NOT_FOUND ((NTSTATUS)0xC0000263L) + +// +// MessageId: STATUS_RESOURCE_NOT_OWNED +// +// MessageText: +// +// {Application Error} +// The application attempted to release a resource it did not own. Click OK to terminate the application. +// +#define STATUS_RESOURCE_NOT_OWNED ((NTSTATUS)0xC0000264L) + +// +// MessageId: STATUS_TOO_MANY_LINKS +// +// MessageText: +// +// An attempt was made to create more links on a file than the file system supports. +// +#define STATUS_TOO_MANY_LINKS ((NTSTATUS)0xC0000265L) + +// +// MessageId: STATUS_QUOTA_LIST_INCONSISTENT +// +// MessageText: +// +// The specified quota list is internally inconsistent with its descriptor. +// +#define STATUS_QUOTA_LIST_INCONSISTENT ((NTSTATUS)0xC0000266L) + +// +// MessageId: STATUS_FILE_IS_OFFLINE +// +// MessageText: +// +// The specified file has been relocated to offline storage. +// +#define STATUS_FILE_IS_OFFLINE ((NTSTATUS)0xC0000267L) + +// +// MessageId: STATUS_EVALUATION_EXPIRATION +// +// MessageText: +// +// {Windows Evaluation Notification} +// The evaluation period for this installation of Windows has expired. This system will shutdown in 1 hour. To restore access to this installation of Windows, please upgrade this installation using a licensed distribution of this product. +// +#define STATUS_EVALUATION_EXPIRATION ((NTSTATUS)0xC0000268L) + +// +// MessageId: STATUS_ILLEGAL_DLL_RELOCATION +// +// MessageText: +// +// {Illegal System DLL Relocation} +// The system DLL %hs was relocated in memory. The application will not run properly. The relocation occurred because the DLL %hs occupied an address range reserved for Windows system DLLs. The vendor supplying the DLL should be contacted for a new DLL. +// +#define STATUS_ILLEGAL_DLL_RELOCATION ((NTSTATUS)0xC0000269L) + +// +// MessageId: STATUS_LICENSE_VIOLATION +// +// MessageText: +// +// {License Violation} +// The system has detected tampering with your registered product type. This is a violation of your software license. Tampering with product type is not permitted. +// +#define STATUS_LICENSE_VIOLATION ((NTSTATUS)0xC000026AL) + +// +// MessageId: STATUS_DLL_INIT_FAILED_LOGOFF +// +// MessageText: +// +// {DLL Initialization Failed} +// The application failed to initialize because the window station is shutting down. +// +#define STATUS_DLL_INIT_FAILED_LOGOFF ((NTSTATUS)0xC000026BL) + +// +// MessageId: STATUS_DRIVER_UNABLE_TO_LOAD +// +// MessageText: +// +// {Unable to Load Device Driver} +// %hs device driver could not be loaded. +// Error Status was 0x%x +// +#define STATUS_DRIVER_UNABLE_TO_LOAD ((NTSTATUS)0xC000026CL) + +// +// MessageId: STATUS_DFS_UNAVAILABLE +// +// MessageText: +// +// DFS is unavailable on the contacted server. +// +#define STATUS_DFS_UNAVAILABLE ((NTSTATUS)0xC000026DL) + +// +// MessageId: STATUS_VOLUME_DISMOUNTED +// +// MessageText: +// +// An operation was attempted to a volume after it was dismounted. +// +#define STATUS_VOLUME_DISMOUNTED ((NTSTATUS)0xC000026EL) + +// +// MessageId: STATUS_WX86_INTERNAL_ERROR +// +// MessageText: +// +// An internal error occurred in the Win32 x86 emulation subsystem. +// +#define STATUS_WX86_INTERNAL_ERROR ((NTSTATUS)0xC000026FL) + +// +// MessageId: STATUS_WX86_FLOAT_STACK_CHECK +// +// MessageText: +// +// Win32 x86 emulation subsystem Floating-point stack check. +// +#define STATUS_WX86_FLOAT_STACK_CHECK ((NTSTATUS)0xC0000270L) + +// +// MessageId: STATUS_VALIDATE_CONTINUE +// +// MessageText: +// +// The validation process needs to continue on to the next step. +// +#define STATUS_VALIDATE_CONTINUE ((NTSTATUS)0xC0000271L) + +// +// MessageId: STATUS_NO_MATCH +// +// MessageText: +// +// There was no match for the specified key in the index. +// +#define STATUS_NO_MATCH ((NTSTATUS)0xC0000272L) + +// +// MessageId: STATUS_NO_MORE_MATCHES +// +// MessageText: +// +// There are no more matches for the current index enumeration. +// +#define STATUS_NO_MORE_MATCHES ((NTSTATUS)0xC0000273L) + +// +// MessageId: STATUS_NOT_A_REPARSE_POINT +// +// MessageText: +// +// The NTFS file or directory is not a reparse point. +// +#define STATUS_NOT_A_REPARSE_POINT ((NTSTATUS)0xC0000275L) + +// +// MessageId: STATUS_IO_REPARSE_TAG_INVALID +// +// MessageText: +// +// The Windows I/O reparse tag passed for the NTFS reparse point is invalid. +// +#define STATUS_IO_REPARSE_TAG_INVALID ((NTSTATUS)0xC0000276L) + +// +// MessageId: STATUS_IO_REPARSE_TAG_MISMATCH +// +// MessageText: +// +// The Windows I/O reparse tag does not match the one present in the NTFS reparse point. +// +#define STATUS_IO_REPARSE_TAG_MISMATCH ((NTSTATUS)0xC0000277L) + +// +// MessageId: STATUS_IO_REPARSE_DATA_INVALID +// +// MessageText: +// +// The user data passed for the NTFS reparse point is invalid. +// +#define STATUS_IO_REPARSE_DATA_INVALID ((NTSTATUS)0xC0000278L) + +// +// MessageId: STATUS_IO_REPARSE_TAG_NOT_HANDLED +// +// MessageText: +// +// The layered file system driver for this IO tag did not handle it when needed. +// +#define STATUS_IO_REPARSE_TAG_NOT_HANDLED ((NTSTATUS)0xC0000279L) + +// +// MessageId: STATUS_REPARSE_POINT_NOT_RESOLVED +// +// MessageText: +// +// The NTFS symbolic link could not be resolved even though the initial file name is valid. +// +#define STATUS_REPARSE_POINT_NOT_RESOLVED ((NTSTATUS)0xC0000280L) + +// +// MessageId: STATUS_DIRECTORY_IS_A_REPARSE_POINT +// +// MessageText: +// +// The NTFS directory is a reparse point. +// +#define STATUS_DIRECTORY_IS_A_REPARSE_POINT ((NTSTATUS)0xC0000281L) + +// +// MessageId: STATUS_RANGE_LIST_CONFLICT +// +// MessageText: +// +// The range could not be added to the range list because of a conflict. +// +#define STATUS_RANGE_LIST_CONFLICT ((NTSTATUS)0xC0000282L) + +// +// MessageId: STATUS_SOURCE_ELEMENT_EMPTY +// +// MessageText: +// +// The specified medium changer source element contains no media. +// +#define STATUS_SOURCE_ELEMENT_EMPTY ((NTSTATUS)0xC0000283L) + +// +// MessageId: STATUS_DESTINATION_ELEMENT_FULL +// +// MessageText: +// +// The specified medium changer destination element already contains media. +// +#define STATUS_DESTINATION_ELEMENT_FULL ((NTSTATUS)0xC0000284L) + +// +// MessageId: STATUS_ILLEGAL_ELEMENT_ADDRESS +// +// MessageText: +// +// The specified medium changer element does not exist. +// +#define STATUS_ILLEGAL_ELEMENT_ADDRESS ((NTSTATUS)0xC0000285L) + +// +// MessageId: STATUS_MAGAZINE_NOT_PRESENT +// +// MessageText: +// +// The specified element is contained within a magazine that is no longer present. +// +#define STATUS_MAGAZINE_NOT_PRESENT ((NTSTATUS)0xC0000286L) + +// +// MessageId: STATUS_REINITIALIZATION_NEEDED +// +// MessageText: +// +// The device requires reinitialization due to hardware errors. +// +#define STATUS_REINITIALIZATION_NEEDED ((NTSTATUS)0xC0000287L) + +// +// MessageId: STATUS_DEVICE_REQUIRES_CLEANING +// +// MessageText: +// +// The device has indicated that cleaning is necessary. +// +#define STATUS_DEVICE_REQUIRES_CLEANING ((NTSTATUS)0x80000288L) + +// +// MessageId: STATUS_DEVICE_DOOR_OPEN +// +// MessageText: +// +// The device has indicated that it's door is open. Further operations require it closed and secured. +// +#define STATUS_DEVICE_DOOR_OPEN ((NTSTATUS)0x80000289L) + +// +// MessageId: STATUS_ENCRYPTION_FAILED +// +// MessageText: +// +// The file encryption attempt failed. +// +#define STATUS_ENCRYPTION_FAILED ((NTSTATUS)0xC000028AL) + +// +// MessageId: STATUS_DECRYPTION_FAILED +// +// MessageText: +// +// The file decryption attempt failed. +// +#define STATUS_DECRYPTION_FAILED ((NTSTATUS)0xC000028BL) + +// +// MessageId: STATUS_RANGE_NOT_FOUND +// +// MessageText: +// +// The specified range could not be found in the range list. +// +#define STATUS_RANGE_NOT_FOUND ((NTSTATUS)0xC000028CL) + +// +// MessageId: STATUS_NO_RECOVERY_POLICY +// +// MessageText: +// +// There is no encryption recovery policy configured for this system. +// +#define STATUS_NO_RECOVERY_POLICY ((NTSTATUS)0xC000028DL) + +// +// MessageId: STATUS_NO_EFS +// +// MessageText: +// +// The required encryption driver is not loaded for this system. +// +#define STATUS_NO_EFS ((NTSTATUS)0xC000028EL) + +// +// MessageId: STATUS_WRONG_EFS +// +// MessageText: +// +// The file was encrypted with a different encryption driver than is currently loaded. +// +#define STATUS_WRONG_EFS ((NTSTATUS)0xC000028FL) + +// +// MessageId: STATUS_NO_USER_KEYS +// +// MessageText: +// +// There are no EFS keys defined for the user. +// +#define STATUS_NO_USER_KEYS ((NTSTATUS)0xC0000290L) + +// +// MessageId: STATUS_FILE_NOT_ENCRYPTED +// +// MessageText: +// +// The specified file is not encrypted. +// +#define STATUS_FILE_NOT_ENCRYPTED ((NTSTATUS)0xC0000291L) + +// +// MessageId: STATUS_NOT_EXPORT_FORMAT +// +// MessageText: +// +// The specified file is not in the defined EFS export format. +// +#define STATUS_NOT_EXPORT_FORMAT ((NTSTATUS)0xC0000292L) + +// +// MessageId: STATUS_FILE_ENCRYPTED +// +// MessageText: +// +// The specified file is encrypted and the user does not have the ability to decrypt it. +// +#define STATUS_FILE_ENCRYPTED ((NTSTATUS)0xC0000293L) + +// +// MessageId: STATUS_WAKE_SYSTEM +// +// MessageText: +// +// The system has awoken +// +#define STATUS_WAKE_SYSTEM ((NTSTATUS)0x40000294L) + +// +// MessageId: STATUS_WMI_GUID_NOT_FOUND +// +// MessageText: +// +// The guid passed was not recognized as valid by a WMI data provider. +// +#define STATUS_WMI_GUID_NOT_FOUND ((NTSTATUS)0xC0000295L) + +// +// MessageId: STATUS_WMI_INSTANCE_NOT_FOUND +// +// MessageText: +// +// The instance name passed was not recognized as valid by a WMI data provider. +// +#define STATUS_WMI_INSTANCE_NOT_FOUND ((NTSTATUS)0xC0000296L) + +// +// MessageId: STATUS_WMI_ITEMID_NOT_FOUND +// +// MessageText: +// +// The data item id passed was not recognized as valid by a WMI data provider. +// +#define STATUS_WMI_ITEMID_NOT_FOUND ((NTSTATUS)0xC0000297L) + +// +// MessageId: STATUS_WMI_TRY_AGAIN +// +// MessageText: +// +// The WMI request could not be completed and should be retried. +// +#define STATUS_WMI_TRY_AGAIN ((NTSTATUS)0xC0000298L) + +// +// MessageId: STATUS_SHARED_POLICY +// +// MessageText: +// +// The policy object is shared and can only be modified at the root +// +#define STATUS_SHARED_POLICY ((NTSTATUS)0xC0000299L) + +// +// MessageId: STATUS_POLICY_OBJECT_NOT_FOUND +// +// MessageText: +// +// The policy object does not exist when it should +// +#define STATUS_POLICY_OBJECT_NOT_FOUND ((NTSTATUS)0xC000029AL) + +// +// MessageId: STATUS_POLICY_ONLY_IN_DS +// +// MessageText: +// +// The requested policy information only lives in the Ds +// +#define STATUS_POLICY_ONLY_IN_DS ((NTSTATUS)0xC000029BL) + +// +// MessageId: STATUS_VOLUME_NOT_UPGRADED +// +// MessageText: +// +// The volume must be upgraded to enable this feature +// +#define STATUS_VOLUME_NOT_UPGRADED ((NTSTATUS)0xC000029CL) + +// +// MessageId: STATUS_REMOTE_STORAGE_NOT_ACTIVE +// +// MessageText: +// +// The remote storage service is not operational at this time. +// +#define STATUS_REMOTE_STORAGE_NOT_ACTIVE ((NTSTATUS)0xC000029DL) + +// +// MessageId: STATUS_REMOTE_STORAGE_MEDIA_ERROR +// +// MessageText: +// +// The remote storage service encountered a media error. +// +#define STATUS_REMOTE_STORAGE_MEDIA_ERROR ((NTSTATUS)0xC000029EL) + +// +// MessageId: STATUS_NO_TRACKING_SERVICE +// +// MessageText: +// +// The tracking (workstation) service is not running. +// +#define STATUS_NO_TRACKING_SERVICE ((NTSTATUS)0xC000029FL) + +// +// MessageId: STATUS_SERVER_SID_MISMATCH +// +// MessageText: +// +// The server process is running under a SID different than that required by client. +// +#define STATUS_SERVER_SID_MISMATCH ((NTSTATUS)0xC00002A0L) + +// +// Directory Service specific Errors +// +// +// MessageId: STATUS_DS_NO_ATTRIBUTE_OR_VALUE +// +// MessageText: +// +// The specified directory service attribute or value does not exist. +// +#define STATUS_DS_NO_ATTRIBUTE_OR_VALUE ((NTSTATUS)0xC00002A1L) + +// +// MessageId: STATUS_DS_INVALID_ATTRIBUTE_SYNTAX +// +// MessageText: +// +// The attribute syntax specified to the directory service is invalid. +// +#define STATUS_DS_INVALID_ATTRIBUTE_SYNTAX ((NTSTATUS)0xC00002A2L) + +// +// MessageId: STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED +// +// MessageText: +// +// The attribute type specified to the directory service is not defined. +// +#define STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED ((NTSTATUS)0xC00002A3L) + +// +// MessageId: STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS +// +// MessageText: +// +// The specified directory service attribute or value already exists. +// +#define STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS ((NTSTATUS)0xC00002A4L) + +// +// MessageId: STATUS_DS_BUSY +// +// MessageText: +// +// The directory service is busy. +// +#define STATUS_DS_BUSY ((NTSTATUS)0xC00002A5L) + +// +// MessageId: STATUS_DS_UNAVAILABLE +// +// MessageText: +// +// The directory service is not available. +// +#define STATUS_DS_UNAVAILABLE ((NTSTATUS)0xC00002A6L) + +// +// MessageId: STATUS_DS_NO_RIDS_ALLOCATED +// +// MessageText: +// +// The directory service was unable to allocate a relative identifier. +// +#define STATUS_DS_NO_RIDS_ALLOCATED ((NTSTATUS)0xC00002A7L) + +// +// MessageId: STATUS_DS_NO_MORE_RIDS +// +// MessageText: +// +// The directory service has exhausted the pool of relative identifiers. +// +#define STATUS_DS_NO_MORE_RIDS ((NTSTATUS)0xC00002A8L) + +// +// MessageId: STATUS_DS_INCORRECT_ROLE_OWNER +// +// MessageText: +// +// The requested operation could not be performed because the directory service is not the master for that type of operation. +// +#define STATUS_DS_INCORRECT_ROLE_OWNER ((NTSTATUS)0xC00002A9L) + +// +// MessageId: STATUS_DS_RIDMGR_INIT_ERROR +// +// MessageText: +// +// The directory service was unable to initialize the subsystem that allocates relative identifiers. +// +#define STATUS_DS_RIDMGR_INIT_ERROR ((NTSTATUS)0xC00002AAL) + +// +// MessageId: STATUS_DS_OBJ_CLASS_VIOLATION +// +// MessageText: +// +// The requested operation did not satisfy one or more constraints associated with the class of the object. +// +#define STATUS_DS_OBJ_CLASS_VIOLATION ((NTSTATUS)0xC00002ABL) + +// +// MessageId: STATUS_DS_CANT_ON_NON_LEAF +// +// MessageText: +// +// The directory service can perform the requested operation only on a leaf object. +// +#define STATUS_DS_CANT_ON_NON_LEAF ((NTSTATUS)0xC00002ACL) + +// +// MessageId: STATUS_DS_CANT_ON_RDN +// +// MessageText: +// +// The directory service cannot perform the requested operation on the Relatively Defined Name (RDN) attribute of an object. +// +#define STATUS_DS_CANT_ON_RDN ((NTSTATUS)0xC00002ADL) + +// +// MessageId: STATUS_DS_CANT_MOD_OBJ_CLASS +// +// MessageText: +// +// The directory service detected an attempt to modify the object class of an object. +// +#define STATUS_DS_CANT_MOD_OBJ_CLASS ((NTSTATUS)0xC00002AEL) + +// +// MessageId: STATUS_DS_CROSS_DOM_MOVE_FAILED +// +// MessageText: +// +// An error occurred while performing a cross domain move operation. +// +#define STATUS_DS_CROSS_DOM_MOVE_FAILED ((NTSTATUS)0xC00002AFL) + +// +// MessageId: STATUS_DS_GC_NOT_AVAILABLE +// +// MessageText: +// +// Unable to Contact the Global Catalog Server. +// +#define STATUS_DS_GC_NOT_AVAILABLE ((NTSTATUS)0xC00002B0L) + +// +// MessageId: STATUS_DIRECTORY_SERVICE_REQUIRED +// +// MessageText: +// +// The requested operation requires a directory service, and none was available. +// +#define STATUS_DIRECTORY_SERVICE_REQUIRED ((NTSTATUS)0xC00002B1L) + +// +// MessageId: STATUS_REPARSE_ATTRIBUTE_CONFLICT +// +// MessageText: +// +// The reparse attribute cannot be set as it is incompatible with an existing attribute. +// +#define STATUS_REPARSE_ATTRIBUTE_CONFLICT ((NTSTATUS)0xC00002B2L) + +// +// MessageId: STATUS_CANT_ENABLE_DENY_ONLY +// +// MessageText: +// +// A group marked use for deny only cannot be enabled. +// +#define STATUS_CANT_ENABLE_DENY_ONLY ((NTSTATUS)0xC00002B3L) + +// +// MessageId: STATUS_DEVICE_REMOVED +// +// MessageText: +// +// The device has been removed. +// +#define STATUS_DEVICE_REMOVED ((NTSTATUS)0xC00002B6L) + +// +// MessageId: STATUS_JOURNAL_DELETE_IN_PROGRESS +// +// MessageText: +// +// The volume change journal is being deleted. +// +#define STATUS_JOURNAL_DELETE_IN_PROGRESS ((NTSTATUS)0xC00002B7L) + +// +// MessageId: STATUS_JOURNAL_NOT_ACTIVE +// +// MessageText: +// +// The volume change journal is not active. +// +#define STATUS_JOURNAL_NOT_ACTIVE ((NTSTATUS)0xC00002B8L) + +// +// MessageId: STATUS_NOINTERFACE +// +// MessageText: +// +// The requested interface is not supported. +// +#define STATUS_NOINTERFACE ((NTSTATUS)0xC00002B9L) + +// +// MessageId: STATUS_DS_ADMIN_LIMIT_EXCEEDED +// +// MessageText: +// +// A directory service resource limit has been exceeded. +// +#define STATUS_DS_ADMIN_LIMIT_EXCEEDED ((NTSTATUS)0xC00002C1L) + +// +// MessageId: STATUS_DRIVER_FAILED_SLEEP +// +// MessageText: +// +// {System Standby Failed} +// The driver %hs does not support standby mode. Updating this driver may allow the system to go to standby mode. +// +#define STATUS_DRIVER_FAILED_SLEEP ((NTSTATUS)0xC00002C2L) + +// +// MessageId: STATUS_MUTUAL_AUTHENTICATION_FAILED +// +// MessageText: +// +// Mutual Authentication failed. The server's password is out of date at the domain controller. +// +#define STATUS_MUTUAL_AUTHENTICATION_FAILED ((NTSTATUS)0xC00002C3L) + +// +// MessageId: STATUS_CORRUPT_SYSTEM_FILE +// +// MessageText: +// +// The system file %1 has become corrupt and has been replaced. +// +#define STATUS_CORRUPT_SYSTEM_FILE ((NTSTATUS)0xC00002C4L) + +// +// MessageId: STATUS_DATATYPE_MISALIGNMENT_ERROR +// +// MessageText: +// +// {EXCEPTION} +// Alignment Error +// A datatype misalignment error was detected in a load or store instruction. +// +#define STATUS_DATATYPE_MISALIGNMENT_ERROR ((NTSTATUS)0xC00002C5L) + +// +// MessageId: STATUS_WMI_READ_ONLY +// +// MessageText: +// +// The WMI data item or data block is read only. +// +#define STATUS_WMI_READ_ONLY ((NTSTATUS)0xC00002C6L) + +// +// MessageId: STATUS_WMI_SET_FAILURE +// +// MessageText: +// +// The WMI data item or data block could not be changed. +// +#define STATUS_WMI_SET_FAILURE ((NTSTATUS)0xC00002C7L) + +// +// MessageId: STATUS_COMMITMENT_MINIMUM +// +// MessageText: +// +// {Virtual Memory Minimum Too Low} +// Your system is low on virtual memory. Windows is increasing the size of your virtual memory paging file. During this process, memory requests for some applications may be denied. For more information, see Help. +// +#define STATUS_COMMITMENT_MINIMUM ((NTSTATUS)0xC00002C8L) + +// +// MessageId: STATUS_TRANSPORT_FULL +// +// MessageText: +// +// The medium changer's transport element contains media, which is causing the operation to fail. +// +#define STATUS_TRANSPORT_FULL ((NTSTATUS)0xC00002CAL) + +// +// MessageId: STATUS_DS_SAM_INIT_FAILURE +// +// MessageText: +// +// Security Accounts Manager initialization failed because of the following error: +// %hs +// Error Status: 0x%x. +// Please shutdown this system and reboot into Directory Services Restore Mode, check the event log for more detailed information. +// +#define STATUS_DS_SAM_INIT_FAILURE ((NTSTATUS)0xC00002CBL) + +// +// MessageId: STATUS_ONLY_IF_CONNECTED +// +// MessageText: +// +// This operation is supported only when you are connected to the server. +// +#define STATUS_ONLY_IF_CONNECTED ((NTSTATUS)0xC00002CCL) + +// +// MessageId: STATUS_DS_SENSITIVE_GROUP_VIOLATION +// +// MessageText: +// +// Only an administrator can modify the membership list of an administrative group. +// +#define STATUS_DS_SENSITIVE_GROUP_VIOLATION ((NTSTATUS)0xC00002CDL) + +// +// MessageId: STATUS_PNP_RESTART_ENUMERATION +// +// MessageText: +// +// A device was removed so enumeration must be restarted. +// +#define STATUS_PNP_RESTART_ENUMERATION ((NTSTATUS)0xC00002CEL) + +// +// MessageId: STATUS_JOURNAL_ENTRY_DELETED +// +// MessageText: +// +// The journal entry has been deleted from the journal. +// +#define STATUS_JOURNAL_ENTRY_DELETED ((NTSTATUS)0xC00002CFL) + +// +// MessageId: STATUS_DS_CANT_MOD_PRIMARYGROUPID +// +// MessageText: +// +// Cannot change the primary group ID of a domain controller account. +// +#define STATUS_DS_CANT_MOD_PRIMARYGROUPID ((NTSTATUS)0xC00002D0L) + +// +// MessageId: STATUS_SYSTEM_IMAGE_BAD_SIGNATURE +// +// MessageText: +// +// {Fatal System Error} +// The system image %s is not properly signed. The file has been replaced with the signed file. The system has been shut down. +// +#define STATUS_SYSTEM_IMAGE_BAD_SIGNATURE ((NTSTATUS)0xC00002D1L) + +// +// MessageId: STATUS_PNP_REBOOT_REQUIRED +// +// MessageText: +// +// Device will not start without a reboot. +// +#define STATUS_PNP_REBOOT_REQUIRED ((NTSTATUS)0xC00002D2L) + +// +// MessageId: STATUS_POWER_STATE_INVALID +// +// MessageText: +// +// Current device power state cannot support this request. +// +#define STATUS_POWER_STATE_INVALID ((NTSTATUS)0xC00002D3L) + +// +// MessageId: STATUS_DS_INVALID_GROUP_TYPE +// +// MessageText: +// +// The specified group type is invalid. +// +#define STATUS_DS_INVALID_GROUP_TYPE ((NTSTATUS)0xC00002D4L) + +// +// MessageId: STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN +// +// MessageText: +// +// In mixed domain no nesting of global group if group is security enabled. +// +#define STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN ((NTSTATUS)0xC00002D5L) + +// +// MessageId: STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN +// +// MessageText: +// +// In mixed domain, cannot nest local groups with other local groups, if the group is security enabled. +// +#define STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN ((NTSTATUS)0xC00002D6L) + +// +// MessageId: STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER +// +// MessageText: +// +// A global group cannot have a local group as a member. +// +#define STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER ((NTSTATUS)0xC00002D7L) + +// +// MessageId: STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER +// +// MessageText: +// +// A global group cannot have a universal group as a member. +// +#define STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER ((NTSTATUS)0xC00002D8L) + +// +// MessageId: STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER +// +// MessageText: +// +// A universal group cannot have a local group as a member. +// +#define STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER ((NTSTATUS)0xC00002D9L) + +// +// MessageId: STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER +// +// MessageText: +// +// A global group cannot have a cross domain member. +// +#define STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER ((NTSTATUS)0xC00002DAL) + +// +// MessageId: STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER +// +// MessageText: +// +// A local group cannot have another cross domain local group as a member. +// +#define STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER ((NTSTATUS)0xC00002DBL) + +// +// MessageId: STATUS_DS_HAVE_PRIMARY_MEMBERS +// +// MessageText: +// +// Cannot change to security disabled group because of having primary members in this group. +// +#define STATUS_DS_HAVE_PRIMARY_MEMBERS ((NTSTATUS)0xC00002DCL) + +// +// MessageId: STATUS_WMI_NOT_SUPPORTED +// +// MessageText: +// +// The WMI operation is not supported by the data block or method. +// +#define STATUS_WMI_NOT_SUPPORTED ((NTSTATUS)0xC00002DDL) + +// +// MessageId: STATUS_INSUFFICIENT_POWER +// +// MessageText: +// +// There is not enough power to complete the requested operation. +// +#define STATUS_INSUFFICIENT_POWER ((NTSTATUS)0xC00002DEL) + +// +// MessageId: STATUS_SAM_NEED_BOOTKEY_PASSWORD +// +// MessageText: +// +// Security Account Manager needs to get the boot password. +// +#define STATUS_SAM_NEED_BOOTKEY_PASSWORD ((NTSTATUS)0xC00002DFL) + +// +// MessageId: STATUS_SAM_NEED_BOOTKEY_FLOPPY +// +// MessageText: +// +// Security Account Manager needs to get the boot key from floppy disk. +// +#define STATUS_SAM_NEED_BOOTKEY_FLOPPY ((NTSTATUS)0xC00002E0L) + +// +// MessageId: STATUS_DS_CANT_START +// +// MessageText: +// +// Directory Service cannot start. +// +#define STATUS_DS_CANT_START ((NTSTATUS)0xC00002E1L) + +// +// MessageId: STATUS_DS_INIT_FAILURE +// +// MessageText: +// +// Directory Services could not start because of the following error: +// %hs +// Error Status: 0x%x. +// Please shutdown this system and reboot into Directory Services Restore Mode, check the event log for more detailed information. +// +#define STATUS_DS_INIT_FAILURE ((NTSTATUS)0xC00002E2L) + +// +// MessageId: STATUS_SAM_INIT_FAILURE +// +// MessageText: +// +// Security Accounts Manager initialization failed because of the following error: +// %hs +// Error Status: 0x%x. +// Please click OK to shutdown this system and reboot into Safe Mode, check the event log for more detailed information. +// +#define STATUS_SAM_INIT_FAILURE ((NTSTATUS)0xC00002E3L) + +// +// MessageId: STATUS_DS_GC_REQUIRED +// +// MessageText: +// +// The requested operation can be performed only on a global catalog server. +// +#define STATUS_DS_GC_REQUIRED ((NTSTATUS)0xC00002E4L) + +// +// MessageId: STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY +// +// MessageText: +// +// A local group can only be a member of other local groups in the same domain. +// +#define STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY ((NTSTATUS)0xC00002E5L) + +// +// MessageId: STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS +// +// MessageText: +// +// Foreign security principals cannot be members of universal groups. +// +#define STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS ((NTSTATUS)0xC00002E6L) + +// +// MessageId: STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED +// +// MessageText: +// +// Your computer could not be joined to the domain. You have exceeded the maximum number of computer accounts you are allowed to create in this domain. Contact your system administrator to have this limit reset or increased. +// +#define STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED ((NTSTATUS)0xC00002E7L) + +// +// MessageId: STATUS_MULTIPLE_FAULT_VIOLATION +// +// MessageText: +// +// STATUS_MULTIPLE_FAULT_VIOLATION +// +#define STATUS_MULTIPLE_FAULT_VIOLATION ((NTSTATUS)0xC00002E8L) + +// +// MessageId: STATUS_CURRENT_DOMAIN_NOT_ALLOWED +// +// MessageText: +// +// This operation cannot be performed on the current domain. +// +#define STATUS_CURRENT_DOMAIN_NOT_ALLOWED ((NTSTATUS)0xC00002E9L) + +// +// MessageId: STATUS_CANNOT_MAKE +// +// MessageText: +// +// The directory or file cannot be created. +// +#define STATUS_CANNOT_MAKE ((NTSTATUS)0xC00002EAL) + +// +// MessageId: STATUS_SYSTEM_SHUTDOWN +// +// MessageText: +// +// The system is in the process of shutting down. +// +#define STATUS_SYSTEM_SHUTDOWN ((NTSTATUS)0xC00002EBL) + +// +// MessageId: STATUS_DS_INIT_FAILURE_CONSOLE +// +// MessageText: +// +// Directory Services could not start because of the following error: +// %hs +// Error Status: 0x%x. +// Please click OK to shutdown the system. You can use the recovery console to diagnose the system further. +// +#define STATUS_DS_INIT_FAILURE_CONSOLE ((NTSTATUS)0xC00002ECL) + +// +// MessageId: STATUS_DS_SAM_INIT_FAILURE_CONSOLE +// +// MessageText: +// +// Security Accounts Manager initialization failed because of the following error: +// %hs +// Error Status: 0x%x. +// Please click OK to shutdown the system. You can use the recovery console to diagnose the system further. +// +#define STATUS_DS_SAM_INIT_FAILURE_CONSOLE ((NTSTATUS)0xC00002EDL) + +// +// MessageId: STATUS_UNFINISHED_CONTEXT_DELETED +// +// MessageText: +// +// A security context was deleted before the context was completed. This is considered a logon failure. +// +#define STATUS_UNFINISHED_CONTEXT_DELETED ((NTSTATUS)0xC00002EEL) + +// +// MessageId: STATUS_NO_TGT_REPLY +// +// MessageText: +// +// The client is trying to negotiate a context and the server requires user-to-user but didn't send a TGT reply. +// +#define STATUS_NO_TGT_REPLY ((NTSTATUS)0xC00002EFL) + +// +// MessageId: STATUS_OBJECTID_NOT_FOUND +// +// MessageText: +// +// An object ID was not found in the file. +// +#define STATUS_OBJECTID_NOT_FOUND ((NTSTATUS)0xC00002F0L) + +// +// MessageId: STATUS_NO_IP_ADDRESSES +// +// MessageText: +// +// Unable to accomplish the requested task because the local machine does not have any IP addresses. +// +#define STATUS_NO_IP_ADDRESSES ((NTSTATUS)0xC00002F1L) + +// +// MessageId: STATUS_WRONG_CREDENTIAL_HANDLE +// +// MessageText: +// +// The supplied credential handle does not match the credential associated with the security context. +// +#define STATUS_WRONG_CREDENTIAL_HANDLE ((NTSTATUS)0xC00002F2L) + +// +// MessageId: STATUS_CRYPTO_SYSTEM_INVALID +// +// MessageText: +// +// The crypto system or checksum function is invalid because a required function is unavailable. +// +#define STATUS_CRYPTO_SYSTEM_INVALID ((NTSTATUS)0xC00002F3L) + +// +// MessageId: STATUS_MAX_REFERRALS_EXCEEDED +// +// MessageText: +// +// The number of maximum ticket referrals has been exceeded. +// +#define STATUS_MAX_REFERRALS_EXCEEDED ((NTSTATUS)0xC00002F4L) + +// +// MessageId: STATUS_MUST_BE_KDC +// +// MessageText: +// +// The local machine must be a Kerberos KDC (domain controller) and it is not. +// +#define STATUS_MUST_BE_KDC ((NTSTATUS)0xC00002F5L) + +// +// MessageId: STATUS_STRONG_CRYPTO_NOT_SUPPORTED +// +// MessageText: +// +// The other end of the security negotiation is requires strong crypto but it is not supported on the local machine. +// +#define STATUS_STRONG_CRYPTO_NOT_SUPPORTED ((NTSTATUS)0xC00002F6L) + +// +// MessageId: STATUS_TOO_MANY_PRINCIPALS +// +// MessageText: +// +// The KDC reply contained more than one principal name. +// +#define STATUS_TOO_MANY_PRINCIPALS ((NTSTATUS)0xC00002F7L) + +// +// MessageId: STATUS_NO_PA_DATA +// +// MessageText: +// +// Expected to find PA data for a hint of what etype to use, but it was not found. +// +#define STATUS_NO_PA_DATA ((NTSTATUS)0xC00002F8L) + +// +// MessageId: STATUS_PKINIT_NAME_MISMATCH +// +// MessageText: +// +// The client certificate does not contain a valid UPN, or does not match the client name in the logon request. Please contact your administrator. +// +#define STATUS_PKINIT_NAME_MISMATCH ((NTSTATUS)0xC00002F9L) + +// +// MessageId: STATUS_SMARTCARD_LOGON_REQUIRED +// +// MessageText: +// +// Smartcard logon is required and was not used. +// +#define STATUS_SMARTCARD_LOGON_REQUIRED ((NTSTATUS)0xC00002FAL) + +// +// MessageId: STATUS_KDC_INVALID_REQUEST +// +// MessageText: +// +// An invalid request was sent to the KDC. +// +#define STATUS_KDC_INVALID_REQUEST ((NTSTATUS)0xC00002FBL) + +// +// MessageId: STATUS_KDC_UNABLE_TO_REFER +// +// MessageText: +// +// The KDC was unable to generate a referral for the service requested. +// +#define STATUS_KDC_UNABLE_TO_REFER ((NTSTATUS)0xC00002FCL) + +// +// MessageId: STATUS_KDC_UNKNOWN_ETYPE +// +// MessageText: +// +// The encryption type requested is not supported by the KDC. +// +#define STATUS_KDC_UNKNOWN_ETYPE ((NTSTATUS)0xC00002FDL) + +// +// MessageId: STATUS_SHUTDOWN_IN_PROGRESS +// +// MessageText: +// +// A system shutdown is in progress. +// +#define STATUS_SHUTDOWN_IN_PROGRESS ((NTSTATUS)0xC00002FEL) + +// +// MessageId: STATUS_SERVER_SHUTDOWN_IN_PROGRESS +// +// MessageText: +// +// The server machine is shutting down. +// +#define STATUS_SERVER_SHUTDOWN_IN_PROGRESS ((NTSTATUS)0xC00002FFL) + +// +// MessageId: STATUS_NOT_SUPPORTED_ON_SBS +// +// MessageText: +// +// This operation is not supported on a computer running Windows Server 2003 for Small Business Server +// +#define STATUS_NOT_SUPPORTED_ON_SBS ((NTSTATUS)0xC0000300L) + +// +// MessageId: STATUS_WMI_GUID_DISCONNECTED +// +// MessageText: +// +// The WMI GUID is no longer available +// +#define STATUS_WMI_GUID_DISCONNECTED ((NTSTATUS)0xC0000301L) + +// +// MessageId: STATUS_WMI_ALREADY_DISABLED +// +// MessageText: +// +// Collection or events for the WMI GUID is already disabled. +// +#define STATUS_WMI_ALREADY_DISABLED ((NTSTATUS)0xC0000302L) + +// +// MessageId: STATUS_WMI_ALREADY_ENABLED +// +// MessageText: +// +// Collection or events for the WMI GUID is already enabled. +// +#define STATUS_WMI_ALREADY_ENABLED ((NTSTATUS)0xC0000303L) + +// +// MessageId: STATUS_MFT_TOO_FRAGMENTED +// +// MessageText: +// +// The Master File Table on the volume is too fragmented to complete this operation. +// +#define STATUS_MFT_TOO_FRAGMENTED ((NTSTATUS)0xC0000304L) + +// +// MessageId: STATUS_COPY_PROTECTION_FAILURE +// +// MessageText: +// +// Copy protection failure. +// +#define STATUS_COPY_PROTECTION_FAILURE ((NTSTATUS)0xC0000305L) + +// +// MessageId: STATUS_CSS_AUTHENTICATION_FAILURE +// +// MessageText: +// +// Copy protection error - DVD CSS Authentication failed. +// +#define STATUS_CSS_AUTHENTICATION_FAILURE ((NTSTATUS)0xC0000306L) + +// +// MessageId: STATUS_CSS_KEY_NOT_PRESENT +// +// MessageText: +// +// Copy protection error - The given sector does not contain a valid key. +// +#define STATUS_CSS_KEY_NOT_PRESENT ((NTSTATUS)0xC0000307L) + +// +// MessageId: STATUS_CSS_KEY_NOT_ESTABLISHED +// +// MessageText: +// +// Copy protection error - DVD session key not established. +// +#define STATUS_CSS_KEY_NOT_ESTABLISHED ((NTSTATUS)0xC0000308L) + +// +// MessageId: STATUS_CSS_SCRAMBLED_SECTOR +// +// MessageText: +// +// Copy protection error - The read failed because the sector is encrypted. +// +#define STATUS_CSS_SCRAMBLED_SECTOR ((NTSTATUS)0xC0000309L) + +// +// MessageId: STATUS_CSS_REGION_MISMATCH +// +// MessageText: +// +// Copy protection error - The given DVD's region does not correspond to the +// region setting of the drive. +// +#define STATUS_CSS_REGION_MISMATCH ((NTSTATUS)0xC000030AL) + +// +// MessageId: STATUS_CSS_RESETS_EXHAUSTED +// +// MessageText: +// +// Copy protection error - The drive's region setting may be permanent. +// +#define STATUS_CSS_RESETS_EXHAUSTED ((NTSTATUS)0xC000030BL) + +/*++ + + MessageId's 0x030c - 0x031f (inclusive) are reserved for future **STORAGE** + copy protection errors. + +--*/ +// +// MessageId: STATUS_PKINIT_FAILURE +// +// MessageText: +// +// The Kerberos protocol encountered an error while validating the KDC certificate during smartcard Logon. There is more information in the system event log. +// +#define STATUS_PKINIT_FAILURE ((NTSTATUS)0xC0000320L) + +// +// MessageId: STATUS_SMARTCARD_SUBSYSTEM_FAILURE +// +// MessageText: +// +// The Kerberos protocol encountered an error while attempting to utilize the smartcard subsystem. +// +#define STATUS_SMARTCARD_SUBSYSTEM_FAILURE ((NTSTATUS)0xC0000321L) + +// +// MessageId: STATUS_NO_KERB_KEY +// +// MessageText: +// +// The target server does not have acceptable Kerberos credentials. +// +#define STATUS_NO_KERB_KEY ((NTSTATUS)0xC0000322L) + +/*++ + + MessageId's 0x0323 - 0x034f (inclusive) are reserved for other future copy + protection errors. + +--*/ +// +// MessageId: STATUS_HOST_DOWN +// +// MessageText: +// +// The transport determined that the remote system is down. +// +#define STATUS_HOST_DOWN ((NTSTATUS)0xC0000350L) + +// +// MessageId: STATUS_UNSUPPORTED_PREAUTH +// +// MessageText: +// +// An unsupported preauthentication mechanism was presented to the Kerberos package. +// +#define STATUS_UNSUPPORTED_PREAUTH ((NTSTATUS)0xC0000351L) + +// +// MessageId: STATUS_EFS_ALG_BLOB_TOO_BIG +// +// MessageText: +// +// The encryption algorithm used on the source file needs a bigger key buffer than the one used on the destination file. +// +#define STATUS_EFS_ALG_BLOB_TOO_BIG ((NTSTATUS)0xC0000352L) + +// +// MessageId: STATUS_PORT_NOT_SET +// +// MessageText: +// +// An attempt to remove a process's DebugPort was made, but a port was not already associated with the process. +// +#define STATUS_PORT_NOT_SET ((NTSTATUS)0xC0000353L) + +// +// MessageId: STATUS_DEBUGGER_INACTIVE +// +// MessageText: +// +// Debugger Inactive: Windows may have been started without kernel debugging enabled. +// +#define STATUS_DEBUGGER_INACTIVE ((NTSTATUS)0xC0000354L) + +// +// MessageId: STATUS_DS_VERSION_CHECK_FAILURE +// +// MessageText: +// +// This version of Windows is not compatible with the behavior version of directory forest, domain or domain controller. +// +#define STATUS_DS_VERSION_CHECK_FAILURE ((NTSTATUS)0xC0000355L) + +// +// MessageId: STATUS_AUDITING_DISABLED +// +// MessageText: +// +// The specified event is currently not being audited. +// +#define STATUS_AUDITING_DISABLED ((NTSTATUS)0xC0000356L) + +// +// MessageId: STATUS_PRENT4_MACHINE_ACCOUNT +// +// MessageText: +// +// The machine account was created pre-NT4. The account needs to be recreated. +// +#define STATUS_PRENT4_MACHINE_ACCOUNT ((NTSTATUS)0xC0000357L) + +// +// MessageId: STATUS_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER +// +// MessageText: +// +// A account group cannot have a universal group as a member. +// +#define STATUS_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER ((NTSTATUS)0xC0000358L) + +// +// MessageId: STATUS_INVALID_IMAGE_WIN_32 +// +// MessageText: +// +// The specified image file did not have the correct format, it appears to be a 32-bit Windows image. +// +#define STATUS_INVALID_IMAGE_WIN_32 ((NTSTATUS)0xC0000359L) + +// +// MessageId: STATUS_INVALID_IMAGE_WIN_64 +// +// MessageText: +// +// The specified image file did not have the correct format, it appears to be a 64-bit Windows image. +// +#define STATUS_INVALID_IMAGE_WIN_64 ((NTSTATUS)0xC000035AL) + +// +// MessageId: STATUS_BAD_BINDINGS +// +// MessageText: +// +// Client's supplied SSPI channel bindings were incorrect. +// +#define STATUS_BAD_BINDINGS ((NTSTATUS)0xC000035BL) + +// +// MessageId: STATUS_NETWORK_SESSION_EXPIRED +// +// MessageText: +// +// The client's session has expired, so the client must reauthenticate to continue accessing the remote resources. +// +#define STATUS_NETWORK_SESSION_EXPIRED ((NTSTATUS)0xC000035CL) + +// +// MessageId: STATUS_APPHELP_BLOCK +// +// MessageText: +// +// AppHelp dialog canceled thus preventing the application from starting. +// +#define STATUS_APPHELP_BLOCK ((NTSTATUS)0xC000035DL) + +// +// MessageId: STATUS_ALL_SIDS_FILTERED +// +// MessageText: +// +// The SID filtering operation removed all SIDs. +// +#define STATUS_ALL_SIDS_FILTERED ((NTSTATUS)0xC000035EL) + +// +// MessageId: STATUS_NOT_SAFE_MODE_DRIVER +// +// MessageText: +// +// The driver was not loaded because the system is booting into safe mode. +// +#define STATUS_NOT_SAFE_MODE_DRIVER ((NTSTATUS)0xC000035FL) + +// +// MessageId: STATUS_ACCESS_DISABLED_BY_POLICY_DEFAULT +// +// MessageText: +// +// Access to %1 has been restricted by your Administrator by the default software restriction policy level. +// +#define STATUS_ACCESS_DISABLED_BY_POLICY_DEFAULT ((NTSTATUS)0xC0000361L) + +// +// MessageId: STATUS_ACCESS_DISABLED_BY_POLICY_PATH +// +// MessageText: +// +// Access to %1 has been restricted by your Administrator by location with policy rule %2 placed on path %3 +// +#define STATUS_ACCESS_DISABLED_BY_POLICY_PATH ((NTSTATUS)0xC0000362L) + +// +// MessageId: STATUS_ACCESS_DISABLED_BY_POLICY_PUBLISHER +// +// MessageText: +// +// Access to %1 has been restricted by your Administrator by software publisher policy. +// +#define STATUS_ACCESS_DISABLED_BY_POLICY_PUBLISHER ((NTSTATUS)0xC0000363L) + +// +// MessageId: STATUS_ACCESS_DISABLED_BY_POLICY_OTHER +// +// MessageText: +// +// Access to %1 has been restricted by your Administrator by policy rule %2. +// +#define STATUS_ACCESS_DISABLED_BY_POLICY_OTHER ((NTSTATUS)0xC0000364L) + +// +// MessageId: STATUS_FAILED_DRIVER_ENTRY +// +// MessageText: +// +// The driver was not loaded because it failed it's initialization call. +// +#define STATUS_FAILED_DRIVER_ENTRY ((NTSTATUS)0xC0000365L) + +// +// MessageId: STATUS_DEVICE_ENUMERATION_ERROR +// +// MessageText: +// +// The "%hs" encountered an error while applying power or reading the device configuration. This may be caused by a failure of your hardware or by a poor connection. +// +#define STATUS_DEVICE_ENUMERATION_ERROR ((NTSTATUS)0xC0000366L) + +// +// MessageId: STATUS_MOUNT_POINT_NOT_RESOLVED +// +// MessageText: +// +// The create operation failed because the name contained at least one mount point which resolves to a volume to which the specified device object is not attached. +// +#define STATUS_MOUNT_POINT_NOT_RESOLVED ((NTSTATUS)0xC0000368L) + +// +// MessageId: STATUS_INVALID_DEVICE_OBJECT_PARAMETER +// +// MessageText: +// +// The device object parameter is either not a valid device object or is not attached to the volume specified by the file name. +// +#define STATUS_INVALID_DEVICE_OBJECT_PARAMETER ((NTSTATUS)0xC0000369L) + +// +// MessageId: STATUS_MCA_OCCURED +// +// MessageText: +// +// A Machine Check Error has occurred. Please check the system eventlog for additional information. +// +#define STATUS_MCA_OCCURED ((NTSTATUS)0xC000036AL) + +// +// MessageId: STATUS_DRIVER_BLOCKED_CRITICAL +// +// MessageText: +// +// Driver %2 has been blocked from loading. +// +#define STATUS_DRIVER_BLOCKED_CRITICAL ((NTSTATUS)0xC000036BL) + +// +// MessageId: STATUS_DRIVER_BLOCKED +// +// MessageText: +// +// Driver %2 has been blocked from loading. +// +#define STATUS_DRIVER_BLOCKED ((NTSTATUS)0xC000036CL) + +// +// MessageId: STATUS_DRIVER_DATABASE_ERROR +// +// MessageText: +// +// There was error [%2] processing the driver database. +// +#define STATUS_DRIVER_DATABASE_ERROR ((NTSTATUS)0xC000036DL) + +// +// MessageId: STATUS_SYSTEM_HIVE_TOO_LARGE +// +// MessageText: +// +// System hive size has exceeded its limit. +// +#define STATUS_SYSTEM_HIVE_TOO_LARGE ((NTSTATUS)0xC000036EL) + +// +// MessageId: STATUS_INVALID_IMPORT_OF_NON_DLL +// +// MessageText: +// +// A dynamic link library (DLL) referenced a module that was neither a DLL nor the process's executable image. +// +#define STATUS_INVALID_IMPORT_OF_NON_DLL ((NTSTATUS)0xC000036FL) + +// +// MessageId: STATUS_DS_SHUTTING_DOWN +// +// MessageText: +// +// The Directory Service is shutting down. +// +#define STATUS_DS_SHUTTING_DOWN ((NTSTATUS)0x40000370L) + +// +// MessageId: STATUS_NO_SECRETS +// +// MessageText: +// +// The local account store does not contain secret material for the specified account. +// +#define STATUS_NO_SECRETS ((NTSTATUS)0xC0000371L) + +// +// MessageId: STATUS_ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY +// +// MessageText: +// +// Access to %1 has been restricted by your Administrator by policy rule %2. +// +#define STATUS_ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY ((NTSTATUS)0xC0000372L) + +// +// MessageId: STATUS_FAILED_STACK_SWITCH +// +// MessageText: +// +// The system was not able to allocate enough memory to perform a stack switch. +// +#define STATUS_FAILED_STACK_SWITCH ((NTSTATUS)0xC0000373L) + +// +// MessageId: STATUS_HEAP_CORRUPTION +// +// MessageText: +// +// A heap has been corrupted. +// +#define STATUS_HEAP_CORRUPTION ((NTSTATUS)0xC0000374L) + +// +// MessageId: STATUS_SMARTCARD_WRONG_PIN +// +// MessageText: +// +// An incorrect PIN was presented to the smart card +// +#define STATUS_SMARTCARD_WRONG_PIN ((NTSTATUS)0xC0000380L) + +// +// MessageId: STATUS_SMARTCARD_CARD_BLOCKED +// +// MessageText: +// +// The smart card is blocked +// +#define STATUS_SMARTCARD_CARD_BLOCKED ((NTSTATUS)0xC0000381L) + +// +// MessageId: STATUS_SMARTCARD_CARD_NOT_AUTHENTICATED +// +// MessageText: +// +// No PIN was presented to the smart card +// +#define STATUS_SMARTCARD_CARD_NOT_AUTHENTICATED ((NTSTATUS)0xC0000382L) + +// +// MessageId: STATUS_SMARTCARD_NO_CARD +// +// MessageText: +// +// No smart card available +// +#define STATUS_SMARTCARD_NO_CARD ((NTSTATUS)0xC0000383L) + +// +// MessageId: STATUS_SMARTCARD_NO_KEY_CONTAINER +// +// MessageText: +// +// The requested key container does not exist on the smart card +// +#define STATUS_SMARTCARD_NO_KEY_CONTAINER ((NTSTATUS)0xC0000384L) + +// +// MessageId: STATUS_SMARTCARD_NO_CERTIFICATE +// +// MessageText: +// +// The requested certificate does not exist on the smart card +// +#define STATUS_SMARTCARD_NO_CERTIFICATE ((NTSTATUS)0xC0000385L) + +// +// MessageId: STATUS_SMARTCARD_NO_KEYSET +// +// MessageText: +// +// The requested keyset does not exist +// +#define STATUS_SMARTCARD_NO_KEYSET ((NTSTATUS)0xC0000386L) + +// +// MessageId: STATUS_SMARTCARD_IO_ERROR +// +// MessageText: +// +// A communication error with the smart card has been detected. +// +#define STATUS_SMARTCARD_IO_ERROR ((NTSTATUS)0xC0000387L) + +// +// MessageId: STATUS_DOWNGRADE_DETECTED +// +// MessageText: +// +// The system detected a possible attempt to compromise security. Please ensure that you can contact the server that authenticated you. +// +#define STATUS_DOWNGRADE_DETECTED ((NTSTATUS)0xC0000388L) + +// +// MessageId: STATUS_SMARTCARD_CERT_REVOKED +// +// MessageText: +// +// The smartcard certificate used for authentication has been revoked. Please contact your system administrator. There may be additional information in the event log. +// +#define STATUS_SMARTCARD_CERT_REVOKED ((NTSTATUS)0xC0000389L) + +// +// MessageId: STATUS_ISSUING_CA_UNTRUSTED +// +// MessageText: +// +// An untrusted certificate authority was detected While processing the smartcard certificate used for authentication. Please contact your system administrator. +// +#define STATUS_ISSUING_CA_UNTRUSTED ((NTSTATUS)0xC000038AL) + +// +// MessageId: STATUS_REVOCATION_OFFLINE_C +// +// MessageText: +// +// The revocation status of the smartcard certificate used for authentication could not be determined. Please contact your system administrator. +// +#define STATUS_REVOCATION_OFFLINE_C ((NTSTATUS)0xC000038BL) + +// +// MessageId: STATUS_PKINIT_CLIENT_FAILURE +// +// MessageText: +// +// The smartcard certificate used for authentication was not trusted. Please contact your system administrator. +// +#define STATUS_PKINIT_CLIENT_FAILURE ((NTSTATUS)0xC000038CL) + +// +// MessageId: STATUS_SMARTCARD_CERT_EXPIRED +// +// MessageText: +// +// The smartcard certificate used for authentication has expired. Please +// contact your system administrator. +// +#define STATUS_SMARTCARD_CERT_EXPIRED ((NTSTATUS)0xC000038DL) + +// +// MessageId: STATUS_DRIVER_FAILED_PRIOR_UNLOAD +// +// MessageText: +// +// The driver could not be loaded because a previous version of the driver is still in memory. +// +#define STATUS_DRIVER_FAILED_PRIOR_UNLOAD ((NTSTATUS)0xC000038EL) + +// +// MessageId: STATUS_SMARTCARD_SILENT_CONTEXT +// +// MessageText: +// +// The smartcard provider could not perform the action since the context was acquired as silent. +// +#define STATUS_SMARTCARD_SILENT_CONTEXT ((NTSTATUS)0xC000038FL) + + /* MessageId up to 0x400 is reserved for smart cards */ +// +// MessageId: STATUS_PER_USER_TRUST_QUOTA_EXCEEDED +// +// MessageText: +// +// The current user's delegated trust creation quota has been exceeded. +// +#define STATUS_PER_USER_TRUST_QUOTA_EXCEEDED ((NTSTATUS)0xC0000401L) + +// +// MessageId: STATUS_ALL_USER_TRUST_QUOTA_EXCEEDED +// +// MessageText: +// +// The total delegated trust creation quota has been exceeded. +// +#define STATUS_ALL_USER_TRUST_QUOTA_EXCEEDED ((NTSTATUS)0xC0000402L) + +// +// MessageId: STATUS_USER_DELETE_TRUST_QUOTA_EXCEEDED +// +// MessageText: +// +// The current user's delegated trust deletion quota has been exceeded. +// +#define STATUS_USER_DELETE_TRUST_QUOTA_EXCEEDED ((NTSTATUS)0xC0000403L) + +// +// MessageId: STATUS_DS_NAME_NOT_UNIQUE +// +// MessageText: +// +// The requested name already exists as a unique identifier. +// +#define STATUS_DS_NAME_NOT_UNIQUE ((NTSTATUS)0xC0000404L) + +// +// MessageId: STATUS_DS_DUPLICATE_ID_FOUND +// +// MessageText: +// +// The requested object has a non-unique identifier and cannot be retrieved. +// +#define STATUS_DS_DUPLICATE_ID_FOUND ((NTSTATUS)0xC0000405L) + +// +// MessageId: STATUS_DS_GROUP_CONVERSION_ERROR +// +// MessageText: +// +// The group cannot be converted due to attribute restrictions on the requested group type. +// +#define STATUS_DS_GROUP_CONVERSION_ERROR ((NTSTATUS)0xC0000406L) + +// +// MessageId: STATUS_VOLSNAP_PREPARE_HIBERNATE +// +// MessageText: +// +// {Volume Shadow Copy Service} +// Please wait while the Volume Shadow Copy Service prepares volume %hs for hibernation. +// +#define STATUS_VOLSNAP_PREPARE_HIBERNATE ((NTSTATUS)0xC0000407L) + +// +// MessageId: STATUS_USER2USER_REQUIRED +// +// MessageText: +// +// Kerberos sub-protocol User2User is required. +// +#define STATUS_USER2USER_REQUIRED ((NTSTATUS)0xC0000408L) + +// +// MessageId: STATUS_STACK_BUFFER_OVERRUN +// +// MessageText: +// +// The system detected an overrun of a stack-based buffer in this application. This overrun could potentially allow a malicious user to gain control of this application. +// +#define STATUS_STACK_BUFFER_OVERRUN ((NTSTATUS)0xC0000409L) // winnt + +// +// MessageId: STATUS_NO_S4U_PROT_SUPPORT +// +// MessageText: +// +// The Kerberos subsystem encountered an error. A service for user protocol request was made against a domain controller which does not support service for user. +// +#define STATUS_NO_S4U_PROT_SUPPORT ((NTSTATUS)0xC000040AL) + +// +// MessageId: STATUS_CROSSREALM_DELEGATION_FAILURE +// +// MessageText: +// +// An attempt was made by this server to make a Kerberos constrained delegation request for a target outside of the server's realm. This is not supported, and indicates a misconfiguration on this server's allowed to delegate to list. Please contact your administrator. +// +#define STATUS_CROSSREALM_DELEGATION_FAILURE ((NTSTATUS)0xC000040BL) + +// +// MessageId: STATUS_REVOCATION_OFFLINE_KDC +// +// MessageText: +// +// The revocation status of the domain controller certificate used for smartcard authentication could not be determined. There is additional information in the system event log. Please contact your system administrator. +// +#define STATUS_REVOCATION_OFFLINE_KDC ((NTSTATUS)0xC000040CL) + +// +// MessageId: STATUS_ISSUING_CA_UNTRUSTED_KDC +// +// MessageText: +// +// An untrusted certificate authority was detected while processing the domain controller certificate used for authentication. There is additional information in the system event log. Please contact your system administrator. +// +#define STATUS_ISSUING_CA_UNTRUSTED_KDC ((NTSTATUS)0xC000040DL) + +// +// MessageId: STATUS_KDC_CERT_EXPIRED +// +// MessageText: +// +// The domain controller certificate used for smartcard logon has expired. Please contact your system administrator with the contents of your system event log. +// +#define STATUS_KDC_CERT_EXPIRED ((NTSTATUS)0xC000040EL) + +// +// MessageId: STATUS_KDC_CERT_REVOKED +// +// MessageText: +// +// The domain controller certificate used for smartcard logon has been revoked. Please contact your system administrator with the contents of your system event log. +// +#define STATUS_KDC_CERT_REVOKED ((NTSTATUS)0xC000040FL) + +// +// MessageId: STATUS_PARAMETER_QUOTA_EXCEEDED +// +// MessageText: +// +// Data present in one of the parameters is more than the function can operate on. +// +#define STATUS_PARAMETER_QUOTA_EXCEEDED ((NTSTATUS)0xC0000410L) + +// +// MessageId: STATUS_HIBERNATION_FAILURE +// +// MessageText: +// +// The system has failed to hibernate (The error code is %hs). Hibernation will be disabled until the system is restarted. +// +#define STATUS_HIBERNATION_FAILURE ((NTSTATUS)0xC0000411L) + +// +// MessageId: STATUS_DELAY_LOAD_FAILED +// +// MessageText: +// +// An attempt to delay-load a .dll or get a function address in a delay-loaded .dll failed. +// +#define STATUS_DELAY_LOAD_FAILED ((NTSTATUS)0xC0000412L) + +// +// MessageId: STATUS_AUTHENTICATION_FIREWALL_FAILED +// +// MessageText: +// +// Logon Failure: The machine you are logging onto is protected by an authentication firewall. The specified account is not allowed to authenticate to the machine. +// +#define STATUS_AUTHENTICATION_FIREWALL_FAILED ((NTSTATUS)0xC0000413L) + +// +// MessageId: STATUS_VDM_DISALLOWED +// +// MessageText: +// +// %hs is a 16-bit application. You do not have permissions to execute 16-bit applications. Check your permissions with your system administrator. +// +#define STATUS_VDM_DISALLOWED ((NTSTATUS)0xC0000414L) + +// +// MessageId: STATUS_HUNG_DISPLAY_DRIVER_THREAD +// +// MessageText: +// +// {Display Driver Stopped Responding} +// The %hs display driver has stopped working normally. Save your work and reboot the system to restore full display functionality. The next time you reboot the machine a dialog will be displayed giving you a chance to report this failure to Microsoft. +// +#define STATUS_HUNG_DISPLAY_DRIVER_THREAD ((NTSTATUS)0xC0000415L) + +// +// MessageId: STATUS_INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE +// +// MessageText: +// +// The Desktop heap encountered an error while allocating session memory. There is more information in the system event log. +// +#define STATUS_INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE ((NTSTATUS)0xC0000416L) + +// +// MessageId: STATUS_INVALID_CRUNTIME_PARAMETER +// +// MessageText: +// +// An invalid parameter was passed to a C runtime function. +// +#define STATUS_INVALID_CRUNTIME_PARAMETER ((NTSTATUS)0xC0000417L) // winnt + +// +// MessageId: STATUS_NTLM_BLOCKED +// +// MessageText: +// +// The authentication failed since NTLM was blocked. +// +#define STATUS_NTLM_BLOCKED ((NTSTATUS)0xC0000418L) + +// +// MessageId: STATUS_DS_SRC_SID_EXISTS_IN_FOREST +// +// MessageText: +// +// The source object's SID already exists in destination forest. +// +#define STATUS_DS_SRC_SID_EXISTS_IN_FOREST ((NTSTATUS)0xC0000419L) + +// +// MessageId: STATUS_DS_DOMAIN_NAME_EXISTS_IN_FOREST +// +// MessageText: +// +// The domain name of the trusted domain already exists in the forest. +// +#define STATUS_DS_DOMAIN_NAME_EXISTS_IN_FOREST ((NTSTATUS)0xC000041AL) + +// +// MessageId: STATUS_DS_FLAT_NAME_EXISTS_IN_FOREST +// +// MessageText: +// +// The flat name of the trusted domain already exists in the forest. +// +#define STATUS_DS_FLAT_NAME_EXISTS_IN_FOREST ((NTSTATUS)0xC000041BL) + +// +// MessageId: STATUS_INVALID_USER_PRINCIPAL_NAME +// +// MessageText: +// +// The User Principal Name (UPN) is invalid. +// +#define STATUS_INVALID_USER_PRINCIPAL_NAME ((NTSTATUS)0xC000041CL) + +// +// MessageId: STATUS_FATAL_USER_CALLBACK_EXCEPTION +// +// MessageText: +// +// An unhandled exception was encountered during a user callback. +// +#define STATUS_FATAL_USER_CALLBACK_EXCEPTION ((NTSTATUS)0xC000041DL) + +// +// MessageId: STATUS_ASSERTION_FAILURE +// +// MessageText: +// +// An assertion failure has occurred. +// +#define STATUS_ASSERTION_FAILURE ((NTSTATUS)0xC0000420L) // winnt + +// +// MessageId: STATUS_VERIFIER_STOP +// +// MessageText: +// +// Application verifier has found an error in the current process. +// +#define STATUS_VERIFIER_STOP ((NTSTATUS)0xC0000421L) + +// +// MessageId: STATUS_CALLBACK_POP_STACK +// +// MessageText: +// +// An exception has occurred in a user mode callback and the kernel callback frame should be removed. +// +#define STATUS_CALLBACK_POP_STACK ((NTSTATUS)0xC0000423L) + +// +// MessageId: STATUS_INCOMPATIBLE_DRIVER_BLOCKED +// +// MessageText: +// +// %2 has been blocked from loading due to incompatibility with this system. Please contact your software vendor for a compatible version of the driver. +// +#define STATUS_INCOMPATIBLE_DRIVER_BLOCKED ((NTSTATUS)0xC0000424L) + +// +// MessageId: STATUS_HIVE_UNLOADED +// +// MessageText: +// +// Illegal operation attempted on a registry key which has already been unloaded. +// +#define STATUS_HIVE_UNLOADED ((NTSTATUS)0xC0000425L) + +// +// MessageId: STATUS_COMPRESSION_DISABLED +// +// MessageText: +// +// Compression is disabled for this volume. +// +#define STATUS_COMPRESSION_DISABLED ((NTSTATUS)0xC0000426L) + +// +// MessageId: STATUS_FILE_SYSTEM_LIMITATION +// +// MessageText: +// +// The requested operation could not be completed due to a file system limitation +// +#define STATUS_FILE_SYSTEM_LIMITATION ((NTSTATUS)0xC0000427L) + +// +// MessageId: STATUS_INVALID_IMAGE_HASH +// +// MessageText: +// +// Windows cannot verify the digital signature for this file. A recent hardware or software change might have installed a file that is signed incorrectly or damaged, or that might be malicious software from an unknown source. +// +#define STATUS_INVALID_IMAGE_HASH ((NTSTATUS)0xC0000428L) + +// +// MessageId: STATUS_NOT_CAPABLE +// +// MessageText: +// +// The implementation is not capable of performing the request. +// +#define STATUS_NOT_CAPABLE ((NTSTATUS)0xC0000429L) + +// +// MessageId: STATUS_REQUEST_OUT_OF_SEQUENCE +// +// MessageText: +// +// The requested operation is out of order with respect to other operations. +// +#define STATUS_REQUEST_OUT_OF_SEQUENCE ((NTSTATUS)0xC000042AL) + +// +// MessageId: STATUS_IMPLEMENTATION_LIMIT +// +// MessageText: +// +// An operation attempted to exceed an implementation-defined limit. +// +#define STATUS_IMPLEMENTATION_LIMIT ((NTSTATUS)0xC000042BL) + +// +// MessageId: STATUS_ELEVATION_REQUIRED +// +// MessageText: +// +// The requested operation requires elevation. +// +#define STATUS_ELEVATION_REQUIRED ((NTSTATUS)0xC000042CL) + +// +// MessageId: STATUS_NO_SECURITY_CONTEXT +// +// MessageText: +// +// The required security context does not exist. +// +#define STATUS_NO_SECURITY_CONTEXT ((NTSTATUS)0xC000042DL) + +// +// MessageId 0x042E is reserved and used in isolation lib as +// +// MessageId=0x042E Facility=System Severity=ERROR SymbolicName=STATUS_VERSION_PARSE_ERROR +// Language=English +// A version number could not be parsed. +// . +// +// MessageId: STATUS_PKU2U_CERT_FAILURE +// +// MessageText: +// +// The PKU2U protocol encountered an error while attempting to utilize the associated certificates. +// +#define STATUS_PKU2U_CERT_FAILURE ((NTSTATUS)0xC000042FL) + +// +// MessageId: STATUS_BEYOND_VDL +// +// MessageText: +// +// The operation was attempted beyond the valid data length of the file. +// +#define STATUS_BEYOND_VDL ((NTSTATUS)0xC0000432L) + +// +// MessageId: STATUS_ENCOUNTERED_WRITE_IN_PROGRESS +// +// MessageText: +// +// The attempted write operation encountered a write already in progress for some portion of the range. +// +#define STATUS_ENCOUNTERED_WRITE_IN_PROGRESS ((NTSTATUS)0xC0000433L) + +// +// MessageId: STATUS_PTE_CHANGED +// +// MessageText: +// +// The page fault mappings changed in the middle of processing a fault so the operation must be retried. +// +#define STATUS_PTE_CHANGED ((NTSTATUS)0xC0000434L) + +// +// MessageId: STATUS_PURGE_FAILED +// +// MessageText: +// +// The attempt to purge this file from memory failed to purge some or all the data from memory. +// +#define STATUS_PURGE_FAILED ((NTSTATUS)0xC0000435L) + +// +// MessageId: STATUS_CRED_REQUIRES_CONFIRMATION +// +// MessageText: +// +// The requested credential requires confirmation. +// +#define STATUS_CRED_REQUIRES_CONFIRMATION ((NTSTATUS)0xC0000440L) + +// +// MessageId: STATUS_CS_ENCRYPTION_INVALID_SERVER_RESPONSE +// +// MessageText: +// +// The remote server sent an invalid response for a file being opened with Client Side Encryption. +// +#define STATUS_CS_ENCRYPTION_INVALID_SERVER_RESPONSE ((NTSTATUS)0xC0000441L) + +// +// MessageId: STATUS_CS_ENCRYPTION_UNSUPPORTED_SERVER +// +// MessageText: +// +// Client Side Encryption is not supported by the remote server even though it claims to support it. +// +#define STATUS_CS_ENCRYPTION_UNSUPPORTED_SERVER ((NTSTATUS)0xC0000442L) + +// +// MessageId: STATUS_CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE +// +// MessageText: +// +// File is encrypted and should be opened in Client Side Encryption mode. +// +#define STATUS_CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE ((NTSTATUS)0xC0000443L) + +// +// MessageId: STATUS_CS_ENCRYPTION_NEW_ENCRYPTED_FILE +// +// MessageText: +// +// A new encrypted file is being created and a $EFS needs to be provided. +// +#define STATUS_CS_ENCRYPTION_NEW_ENCRYPTED_FILE ((NTSTATUS)0xC0000444L) + +// +// MessageId: STATUS_CS_ENCRYPTION_FILE_NOT_CSE +// +// MessageText: +// +// The SMB client requested a CSE FSCTL on a non-CSE file. +// +#define STATUS_CS_ENCRYPTION_FILE_NOT_CSE ((NTSTATUS)0xC0000445L) + +// +// MessageId: STATUS_INVALID_LABEL +// +// MessageText: +// +// Indicates a particular Security ID may not be assigned as the label of an object. +// +#define STATUS_INVALID_LABEL ((NTSTATUS)0xC0000446L) + +// +// MessageId: STATUS_DRIVER_PROCESS_TERMINATED +// +// MessageText: +// +// The process hosting the driver for this device has terminated. +// +#define STATUS_DRIVER_PROCESS_TERMINATED ((NTSTATUS)0xC0000450L) + +// +// MessageId: STATUS_AMBIGUOUS_SYSTEM_DEVICE +// +// MessageText: +// +// The requested system device cannot be identified due to multiple indistinguishable devices potentially matching the identification criteria. +// +#define STATUS_AMBIGUOUS_SYSTEM_DEVICE ((NTSTATUS)0xC0000451L) + +// +// MessageId: STATUS_SYSTEM_DEVICE_NOT_FOUND +// +// MessageText: +// +// The requested system device cannot be found. +// +#define STATUS_SYSTEM_DEVICE_NOT_FOUND ((NTSTATUS)0xC0000452L) + +// +// MessageId: STATUS_RESTART_BOOT_APPLICATION +// +// MessageText: +// +// This boot application must be restarted. +// +#define STATUS_RESTART_BOOT_APPLICATION ((NTSTATUS)0xC0000453L) + +// +// MessageId: STATUS_INSUFFICIENT_NVRAM_RESOURCES +// +// MessageText: +// +// Insufficient NVRAM resources exist to complete the API. A reboot might be required. +// +#define STATUS_INSUFFICIENT_NVRAM_RESOURCES ((NTSTATUS)0xC0000454L) + +// +// MessageId: STATUS_INVALID_TASK_NAME +// +// MessageText: +// +// The specified task name is invalid. +// +#define STATUS_INVALID_TASK_NAME ((NTSTATUS)0xC0000500L) + +// +// MessageId: STATUS_INVALID_TASK_INDEX +// +// MessageText: +// +// The specified task index is invalid. +// +#define STATUS_INVALID_TASK_INDEX ((NTSTATUS)0xC0000501L) + +// +// MessageId: STATUS_THREAD_ALREADY_IN_TASK +// +// MessageText: +// +// The specified thread is already joining a task. +// +#define STATUS_THREAD_ALREADY_IN_TASK ((NTSTATUS)0xC0000502L) + +// +// MessageId: STATUS_CALLBACK_BYPASS +// +// MessageText: +// +// A callback has requested to bypass native code. +// +#define STATUS_CALLBACK_BYPASS ((NTSTATUS)0xC0000503L) + +// +// MessageId: STATUS_FAIL_FAST_EXCEPTION +// +// MessageText: +// +// {Fail Fast Exception} +// A fail fast exception occurred. Exception handlers will not be invoked and the process will be terminated immediately. +// +#define STATUS_FAIL_FAST_EXCEPTION ((NTSTATUS)0xC0000602L) + +// +// MessageId: STATUS_IMAGE_CERT_REVOKED +// +// MessageText: +// +// Windows cannot verify the digital signature for this file. The signing certificate for this file has been revoked. +// +#define STATUS_IMAGE_CERT_REVOKED ((NTSTATUS)0xC0000603L) + +// +// MessageId: STATUS_PORT_CLOSED +// +// MessageText: +// +// The ALPC port is closed. +// +#define STATUS_PORT_CLOSED ((NTSTATUS)0xC0000700L) + +// +// MessageId: STATUS_MESSAGE_LOST +// +// MessageText: +// +// The ALPC message requested is no longer available. +// +#define STATUS_MESSAGE_LOST ((NTSTATUS)0xC0000701L) + +// +// MessageId: STATUS_INVALID_MESSAGE +// +// MessageText: +// +// The ALPC message supplied is invalid. +// +#define STATUS_INVALID_MESSAGE ((NTSTATUS)0xC0000702L) + +// +// MessageId: STATUS_REQUEST_CANCELED +// +// MessageText: +// +// The ALPC message has been canceled. +// +#define STATUS_REQUEST_CANCELED ((NTSTATUS)0xC0000703L) + +// +// MessageId: STATUS_RECURSIVE_DISPATCH +// +// MessageText: +// +// Invalid recursive dispatch attempt. +// +#define STATUS_RECURSIVE_DISPATCH ((NTSTATUS)0xC0000704L) + +// +// MessageId: STATUS_LPC_RECEIVE_BUFFER_EXPECTED +// +// MessageText: +// +// No receive buffer has been supplied in a synchrounus request. +// +#define STATUS_LPC_RECEIVE_BUFFER_EXPECTED ((NTSTATUS)0xC0000705L) + +// +// MessageId: STATUS_LPC_INVALID_CONNECTION_USAGE +// +// MessageText: +// +// The connection port is used in an invalid context. +// +#define STATUS_LPC_INVALID_CONNECTION_USAGE ((NTSTATUS)0xC0000706L) + +// +// MessageId: STATUS_LPC_REQUESTS_NOT_ALLOWED +// +// MessageText: +// +// The ALPC port does not accept new request messages. +// +#define STATUS_LPC_REQUESTS_NOT_ALLOWED ((NTSTATUS)0xC0000707L) + +// +// MessageId: STATUS_RESOURCE_IN_USE +// +// MessageText: +// +// The resource requested is already in use. +// +#define STATUS_RESOURCE_IN_USE ((NTSTATUS)0xC0000708L) + +// +// MessageId: STATUS_HARDWARE_MEMORY_ERROR +// +// MessageText: +// +// The hardware has reported an uncorrectable memory error. +// +#define STATUS_HARDWARE_MEMORY_ERROR ((NTSTATUS)0xC0000709L) + +// +// MessageId: STATUS_THREADPOOL_HANDLE_EXCEPTION +// +// MessageText: +// +// Status 0x%08x was returned, waiting on handle 0x%x for wait 0x%p, in waiter 0x%p. +// +#define STATUS_THREADPOOL_HANDLE_EXCEPTION ((NTSTATUS)0xC000070AL) + +// +// MessageId: STATUS_THREADPOOL_SET_EVENT_ON_COMPLETION_FAILED +// +// MessageText: +// +// After a callback to 0x%p(0x%p), a completion call to SetEvent(0x%p) failed with status 0x%08x. +// +#define STATUS_THREADPOOL_SET_EVENT_ON_COMPLETION_FAILED ((NTSTATUS)0xC000070BL) + +// +// MessageId: STATUS_THREADPOOL_RELEASE_SEMAPHORE_ON_COMPLETION_FAILED +// +// MessageText: +// +// After a callback to 0x%p(0x%p), a completion call to ReleaseSemaphore(0x%p, %d) failed with status 0x%08x. +// +#define STATUS_THREADPOOL_RELEASE_SEMAPHORE_ON_COMPLETION_FAILED ((NTSTATUS)0xC000070CL) + +// +// MessageId: STATUS_THREADPOOL_RELEASE_MUTEX_ON_COMPLETION_FAILED +// +// MessageText: +// +// After a callback to 0x%p(0x%p), a completion call to ReleaseMutex(%p) failed with status 0x%08x. +// +#define STATUS_THREADPOOL_RELEASE_MUTEX_ON_COMPLETION_FAILED ((NTSTATUS)0xC000070DL) + +// +// MessageId: STATUS_THREADPOOL_FREE_LIBRARY_ON_COMPLETION_FAILED +// +// MessageText: +// +// After a callback to 0x%p(0x%p), an completion call to FreeLibrary(%p) failed with status 0x%08x. +// +#define STATUS_THREADPOOL_FREE_LIBRARY_ON_COMPLETION_FAILED ((NTSTATUS)0xC000070EL) + +// +// MessageId: STATUS_THREADPOOL_RELEASED_DURING_OPERATION +// +// MessageText: +// +// The threadpool 0x%p was released while a thread was posting a callback to 0x%p(0x%p) to it. +// +#define STATUS_THREADPOOL_RELEASED_DURING_OPERATION ((NTSTATUS)0xC000070FL) + +// +// MessageId: STATUS_CALLBACK_RETURNED_WHILE_IMPERSONATING +// +// MessageText: +// +// A threadpool worker thread is impersonating a client, after a callback to 0x%p(0x%p). +// This is unexpected, indicating that the callback is missing a call to revert the impersonation. +// +#define STATUS_CALLBACK_RETURNED_WHILE_IMPERSONATING ((NTSTATUS)0xC0000710L) + +// +// MessageId: STATUS_APC_RETURNED_WHILE_IMPERSONATING +// +// MessageText: +// +// A threadpool worker thread is impersonating a client, after executing an APC. +// This is unexpected, indicating that the APC is missing a call to revert the impersonation. +// +#define STATUS_APC_RETURNED_WHILE_IMPERSONATING ((NTSTATUS)0xC0000711L) + +// +// MessageId: STATUS_PROCESS_IS_PROTECTED +// +// MessageText: +// +// Either the target process, or the target thread's containing process, is a protected process. +// +#define STATUS_PROCESS_IS_PROTECTED ((NTSTATUS)0xC0000712L) + +// +// MessageId: STATUS_MCA_EXCEPTION +// +// MessageText: +// +// A Thread is getting dispatched with MCA EXCEPTION because of MCA. +// +#define STATUS_MCA_EXCEPTION ((NTSTATUS)0xC0000713L) + +// +// MessageId: STATUS_CERTIFICATE_MAPPING_NOT_UNIQUE +// +// MessageText: +// +// The client certificate account mapping is not unique. +// +#define STATUS_CERTIFICATE_MAPPING_NOT_UNIQUE ((NTSTATUS)0xC0000714L) + +// +// MessageId: STATUS_SYMLINK_CLASS_DISABLED +// +// MessageText: +// +// The symbolic link cannot be followed because its type is disabled. +// +#define STATUS_SYMLINK_CLASS_DISABLED ((NTSTATUS)0xC0000715L) + +// +// MessageId: STATUS_INVALID_IDN_NORMALIZATION +// +// MessageText: +// +// Indicates that the specified string is not valid for IDN normalization. +// +#define STATUS_INVALID_IDN_NORMALIZATION ((NTSTATUS)0xC0000716L) + +// +// MessageId: STATUS_NO_UNICODE_TRANSLATION +// +// MessageText: +// +// No mapping for the Unicode character exists in the target multi-byte code page. +// +#define STATUS_NO_UNICODE_TRANSLATION ((NTSTATUS)0xC0000717L) + +// +// MessageId: STATUS_ALREADY_REGISTERED +// +// MessageText: +// +// The provided callback is already registered. +// +#define STATUS_ALREADY_REGISTERED ((NTSTATUS)0xC0000718L) + +// +// MessageId: STATUS_CONTEXT_MISMATCH +// +// MessageText: +// +// The provided context did not match the target. +// +#define STATUS_CONTEXT_MISMATCH ((NTSTATUS)0xC0000719L) + +// +// MessageId: STATUS_PORT_ALREADY_HAS_COMPLETION_LIST +// +// MessageText: +// +// The specified port already has a completion list. +// +#define STATUS_PORT_ALREADY_HAS_COMPLETION_LIST ((NTSTATUS)0xC000071AL) + +// +// MessageId: STATUS_CALLBACK_RETURNED_THREAD_PRIORITY +// +// MessageText: +// +// A threadpool worker thread enter a callback at thread base priority 0x%x and exited at priority 0x%x. +// This is unexpected, indicating that the callback missed restoring the priority. +// +#define STATUS_CALLBACK_RETURNED_THREAD_PRIORITY ((NTSTATUS)0xC000071BL) + +// +// MessageId: STATUS_INVALID_THREAD +// +// MessageText: +// +// An invalid thread, handle %p, is specified for this operation. Possibly, a threadpool worker thread was specified. +// +#define STATUS_INVALID_THREAD ((NTSTATUS)0xC000071CL) + +// +// MessageId: STATUS_CALLBACK_RETURNED_TRANSACTION +// +// MessageText: +// +// A threadpool worker thread enter a callback, which left transaction state. +// This is unexpected, indicating that the callback missed clearing the transaction. +// +#define STATUS_CALLBACK_RETURNED_TRANSACTION ((NTSTATUS)0xC000071DL) + +// +// MessageId: STATUS_CALLBACK_RETURNED_LDR_LOCK +// +// MessageText: +// +// A threadpool worker thread enter a callback, which left the loader lock held. +// This is unexpected, indicating that the callback missed releasing the lock. +// +#define STATUS_CALLBACK_RETURNED_LDR_LOCK ((NTSTATUS)0xC000071EL) + +// +// MessageId: STATUS_CALLBACK_RETURNED_LANG +// +// MessageText: +// +// A threadpool worker thread enter a callback, which left with preferred languages set. +// This is unexpected, indicating that the callback missed clearing them. +// +#define STATUS_CALLBACK_RETURNED_LANG ((NTSTATUS)0xC000071FL) + +// +// MessageId: STATUS_CALLBACK_RETURNED_PRI_BACK +// +// MessageText: +// +// A threadpool worker thread enter a callback, which left with background priorities set. +// This is unexpected, indicating that the callback missed restoring the original priorities. +// +#define STATUS_CALLBACK_RETURNED_PRI_BACK ((NTSTATUS)0xC0000720L) + +// +// MessageId: STATUS_CALLBACK_RETURNED_THREAD_AFFINITY +// +// MessageText: +// +// A threadpool worker thread enter a callback at thread affinity %p and exited at affinity %p. +// This is unexpected, indicating that the callback missed restoring the priority. +// +#define STATUS_CALLBACK_RETURNED_THREAD_AFFINITY ((NTSTATUS)0xC0000721L) + +// +// MessageId: STATUS_DISK_REPAIR_DISABLED +// +// MessageText: +// +// The attempted operation required self healing to be enabled. +// +#define STATUS_DISK_REPAIR_DISABLED ((NTSTATUS)0xC0000800L) + +// +// MessageId: STATUS_DS_DOMAIN_RENAME_IN_PROGRESS +// +// MessageText: +// +// The Directory Service cannot perform the requested operation because a domain rename operation is in progress. +// +#define STATUS_DS_DOMAIN_RENAME_IN_PROGRESS ((NTSTATUS)0xC0000801L) + +// +// MessageId: STATUS_DISK_QUOTA_EXCEEDED +// +// MessageText: +// +// The requested file operation failed because the storage quota was exceeded. +// To free up disk space, move files to a different location or delete unnecessary files. For more information, contact your system administrator. +// +#define STATUS_DISK_QUOTA_EXCEEDED ((NTSTATUS)0xC0000802L) + +// +// MessageId: STATUS_DATA_LOST_REPAIR +// +// MessageText: +// +// Windows discovered a corruption in the file "%hs". +// This file has now been repaired. +// Please check if any data in the file was lost because of the corruption. +// +#define STATUS_DATA_LOST_REPAIR ((NTSTATUS)0x80000803L) + +// +// MessageId: STATUS_CONTENT_BLOCKED +// +// MessageText: +// +// The requested file operation failed because the storage policy blocks that type of file. For more information, contact your system administrator. +// +#define STATUS_CONTENT_BLOCKED ((NTSTATUS)0xC0000804L) + +// +// MessageId: STATUS_BAD_CLUSTERS +// +// MessageText: +// +// The operation could not be completed due to bad clusters on disk. +// +#define STATUS_BAD_CLUSTERS ((NTSTATUS)0xC0000805L) + +// +// MessageId: STATUS_VOLUME_DIRTY +// +// MessageText: +// +// The operation could not be completed because the volume is dirty. Please run chkdsk and try again. +// +#define STATUS_VOLUME_DIRTY ((NTSTATUS)0xC0000806L) + +// +// MessageId: STATUS_FILE_CHECKED_OUT +// +// MessageText: +// +// This file is checked out or locked for editing by another user. +// +#define STATUS_FILE_CHECKED_OUT ((NTSTATUS)0xC0000901L) + +// +// MessageId: STATUS_CHECKOUT_REQUIRED +// +// MessageText: +// +// The file must be checked out before saving changes. +// +#define STATUS_CHECKOUT_REQUIRED ((NTSTATUS)0xC0000902L) + +// +// MessageId: STATUS_BAD_FILE_TYPE +// +// MessageText: +// +// The file type being saved or retrieved has been blocked. +// +#define STATUS_BAD_FILE_TYPE ((NTSTATUS)0xC0000903L) + +// +// MessageId: STATUS_FILE_TOO_LARGE +// +// MessageText: +// +// The file size exceeds the limit allowed and cannot be saved. +// +#define STATUS_FILE_TOO_LARGE ((NTSTATUS)0xC0000904L) + +// +// MessageId: STATUS_FORMS_AUTH_REQUIRED +// +// MessageText: +// +// Access Denied. Before opening files in this location, you must first browse to the web site and select the option to login automatically. +// +#define STATUS_FORMS_AUTH_REQUIRED ((NTSTATUS)0xC0000905L) + +// +// MessageId: STATUS_VIRUS_INFECTED +// +// MessageText: +// +// Operation did not complete successfully because the file contains a virus. +// +#define STATUS_VIRUS_INFECTED ((NTSTATUS)0xC0000906L) + +// +// MessageId: STATUS_VIRUS_DELETED +// +// MessageText: +// +// This file contains a virus and cannot be opened. Due to the nature of this virus, the file has been removed from this location. +// +#define STATUS_VIRUS_DELETED ((NTSTATUS)0xC0000907L) + +// +// MessageId: STATUS_BAD_MCFG_TABLE +// +// MessageText: +// +// The resources required for this device conflict with the MCFG table. +// +#define STATUS_BAD_MCFG_TABLE ((NTSTATUS)0xC0000908L) + +// +// MessageId: STATUS_CANNOT_BREAK_OPLOCK +// +// MessageText: +// +// The operation did not complete successfully because it would cause an oplock to be broken. The caller has requested that existing oplocks not be broken. +// +#define STATUS_CANNOT_BREAK_OPLOCK ((NTSTATUS)0xC0000909L) + +// +// MessageId: STATUS_WOW_ASSERTION +// +// MessageText: +// +// WOW Assertion Error. +// +#define STATUS_WOW_ASSERTION ((NTSTATUS)0xC0009898L) + +// +// MessageId: STATUS_INVALID_SIGNATURE +// +// MessageText: +// +// The cryptographic signature is invalid. +// +#define STATUS_INVALID_SIGNATURE ((NTSTATUS)0xC000A000L) + +// +// MessageId: STATUS_HMAC_NOT_SUPPORTED +// +// MessageText: +// +// The cryptographic provider does not support HMAC. +// +#define STATUS_HMAC_NOT_SUPPORTED ((NTSTATUS)0xC000A001L) + +// +// MessageId: STATUS_AUTH_TAG_MISMATCH +// +// MessageText: +// +// The computed authentication tag did not match the input authentication tag. +// +#define STATUS_AUTH_TAG_MISMATCH ((NTSTATUS)0xC000A002L) + +/*++ + + MessageId's 0xa010 - 0xa07f (inclusive) are reserved for TCPIP errors. + +--*/ +// +// MessageId: STATUS_IPSEC_QUEUE_OVERFLOW +// +// MessageText: +// +// The IPSEC queue overflowed. +// +#define STATUS_IPSEC_QUEUE_OVERFLOW ((NTSTATUS)0xC000A010L) + +// +// MessageId: STATUS_ND_QUEUE_OVERFLOW +// +// MessageText: +// +// The neighbor discovery queue overflowed. +// +#define STATUS_ND_QUEUE_OVERFLOW ((NTSTATUS)0xC000A011L) + +// +// MessageId: STATUS_HOPLIMIT_EXCEEDED +// +// MessageText: +// +// An ICMP hop limit exceeded error was received. +// +#define STATUS_HOPLIMIT_EXCEEDED ((NTSTATUS)0xC000A012L) + +// +// MessageId: STATUS_PROTOCOL_NOT_SUPPORTED +// +// MessageText: +// +// The protocol is not installed on the local machine. +// +#define STATUS_PROTOCOL_NOT_SUPPORTED ((NTSTATUS)0xC000A013L) + +// +// MessageId: STATUS_FASTPATH_REJECTED +// +// MessageText: +// +// An operation or data has been rejected while on the network fast path. +// +#define STATUS_FASTPATH_REJECTED ((NTSTATUS)0xC000A014L) + +/*++ + + MessageId's 0xa014 - 0xa07f (inclusive) are reserved for TCPIP errors. + +--*/ +// +// MessageId: STATUS_LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED +// +// MessageText: +// +// {Delayed Write Failed} +// Windows was unable to save all the data for the file %hs; the data has been lost. +// This error may be caused by network connectivity issues. Please try to save this file elsewhere. +// +#define STATUS_LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED ((NTSTATUS)0xC000A080L) + +// +// MessageId: STATUS_LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR +// +// MessageText: +// +// {Delayed Write Failed} +// Windows was unable to save all the data for the file %hs; the data has been lost. +// This error was returned by the server on which the file exists. Please try to save this file elsewhere. +// +#define STATUS_LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR ((NTSTATUS)0xC000A081L) + +// +// MessageId: STATUS_LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR +// +// MessageText: +// +// {Delayed Write Failed} +// Windows was unable to save all the data for the file %hs; the data has been lost. +// This error may be caused if the device has been removed or the media is write-protected. +// +#define STATUS_LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR ((NTSTATUS)0xC000A082L) + +// +// MessageId: STATUS_XML_PARSE_ERROR +// +// MessageText: +// +// Windows was unable to parse the requested XML data. +// +#define STATUS_XML_PARSE_ERROR ((NTSTATUS)0xC000A083L) + +// +// MessageId: STATUS_XMLDSIG_ERROR +// +// MessageText: +// +// An error was encountered while processing an XML digital signature. +// +#define STATUS_XMLDSIG_ERROR ((NTSTATUS)0xC000A084L) + +// +// MessageId: STATUS_WRONG_COMPARTMENT +// +// MessageText: +// +// Indicates that the caller made the connection request in the wrong routing compartment. +// +#define STATUS_WRONG_COMPARTMENT ((NTSTATUS)0xC000A085L) + +// +// MessageId: STATUS_AUTHIP_FAILURE +// +// MessageText: +// +// Indicates that there was an AuthIP failure when attempting to connect to the remote host. +// +#define STATUS_AUTHIP_FAILURE ((NTSTATUS)0xC000A086L) + +// +// MessageId: STATUS_DS_OID_MAPPED_GROUP_CANT_HAVE_MEMBERS +// +// MessageText: +// +// OID mapped groups cannot have members. +// +#define STATUS_DS_OID_MAPPED_GROUP_CANT_HAVE_MEMBERS ((NTSTATUS)0xC000A087L) + +// +// MessageId: STATUS_DS_OID_NOT_FOUND +// +// MessageText: +// +// The specified OID cannot be found. +// +#define STATUS_DS_OID_NOT_FOUND ((NTSTATUS)0xC000A088L) + +/*++ + + MessageId's 0xa100 - 0xa120 (inclusive) are for the SMB Hash Generation Service. + +--*/ +// +// MessageId: STATUS_HASH_NOT_SUPPORTED +// +// MessageText: +// +// Hash generation for the specified version and hash type is not enabled on server. +// +#define STATUS_HASH_NOT_SUPPORTED ((NTSTATUS)0xC000A100L) + +// +// MessageId: STATUS_HASH_NOT_PRESENT +// +// MessageText: +// +// The hash requests is not present or not up to date with the current file contents. +// +#define STATUS_HASH_NOT_PRESENT ((NTSTATUS)0xC000A101L) + + +// +// Debugger error values +// + +// +// MessageId: DBG_NO_STATE_CHANGE +// +// MessageText: +// +// Debugger did not perform a state change. +// +#define DBG_NO_STATE_CHANGE ((NTSTATUS)0xC0010001L) + +// +// MessageId: DBG_APP_NOT_IDLE +// +// MessageText: +// +// Debugger has found the application is not idle. +// +#define DBG_APP_NOT_IDLE ((NTSTATUS)0xC0010002L) + + +// +// RPC error values +// + +// +// MessageId: RPC_NT_INVALID_STRING_BINDING +// +// MessageText: +// +// The string binding is invalid. +// +#define RPC_NT_INVALID_STRING_BINDING ((NTSTATUS)0xC0020001L) + +// +// MessageId: RPC_NT_WRONG_KIND_OF_BINDING +// +// MessageText: +// +// The binding handle is not the correct type. +// +#define RPC_NT_WRONG_KIND_OF_BINDING ((NTSTATUS)0xC0020002L) + +// +// MessageId: RPC_NT_INVALID_BINDING +// +// MessageText: +// +// The binding handle is invalid. +// +#define RPC_NT_INVALID_BINDING ((NTSTATUS)0xC0020003L) + +// +// MessageId: RPC_NT_PROTSEQ_NOT_SUPPORTED +// +// MessageText: +// +// The RPC protocol sequence is not supported. +// +#define RPC_NT_PROTSEQ_NOT_SUPPORTED ((NTSTATUS)0xC0020004L) + +// +// MessageId: RPC_NT_INVALID_RPC_PROTSEQ +// +// MessageText: +// +// The RPC protocol sequence is invalid. +// +#define RPC_NT_INVALID_RPC_PROTSEQ ((NTSTATUS)0xC0020005L) + +// +// MessageId: RPC_NT_INVALID_STRING_UUID +// +// MessageText: +// +// The string UUID is invalid. +// +#define RPC_NT_INVALID_STRING_UUID ((NTSTATUS)0xC0020006L) + +// +// MessageId: RPC_NT_INVALID_ENDPOINT_FORMAT +// +// MessageText: +// +// The endpoint format is invalid. +// +#define RPC_NT_INVALID_ENDPOINT_FORMAT ((NTSTATUS)0xC0020007L) + +// +// MessageId: RPC_NT_INVALID_NET_ADDR +// +// MessageText: +// +// The network address is invalid. +// +#define RPC_NT_INVALID_NET_ADDR ((NTSTATUS)0xC0020008L) + +// +// MessageId: RPC_NT_NO_ENDPOINT_FOUND +// +// MessageText: +// +// No endpoint was found. +// +#define RPC_NT_NO_ENDPOINT_FOUND ((NTSTATUS)0xC0020009L) + +// +// MessageId: RPC_NT_INVALID_TIMEOUT +// +// MessageText: +// +// The timeout value is invalid. +// +#define RPC_NT_INVALID_TIMEOUT ((NTSTATUS)0xC002000AL) + +// +// MessageId: RPC_NT_OBJECT_NOT_FOUND +// +// MessageText: +// +// The object UUID was not found. +// +#define RPC_NT_OBJECT_NOT_FOUND ((NTSTATUS)0xC002000BL) + +// +// MessageId: RPC_NT_ALREADY_REGISTERED +// +// MessageText: +// +// The object UUID has already been registered. +// +#define RPC_NT_ALREADY_REGISTERED ((NTSTATUS)0xC002000CL) + +// +// MessageId: RPC_NT_TYPE_ALREADY_REGISTERED +// +// MessageText: +// +// The type UUID has already been registered. +// +#define RPC_NT_TYPE_ALREADY_REGISTERED ((NTSTATUS)0xC002000DL) + +// +// MessageId: RPC_NT_ALREADY_LISTENING +// +// MessageText: +// +// The RPC server is already listening. +// +#define RPC_NT_ALREADY_LISTENING ((NTSTATUS)0xC002000EL) + +// +// MessageId: RPC_NT_NO_PROTSEQS_REGISTERED +// +// MessageText: +// +// No protocol sequences have been registered. +// +#define RPC_NT_NO_PROTSEQS_REGISTERED ((NTSTATUS)0xC002000FL) + +// +// MessageId: RPC_NT_NOT_LISTENING +// +// MessageText: +// +// The RPC server is not listening. +// +#define RPC_NT_NOT_LISTENING ((NTSTATUS)0xC0020010L) + +// +// MessageId: RPC_NT_UNKNOWN_MGR_TYPE +// +// MessageText: +// +// The manager type is unknown. +// +#define RPC_NT_UNKNOWN_MGR_TYPE ((NTSTATUS)0xC0020011L) + +// +// MessageId: RPC_NT_UNKNOWN_IF +// +// MessageText: +// +// The interface is unknown. +// +#define RPC_NT_UNKNOWN_IF ((NTSTATUS)0xC0020012L) + +// +// MessageId: RPC_NT_NO_BINDINGS +// +// MessageText: +// +// There are no bindings. +// +#define RPC_NT_NO_BINDINGS ((NTSTATUS)0xC0020013L) + +// +// MessageId: RPC_NT_NO_PROTSEQS +// +// MessageText: +// +// There are no protocol sequences. +// +#define RPC_NT_NO_PROTSEQS ((NTSTATUS)0xC0020014L) + +// +// MessageId: RPC_NT_CANT_CREATE_ENDPOINT +// +// MessageText: +// +// The endpoint cannot be created. +// +#define RPC_NT_CANT_CREATE_ENDPOINT ((NTSTATUS)0xC0020015L) + +// +// MessageId: RPC_NT_OUT_OF_RESOURCES +// +// MessageText: +// +// Not enough resources are available to complete this operation. +// +#define RPC_NT_OUT_OF_RESOURCES ((NTSTATUS)0xC0020016L) + +// +// MessageId: RPC_NT_SERVER_UNAVAILABLE +// +// MessageText: +// +// The RPC server is unavailable. +// +#define RPC_NT_SERVER_UNAVAILABLE ((NTSTATUS)0xC0020017L) + +// +// MessageId: RPC_NT_SERVER_TOO_BUSY +// +// MessageText: +// +// The RPC server is too busy to complete this operation. +// +#define RPC_NT_SERVER_TOO_BUSY ((NTSTATUS)0xC0020018L) + +// +// MessageId: RPC_NT_INVALID_NETWORK_OPTIONS +// +// MessageText: +// +// The network options are invalid. +// +#define RPC_NT_INVALID_NETWORK_OPTIONS ((NTSTATUS)0xC0020019L) + +// +// MessageId: RPC_NT_NO_CALL_ACTIVE +// +// MessageText: +// +// There are no remote procedure calls active on this thread. +// +#define RPC_NT_NO_CALL_ACTIVE ((NTSTATUS)0xC002001AL) + +// +// MessageId: RPC_NT_CALL_FAILED +// +// MessageText: +// +// The remote procedure call failed. +// +#define RPC_NT_CALL_FAILED ((NTSTATUS)0xC002001BL) + +// +// MessageId: RPC_NT_CALL_FAILED_DNE +// +// MessageText: +// +// The remote procedure call failed and did not execute. +// +#define RPC_NT_CALL_FAILED_DNE ((NTSTATUS)0xC002001CL) + +// +// MessageId: RPC_NT_PROTOCOL_ERROR +// +// MessageText: +// +// An RPC protocol error occurred. +// +#define RPC_NT_PROTOCOL_ERROR ((NTSTATUS)0xC002001DL) + +// +// MessageId: RPC_NT_UNSUPPORTED_TRANS_SYN +// +// MessageText: +// +// The transfer syntax is not supported by the RPC server. +// +#define RPC_NT_UNSUPPORTED_TRANS_SYN ((NTSTATUS)0xC002001FL) + +// +// MessageId: RPC_NT_UNSUPPORTED_TYPE +// +// MessageText: +// +// The type UUID is not supported. +// +#define RPC_NT_UNSUPPORTED_TYPE ((NTSTATUS)0xC0020021L) + +// +// MessageId: RPC_NT_INVALID_TAG +// +// MessageText: +// +// The tag is invalid. +// +#define RPC_NT_INVALID_TAG ((NTSTATUS)0xC0020022L) + +// +// MessageId: RPC_NT_INVALID_BOUND +// +// MessageText: +// +// The array bounds are invalid. +// +#define RPC_NT_INVALID_BOUND ((NTSTATUS)0xC0020023L) + +// +// MessageId: RPC_NT_NO_ENTRY_NAME +// +// MessageText: +// +// The binding does not contain an entry name. +// +#define RPC_NT_NO_ENTRY_NAME ((NTSTATUS)0xC0020024L) + +// +// MessageId: RPC_NT_INVALID_NAME_SYNTAX +// +// MessageText: +// +// The name syntax is invalid. +// +#define RPC_NT_INVALID_NAME_SYNTAX ((NTSTATUS)0xC0020025L) + +// +// MessageId: RPC_NT_UNSUPPORTED_NAME_SYNTAX +// +// MessageText: +// +// The name syntax is not supported. +// +#define RPC_NT_UNSUPPORTED_NAME_SYNTAX ((NTSTATUS)0xC0020026L) + +// +// MessageId: RPC_NT_UUID_NO_ADDRESS +// +// MessageText: +// +// No network address is available to use to construct a UUID. +// +#define RPC_NT_UUID_NO_ADDRESS ((NTSTATUS)0xC0020028L) + +// +// MessageId: RPC_NT_DUPLICATE_ENDPOINT +// +// MessageText: +// +// The endpoint is a duplicate. +// +#define RPC_NT_DUPLICATE_ENDPOINT ((NTSTATUS)0xC0020029L) + +// +// MessageId: RPC_NT_UNKNOWN_AUTHN_TYPE +// +// MessageText: +// +// The authentication type is unknown. +// +#define RPC_NT_UNKNOWN_AUTHN_TYPE ((NTSTATUS)0xC002002AL) + +// +// MessageId: RPC_NT_MAX_CALLS_TOO_SMALL +// +// MessageText: +// +// The maximum number of calls is too small. +// +#define RPC_NT_MAX_CALLS_TOO_SMALL ((NTSTATUS)0xC002002BL) + +// +// MessageId: RPC_NT_STRING_TOO_LONG +// +// MessageText: +// +// The string is too long. +// +#define RPC_NT_STRING_TOO_LONG ((NTSTATUS)0xC002002CL) + +// +// MessageId: RPC_NT_PROTSEQ_NOT_FOUND +// +// MessageText: +// +// The RPC protocol sequence was not found. +// +#define RPC_NT_PROTSEQ_NOT_FOUND ((NTSTATUS)0xC002002DL) + +// +// MessageId: RPC_NT_PROCNUM_OUT_OF_RANGE +// +// MessageText: +// +// The procedure number is out of range. +// +#define RPC_NT_PROCNUM_OUT_OF_RANGE ((NTSTATUS)0xC002002EL) + +// +// MessageId: RPC_NT_BINDING_HAS_NO_AUTH +// +// MessageText: +// +// The binding does not contain any authentication information. +// +#define RPC_NT_BINDING_HAS_NO_AUTH ((NTSTATUS)0xC002002FL) + +// +// MessageId: RPC_NT_UNKNOWN_AUTHN_SERVICE +// +// MessageText: +// +// The authentication service is unknown. +// +#define RPC_NT_UNKNOWN_AUTHN_SERVICE ((NTSTATUS)0xC0020030L) + +// +// MessageId: RPC_NT_UNKNOWN_AUTHN_LEVEL +// +// MessageText: +// +// The authentication level is unknown. +// +#define RPC_NT_UNKNOWN_AUTHN_LEVEL ((NTSTATUS)0xC0020031L) + +// +// MessageId: RPC_NT_INVALID_AUTH_IDENTITY +// +// MessageText: +// +// The security context is invalid. +// +#define RPC_NT_INVALID_AUTH_IDENTITY ((NTSTATUS)0xC0020032L) + +// +// MessageId: RPC_NT_UNKNOWN_AUTHZ_SERVICE +// +// MessageText: +// +// The authorization service is unknown. +// +#define RPC_NT_UNKNOWN_AUTHZ_SERVICE ((NTSTATUS)0xC0020033L) + +// +// MessageId: EPT_NT_INVALID_ENTRY +// +// MessageText: +// +// The entry is invalid. +// +#define EPT_NT_INVALID_ENTRY ((NTSTATUS)0xC0020034L) + +// +// MessageId: EPT_NT_CANT_PERFORM_OP +// +// MessageText: +// +// The operation cannot be performed. +// +#define EPT_NT_CANT_PERFORM_OP ((NTSTATUS)0xC0020035L) + +// +// MessageId: EPT_NT_NOT_REGISTERED +// +// MessageText: +// +// There are no more endpoints available from the endpoint mapper. +// +#define EPT_NT_NOT_REGISTERED ((NTSTATUS)0xC0020036L) + +// +// MessageId: RPC_NT_NOTHING_TO_EXPORT +// +// MessageText: +// +// No interfaces have been exported. +// +#define RPC_NT_NOTHING_TO_EXPORT ((NTSTATUS)0xC0020037L) + +// +// MessageId: RPC_NT_INCOMPLETE_NAME +// +// MessageText: +// +// The entry name is incomplete. +// +#define RPC_NT_INCOMPLETE_NAME ((NTSTATUS)0xC0020038L) + +// +// MessageId: RPC_NT_INVALID_VERS_OPTION +// +// MessageText: +// +// The version option is invalid. +// +#define RPC_NT_INVALID_VERS_OPTION ((NTSTATUS)0xC0020039L) + +// +// MessageId: RPC_NT_NO_MORE_MEMBERS +// +// MessageText: +// +// There are no more members. +// +#define RPC_NT_NO_MORE_MEMBERS ((NTSTATUS)0xC002003AL) + +// +// MessageId: RPC_NT_NOT_ALL_OBJS_UNEXPORTED +// +// MessageText: +// +// There is nothing to unexport. +// +#define RPC_NT_NOT_ALL_OBJS_UNEXPORTED ((NTSTATUS)0xC002003BL) + +// +// MessageId: RPC_NT_INTERFACE_NOT_FOUND +// +// MessageText: +// +// The interface was not found. +// +#define RPC_NT_INTERFACE_NOT_FOUND ((NTSTATUS)0xC002003CL) + +// +// MessageId: RPC_NT_ENTRY_ALREADY_EXISTS +// +// MessageText: +// +// The entry already exists. +// +#define RPC_NT_ENTRY_ALREADY_EXISTS ((NTSTATUS)0xC002003DL) + +// +// MessageId: RPC_NT_ENTRY_NOT_FOUND +// +// MessageText: +// +// The entry is not found. +// +#define RPC_NT_ENTRY_NOT_FOUND ((NTSTATUS)0xC002003EL) + +// +// MessageId: RPC_NT_NAME_SERVICE_UNAVAILABLE +// +// MessageText: +// +// The name service is unavailable. +// +#define RPC_NT_NAME_SERVICE_UNAVAILABLE ((NTSTATUS)0xC002003FL) + +// +// MessageId: RPC_NT_INVALID_NAF_ID +// +// MessageText: +// +// The network address family is invalid. +// +#define RPC_NT_INVALID_NAF_ID ((NTSTATUS)0xC0020040L) + +// +// MessageId: RPC_NT_CANNOT_SUPPORT +// +// MessageText: +// +// The requested operation is not supported. +// +#define RPC_NT_CANNOT_SUPPORT ((NTSTATUS)0xC0020041L) + +// +// MessageId: RPC_NT_NO_CONTEXT_AVAILABLE +// +// MessageText: +// +// No security context is available to allow impersonation. +// +#define RPC_NT_NO_CONTEXT_AVAILABLE ((NTSTATUS)0xC0020042L) + +// +// MessageId: RPC_NT_INTERNAL_ERROR +// +// MessageText: +// +// An internal error occurred in RPC. +// +#define RPC_NT_INTERNAL_ERROR ((NTSTATUS)0xC0020043L) + +// +// MessageId: RPC_NT_ZERO_DIVIDE +// +// MessageText: +// +// The RPC server attempted an integer divide by zero. +// +#define RPC_NT_ZERO_DIVIDE ((NTSTATUS)0xC0020044L) + +// +// MessageId: RPC_NT_ADDRESS_ERROR +// +// MessageText: +// +// An addressing error occurred in the RPC server. +// +#define RPC_NT_ADDRESS_ERROR ((NTSTATUS)0xC0020045L) + +// +// MessageId: RPC_NT_FP_DIV_ZERO +// +// MessageText: +// +// A floating point operation at the RPC server caused a divide by zero. +// +#define RPC_NT_FP_DIV_ZERO ((NTSTATUS)0xC0020046L) + +// +// MessageId: RPC_NT_FP_UNDERFLOW +// +// MessageText: +// +// A floating point underflow occurred at the RPC server. +// +#define RPC_NT_FP_UNDERFLOW ((NTSTATUS)0xC0020047L) + +// +// MessageId: RPC_NT_FP_OVERFLOW +// +// MessageText: +// +// A floating point overflow occurred at the RPC server. +// +#define RPC_NT_FP_OVERFLOW ((NTSTATUS)0xC0020048L) + +// +// MessageId: RPC_NT_NO_MORE_ENTRIES +// +// MessageText: +// +// The list of RPC servers available for auto-handle binding has been exhausted. +// +#define RPC_NT_NO_MORE_ENTRIES ((NTSTATUS)0xC0030001L) + +// +// MessageId: RPC_NT_SS_CHAR_TRANS_OPEN_FAIL +// +// MessageText: +// +// The file designated by DCERPCCHARTRANS cannot be opened. +// +#define RPC_NT_SS_CHAR_TRANS_OPEN_FAIL ((NTSTATUS)0xC0030002L) + +// +// MessageId: RPC_NT_SS_CHAR_TRANS_SHORT_FILE +// +// MessageText: +// +// The file containing the character translation table has fewer than 512 bytes. +// +#define RPC_NT_SS_CHAR_TRANS_SHORT_FILE ((NTSTATUS)0xC0030003L) + +// +// MessageId: RPC_NT_SS_IN_NULL_CONTEXT +// +// MessageText: +// +// A null context handle is passed as an [in] parameter. +// +#define RPC_NT_SS_IN_NULL_CONTEXT ((NTSTATUS)0xC0030004L) + +// +// MessageId: RPC_NT_SS_CONTEXT_MISMATCH +// +// MessageText: +// +// The context handle does not match any known context handles. +// +#define RPC_NT_SS_CONTEXT_MISMATCH ((NTSTATUS)0xC0030005L) + +// +// MessageId: RPC_NT_SS_CONTEXT_DAMAGED +// +// MessageText: +// +// The context handle changed during a call. +// +#define RPC_NT_SS_CONTEXT_DAMAGED ((NTSTATUS)0xC0030006L) + +// +// MessageId: RPC_NT_SS_HANDLES_MISMATCH +// +// MessageText: +// +// The binding handles passed to a remote procedure call do not match. +// +#define RPC_NT_SS_HANDLES_MISMATCH ((NTSTATUS)0xC0030007L) + +// +// MessageId: RPC_NT_SS_CANNOT_GET_CALL_HANDLE +// +// MessageText: +// +// The stub is unable to get the call handle. +// +#define RPC_NT_SS_CANNOT_GET_CALL_HANDLE ((NTSTATUS)0xC0030008L) + +// +// MessageId: RPC_NT_NULL_REF_POINTER +// +// MessageText: +// +// A null reference pointer was passed to the stub. +// +#define RPC_NT_NULL_REF_POINTER ((NTSTATUS)0xC0030009L) + +// +// MessageId: RPC_NT_ENUM_VALUE_OUT_OF_RANGE +// +// MessageText: +// +// The enumeration value is out of range. +// +#define RPC_NT_ENUM_VALUE_OUT_OF_RANGE ((NTSTATUS)0xC003000AL) + +// +// MessageId: RPC_NT_BYTE_COUNT_TOO_SMALL +// +// MessageText: +// +// The byte count is too small. +// +#define RPC_NT_BYTE_COUNT_TOO_SMALL ((NTSTATUS)0xC003000BL) + +// +// MessageId: RPC_NT_BAD_STUB_DATA +// +// MessageText: +// +// The stub received bad data. +// +#define RPC_NT_BAD_STUB_DATA ((NTSTATUS)0xC003000CL) + +// +// MessageId: RPC_NT_CALL_IN_PROGRESS +// +// MessageText: +// +// A remote procedure call is already in progress for this thread. +// +#define RPC_NT_CALL_IN_PROGRESS ((NTSTATUS)0xC0020049L) + +// +// MessageId: RPC_NT_NO_MORE_BINDINGS +// +// MessageText: +// +// There are no more bindings. +// +#define RPC_NT_NO_MORE_BINDINGS ((NTSTATUS)0xC002004AL) + +// +// MessageId: RPC_NT_GROUP_MEMBER_NOT_FOUND +// +// MessageText: +// +// The group member was not found. +// +#define RPC_NT_GROUP_MEMBER_NOT_FOUND ((NTSTATUS)0xC002004BL) + +// +// MessageId: EPT_NT_CANT_CREATE +// +// MessageText: +// +// The endpoint mapper database entry could not be created. +// +#define EPT_NT_CANT_CREATE ((NTSTATUS)0xC002004CL) + +// +// MessageId: RPC_NT_INVALID_OBJECT +// +// MessageText: +// +// The object UUID is the nil UUID. +// +#define RPC_NT_INVALID_OBJECT ((NTSTATUS)0xC002004DL) + +// +// MessageId: RPC_NT_NO_INTERFACES +// +// MessageText: +// +// No interfaces have been registered. +// +#define RPC_NT_NO_INTERFACES ((NTSTATUS)0xC002004FL) + +// +// MessageId: RPC_NT_CALL_CANCELLED +// +// MessageText: +// +// The remote procedure call was cancelled. +// +#define RPC_NT_CALL_CANCELLED ((NTSTATUS)0xC0020050L) + +// +// MessageId: RPC_NT_BINDING_INCOMPLETE +// +// MessageText: +// +// The binding handle does not contain all required information. +// +#define RPC_NT_BINDING_INCOMPLETE ((NTSTATUS)0xC0020051L) + +// +// MessageId: RPC_NT_COMM_FAILURE +// +// MessageText: +// +// A communications failure occurred during a remote procedure call. +// +#define RPC_NT_COMM_FAILURE ((NTSTATUS)0xC0020052L) + +// +// MessageId: RPC_NT_UNSUPPORTED_AUTHN_LEVEL +// +// MessageText: +// +// The requested authentication level is not supported. +// +#define RPC_NT_UNSUPPORTED_AUTHN_LEVEL ((NTSTATUS)0xC0020053L) + +// +// MessageId: RPC_NT_NO_PRINC_NAME +// +// MessageText: +// +// No principal name registered. +// +#define RPC_NT_NO_PRINC_NAME ((NTSTATUS)0xC0020054L) + +// +// MessageId: RPC_NT_NOT_RPC_ERROR +// +// MessageText: +// +// The error specified is not a valid Windows RPC error code. +// +#define RPC_NT_NOT_RPC_ERROR ((NTSTATUS)0xC0020055L) + +// +// MessageId: RPC_NT_UUID_LOCAL_ONLY +// +// MessageText: +// +// A UUID that is valid only on this computer has been allocated. +// +#define RPC_NT_UUID_LOCAL_ONLY ((NTSTATUS)0x40020056L) + +// +// MessageId: RPC_NT_SEC_PKG_ERROR +// +// MessageText: +// +// A security package specific error occurred. +// +#define RPC_NT_SEC_PKG_ERROR ((NTSTATUS)0xC0020057L) + +// +// MessageId: RPC_NT_NOT_CANCELLED +// +// MessageText: +// +// Thread is not cancelled. +// +#define RPC_NT_NOT_CANCELLED ((NTSTATUS)0xC0020058L) + +// +// MessageId: RPC_NT_INVALID_ES_ACTION +// +// MessageText: +// +// Invalid operation on the encoding/decoding handle. +// +#define RPC_NT_INVALID_ES_ACTION ((NTSTATUS)0xC0030059L) + +// +// MessageId: RPC_NT_WRONG_ES_VERSION +// +// MessageText: +// +// Incompatible version of the serializing package. +// +#define RPC_NT_WRONG_ES_VERSION ((NTSTATUS)0xC003005AL) + +// +// MessageId: RPC_NT_WRONG_STUB_VERSION +// +// MessageText: +// +// Incompatible version of the RPC stub. +// +#define RPC_NT_WRONG_STUB_VERSION ((NTSTATUS)0xC003005BL) + +// +// MessageId: RPC_NT_INVALID_PIPE_OBJECT +// +// MessageText: +// +// The RPC pipe object is invalid or corrupted. +// +#define RPC_NT_INVALID_PIPE_OBJECT ((NTSTATUS)0xC003005CL) + +// +// MessageId: RPC_NT_INVALID_PIPE_OPERATION +// +// MessageText: +// +// An invalid operation was attempted on an RPC pipe object. +// +#define RPC_NT_INVALID_PIPE_OPERATION ((NTSTATUS)0xC003005DL) + +// +// MessageId: RPC_NT_WRONG_PIPE_VERSION +// +// MessageText: +// +// Unsupported RPC pipe version. +// +#define RPC_NT_WRONG_PIPE_VERSION ((NTSTATUS)0xC003005EL) + +// +// MessageId: RPC_NT_PIPE_CLOSED +// +// MessageText: +// +// The RPC pipe object has already been closed. +// +#define RPC_NT_PIPE_CLOSED ((NTSTATUS)0xC003005FL) + +// +// MessageId: RPC_NT_PIPE_DISCIPLINE_ERROR +// +// MessageText: +// +// The RPC call completed before all pipes were processed. +// +#define RPC_NT_PIPE_DISCIPLINE_ERROR ((NTSTATUS)0xC0030060L) + +// +// MessageId: RPC_NT_PIPE_EMPTY +// +// MessageText: +// +// No more data is available from the RPC pipe. +// +#define RPC_NT_PIPE_EMPTY ((NTSTATUS)0xC0030061L) + +// +// MessageId: RPC_NT_INVALID_ASYNC_HANDLE +// +// MessageText: +// +// Invalid asynchronous remote procedure call handle. +// +#define RPC_NT_INVALID_ASYNC_HANDLE ((NTSTATUS)0xC0020062L) + +// +// MessageId: RPC_NT_INVALID_ASYNC_CALL +// +// MessageText: +// +// Invalid asynchronous RPC call handle for this operation. +// +#define RPC_NT_INVALID_ASYNC_CALL ((NTSTATUS)0xC0020063L) + +// +// MessageId: RPC_NT_PROXY_ACCESS_DENIED +// +// MessageText: +// +// Access to the HTTP proxy is denied. +// +#define RPC_NT_PROXY_ACCESS_DENIED ((NTSTATUS)0xC0020064L) + +// +// MessageId: RPC_NT_COOKIE_AUTH_FAILED +// +// MessageText: +// +// HTTP proxy server rejected the connection because the cookie authentication failed. +// +#define RPC_NT_COOKIE_AUTH_FAILED ((NTSTATUS)0xC0020065L) + +// +// MessageId: RPC_NT_SEND_INCOMPLETE +// +// MessageText: +// +// Some data remains to be sent in the request buffer. +// +#define RPC_NT_SEND_INCOMPLETE ((NTSTATUS)0x400200AFL) + + +// +// ACPI error values +// + +// +// MessageId: STATUS_ACPI_INVALID_OPCODE +// +// MessageText: +// +// An attempt was made to run an invalid AML opcode +// +#define STATUS_ACPI_INVALID_OPCODE ((NTSTATUS)0xC0140001L) + +// +// MessageId: STATUS_ACPI_STACK_OVERFLOW +// +// MessageText: +// +// The AML Interpreter Stack has overflowed +// +#define STATUS_ACPI_STACK_OVERFLOW ((NTSTATUS)0xC0140002L) + +// +// MessageId: STATUS_ACPI_ASSERT_FAILED +// +// MessageText: +// +// An inconsistent state has occurred +// +#define STATUS_ACPI_ASSERT_FAILED ((NTSTATUS)0xC0140003L) + +// +// MessageId: STATUS_ACPI_INVALID_INDEX +// +// MessageText: +// +// An attempt was made to access an array outside of its bounds +// +#define STATUS_ACPI_INVALID_INDEX ((NTSTATUS)0xC0140004L) + +// +// MessageId: STATUS_ACPI_INVALID_ARGUMENT +// +// MessageText: +// +// A required argument was not specified +// +#define STATUS_ACPI_INVALID_ARGUMENT ((NTSTATUS)0xC0140005L) + +// +// MessageId: STATUS_ACPI_FATAL +// +// MessageText: +// +// A fatal error has occurred +// +#define STATUS_ACPI_FATAL ((NTSTATUS)0xC0140006L) + +// +// MessageId: STATUS_ACPI_INVALID_SUPERNAME +// +// MessageText: +// +// An invalid SuperName was specified +// +#define STATUS_ACPI_INVALID_SUPERNAME ((NTSTATUS)0xC0140007L) + +// +// MessageId: STATUS_ACPI_INVALID_ARGTYPE +// +// MessageText: +// +// An argument with an incorrect type was specified +// +#define STATUS_ACPI_INVALID_ARGTYPE ((NTSTATUS)0xC0140008L) + +// +// MessageId: STATUS_ACPI_INVALID_OBJTYPE +// +// MessageText: +// +// An object with an incorrect type was specified +// +#define STATUS_ACPI_INVALID_OBJTYPE ((NTSTATUS)0xC0140009L) + +// +// MessageId: STATUS_ACPI_INVALID_TARGETTYPE +// +// MessageText: +// +// A target with an incorrect type was specified +// +#define STATUS_ACPI_INVALID_TARGETTYPE ((NTSTATUS)0xC014000AL) + +// +// MessageId: STATUS_ACPI_INCORRECT_ARGUMENT_COUNT +// +// MessageText: +// +// An incorrect number of arguments were specified +// +#define STATUS_ACPI_INCORRECT_ARGUMENT_COUNT ((NTSTATUS)0xC014000BL) + +// +// MessageId: STATUS_ACPI_ADDRESS_NOT_MAPPED +// +// MessageText: +// +// An address failed to translate +// +#define STATUS_ACPI_ADDRESS_NOT_MAPPED ((NTSTATUS)0xC014000CL) + +// +// MessageId: STATUS_ACPI_INVALID_EVENTTYPE +// +// MessageText: +// +// An incorrect event type was specified +// +#define STATUS_ACPI_INVALID_EVENTTYPE ((NTSTATUS)0xC014000DL) + +// +// MessageId: STATUS_ACPI_HANDLER_COLLISION +// +// MessageText: +// +// A handler for the target already exists +// +#define STATUS_ACPI_HANDLER_COLLISION ((NTSTATUS)0xC014000EL) + +// +// MessageId: STATUS_ACPI_INVALID_DATA +// +// MessageText: +// +// Invalid data for the target was specified +// +#define STATUS_ACPI_INVALID_DATA ((NTSTATUS)0xC014000FL) + +// +// MessageId: STATUS_ACPI_INVALID_REGION +// +// MessageText: +// +// An invalid region for the target was specified +// +#define STATUS_ACPI_INVALID_REGION ((NTSTATUS)0xC0140010L) + +// +// MessageId: STATUS_ACPI_INVALID_ACCESS_SIZE +// +// MessageText: +// +// An attempt was made to access a field outside of the defined range +// +#define STATUS_ACPI_INVALID_ACCESS_SIZE ((NTSTATUS)0xC0140011L) + +// +// MessageId: STATUS_ACPI_ACQUIRE_GLOBAL_LOCK +// +// MessageText: +// +// The Global system lock could not be acquired +// +#define STATUS_ACPI_ACQUIRE_GLOBAL_LOCK ((NTSTATUS)0xC0140012L) + +// +// MessageId: STATUS_ACPI_ALREADY_INITIALIZED +// +// MessageText: +// +// An attempt was made to reinitialize the ACPI subsystem +// +#define STATUS_ACPI_ALREADY_INITIALIZED ((NTSTATUS)0xC0140013L) + +// +// MessageId: STATUS_ACPI_NOT_INITIALIZED +// +// MessageText: +// +// The ACPI subsystem has not been initialized +// +#define STATUS_ACPI_NOT_INITIALIZED ((NTSTATUS)0xC0140014L) + +// +// MessageId: STATUS_ACPI_INVALID_MUTEX_LEVEL +// +// MessageText: +// +// An incorrect mutex was specified +// +#define STATUS_ACPI_INVALID_MUTEX_LEVEL ((NTSTATUS)0xC0140015L) + +// +// MessageId: STATUS_ACPI_MUTEX_NOT_OWNED +// +// MessageText: +// +// The mutex is not currently owned +// +#define STATUS_ACPI_MUTEX_NOT_OWNED ((NTSTATUS)0xC0140016L) + +// +// MessageId: STATUS_ACPI_MUTEX_NOT_OWNER +// +// MessageText: +// +// An attempt was made to access the mutex by a process that was not the owner +// +#define STATUS_ACPI_MUTEX_NOT_OWNER ((NTSTATUS)0xC0140017L) + +// +// MessageId: STATUS_ACPI_RS_ACCESS +// +// MessageText: +// +// An error occurred during an access to Region Space +// +#define STATUS_ACPI_RS_ACCESS ((NTSTATUS)0xC0140018L) + +// +// MessageId: STATUS_ACPI_INVALID_TABLE +// +// MessageText: +// +// An attempt was made to use an incorrect table +// +#define STATUS_ACPI_INVALID_TABLE ((NTSTATUS)0xC0140019L) + +// +// MessageId: STATUS_ACPI_REG_HANDLER_FAILED +// +// MessageText: +// +// The registration of an ACPI event failed +// +#define STATUS_ACPI_REG_HANDLER_FAILED ((NTSTATUS)0xC0140020L) + +// +// MessageId: STATUS_ACPI_POWER_REQUEST_FAILED +// +// MessageText: +// +// An ACPI Power Object failed to transition state +// +#define STATUS_ACPI_POWER_REQUEST_FAILED ((NTSTATUS)0xC0140021L) + +// +// Terminal Server specific Errors +// +// +// MessageId: STATUS_CTX_WINSTATION_NAME_INVALID +// +// MessageText: +// +// Session name %1 is invalid. +// +#define STATUS_CTX_WINSTATION_NAME_INVALID ((NTSTATUS)0xC00A0001L) + +// +// MessageId: STATUS_CTX_INVALID_PD +// +// MessageText: +// +// The protocol driver %1 is invalid. +// +#define STATUS_CTX_INVALID_PD ((NTSTATUS)0xC00A0002L) + +// +// MessageId: STATUS_CTX_PD_NOT_FOUND +// +// MessageText: +// +// The protocol driver %1 was not found in the system path. +// +#define STATUS_CTX_PD_NOT_FOUND ((NTSTATUS)0xC00A0003L) + +// +// MessageId: STATUS_CTX_CDM_CONNECT +// +// MessageText: +// +// The Client Drive Mapping Service Has Connected on Terminal Connection. +// +#define STATUS_CTX_CDM_CONNECT ((NTSTATUS)0x400A0004L) + +// +// MessageId: STATUS_CTX_CDM_DISCONNECT +// +// MessageText: +// +// The Client Drive Mapping Service Has Disconnected on Terminal Connection. +// +#define STATUS_CTX_CDM_DISCONNECT ((NTSTATUS)0x400A0005L) + +// +// MessageId: STATUS_CTX_CLOSE_PENDING +// +// MessageText: +// +// A close operation is pending on the Terminal Connection. +// +#define STATUS_CTX_CLOSE_PENDING ((NTSTATUS)0xC00A0006L) + +// +// MessageId: STATUS_CTX_NO_OUTBUF +// +// MessageText: +// +// There are no free output buffers available. +// +#define STATUS_CTX_NO_OUTBUF ((NTSTATUS)0xC00A0007L) + +// +// MessageId: STATUS_CTX_MODEM_INF_NOT_FOUND +// +// MessageText: +// +// The MODEM.INF file was not found. +// +#define STATUS_CTX_MODEM_INF_NOT_FOUND ((NTSTATUS)0xC00A0008L) + +// +// MessageId: STATUS_CTX_INVALID_MODEMNAME +// +// MessageText: +// +// The modem (%1) was not found in MODEM.INF. +// +#define STATUS_CTX_INVALID_MODEMNAME ((NTSTATUS)0xC00A0009L) + +// +// MessageId: STATUS_CTX_RESPONSE_ERROR +// +// MessageText: +// +// The modem did not accept the command sent to it. +// Verify the configured modem name matches the attached modem. +// +#define STATUS_CTX_RESPONSE_ERROR ((NTSTATUS)0xC00A000AL) + +// +// MessageId: STATUS_CTX_MODEM_RESPONSE_TIMEOUT +// +// MessageText: +// +// The modem did not respond to the command sent to it. +// Verify the modem is properly cabled and powered on. +// +#define STATUS_CTX_MODEM_RESPONSE_TIMEOUT ((NTSTATUS)0xC00A000BL) + +// +// MessageId: STATUS_CTX_MODEM_RESPONSE_NO_CARRIER +// +// MessageText: +// +// Carrier detect has failed or carrier has been dropped due to disconnect. +// +#define STATUS_CTX_MODEM_RESPONSE_NO_CARRIER ((NTSTATUS)0xC00A000CL) + +// +// MessageId: STATUS_CTX_MODEM_RESPONSE_NO_DIALTONE +// +// MessageText: +// +// Dial tone not detected within required time. +// Verify phone cable is properly attached and functional. +// +#define STATUS_CTX_MODEM_RESPONSE_NO_DIALTONE ((NTSTATUS)0xC00A000DL) + +// +// MessageId: STATUS_CTX_MODEM_RESPONSE_BUSY +// +// MessageText: +// +// Busy signal detected at remote site on callback. +// +#define STATUS_CTX_MODEM_RESPONSE_BUSY ((NTSTATUS)0xC00A000EL) + +// +// MessageId: STATUS_CTX_MODEM_RESPONSE_VOICE +// +// MessageText: +// +// Voice detected at remote site on callback. +// +#define STATUS_CTX_MODEM_RESPONSE_VOICE ((NTSTATUS)0xC00A000FL) + +// +// MessageId: STATUS_CTX_TD_ERROR +// +// MessageText: +// +// Transport driver error +// +#define STATUS_CTX_TD_ERROR ((NTSTATUS)0xC00A0010L) + +// +// MessageId: STATUS_CTX_LICENSE_CLIENT_INVALID +// +// MessageText: +// +// The client you are using is not licensed to use this system. Your logon request is denied. +// +#define STATUS_CTX_LICENSE_CLIENT_INVALID ((NTSTATUS)0xC00A0012L) + +// +// MessageId: STATUS_CTX_LICENSE_NOT_AVAILABLE +// +// MessageText: +// +// The system has reached its licensed logon limit. +// Please try again later. +// +#define STATUS_CTX_LICENSE_NOT_AVAILABLE ((NTSTATUS)0xC00A0013L) + +// +// MessageId: STATUS_CTX_LICENSE_EXPIRED +// +// MessageText: +// +// The system license has expired. Your logon request is denied. +// +#define STATUS_CTX_LICENSE_EXPIRED ((NTSTATUS)0xC00A0014L) + +// +// MessageId: STATUS_CTX_WINSTATION_NOT_FOUND +// +// MessageText: +// +// The specified session cannot be found. +// +#define STATUS_CTX_WINSTATION_NOT_FOUND ((NTSTATUS)0xC00A0015L) + +// +// MessageId: STATUS_CTX_WINSTATION_NAME_COLLISION +// +// MessageText: +// +// The specified session name is already in use. +// +#define STATUS_CTX_WINSTATION_NAME_COLLISION ((NTSTATUS)0xC00A0016L) + +// +// MessageId: STATUS_CTX_WINSTATION_BUSY +// +// MessageText: +// +// The task you are trying to do can't be completed because Remote Desktop Services is currently busy. Please try again in a few minutes. Other users should still be able to log on. +// +#define STATUS_CTX_WINSTATION_BUSY ((NTSTATUS)0xC00A0017L) + +// +// MessageId: STATUS_CTX_BAD_VIDEO_MODE +// +// MessageText: +// +// An attempt has been made to connect to a session whose video mode is not supported by the current client. +// +#define STATUS_CTX_BAD_VIDEO_MODE ((NTSTATUS)0xC00A0018L) + +// +// MessageId: STATUS_CTX_GRAPHICS_INVALID +// +// MessageText: +// +// The application attempted to enable DOS graphics mode. +// DOS graphics mode is not supported. +// +#define STATUS_CTX_GRAPHICS_INVALID ((NTSTATUS)0xC00A0022L) + +// +// MessageId: STATUS_CTX_NOT_CONSOLE +// +// MessageText: +// +// The requested operation can be performed only on the system console. +// This is most often the result of a driver or system DLL requiring direct console access. +// +#define STATUS_CTX_NOT_CONSOLE ((NTSTATUS)0xC00A0024L) + +// +// MessageId: STATUS_CTX_CLIENT_QUERY_TIMEOUT +// +// MessageText: +// +// The client failed to respond to the server connect message. +// +#define STATUS_CTX_CLIENT_QUERY_TIMEOUT ((NTSTATUS)0xC00A0026L) + +// +// MessageId: STATUS_CTX_CONSOLE_DISCONNECT +// +// MessageText: +// +// Disconnecting the console session is not supported. +// +#define STATUS_CTX_CONSOLE_DISCONNECT ((NTSTATUS)0xC00A0027L) + +// +// MessageId: STATUS_CTX_CONSOLE_CONNECT +// +// MessageText: +// +// Reconnecting a disconnected session to the console is not supported. +// +#define STATUS_CTX_CONSOLE_CONNECT ((NTSTATUS)0xC00A0028L) + +// +// MessageId: STATUS_CTX_SHADOW_DENIED +// +// MessageText: +// +// The request to control another session remotely was denied. +// +#define STATUS_CTX_SHADOW_DENIED ((NTSTATUS)0xC00A002AL) + +// +// MessageId: STATUS_CTX_WINSTATION_ACCESS_DENIED +// +// MessageText: +// +// A process has requested access to a session, but has not been granted those access rights. +// +#define STATUS_CTX_WINSTATION_ACCESS_DENIED ((NTSTATUS)0xC00A002BL) + +// +// MessageId: STATUS_CTX_INVALID_WD +// +// MessageText: +// +// The Terminal Connection driver %1 is invalid. +// +#define STATUS_CTX_INVALID_WD ((NTSTATUS)0xC00A002EL) + +// +// MessageId: STATUS_CTX_WD_NOT_FOUND +// +// MessageText: +// +// The Terminal Connection driver %1 was not found in the system path. +// +#define STATUS_CTX_WD_NOT_FOUND ((NTSTATUS)0xC00A002FL) + +// +// MessageId: STATUS_CTX_SHADOW_INVALID +// +// MessageText: +// +// The requested session cannot be controlled remotely. +// You cannot control your own session, a session that is trying to control your session, +// a session that has no user logged on, nor control other sessions from the console. +// +#define STATUS_CTX_SHADOW_INVALID ((NTSTATUS)0xC00A0030L) + +// +// MessageId: STATUS_CTX_SHADOW_DISABLED +// +// MessageText: +// +// The requested session is not configured to allow remote control. +// +#define STATUS_CTX_SHADOW_DISABLED ((NTSTATUS)0xC00A0031L) + +// +// MessageId: STATUS_RDP_PROTOCOL_ERROR +// +// MessageText: +// +// The RDP protocol component %2 detected an error in the protocol stream and has disconnected the client. +// +#define STATUS_RDP_PROTOCOL_ERROR ((NTSTATUS)0xC00A0032L) + +// +// MessageId: STATUS_CTX_CLIENT_LICENSE_NOT_SET +// +// MessageText: +// +// Your request to connect to this Terminal server has been rejected. +// Your Terminal Server Client license number has not been entered for this copy of the Terminal Client. +// Please call your system administrator for help in entering a valid, unique license number for this Terminal Server Client. +// Click OK to continue. +// +#define STATUS_CTX_CLIENT_LICENSE_NOT_SET ((NTSTATUS)0xC00A0033L) + +// +// MessageId: STATUS_CTX_CLIENT_LICENSE_IN_USE +// +// MessageText: +// +// Your request to connect to this Terminal server has been rejected. +// Your Terminal Server Client license number is currently being used by another user. +// Please call your system administrator to obtain a new copy of the Terminal Server Client with a valid, unique license number. +// Click OK to continue. +// +#define STATUS_CTX_CLIENT_LICENSE_IN_USE ((NTSTATUS)0xC00A0034L) + +// +// MessageId: STATUS_CTX_SHADOW_ENDED_BY_MODE_CHANGE +// +// MessageText: +// +// The remote control of the console was terminated because the display mode was changed. Changing the display mode in a remote control session is not supported. +// +#define STATUS_CTX_SHADOW_ENDED_BY_MODE_CHANGE ((NTSTATUS)0xC00A0035L) + +// +// MessageId: STATUS_CTX_SHADOW_NOT_RUNNING +// +// MessageText: +// +// Remote control could not be terminated because the specified session is not currently being remotely controlled. +// +#define STATUS_CTX_SHADOW_NOT_RUNNING ((NTSTATUS)0xC00A0036L) + +// +// MessageId: STATUS_CTX_LOGON_DISABLED +// +// MessageText: +// +// Your interactive logon privilege has been disabled. +// Please contact your system administrator. +// +#define STATUS_CTX_LOGON_DISABLED ((NTSTATUS)0xC00A0037L) + +// +// MessageId: STATUS_CTX_SECURITY_LAYER_ERROR +// +// MessageText: +// +// The Terminal Server security layer detected an error in the protocol stream and has disconnected the client. +// Client IP: %2. +// +#define STATUS_CTX_SECURITY_LAYER_ERROR ((NTSTATUS)0xC00A0038L) + +// +// MessageId: STATUS_TS_INCOMPATIBLE_SESSIONS +// +// MessageText: +// +// The target session is incompatible with the current session. +// +#define STATUS_TS_INCOMPATIBLE_SESSIONS ((NTSTATUS)0xC00A0039L) + +// +// MessageId: STATUS_TS_VIDEO_SUBSYSTEM_ERROR +// +// MessageText: +// +// Windows can't connect to your session because a problem occurred in the Windows video subsystem. Try connecting again later, or contact the server administrator for assistance. +// +#define STATUS_TS_VIDEO_SUBSYSTEM_ERROR ((NTSTATUS)0xC00A003AL) + + +// +// IO error values +// + +// +// MessageId: STATUS_PNP_BAD_MPS_TABLE +// +// MessageText: +// +// A device is missing in the system BIOS MPS table. This device will not be used. +// Please contact your system vendor for system BIOS update. +// +#define STATUS_PNP_BAD_MPS_TABLE ((NTSTATUS)0xC0040035L) + +// +// MessageId: STATUS_PNP_TRANSLATION_FAILED +// +// MessageText: +// +// A translator failed to translate resources. +// +#define STATUS_PNP_TRANSLATION_FAILED ((NTSTATUS)0xC0040036L) + +// +// MessageId: STATUS_PNP_IRQ_TRANSLATION_FAILED +// +// MessageText: +// +// A IRQ translator failed to translate resources. +// +#define STATUS_PNP_IRQ_TRANSLATION_FAILED ((NTSTATUS)0xC0040037L) + +// +// MessageId: STATUS_PNP_INVALID_ID +// +// MessageText: +// +// Driver %2 returned invalid ID for a child device (%3). +// +#define STATUS_PNP_INVALID_ID ((NTSTATUS)0xC0040038L) + +// +// MessageId: STATUS_IO_REISSUE_AS_CACHED +// +// MessageText: +// +// Reissue the given operation as a cached IO operation +// +#define STATUS_IO_REISSUE_AS_CACHED ((NTSTATUS)0xC0040039L) + + +// +// MUI error values +// + +// +// MessageId: STATUS_MUI_FILE_NOT_FOUND +// +// MessageText: +// +// The resource loader failed to find MUI file. +// +#define STATUS_MUI_FILE_NOT_FOUND ((NTSTATUS)0xC00B0001L) + +// +// MessageId: STATUS_MUI_INVALID_FILE +// +// MessageText: +// +// The resource loader failed to load MUI file because the file fail to pass validation. +// +#define STATUS_MUI_INVALID_FILE ((NTSTATUS)0xC00B0002L) + +// +// MessageId: STATUS_MUI_INVALID_RC_CONFIG +// +// MessageText: +// +// The RC Manifest is corrupted with garbage data or unsupported version or missing required item. +// +#define STATUS_MUI_INVALID_RC_CONFIG ((NTSTATUS)0xC00B0003L) + +// +// MessageId: STATUS_MUI_INVALID_LOCALE_NAME +// +// MessageText: +// +// The RC Manifest has invalid culture name. +// +#define STATUS_MUI_INVALID_LOCALE_NAME ((NTSTATUS)0xC00B0004L) + +// +// MessageId: STATUS_MUI_INVALID_ULTIMATEFALLBACK_NAME +// +// MessageText: +// +// The RC Manifest has invalid ultimatefallback name. +// +#define STATUS_MUI_INVALID_ULTIMATEFALLBACK_NAME ((NTSTATUS)0xC00B0005L) + +// +// MessageId: STATUS_MUI_FILE_NOT_LOADED +// +// MessageText: +// +// The resource loader cache doesn't have loaded MUI entry. +// +#define STATUS_MUI_FILE_NOT_LOADED ((NTSTATUS)0xC00B0006L) + +// +// MessageId: STATUS_RESOURCE_ENUM_USER_STOP +// +// MessageText: +// +// User stopped resource enumeration. +// +#define STATUS_RESOURCE_ENUM_USER_STOP ((NTSTATUS)0xC00B0007L) + + +// +// Filter Manager error values +// + +// +// Translation macro for converting: +// HRESULT --> NTSTATUS +// + +#define FILTER_FLT_NTSTATUS_FROM_HRESULT(x) ((NTSTATUS) (((x) & 0xC0007FFF) | (FACILITY_FILTER_MANAGER << 16) | 0x40000000)) + +// +// MessageId: STATUS_FLT_NO_HANDLER_DEFINED +// +// MessageText: +// +// A handler was not defined by the filter for this operation. +// +#define STATUS_FLT_NO_HANDLER_DEFINED ((NTSTATUS)0xC01C0001L) + +// +// MessageId: STATUS_FLT_CONTEXT_ALREADY_DEFINED +// +// MessageText: +// +// A context is already defined for this object. +// +#define STATUS_FLT_CONTEXT_ALREADY_DEFINED ((NTSTATUS)0xC01C0002L) + +// +// MessageId: STATUS_FLT_INVALID_ASYNCHRONOUS_REQUEST +// +// MessageText: +// +// Asynchronous requests are not valid for this operation. +// +#define STATUS_FLT_INVALID_ASYNCHRONOUS_REQUEST ((NTSTATUS)0xC01C0003L) + +// +// MessageId: STATUS_FLT_DISALLOW_FAST_IO +// +// MessageText: +// +// Internal error code used by the filter manager to determine if a fastio operation should be forced down the IRP path. Mini-filters should never return this value. +// +#define STATUS_FLT_DISALLOW_FAST_IO ((NTSTATUS)0xC01C0004L) + +// +// MessageId: STATUS_FLT_INVALID_NAME_REQUEST +// +// MessageText: +// +// An invalid name request was made. The name requested cannot be retrieved at this time. +// +#define STATUS_FLT_INVALID_NAME_REQUEST ((NTSTATUS)0xC01C0005L) + +// +// MessageId: STATUS_FLT_NOT_SAFE_TO_POST_OPERATION +// +// MessageText: +// +// Posting this operation to a worker thread for further processing is not safe at this time because it could lead to a system deadlock. +// +#define STATUS_FLT_NOT_SAFE_TO_POST_OPERATION ((NTSTATUS)0xC01C0006L) + +// +// MessageId: STATUS_FLT_NOT_INITIALIZED +// +// MessageText: +// +// The Filter Manager was not initialized when a filter tried to register. Make sure that the Filter Manager is getting loaded as a driver. +// +#define STATUS_FLT_NOT_INITIALIZED ((NTSTATUS)0xC01C0007L) + +// +// MessageId: STATUS_FLT_FILTER_NOT_READY +// +// MessageText: +// +// The filter is not ready for attachment to volumes because it has not finished initializing (FltStartFiltering has not been called). +// +#define STATUS_FLT_FILTER_NOT_READY ((NTSTATUS)0xC01C0008L) + +// +// MessageId: STATUS_FLT_POST_OPERATION_CLEANUP +// +// MessageText: +// +// The filter must cleanup any operation specific context at this time because it is being removed from the system before the operation is completed by the lower drivers. +// +#define STATUS_FLT_POST_OPERATION_CLEANUP ((NTSTATUS)0xC01C0009L) + +// +// MessageId: STATUS_FLT_INTERNAL_ERROR +// +// MessageText: +// +// The Filter Manager had an internal error from which it cannot recover, therefore the operation has been failed. This is usually the result of a filter returning an invalid value from a pre-operation callback. +// +#define STATUS_FLT_INTERNAL_ERROR ((NTSTATUS)0xC01C000AL) + +// +// MessageId: STATUS_FLT_DELETING_OBJECT +// +// MessageText: +// +// The object specified for this action is in the process of being deleted, therefore the action requested cannot be completed at this time. +// +#define STATUS_FLT_DELETING_OBJECT ((NTSTATUS)0xC01C000BL) + +// +// MessageId: STATUS_FLT_MUST_BE_NONPAGED_POOL +// +// MessageText: +// +// Non-paged pool must be used for this type of context. +// +#define STATUS_FLT_MUST_BE_NONPAGED_POOL ((NTSTATUS)0xC01C000CL) + +// +// MessageId: STATUS_FLT_DUPLICATE_ENTRY +// +// MessageText: +// +// A duplicate handler definition has been provided for an operation. +// +#define STATUS_FLT_DUPLICATE_ENTRY ((NTSTATUS)0xC01C000DL) + +// +// MessageId: STATUS_FLT_CBDQ_DISABLED +// +// MessageText: +// +// The callback data queue has been disabled. +// +#define STATUS_FLT_CBDQ_DISABLED ((NTSTATUS)0xC01C000EL) + +// +// MessageId: STATUS_FLT_DO_NOT_ATTACH +// +// MessageText: +// +// Do not attach the filter to the volume at this time. +// +#define STATUS_FLT_DO_NOT_ATTACH ((NTSTATUS)0xC01C000FL) + +// +// MessageId: STATUS_FLT_DO_NOT_DETACH +// +// MessageText: +// +// Do not detach the filter from the volume at this time. +// +#define STATUS_FLT_DO_NOT_DETACH ((NTSTATUS)0xC01C0010L) + +// +// MessageId: STATUS_FLT_INSTANCE_ALTITUDE_COLLISION +// +// MessageText: +// +// An instance already exists at this altitude on the volume specified. +// +#define STATUS_FLT_INSTANCE_ALTITUDE_COLLISION ((NTSTATUS)0xC01C0011L) + +// +// MessageId: STATUS_FLT_INSTANCE_NAME_COLLISION +// +// MessageText: +// +// An instance already exists with this name on the volume specified. +// +#define STATUS_FLT_INSTANCE_NAME_COLLISION ((NTSTATUS)0xC01C0012L) + +// +// MessageId: STATUS_FLT_FILTER_NOT_FOUND +// +// MessageText: +// +// The system could not find the filter specified. +// +#define STATUS_FLT_FILTER_NOT_FOUND ((NTSTATUS)0xC01C0013L) + +// +// MessageId: STATUS_FLT_VOLUME_NOT_FOUND +// +// MessageText: +// +// The system could not find the volume specified. +// +#define STATUS_FLT_VOLUME_NOT_FOUND ((NTSTATUS)0xC01C0014L) + +// +// MessageId: STATUS_FLT_INSTANCE_NOT_FOUND +// +// MessageText: +// +// The system could not find the instance specified. +// +#define STATUS_FLT_INSTANCE_NOT_FOUND ((NTSTATUS)0xC01C0015L) + +// +// MessageId: STATUS_FLT_CONTEXT_ALLOCATION_NOT_FOUND +// +// MessageText: +// +// No registered context allocation definition was found for the given request. +// +#define STATUS_FLT_CONTEXT_ALLOCATION_NOT_FOUND ((NTSTATUS)0xC01C0016L) + +// +// MessageId: STATUS_FLT_INVALID_CONTEXT_REGISTRATION +// +// MessageText: +// +// An invalid parameter was specified during context registration. +// +#define STATUS_FLT_INVALID_CONTEXT_REGISTRATION ((NTSTATUS)0xC01C0017L) + +// +// MessageId: STATUS_FLT_NAME_CACHE_MISS +// +// MessageText: +// +// The name requested was not found in Filter Manager's name cache and could not be retrieved from the file system. +// +#define STATUS_FLT_NAME_CACHE_MISS ((NTSTATUS)0xC01C0018L) + +// +// MessageId: STATUS_FLT_NO_DEVICE_OBJECT +// +// MessageText: +// +// The requested device object does not exist for the given volume. +// +#define STATUS_FLT_NO_DEVICE_OBJECT ((NTSTATUS)0xC01C0019L) + +// +// MessageId: STATUS_FLT_VOLUME_ALREADY_MOUNTED +// +// MessageText: +// +// The specified volume is already mounted. +// +#define STATUS_FLT_VOLUME_ALREADY_MOUNTED ((NTSTATUS)0xC01C001AL) + +// +// MessageId: STATUS_FLT_ALREADY_ENLISTED +// +// MessageText: +// +// The specified Transaction Context is already enlisted in a transaction +// +#define STATUS_FLT_ALREADY_ENLISTED ((NTSTATUS)0xC01C001BL) + +// +// MessageId: STATUS_FLT_CONTEXT_ALREADY_LINKED +// +// MessageText: +// +// The specifiec context is already attached to another object +// +#define STATUS_FLT_CONTEXT_ALREADY_LINKED ((NTSTATUS)0xC01C001CL) + +// +// MessageId: STATUS_FLT_NO_WAITER_FOR_REPLY +// +// MessageText: +// +// No waiter is present for the filter's reply to this message. +// +#define STATUS_FLT_NO_WAITER_FOR_REPLY ((NTSTATUS)0xC01C0020L) + + +// +// Side-by-side (SXS) error values +// + +// +// MessageId: STATUS_SXS_SECTION_NOT_FOUND +// +// MessageText: +// +// The requested section is not present in the activation context. +// +#define STATUS_SXS_SECTION_NOT_FOUND ((NTSTATUS)0xC0150001L) + +// +// MessageId: STATUS_SXS_CANT_GEN_ACTCTX +// +// MessageText: +// +// Windows was not able to process the application binding information. +// Please refer to your System Event Log for further information. +// +#define STATUS_SXS_CANT_GEN_ACTCTX ((NTSTATUS)0xC0150002L) + +// +// MessageId: STATUS_SXS_INVALID_ACTCTXDATA_FORMAT +// +// MessageText: +// +// The application binding data format is invalid. +// +#define STATUS_SXS_INVALID_ACTCTXDATA_FORMAT ((NTSTATUS)0xC0150003L) + +// +// MessageId: STATUS_SXS_ASSEMBLY_NOT_FOUND +// +// MessageText: +// +// The referenced assembly is not installed on your system. +// +#define STATUS_SXS_ASSEMBLY_NOT_FOUND ((NTSTATUS)0xC0150004L) + +// +// MessageId: STATUS_SXS_MANIFEST_FORMAT_ERROR +// +// MessageText: +// +// The manifest file does not begin with the required tag and format information. +// +#define STATUS_SXS_MANIFEST_FORMAT_ERROR ((NTSTATUS)0xC0150005L) + +// +// MessageId: STATUS_SXS_MANIFEST_PARSE_ERROR +// +// MessageText: +// +// The manifest file contains one or more syntax errors. +// +#define STATUS_SXS_MANIFEST_PARSE_ERROR ((NTSTATUS)0xC0150006L) + +// +// MessageId: STATUS_SXS_ACTIVATION_CONTEXT_DISABLED +// +// MessageText: +// +// The application attempted to activate a disabled activation context. +// +#define STATUS_SXS_ACTIVATION_CONTEXT_DISABLED ((NTSTATUS)0xC0150007L) + +// +// MessageId: STATUS_SXS_KEY_NOT_FOUND +// +// MessageText: +// +// The requested lookup key was not found in any active activation context. +// +#define STATUS_SXS_KEY_NOT_FOUND ((NTSTATUS)0xC0150008L) + +// +// MessageId: STATUS_SXS_VERSION_CONFLICT +// +// MessageText: +// +// A component version required by the application conflicts with another component version already active. +// +#define STATUS_SXS_VERSION_CONFLICT ((NTSTATUS)0xC0150009L) + +// +// MessageId: STATUS_SXS_WRONG_SECTION_TYPE +// +// MessageText: +// +// The type requested activation context section does not match the query API used. +// +#define STATUS_SXS_WRONG_SECTION_TYPE ((NTSTATUS)0xC015000AL) + +// +// MessageId: STATUS_SXS_THREAD_QUERIES_DISABLED +// +// MessageText: +// +// Lack of system resources has required isolated activation to be disabled for the current thread of execution. +// +#define STATUS_SXS_THREAD_QUERIES_DISABLED ((NTSTATUS)0xC015000BL) + +// +// MessageId: STATUS_SXS_ASSEMBLY_MISSING +// +// MessageText: +// +// The referenced assembly could not be found. +// +#define STATUS_SXS_ASSEMBLY_MISSING ((NTSTATUS)0xC015000CL) + +// +// MessageId: STATUS_SXS_RELEASE_ACTIVATION_CONTEXT +// +// MessageText: +// +// A kernel mode component is releasing a reference on an activation context. +// +#define STATUS_SXS_RELEASE_ACTIVATION_CONTEXT ((NTSTATUS)0x4015000DL) + +// +// MessageId: STATUS_SXS_PROCESS_DEFAULT_ALREADY_SET +// +// MessageText: +// +// An attempt to set the process default activation context failed because the process default activation context was already set. +// +#define STATUS_SXS_PROCESS_DEFAULT_ALREADY_SET ((NTSTATUS)0xC015000EL) + +#if defined(STATUS_SUCCESS) || (_WIN32_WINNT > 0x0500) || (_WIN32_FUSION >= 0x0100) // winnt +// +// MessageId: STATUS_SXS_EARLY_DEACTIVATION +// +// MessageText: +// +// The activation context being deactivated is not the most recently activated one. +// +#define STATUS_SXS_EARLY_DEACTIVATION ((NTSTATUS)0xC015000FL) // winnt + +// +// MessageId: STATUS_SXS_INVALID_DEACTIVATION +// +// MessageText: +// +// The activation context being deactivated is not active for the current thread of execution. +// +#define STATUS_SXS_INVALID_DEACTIVATION ((NTSTATUS)0xC0150010L) // winnt + +#endif // winnt +// +// MessageId: STATUS_SXS_MULTIPLE_DEACTIVATION +// +// MessageText: +// +// The activation context being deactivated has already been deactivated. +// +#define STATUS_SXS_MULTIPLE_DEACTIVATION ((NTSTATUS)0xC0150011L) + +// +// MessageId: STATUS_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY +// +// MessageText: +// +// The activation context of system default assembly could not be generated. +// +#define STATUS_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY ((NTSTATUS)0xC0150012L) + +// +// MessageId: STATUS_SXS_PROCESS_TERMINATION_REQUESTED +// +// MessageText: +// +// A component used by the isolation facility has requested to terminate the process. +// +#define STATUS_SXS_PROCESS_TERMINATION_REQUESTED ((NTSTATUS)0xC0150013L) + +// +// MessageId: STATUS_SXS_CORRUPT_ACTIVATION_STACK +// +// MessageText: +// +// The activation context activation stack for the running thread of execution is corrupt. +// +#define STATUS_SXS_CORRUPT_ACTIVATION_STACK ((NTSTATUS)0xC0150014L) + +// +// MessageId: STATUS_SXS_CORRUPTION +// +// MessageText: +// +// The application isolation metadata for this process or thread has become corrupt. +// +#define STATUS_SXS_CORRUPTION ((NTSTATUS)0xC0150015L) + +// +// MessageId: STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE +// +// MessageText: +// +// The value of an attribute in an identity is not within the legal range. +// +#define STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE ((NTSTATUS)0xC0150016L) + +// +// MessageId: STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME +// +// MessageText: +// +// The name of an attribute in an identity is not within the legal range. +// +#define STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME ((NTSTATUS)0xC0150017L) + +// +// MessageId: STATUS_SXS_IDENTITY_DUPLICATE_ATTRIBUTE +// +// MessageText: +// +// An identity contains two definitions for the same attribute. +// +#define STATUS_SXS_IDENTITY_DUPLICATE_ATTRIBUTE ((NTSTATUS)0xC0150018L) + +// +// MessageId: STATUS_SXS_IDENTITY_PARSE_ERROR +// +// MessageText: +// +// The identity string is malformed. This may be due to a trailing comma, more than two unnamed attributes, missing attribute name or missing attribute value. +// +#define STATUS_SXS_IDENTITY_PARSE_ERROR ((NTSTATUS)0xC0150019L) + +// +// MessageId: STATUS_SXS_COMPONENT_STORE_CORRUPT +// +// MessageText: +// +// The component store has been corrupted. +// +#define STATUS_SXS_COMPONENT_STORE_CORRUPT ((NTSTATUS)0xC015001AL) + +// +// MessageId: STATUS_SXS_FILE_HASH_MISMATCH +// +// MessageText: +// +// A component's file does not match the verification information present in the component manifest. +// +#define STATUS_SXS_FILE_HASH_MISMATCH ((NTSTATUS)0xC015001BL) + +// +// MessageId: STATUS_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT +// +// MessageText: +// +// The identities of the manifests are identical but their contents are different. +// +#define STATUS_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT ((NTSTATUS)0xC015001CL) + +// +// MessageId: STATUS_SXS_IDENTITIES_DIFFERENT +// +// MessageText: +// +// The component identities are different. +// +#define STATUS_SXS_IDENTITIES_DIFFERENT ((NTSTATUS)0xC015001DL) + +// +// MessageId: STATUS_SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT +// +// MessageText: +// +// The assembly is not a deployment. +// +#define STATUS_SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT ((NTSTATUS)0xC015001EL) + +// +// MessageId: STATUS_SXS_FILE_NOT_PART_OF_ASSEMBLY +// +// MessageText: +// +// The file is not a part of the assembly. +// +#define STATUS_SXS_FILE_NOT_PART_OF_ASSEMBLY ((NTSTATUS)0xC015001FL) + +// +// MessageId: STATUS_ADVANCED_INSTALLER_FAILED +// +// MessageText: +// +// An advanced installer failed during setup or servicing. +// +#define STATUS_ADVANCED_INSTALLER_FAILED ((NTSTATUS)0xC0150020L) + +// +// MessageId: STATUS_XML_ENCODING_MISMATCH +// +// MessageText: +// +// The character encoding in the XML declaration did not match the encoding used in the document. +// +#define STATUS_XML_ENCODING_MISMATCH ((NTSTATUS)0xC0150021L) + +// +// MessageId: STATUS_SXS_MANIFEST_TOO_BIG +// +// MessageText: +// +// The size of the manifest exceeds the maximum allowed. +// +#define STATUS_SXS_MANIFEST_TOO_BIG ((NTSTATUS)0xC0150022L) + +// +// MessageId: STATUS_SXS_SETTING_NOT_REGISTERED +// +// MessageText: +// +// The setting is not registered. +// +#define STATUS_SXS_SETTING_NOT_REGISTERED ((NTSTATUS)0xC0150023L) + +// +// MessageId: STATUS_SXS_TRANSACTION_CLOSURE_INCOMPLETE +// +// MessageText: +// +// One or more required members of the transaction are not present. +// +#define STATUS_SXS_TRANSACTION_CLOSURE_INCOMPLETE ((NTSTATUS)0xC0150024L) + +// +// MessageId: STATUS_SMI_PRIMITIVE_INSTALLER_FAILED +// +// MessageText: +// +// The SMI primitive installer failed during setup or servicing. +// +#define STATUS_SMI_PRIMITIVE_INSTALLER_FAILED ((NTSTATUS)0xC0150025L) + +// +// MessageId: STATUS_GENERIC_COMMAND_FAILED +// +// MessageText: +// +// A generic command executable returned a result that indicates failure. +// +#define STATUS_GENERIC_COMMAND_FAILED ((NTSTATUS)0xC0150026L) + +// +// MessageId: STATUS_SXS_FILE_HASH_MISSING +// +// MessageText: +// +// A component is missing file verification information in its manifest. +// +#define STATUS_SXS_FILE_HASH_MISSING ((NTSTATUS)0xC0150027L) + + +// +// Cluster error values +// + +// +// MessageId: STATUS_CLUSTER_INVALID_NODE +// +// MessageText: +// +// The cluster node is not valid. +// +#define STATUS_CLUSTER_INVALID_NODE ((NTSTATUS)0xC0130001L) + +// +// MessageId: STATUS_CLUSTER_NODE_EXISTS +// +// MessageText: +// +// The cluster node already exists. +// +#define STATUS_CLUSTER_NODE_EXISTS ((NTSTATUS)0xC0130002L) + +// +// MessageId: STATUS_CLUSTER_JOIN_IN_PROGRESS +// +// MessageText: +// +// A node is in the process of joining the cluster. +// +#define STATUS_CLUSTER_JOIN_IN_PROGRESS ((NTSTATUS)0xC0130003L) + +// +// MessageId: STATUS_CLUSTER_NODE_NOT_FOUND +// +// MessageText: +// +// The cluster node was not found. +// +#define STATUS_CLUSTER_NODE_NOT_FOUND ((NTSTATUS)0xC0130004L) + +// +// MessageId: STATUS_CLUSTER_LOCAL_NODE_NOT_FOUND +// +// MessageText: +// +// The cluster local node information was not found. +// +#define STATUS_CLUSTER_LOCAL_NODE_NOT_FOUND ((NTSTATUS)0xC0130005L) + +// +// MessageId: STATUS_CLUSTER_NETWORK_EXISTS +// +// MessageText: +// +// The cluster network already exists. +// +#define STATUS_CLUSTER_NETWORK_EXISTS ((NTSTATUS)0xC0130006L) + +// +// MessageId: STATUS_CLUSTER_NETWORK_NOT_FOUND +// +// MessageText: +// +// The cluster network was not found. +// +#define STATUS_CLUSTER_NETWORK_NOT_FOUND ((NTSTATUS)0xC0130007L) + +// +// MessageId: STATUS_CLUSTER_NETINTERFACE_EXISTS +// +// MessageText: +// +// The cluster network interface already exists. +// +#define STATUS_CLUSTER_NETINTERFACE_EXISTS ((NTSTATUS)0xC0130008L) + +// +// MessageId: STATUS_CLUSTER_NETINTERFACE_NOT_FOUND +// +// MessageText: +// +// The cluster network interface was not found. +// +#define STATUS_CLUSTER_NETINTERFACE_NOT_FOUND ((NTSTATUS)0xC0130009L) + +// +// MessageId: STATUS_CLUSTER_INVALID_REQUEST +// +// MessageText: +// +// The cluster request is not valid for this object. +// +#define STATUS_CLUSTER_INVALID_REQUEST ((NTSTATUS)0xC013000AL) + +// +// MessageId: STATUS_CLUSTER_INVALID_NETWORK_PROVIDER +// +// MessageText: +// +// The cluster network provider is not valid. +// +#define STATUS_CLUSTER_INVALID_NETWORK_PROVIDER ((NTSTATUS)0xC013000BL) + +// +// MessageId: STATUS_CLUSTER_NODE_DOWN +// +// MessageText: +// +// The cluster node is down. +// +#define STATUS_CLUSTER_NODE_DOWN ((NTSTATUS)0xC013000CL) + +// +// MessageId: STATUS_CLUSTER_NODE_UNREACHABLE +// +// MessageText: +// +// The cluster node is not reachable. +// +#define STATUS_CLUSTER_NODE_UNREACHABLE ((NTSTATUS)0xC013000DL) + +// +// MessageId: STATUS_CLUSTER_NODE_NOT_MEMBER +// +// MessageText: +// +// The cluster node is not a member of the cluster. +// +#define STATUS_CLUSTER_NODE_NOT_MEMBER ((NTSTATUS)0xC013000EL) + +// +// MessageId: STATUS_CLUSTER_JOIN_NOT_IN_PROGRESS +// +// MessageText: +// +// A cluster join operation is not in progress. +// +#define STATUS_CLUSTER_JOIN_NOT_IN_PROGRESS ((NTSTATUS)0xC013000FL) + +// +// MessageId: STATUS_CLUSTER_INVALID_NETWORK +// +// MessageText: +// +// The cluster network is not valid. +// +#define STATUS_CLUSTER_INVALID_NETWORK ((NTSTATUS)0xC0130010L) + +// +// MessageId: STATUS_CLUSTER_NO_NET_ADAPTERS +// +// MessageText: +// +// No network adapters are available. +// +#define STATUS_CLUSTER_NO_NET_ADAPTERS ((NTSTATUS)0xC0130011L) + +// +// MessageId: STATUS_CLUSTER_NODE_UP +// +// MessageText: +// +// The cluster node is up. +// +#define STATUS_CLUSTER_NODE_UP ((NTSTATUS)0xC0130012L) + +// +// MessageId: STATUS_CLUSTER_NODE_PAUSED +// +// MessageText: +// +// The cluster node is paused. +// +#define STATUS_CLUSTER_NODE_PAUSED ((NTSTATUS)0xC0130013L) + +// +// MessageId: STATUS_CLUSTER_NODE_NOT_PAUSED +// +// MessageText: +// +// The cluster node is not paused. +// +#define STATUS_CLUSTER_NODE_NOT_PAUSED ((NTSTATUS)0xC0130014L) + +// +// MessageId: STATUS_CLUSTER_NO_SECURITY_CONTEXT +// +// MessageText: +// +// No cluster security context is available. +// +#define STATUS_CLUSTER_NO_SECURITY_CONTEXT ((NTSTATUS)0xC0130015L) + +// +// MessageId: STATUS_CLUSTER_NETWORK_NOT_INTERNAL +// +// MessageText: +// +// The cluster network is not configured for internal cluster communication. +// +#define STATUS_CLUSTER_NETWORK_NOT_INTERNAL ((NTSTATUS)0xC0130016L) + +// +// MessageId: STATUS_CLUSTER_POISONED +// +// MessageText: +// +// The cluster node has been poisoned. +// +#define STATUS_CLUSTER_POISONED ((NTSTATUS)0xC0130017L) + +// +// MessageId: STATUS_CLUSTER_NON_CSV_PATH +// +// MessageText: +// +// The path does not belong to a cluster shared volume. +// +#define STATUS_CLUSTER_NON_CSV_PATH ((NTSTATUS)0xC0130018L) + +// +// MessageId: STATUS_CLUSTER_CSV_VOLUME_NOT_LOCAL +// +// MessageText: +// +// The cluster shared volume is not locally mounted. +// +#define STATUS_CLUSTER_CSV_VOLUME_NOT_LOCAL ((NTSTATUS)0xC0130019L) + + +// +// Transaction Manager error values +// + +// +// MessageId: STATUS_TRANSACTIONAL_CONFLICT +// +// MessageText: +// +// The function attempted to use a name that is reserved for use by another transaction. +// +#define STATUS_TRANSACTIONAL_CONFLICT ((NTSTATUS)0xC0190001L) + +// +// MessageId: STATUS_INVALID_TRANSACTION +// +// MessageText: +// +// The transaction handle associated with this operation is not valid. +// +#define STATUS_INVALID_TRANSACTION ((NTSTATUS)0xC0190002L) + +// +// MessageId: STATUS_TRANSACTION_NOT_ACTIVE +// +// MessageText: +// +// The requested operation was made in the context of a transaction that is no longer active. +// +#define STATUS_TRANSACTION_NOT_ACTIVE ((NTSTATUS)0xC0190003L) + +// +// MessageId: STATUS_TM_INITIALIZATION_FAILED +// +// MessageText: +// +// The Transaction Manager was unable to be successfully initialized. Transacted operations are not supported. +// +#define STATUS_TM_INITIALIZATION_FAILED ((NTSTATUS)0xC0190004L) + +// +// MessageId: STATUS_RM_NOT_ACTIVE +// +// MessageText: +// +// Transaction support within the specified resource manager is not started or was shut down due to an error. +// +#define STATUS_RM_NOT_ACTIVE ((NTSTATUS)0xC0190005L) + +// +// MessageId: STATUS_RM_METADATA_CORRUPT +// +// MessageText: +// +// The metadata of the RM has been corrupted. The RM will not function. +// +#define STATUS_RM_METADATA_CORRUPT ((NTSTATUS)0xC0190006L) + +// +// MessageId: STATUS_TRANSACTION_NOT_JOINED +// +// MessageText: +// +// The resource manager has attempted to prepare a transaction that it has not successfully joined. +// +#define STATUS_TRANSACTION_NOT_JOINED ((NTSTATUS)0xC0190007L) + +// +// MessageId: STATUS_DIRECTORY_NOT_RM +// +// MessageText: +// +// The specified directory does not contain a file system resource manager. +// +#define STATUS_DIRECTORY_NOT_RM ((NTSTATUS)0xC0190008L) + +// +// MessageId: STATUS_COULD_NOT_RESIZE_LOG +// +// MessageText: +// +// The log could not be set to the requested size. +// +#define STATUS_COULD_NOT_RESIZE_LOG ((NTSTATUS)0x80190009L) + +// +// MessageId: STATUS_TRANSACTIONS_UNSUPPORTED_REMOTE +// +// MessageText: +// +// The remote server or share does not support transacted file operations. +// +#define STATUS_TRANSACTIONS_UNSUPPORTED_REMOTE ((NTSTATUS)0xC019000AL) + +// +// MessageId: STATUS_LOG_RESIZE_INVALID_SIZE +// +// MessageText: +// +// The requested log size for the file system resource manager is invalid. +// +#define STATUS_LOG_RESIZE_INVALID_SIZE ((NTSTATUS)0xC019000BL) + +// +// MessageId: STATUS_REMOTE_FILE_VERSION_MISMATCH +// +// MessageText: +// +// The remote server sent mismatching version number or Fid for a file opened with transactions. +// +#define STATUS_REMOTE_FILE_VERSION_MISMATCH ((NTSTATUS)0xC019000CL) + +// +// MessageId: STATUS_CRM_PROTOCOL_ALREADY_EXISTS +// +// MessageText: +// +// The RM tried to register a protocol that already exists. +// +#define STATUS_CRM_PROTOCOL_ALREADY_EXISTS ((NTSTATUS)0xC019000FL) + +// +// MessageId: STATUS_TRANSACTION_PROPAGATION_FAILED +// +// MessageText: +// +// The attempt to propagate the Transaction failed. +// +#define STATUS_TRANSACTION_PROPAGATION_FAILED ((NTSTATUS)0xC0190010L) + +// +// MessageId: STATUS_CRM_PROTOCOL_NOT_FOUND +// +// MessageText: +// +// The requested propagation protocol was not registered as a CRM. +// +#define STATUS_CRM_PROTOCOL_NOT_FOUND ((NTSTATUS)0xC0190011L) + +// +// MessageId: STATUS_TRANSACTION_SUPERIOR_EXISTS +// +// MessageText: +// +// The Transaction object already has a superior enlistment, and the caller attempted an operation that would have created a new superior. Only a single superior enlistment is allowed. +// +#define STATUS_TRANSACTION_SUPERIOR_EXISTS ((NTSTATUS)0xC0190012L) + +// +// MessageId: STATUS_TRANSACTION_REQUEST_NOT_VALID +// +// MessageText: +// +// The requested operation is not valid on the Transaction object in its current state. +// +#define STATUS_TRANSACTION_REQUEST_NOT_VALID ((NTSTATUS)0xC0190013L) + +// +// MessageId: STATUS_TRANSACTION_NOT_REQUESTED +// +// MessageText: +// +// The caller has called a response API, but the response is not expected because the TM did not issue the corresponding request to the caller. +// +#define STATUS_TRANSACTION_NOT_REQUESTED ((NTSTATUS)0xC0190014L) + +// +// MessageId: STATUS_TRANSACTION_ALREADY_ABORTED +// +// MessageText: +// +// It is too late to perform the requested operation, since the Transaction has already been aborted. +// +#define STATUS_TRANSACTION_ALREADY_ABORTED ((NTSTATUS)0xC0190015L) + +// +// MessageId: STATUS_TRANSACTION_ALREADY_COMMITTED +// +// MessageText: +// +// It is too late to perform the requested operation, since the Transaction has already been committed. +// +#define STATUS_TRANSACTION_ALREADY_COMMITTED ((NTSTATUS)0xC0190016L) + +// +// MessageId: STATUS_TRANSACTION_INVALID_MARSHALL_BUFFER +// +// MessageText: +// +// The buffer passed in to NtPushTransaction or NtPullTransaction is not in a valid format. +// +#define STATUS_TRANSACTION_INVALID_MARSHALL_BUFFER ((NTSTATUS)0xC0190017L) + +// +// MessageId: STATUS_CURRENT_TRANSACTION_NOT_VALID +// +// MessageText: +// +// The current transaction context associated with the thread is not a valid handle to a transaction object. +// +#define STATUS_CURRENT_TRANSACTION_NOT_VALID ((NTSTATUS)0xC0190018L) + +// +// MessageId: STATUS_LOG_GROWTH_FAILED +// +// MessageText: +// +// An attempt to create space in the transactional resource manager's log failed. The failure status has been recorded in the event log. +// +#define STATUS_LOG_GROWTH_FAILED ((NTSTATUS)0xC0190019L) + +// +// MessageId: STATUS_OBJECT_NO_LONGER_EXISTS +// +// MessageText: +// +// The object (file, stream, link) corresponding to the handle has been deleted by a transaction savepoint rollback. +// +#define STATUS_OBJECT_NO_LONGER_EXISTS ((NTSTATUS)0xC0190021L) + +// +// MessageId: STATUS_STREAM_MINIVERSION_NOT_FOUND +// +// MessageText: +// +// The specified file miniversion was not found for this transacted file open. +// +#define STATUS_STREAM_MINIVERSION_NOT_FOUND ((NTSTATUS)0xC0190022L) + +// +// MessageId: STATUS_STREAM_MINIVERSION_NOT_VALID +// +// MessageText: +// +// The specified file miniversion was found but has been invalidated. Most likely cause is a transaction savepoint rollback. +// +#define STATUS_STREAM_MINIVERSION_NOT_VALID ((NTSTATUS)0xC0190023L) + +// +// MessageId: STATUS_MINIVERSION_INACCESSIBLE_FROM_SPECIFIED_TRANSACTION +// +// MessageText: +// +// A miniversion may only be opened in the context of the transaction that created it. +// +#define STATUS_MINIVERSION_INACCESSIBLE_FROM_SPECIFIED_TRANSACTION ((NTSTATUS)0xC0190024L) + +// +// MessageId: STATUS_CANT_OPEN_MINIVERSION_WITH_MODIFY_INTENT +// +// MessageText: +// +// It is not possible to open a miniversion with modify access. +// +#define STATUS_CANT_OPEN_MINIVERSION_WITH_MODIFY_INTENT ((NTSTATUS)0xC0190025L) + +// +// MessageId: STATUS_CANT_CREATE_MORE_STREAM_MINIVERSIONS +// +// MessageText: +// +// It is not possible to create any more miniversions for this stream. +// +#define STATUS_CANT_CREATE_MORE_STREAM_MINIVERSIONS ((NTSTATUS)0xC0190026L) + +// +// MessageId: STATUS_HANDLE_NO_LONGER_VALID +// +// MessageText: +// +// The handle has been invalidated by a transaction. The most likely cause is the presence of memory mapping on a file or an open handle when the transaction ended or rolled back to savepoint. +// +#define STATUS_HANDLE_NO_LONGER_VALID ((NTSTATUS)0xC0190028L) + +// +// MessageId: STATUS_NO_TXF_METADATA +// +// MessageText: +// +// There is no transaction metadata on the file. +// +#define STATUS_NO_TXF_METADATA ((NTSTATUS)0x80190029L) + +// +// MessageId: STATUS_LOG_CORRUPTION_DETECTED +// +// MessageText: +// +// The log data is corrupt. +// +#define STATUS_LOG_CORRUPTION_DETECTED ((NTSTATUS)0xC0190030L) + +// +// MessageId: STATUS_CANT_RECOVER_WITH_HANDLE_OPEN +// +// MessageText: +// +// The file can't be recovered because there is a handle still open on it. +// +#define STATUS_CANT_RECOVER_WITH_HANDLE_OPEN ((NTSTATUS)0x80190031L) + +// +// MessageId: STATUS_RM_DISCONNECTED +// +// MessageText: +// +// The transaction outcome is unavailable because the resource manager responsible for it has disconnected. +// +#define STATUS_RM_DISCONNECTED ((NTSTATUS)0xC0190032L) + +// +// MessageId: STATUS_ENLISTMENT_NOT_SUPERIOR +// +// MessageText: +// +// The request was rejected because the enlistment in question is not a superior enlistment. +// +#define STATUS_ENLISTMENT_NOT_SUPERIOR ((NTSTATUS)0xC0190033L) + +// +// MessageId: STATUS_RECOVERY_NOT_NEEDED +// +// MessageText: +// +// The transactional resource manager is already consistent. Recovery is not needed. +// +#define STATUS_RECOVERY_NOT_NEEDED ((NTSTATUS)0x40190034L) + +// +// MessageId: STATUS_RM_ALREADY_STARTED +// +// MessageText: +// +// The transactional resource manager has already been started. +// +#define STATUS_RM_ALREADY_STARTED ((NTSTATUS)0x40190035L) + +// +// MessageId: STATUS_FILE_IDENTITY_NOT_PERSISTENT +// +// MessageText: +// +// The file cannot be opened transactionally, because its identity depends on the outcome of an unresolved transaction. +// +#define STATUS_FILE_IDENTITY_NOT_PERSISTENT ((NTSTATUS)0xC0190036L) + +// +// MessageId: STATUS_CANT_BREAK_TRANSACTIONAL_DEPENDENCY +// +// MessageText: +// +// The operation cannot be performed because another transaction is depending on the fact that this property will not change. +// +#define STATUS_CANT_BREAK_TRANSACTIONAL_DEPENDENCY ((NTSTATUS)0xC0190037L) + +// +// MessageId: STATUS_CANT_CROSS_RM_BOUNDARY +// +// MessageText: +// +// The operation would involve a single file with two transactional resource managers and is therefore not allowed. +// +#define STATUS_CANT_CROSS_RM_BOUNDARY ((NTSTATUS)0xC0190038L) + +// +// MessageId: STATUS_TXF_DIR_NOT_EMPTY +// +// MessageText: +// +// The $Txf directory must be empty for this operation to succeed. +// +#define STATUS_TXF_DIR_NOT_EMPTY ((NTSTATUS)0xC0190039L) + +// +// MessageId: STATUS_INDOUBT_TRANSACTIONS_EXIST +// +// MessageText: +// +// The operation would leave a transactional resource manager in an inconsistent state and is therefore not allowed. +// +#define STATUS_INDOUBT_TRANSACTIONS_EXIST ((NTSTATUS)0xC019003AL) + +// +// MessageId: STATUS_TM_VOLATILE +// +// MessageText: +// +// The operation could not be completed because the transaction manager does not have a log. +// +#define STATUS_TM_VOLATILE ((NTSTATUS)0xC019003BL) + +// +// MessageId: STATUS_ROLLBACK_TIMER_EXPIRED +// +// MessageText: +// +// A rollback could not be scheduled because a previously scheduled rollback has already executed or been queued for execution. +// +#define STATUS_ROLLBACK_TIMER_EXPIRED ((NTSTATUS)0xC019003CL) + +// +// MessageId: STATUS_TXF_ATTRIBUTE_CORRUPT +// +// MessageText: +// +// The transactional metadata attribute on the file or directory %hs is corrupt and unreadable. +// +#define STATUS_TXF_ATTRIBUTE_CORRUPT ((NTSTATUS)0xC019003DL) + +// +// MessageId: STATUS_EFS_NOT_ALLOWED_IN_TRANSACTION +// +// MessageText: +// +// The encryption operation could not be completed because a transaction is active. +// +#define STATUS_EFS_NOT_ALLOWED_IN_TRANSACTION ((NTSTATUS)0xC019003EL) + +// +// MessageId: STATUS_TRANSACTIONAL_OPEN_NOT_ALLOWED +// +// MessageText: +// +// This object is not allowed to be opened in a transaction. +// +#define STATUS_TRANSACTIONAL_OPEN_NOT_ALLOWED ((NTSTATUS)0xC019003FL) + +// +// MessageId: STATUS_TRANSACTED_MAPPING_UNSUPPORTED_REMOTE +// +// MessageText: +// +// Memory mapping (creating a mapped section) a remote file under a transaction is not supported. +// +#define STATUS_TRANSACTED_MAPPING_UNSUPPORTED_REMOTE ((NTSTATUS)0xC0190040L) + +// +// MessageId: STATUS_TXF_METADATA_ALREADY_PRESENT +// +// MessageText: +// +// Transaction metadata is already present on this file and cannot be superseded. +// +#define STATUS_TXF_METADATA_ALREADY_PRESENT ((NTSTATUS)0x80190041L) + +// +// MessageId: STATUS_TRANSACTION_SCOPE_CALLBACKS_NOT_SET +// +// MessageText: +// +// A transaction scope could not be entered because the scope handler has not been initialized. +// +#define STATUS_TRANSACTION_SCOPE_CALLBACKS_NOT_SET ((NTSTATUS)0x80190042L) + +// +// MessageId: STATUS_TRANSACTION_REQUIRED_PROMOTION +// +// MessageText: +// +// Promotion was required in order to allow the resource manager to enlist, but the transaction was set to disallow it. +// +#define STATUS_TRANSACTION_REQUIRED_PROMOTION ((NTSTATUS)0xC0190043L) + +// +// MessageId: STATUS_CANNOT_EXECUTE_FILE_IN_TRANSACTION +// +// MessageText: +// +// This file is open for modification in an unresolved transaction and may be opened for execute only by a transacted reader. +// +#define STATUS_CANNOT_EXECUTE_FILE_IN_TRANSACTION ((NTSTATUS)0xC0190044L) + +// +// MessageId: STATUS_TRANSACTIONS_NOT_FROZEN +// +// MessageText: +// +// The request to thaw frozen transactions was ignored because transactions had not previously been frozen. +// +#define STATUS_TRANSACTIONS_NOT_FROZEN ((NTSTATUS)0xC0190045L) + +// +// MessageId: STATUS_TRANSACTION_FREEZE_IN_PROGRESS +// +// MessageText: +// +// Transactions cannot be frozen because a freeze is already in progress. +// +#define STATUS_TRANSACTION_FREEZE_IN_PROGRESS ((NTSTATUS)0xC0190046L) + +// +// MessageId: STATUS_NOT_SNAPSHOT_VOLUME +// +// MessageText: +// +// The target volume is not a snapshot volume. This operation is only valid on a volume mounted as a snapshot. +// +#define STATUS_NOT_SNAPSHOT_VOLUME ((NTSTATUS)0xC0190047L) + +// +// MessageId: STATUS_NO_SAVEPOINT_WITH_OPEN_FILES +// +// MessageText: +// +// The savepoint operation failed because files are open on the transaction. This is not permitted. +// +#define STATUS_NO_SAVEPOINT_WITH_OPEN_FILES ((NTSTATUS)0xC0190048L) + +// +// MessageId: STATUS_SPARSE_NOT_ALLOWED_IN_TRANSACTION +// +// MessageText: +// +// The sparse operation could not be completed because a transaction is active on the file. +// +#define STATUS_SPARSE_NOT_ALLOWED_IN_TRANSACTION ((NTSTATUS)0xC0190049L) + +// +// MessageId: STATUS_TM_IDENTITY_MISMATCH +// +// MessageText: +// +// The call to create a TransactionManager object failed because the Tm Identity stored in the logfile does not match the Tm Identity that was passed in as an argument. +// +#define STATUS_TM_IDENTITY_MISMATCH ((NTSTATUS)0xC019004AL) + +// +// MessageId: STATUS_FLOATED_SECTION +// +// MessageText: +// +// I/O was attempted on a section object that has been floated as a result of a transaction ending. There is no valid data. +// +#define STATUS_FLOATED_SECTION ((NTSTATUS)0xC019004BL) + +// +// MessageId: STATUS_CANNOT_ACCEPT_TRANSACTED_WORK +// +// MessageText: +// +// The transactional resource manager cannot currently accept transacted work due to a transient condition such as low resources. +// +#define STATUS_CANNOT_ACCEPT_TRANSACTED_WORK ((NTSTATUS)0xC019004CL) + +// +// MessageId: STATUS_CANNOT_ABORT_TRANSACTIONS +// +// MessageText: +// +// The transactional resource manager had too many tranactions outstanding that could not be aborted. The transactional resource manger has been shut down. +// +#define STATUS_CANNOT_ABORT_TRANSACTIONS ((NTSTATUS)0xC019004DL) + +// +// MessageId: STATUS_TRANSACTION_NOT_FOUND +// +// MessageText: +// +// The specified Transaction was unable to be opened, because it was not found. +// +#define STATUS_TRANSACTION_NOT_FOUND ((NTSTATUS)0xC019004EL) + +// +// MessageId: STATUS_RESOURCEMANAGER_NOT_FOUND +// +// MessageText: +// +// The specified ResourceManager was unable to be opened, because it was not found. +// +#define STATUS_RESOURCEMANAGER_NOT_FOUND ((NTSTATUS)0xC019004FL) + +// +// MessageId: STATUS_ENLISTMENT_NOT_FOUND +// +// MessageText: +// +// The specified Enlistment was unable to be opened, because it was not found. +// +#define STATUS_ENLISTMENT_NOT_FOUND ((NTSTATUS)0xC0190050L) + +// +// MessageId: STATUS_TRANSACTIONMANAGER_NOT_FOUND +// +// MessageText: +// +// The specified TransactionManager was unable to be opened, because it was not found. +// +#define STATUS_TRANSACTIONMANAGER_NOT_FOUND ((NTSTATUS)0xC0190051L) + +// +// MessageId: STATUS_TRANSACTIONMANAGER_NOT_ONLINE +// +// MessageText: +// +// The object specified could not be created or opened, because its associated TransactionManager is not online. The TransactionManager must be brought fully Online by calling RecoverTransactionManager to recover to the end of its LogFile before objects in its Transaction or ResourceManager namespaces can be opened. In addition, errors in writing records to its LogFile can cause a TransactionManager to go offline. +// +#define STATUS_TRANSACTIONMANAGER_NOT_ONLINE ((NTSTATUS)0xC0190052L) + +// +// MessageId: STATUS_TRANSACTIONMANAGER_RECOVERY_NAME_COLLISION +// +// MessageText: +// +// The specified TransactionManager was unable to create the objects contained in its logfile in the Ob namespace. Therefore, the TransactionManager was unable to recover. +// +#define STATUS_TRANSACTIONMANAGER_RECOVERY_NAME_COLLISION ((NTSTATUS)0xC0190053L) + +// +// MessageId: STATUS_TRANSACTION_NOT_ROOT +// +// MessageText: +// +// The call to create a superior Enlistment on this Transaction object could not be completed, because the Transaction object specified for the enlistment is a subordinate branch of the Transaction. Only the root of the Transaction can be enlisted on as a superior. +// +#define STATUS_TRANSACTION_NOT_ROOT ((NTSTATUS)0xC0190054L) + +// +// MessageId: STATUS_TRANSACTION_OBJECT_EXPIRED +// +// MessageText: +// +// Because the associated transaction manager or resource manager has been closed, the handle is no longer valid. +// +#define STATUS_TRANSACTION_OBJECT_EXPIRED ((NTSTATUS)0xC0190055L) + +// +// MessageId: STATUS_COMPRESSION_NOT_ALLOWED_IN_TRANSACTION +// +// MessageText: +// +// The compression operation could not be completed because a transaction is active on the file. +// +#define STATUS_COMPRESSION_NOT_ALLOWED_IN_TRANSACTION ((NTSTATUS)0xC0190056L) + +// +// MessageId: STATUS_TRANSACTION_RESPONSE_NOT_ENLISTED +// +// MessageText: +// +// The specified operation could not be performed on this Superior enlistment, because the enlistment was not created with the corresponding completion response in the NotificationMask. +// +#define STATUS_TRANSACTION_RESPONSE_NOT_ENLISTED ((NTSTATUS)0xC0190057L) + +// +// MessageId: STATUS_TRANSACTION_RECORD_TOO_LONG +// +// MessageText: +// +// The specified operation could not be performed, because the record that would be logged was too long. This can occur because of two conditions: either there are too many Enlistments on this Transaction, or the combined RecoveryInformation being logged on behalf of those Enlistments is too long. +// +#define STATUS_TRANSACTION_RECORD_TOO_LONG ((NTSTATUS)0xC0190058L) + +// +// MessageId: STATUS_NO_LINK_TRACKING_IN_TRANSACTION +// +// MessageText: +// +// The link tracking operation could not be completed because a transaction is active. +// +#define STATUS_NO_LINK_TRACKING_IN_TRANSACTION ((NTSTATUS)0xC0190059L) + +// +// MessageId: STATUS_OPERATION_NOT_SUPPORTED_IN_TRANSACTION +// +// MessageText: +// +// This operation cannot be performed in a transaction. +// +#define STATUS_OPERATION_NOT_SUPPORTED_IN_TRANSACTION ((NTSTATUS)0xC019005AL) + +// +// MessageId: STATUS_TRANSACTION_INTEGRITY_VIOLATED +// +// MessageText: +// +// The kernel transaction manager had to abort or forget the transaction because it blocked forward progress. +// +#define STATUS_TRANSACTION_INTEGRITY_VIOLATED ((NTSTATUS)0xC019005BL) + +// +// MessageId: STATUS_TRANSACTIONMANAGER_IDENTITY_MISMATCH +// +// MessageText: +// +// The TransactionManager identity that was supplied did not match the one recorded in the TransactionManager's log file. +// +#define STATUS_TRANSACTIONMANAGER_IDENTITY_MISMATCH ((NTSTATUS)0xC019005CL) + +// +// MessageId: STATUS_RM_CANNOT_BE_FROZEN_FOR_SNAPSHOT +// +// MessageText: +// +// This snapshot operation cannot continue because a transactional resource manager cannot be frozen in its current state. Please try again. +// +#define STATUS_RM_CANNOT_BE_FROZEN_FOR_SNAPSHOT ((NTSTATUS)0xC019005DL) + +// +// MessageId: STATUS_TRANSACTION_MUST_WRITETHROUGH +// +// MessageText: +// +// The transaction cannot be enlisted on with the specified EnlistmentMask, because the transaction has already completed the PrePrepare phase. In order to ensure correctness, the ResourceManager must switch to a write-through mode and cease caching data within this transaction. Enlisting for only subsequent transaction phases may still succeed. +// +#define STATUS_TRANSACTION_MUST_WRITETHROUGH ((NTSTATUS)0xC019005EL) + +// +// MessageId: STATUS_TRANSACTION_NO_SUPERIOR +// +// MessageText: +// +// The transaction does not have a superior enlistment. +// +#define STATUS_TRANSACTION_NO_SUPERIOR ((NTSTATUS)0xC019005FL) + +// +// MessageId: STATUS_EXPIRED_HANDLE +// +// MessageText: +// +// The handle is no longer properly associated with its transaction. It may have been opened in a transactional resource manager that was subsequently forced to restart. Please close the handle and open a new one. +// +#define STATUS_EXPIRED_HANDLE ((NTSTATUS)0xC0190060L) + +// +// MessageId: STATUS_TRANSACTION_NOT_ENLISTED +// +// MessageText: +// +// The specified operation could not be performed because the resource manager is not enlisted in the transaction. +// +#define STATUS_TRANSACTION_NOT_ENLISTED ((NTSTATUS)0xC0190061L) + + +// +// CLFS (common log file system) error values +// + +// +// MessageId: STATUS_LOG_SECTOR_INVALID +// +// MessageText: +// +// Log service found an invalid log sector. +// +#define STATUS_LOG_SECTOR_INVALID ((NTSTATUS)0xC01A0001L) + +// +// MessageId: STATUS_LOG_SECTOR_PARITY_INVALID +// +// MessageText: +// +// Log service encountered a log sector with invalid block parity. +// +#define STATUS_LOG_SECTOR_PARITY_INVALID ((NTSTATUS)0xC01A0002L) + +// +// MessageId: STATUS_LOG_SECTOR_REMAPPED +// +// MessageText: +// +// Log service encountered a remapped log sector. +// +#define STATUS_LOG_SECTOR_REMAPPED ((NTSTATUS)0xC01A0003L) + +// +// MessageId: STATUS_LOG_BLOCK_INCOMPLETE +// +// MessageText: +// +// Log service encountered a partial or incomplete log block. +// +#define STATUS_LOG_BLOCK_INCOMPLETE ((NTSTATUS)0xC01A0004L) + +// +// MessageId: STATUS_LOG_INVALID_RANGE +// +// MessageText: +// +// Log service encountered an attempt access data outside the active log range. +// +#define STATUS_LOG_INVALID_RANGE ((NTSTATUS)0xC01A0005L) + +// +// MessageId: STATUS_LOG_BLOCKS_EXHAUSTED +// +// MessageText: +// +// Log service user log marshalling buffers are exhausted. +// +#define STATUS_LOG_BLOCKS_EXHAUSTED ((NTSTATUS)0xC01A0006L) + +// +// MessageId: STATUS_LOG_READ_CONTEXT_INVALID +// +// MessageText: +// +// Log service encountered an attempt read from a marshalling area with an invalid read context. +// +#define STATUS_LOG_READ_CONTEXT_INVALID ((NTSTATUS)0xC01A0007L) + +// +// MessageId: STATUS_LOG_RESTART_INVALID +// +// MessageText: +// +// Log service encountered an invalid log restart area. +// +#define STATUS_LOG_RESTART_INVALID ((NTSTATUS)0xC01A0008L) + +// +// MessageId: STATUS_LOG_BLOCK_VERSION +// +// MessageText: +// +// Log service encountered an invalid log block version. +// +#define STATUS_LOG_BLOCK_VERSION ((NTSTATUS)0xC01A0009L) + +// +// MessageId: STATUS_LOG_BLOCK_INVALID +// +// MessageText: +// +// Log service encountered an invalid log block. +// +#define STATUS_LOG_BLOCK_INVALID ((NTSTATUS)0xC01A000AL) + +// +// MessageId: STATUS_LOG_READ_MODE_INVALID +// +// MessageText: +// +// Log service encountered an attempt to read the log with an invalid read mode. +// +#define STATUS_LOG_READ_MODE_INVALID ((NTSTATUS)0xC01A000BL) + +// +// MessageId: STATUS_LOG_NO_RESTART +// +// MessageText: +// +// Log service encountered a log stream with no restart area. +// +#define STATUS_LOG_NO_RESTART ((NTSTATUS)0x401A000CL) + +// +// MessageId: STATUS_LOG_METADATA_CORRUPT +// +// MessageText: +// +// Log service encountered a corrupted metadata file. +// +#define STATUS_LOG_METADATA_CORRUPT ((NTSTATUS)0xC01A000DL) + +// +// MessageId: STATUS_LOG_METADATA_INVALID +// +// MessageText: +// +// Log service encountered a metadata file that could not be created by the log file system. +// +#define STATUS_LOG_METADATA_INVALID ((NTSTATUS)0xC01A000EL) + +// +// MessageId: STATUS_LOG_METADATA_INCONSISTENT +// +// MessageText: +// +// Log service encountered a metadata file with inconsistent data. +// +#define STATUS_LOG_METADATA_INCONSISTENT ((NTSTATUS)0xC01A000FL) + +// +// MessageId: STATUS_LOG_RESERVATION_INVALID +// +// MessageText: +// +// Log service encountered an attempt to erroneously allocate or dispose reservation space. +// +#define STATUS_LOG_RESERVATION_INVALID ((NTSTATUS)0xC01A0010L) + +// +// MessageId: STATUS_LOG_CANT_DELETE +// +// MessageText: +// +// Log service cannot delete log file or file system container. +// +#define STATUS_LOG_CANT_DELETE ((NTSTATUS)0xC01A0011L) + +// +// MessageId: STATUS_LOG_CONTAINER_LIMIT_EXCEEDED +// +// MessageText: +// +// Log service has reached the maximum allowable containers allocated to a log file. +// +#define STATUS_LOG_CONTAINER_LIMIT_EXCEEDED ((NTSTATUS)0xC01A0012L) + +// +// MessageId: STATUS_LOG_START_OF_LOG +// +// MessageText: +// +// Log service has attempted to read or write backwards past the start of the log. +// +#define STATUS_LOG_START_OF_LOG ((NTSTATUS)0xC01A0013L) + +// +// MessageId: STATUS_LOG_POLICY_ALREADY_INSTALLED +// +// MessageText: +// +// Log policy could not be installed because a policy of the same type is already present. +// +#define STATUS_LOG_POLICY_ALREADY_INSTALLED ((NTSTATUS)0xC01A0014L) + +// +// MessageId: STATUS_LOG_POLICY_NOT_INSTALLED +// +// MessageText: +// +// Log policy in question was not installed at the time of the request. +// +#define STATUS_LOG_POLICY_NOT_INSTALLED ((NTSTATUS)0xC01A0015L) + +// +// MessageId: STATUS_LOG_POLICY_INVALID +// +// MessageText: +// +// The installed set of policies on the log is invalid. +// +#define STATUS_LOG_POLICY_INVALID ((NTSTATUS)0xC01A0016L) + +// +// MessageId: STATUS_LOG_POLICY_CONFLICT +// +// MessageText: +// +// A policy on the log in question prevented the operation from completing. +// +#define STATUS_LOG_POLICY_CONFLICT ((NTSTATUS)0xC01A0017L) + +// +// MessageId: STATUS_LOG_PINNED_ARCHIVE_TAIL +// +// MessageText: +// +// Log space cannot be reclaimed because the log is pinned by the archive tail. +// +#define STATUS_LOG_PINNED_ARCHIVE_TAIL ((NTSTATUS)0xC01A0018L) + +// +// MessageId: STATUS_LOG_RECORD_NONEXISTENT +// +// MessageText: +// +// Log record is not a record in the log file. +// +#define STATUS_LOG_RECORD_NONEXISTENT ((NTSTATUS)0xC01A0019L) + +// +// MessageId: STATUS_LOG_RECORDS_RESERVED_INVALID +// +// MessageText: +// +// Number of reserved log records or the adjustment of the number of reserved log records is invalid. +// +#define STATUS_LOG_RECORDS_RESERVED_INVALID ((NTSTATUS)0xC01A001AL) + +// +// MessageId: STATUS_LOG_SPACE_RESERVED_INVALID +// +// MessageText: +// +// Reserved log space or the adjustment of the log space is invalid. +// +#define STATUS_LOG_SPACE_RESERVED_INVALID ((NTSTATUS)0xC01A001BL) + +// +// MessageId: STATUS_LOG_TAIL_INVALID +// +// MessageText: +// +// A new or existing archive tail or base of the active log is invalid. +// +#define STATUS_LOG_TAIL_INVALID ((NTSTATUS)0xC01A001CL) + +// +// MessageId: STATUS_LOG_FULL +// +// MessageText: +// +// Log space is exhausted. +// +#define STATUS_LOG_FULL ((NTSTATUS)0xC01A001DL) + +// +// MessageId: STATUS_LOG_MULTIPLEXED +// +// MessageText: +// +// Log is multiplexed, no direct writes to the physical log is allowed. +// +#define STATUS_LOG_MULTIPLEXED ((NTSTATUS)0xC01A001EL) + +// +// MessageId: STATUS_LOG_DEDICATED +// +// MessageText: +// +// The operation failed because the log is a dedicated log. +// +#define STATUS_LOG_DEDICATED ((NTSTATUS)0xC01A001FL) + +// +// MessageId: STATUS_LOG_ARCHIVE_NOT_IN_PROGRESS +// +// MessageText: +// +// The operation requires an archive context. +// +#define STATUS_LOG_ARCHIVE_NOT_IN_PROGRESS ((NTSTATUS)0xC01A0020L) + +// +// MessageId: STATUS_LOG_ARCHIVE_IN_PROGRESS +// +// MessageText: +// +// Log archival is in progress. +// +#define STATUS_LOG_ARCHIVE_IN_PROGRESS ((NTSTATUS)0xC01A0021L) + +// +// MessageId: STATUS_LOG_EPHEMERAL +// +// MessageText: +// +// The operation requires a non-ephemeral log, but the log is ephemeral. +// +#define STATUS_LOG_EPHEMERAL ((NTSTATUS)0xC01A0022L) + +// +// MessageId: STATUS_LOG_NOT_ENOUGH_CONTAINERS +// +// MessageText: +// +// The log must have at least two containers before it can be read from or written to. +// +#define STATUS_LOG_NOT_ENOUGH_CONTAINERS ((NTSTATUS)0xC01A0023L) + +// +// MessageId: STATUS_LOG_CLIENT_ALREADY_REGISTERED +// +// MessageText: +// +// A log client has already registered on the stream. +// +#define STATUS_LOG_CLIENT_ALREADY_REGISTERED ((NTSTATUS)0xC01A0024L) + +// +// MessageId: STATUS_LOG_CLIENT_NOT_REGISTERED +// +// MessageText: +// +// A log client has not been registered on the stream. +// +#define STATUS_LOG_CLIENT_NOT_REGISTERED ((NTSTATUS)0xC01A0025L) + +// +// MessageId: STATUS_LOG_FULL_HANDLER_IN_PROGRESS +// +// MessageText: +// +// A request has already been made to handle the log full condition. +// +#define STATUS_LOG_FULL_HANDLER_IN_PROGRESS ((NTSTATUS)0xC01A0026L) + +// +// MessageId: STATUS_LOG_CONTAINER_READ_FAILED +// +// MessageText: +// +// Log service encountered an error when attempting to read from a log container. +// +#define STATUS_LOG_CONTAINER_READ_FAILED ((NTSTATUS)0xC01A0027L) + +// +// MessageId: STATUS_LOG_CONTAINER_WRITE_FAILED +// +// MessageText: +// +// Log service encountered an error when attempting to write to a log container. +// +#define STATUS_LOG_CONTAINER_WRITE_FAILED ((NTSTATUS)0xC01A0028L) + +// +// MessageId: STATUS_LOG_CONTAINER_OPEN_FAILED +// +// MessageText: +// +// Log service encountered an error when attempting open a log container. +// +#define STATUS_LOG_CONTAINER_OPEN_FAILED ((NTSTATUS)0xC01A0029L) + +// +// MessageId: STATUS_LOG_CONTAINER_STATE_INVALID +// +// MessageText: +// +// Log service encountered an invalid container state when attempting a requested action. +// +#define STATUS_LOG_CONTAINER_STATE_INVALID ((NTSTATUS)0xC01A002AL) + +// +// MessageId: STATUS_LOG_STATE_INVALID +// +// MessageText: +// +// Log service is not in the correct state to perform a requested action. +// +#define STATUS_LOG_STATE_INVALID ((NTSTATUS)0xC01A002BL) + +// +// MessageId: STATUS_LOG_PINNED +// +// MessageText: +// +// Log space cannot be reclaimed because the log is pinned. +// +#define STATUS_LOG_PINNED ((NTSTATUS)0xC01A002CL) + +// +// MessageId: STATUS_LOG_METADATA_FLUSH_FAILED +// +// MessageText: +// +// Log metadata flush failed. +// +#define STATUS_LOG_METADATA_FLUSH_FAILED ((NTSTATUS)0xC01A002DL) + +// +// MessageId: STATUS_LOG_INCONSISTENT_SECURITY +// +// MessageText: +// +// Security on the log and its containers is inconsistent. +// +#define STATUS_LOG_INCONSISTENT_SECURITY ((NTSTATUS)0xC01A002EL) + +// +// MessageId: STATUS_LOG_APPENDED_FLUSH_FAILED +// +// MessageText: +// +// Records were appended to the log or reservation changes were made, but the log could not be flushed. +// +#define STATUS_LOG_APPENDED_FLUSH_FAILED ((NTSTATUS)0xC01A002FL) + +// +// MessageId: STATUS_LOG_PINNED_RESERVATION +// +// MessageText: +// +// The log is pinned due to reservation consuming most of the log space. Free some reserved records to make space available. +// +#define STATUS_LOG_PINNED_RESERVATION ((NTSTATUS)0xC01A0030L) + + +// +// XDDM Video Facility Error codes (videoprt.sys) +// + +// +// MessageId: STATUS_VIDEO_HUNG_DISPLAY_DRIVER_THREAD +// +// MessageText: +// +// {Display Driver Stopped Responding} +// The %hs display driver has stopped working normally. Save your work and reboot the system to restore full display functionality. The next time you reboot the machine a dialog will be displayed giving you a chance to upload data about this failure to Microsoft. +// +#define STATUS_VIDEO_HUNG_DISPLAY_DRIVER_THREAD ((NTSTATUS)0xC01B00EAL) + +// +// MessageId: STATUS_VIDEO_HUNG_DISPLAY_DRIVER_THREAD_RECOVERED +// +// MessageText: +// +// {Display Driver Stopped Responding and recovered} +// The %hs display driver has stopped working normally. The recovery had been performed. +// +#define STATUS_VIDEO_HUNG_DISPLAY_DRIVER_THREAD_RECOVERED ((NTSTATUS)0x801B00EBL) + +// +// MessageId: STATUS_VIDEO_DRIVER_DEBUG_REPORT_REQUEST +// +// MessageText: +// +// {Display Driver Recovered From Failure} +// The %hs display driver has detected and recovered from a failure. Some graphical operations may have failed. The next time you reboot the machine a dialog will be displayed giving you a chance to upload data about this failure to Microsoft. +// +#define STATUS_VIDEO_DRIVER_DEBUG_REPORT_REQUEST ((NTSTATUS)0x401B00ECL) + + +// +// Monitor Facility Error codes (monitor.sys) +// + +// +// MessageId: STATUS_MONITOR_NO_DESCRIPTOR +// +// MessageText: +// +// Monitor descriptor could not be obtained. +// +#define STATUS_MONITOR_NO_DESCRIPTOR ((NTSTATUS)0xC01D0001L) + +// +// MessageId: STATUS_MONITOR_UNKNOWN_DESCRIPTOR_FORMAT +// +// MessageText: +// +// Format of the obtained monitor descriptor is not supported by this release. +// +#define STATUS_MONITOR_UNKNOWN_DESCRIPTOR_FORMAT ((NTSTATUS)0xC01D0002L) + +// +// MessageId: STATUS_MONITOR_INVALID_DESCRIPTOR_CHECKSUM +// +// MessageText: +// +// Checksum of the obtained monitor descriptor is invalid. +// +#define STATUS_MONITOR_INVALID_DESCRIPTOR_CHECKSUM ((NTSTATUS)0xC01D0003L) + +// +// MessageId: STATUS_MONITOR_INVALID_STANDARD_TIMING_BLOCK +// +// MessageText: +// +// Monitor descriptor contains an invalid standard timing block. +// +#define STATUS_MONITOR_INVALID_STANDARD_TIMING_BLOCK ((NTSTATUS)0xC01D0004L) + +// +// MessageId: STATUS_MONITOR_WMI_DATABLOCK_REGISTRATION_FAILED +// +// MessageText: +// +// WMI data block registration failed for one of the MSMonitorClass WMI subclasses. +// +#define STATUS_MONITOR_WMI_DATABLOCK_REGISTRATION_FAILED ((NTSTATUS)0xC01D0005L) + +// +// MessageId: STATUS_MONITOR_INVALID_SERIAL_NUMBER_MONDSC_BLOCK +// +// MessageText: +// +// Provided monitor descriptor block is either corrupted or does not contain monitor's detailed serial number. +// +#define STATUS_MONITOR_INVALID_SERIAL_NUMBER_MONDSC_BLOCK ((NTSTATUS)0xC01D0006L) + +// +// MessageId: STATUS_MONITOR_INVALID_USER_FRIENDLY_MONDSC_BLOCK +// +// MessageText: +// +// Provided monitor descriptor block is either corrupted or does not contain monitor's user friendly name. +// +#define STATUS_MONITOR_INVALID_USER_FRIENDLY_MONDSC_BLOCK ((NTSTATUS)0xC01D0007L) + +// +// MessageId: STATUS_MONITOR_NO_MORE_DESCRIPTOR_DATA +// +// MessageText: +// +// There is no monitor descriptor data at the specified (offset, size) region. +// +#define STATUS_MONITOR_NO_MORE_DESCRIPTOR_DATA ((NTSTATUS)0xC01D0008L) + +// +// MessageId: STATUS_MONITOR_INVALID_DETAILED_TIMING_BLOCK +// +// MessageText: +// +// Monitor descriptor contains an invalid detailed timing block. +// +#define STATUS_MONITOR_INVALID_DETAILED_TIMING_BLOCK ((NTSTATUS)0xC01D0009L) + +// +// MessageId: STATUS_MONITOR_INVALID_MANUFACTURE_DATE +// +// MessageText: +// +// Monitor descriptor contains invalid manufacture date. +// +#define STATUS_MONITOR_INVALID_MANUFACTURE_DATE ((NTSTATUS)0xC01D000AL) + + +// +// Graphics Facility Error codes (dxg.sys, dxgkrnl.sys) +// + +// +// Common Windows Graphics Kernel Subsystem status codes {0x0000..0x00ff} +// +// +// MessageId: STATUS_GRAPHICS_NOT_EXCLUSIVE_MODE_OWNER +// +// MessageText: +// +// Exclusive mode ownership is needed to create unmanaged primary allocation. +// +#define STATUS_GRAPHICS_NOT_EXCLUSIVE_MODE_OWNER ((NTSTATUS)0xC01E0000L) + +// +// MessageId: STATUS_GRAPHICS_INSUFFICIENT_DMA_BUFFER +// +// MessageText: +// +// The driver needs more DMA buffer space in order to complete the requested operation. +// +#define STATUS_GRAPHICS_INSUFFICIENT_DMA_BUFFER ((NTSTATUS)0xC01E0001L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_DISPLAY_ADAPTER +// +// MessageText: +// +// Specified display adapter handle is invalid. +// +#define STATUS_GRAPHICS_INVALID_DISPLAY_ADAPTER ((NTSTATUS)0xC01E0002L) + +// +// MessageId: STATUS_GRAPHICS_ADAPTER_WAS_RESET +// +// MessageText: +// +// Specified display adapter and all of its state has been reset. +// +#define STATUS_GRAPHICS_ADAPTER_WAS_RESET ((NTSTATUS)0xC01E0003L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_DRIVER_MODEL +// +// MessageText: +// +// The driver stack doesn't match the expected driver model. +// +#define STATUS_GRAPHICS_INVALID_DRIVER_MODEL ((NTSTATUS)0xC01E0004L) + +// +// MessageId: STATUS_GRAPHICS_PRESENT_MODE_CHANGED +// +// MessageText: +// +// Present happened but ended up into the changed desktop mode +// +#define STATUS_GRAPHICS_PRESENT_MODE_CHANGED ((NTSTATUS)0xC01E0005L) + +// +// MessageId: STATUS_GRAPHICS_PRESENT_OCCLUDED +// +// MessageText: +// +// Nothing to present due to desktop occlusion +// +#define STATUS_GRAPHICS_PRESENT_OCCLUDED ((NTSTATUS)0xC01E0006L) + +// +// MessageId: STATUS_GRAPHICS_PRESENT_DENIED +// +// MessageText: +// +// Not able to present due to denial of desktop access +// +#define STATUS_GRAPHICS_PRESENT_DENIED ((NTSTATUS)0xC01E0007L) + +// +// MessageId: STATUS_GRAPHICS_CANNOTCOLORCONVERT +// +// MessageText: +// +// Not able to present with color convertion +// +#define STATUS_GRAPHICS_CANNOTCOLORCONVERT ((NTSTATUS)0xC01E0008L) + +// +// MessageId: STATUS_GRAPHICS_DRIVER_MISMATCH +// +// MessageText: +// +// The kernel driver detected a version mismatch between it and the user mode driver. +// +#define STATUS_GRAPHICS_DRIVER_MISMATCH ((NTSTATUS)0xC01E0009L) + +// +// MessageId: STATUS_GRAPHICS_PARTIAL_DATA_POPULATED +// +// MessageText: +// +// Specified buffer is not big enough to contain entire requested dataset. Partial data populated upto the size of the buffer. Caller needs to provide buffer of size as specified in the partially populated buffer's content (interface specific). +// +#define STATUS_GRAPHICS_PARTIAL_DATA_POPULATED ((NTSTATUS)0x401E000AL) + +// +// MessageId: STATUS_GRAPHICS_PRESENT_REDIRECTION_DISABLED +// +// MessageText: +// +// Present redirection is disabled (desktop windowing management subsystem is off). +// +#define STATUS_GRAPHICS_PRESENT_REDIRECTION_DISABLED ((NTSTATUS)0xC01E000BL) + +// +// MessageId: STATUS_GRAPHICS_PRESENT_UNOCCLUDED +// +// MessageText: +// +// Previous exclusive VidPn source owner has released its ownership +// +#define STATUS_GRAPHICS_PRESENT_UNOCCLUDED ((NTSTATUS)0xC01E000CL) + +// +// Video Memory Manager (VidMM) specific status codes {0x0100..0x01ff} +// +// +// MessageId: STATUS_GRAPHICS_NO_VIDEO_MEMORY +// +// MessageText: +// +// Not enough video memory available to complete the operation. +// +#define STATUS_GRAPHICS_NO_VIDEO_MEMORY ((NTSTATUS)0xC01E0100L) + +// +// MessageId: STATUS_GRAPHICS_CANT_LOCK_MEMORY +// +// MessageText: +// +// Couldn't probe and lock the underlying memory of an allocation. +// +#define STATUS_GRAPHICS_CANT_LOCK_MEMORY ((NTSTATUS)0xC01E0101L) + +// +// MessageId: STATUS_GRAPHICS_ALLOCATION_BUSY +// +// MessageText: +// +// The allocation is currently busy. +// +#define STATUS_GRAPHICS_ALLOCATION_BUSY ((NTSTATUS)0xC01E0102L) + +// +// MessageId: STATUS_GRAPHICS_TOO_MANY_REFERENCES +// +// MessageText: +// +// An object being referenced has already reached the maximum reference count and can't be referenced any further. +// +#define STATUS_GRAPHICS_TOO_MANY_REFERENCES ((NTSTATUS)0xC01E0103L) + +// +// MessageId: STATUS_GRAPHICS_TRY_AGAIN_LATER +// +// MessageText: +// +// A problem couldn't be solved due to some currently existing condition. The problem should be tried again later. +// +#define STATUS_GRAPHICS_TRY_AGAIN_LATER ((NTSTATUS)0xC01E0104L) + +// +// MessageId: STATUS_GRAPHICS_TRY_AGAIN_NOW +// +// MessageText: +// +// A problem couldn't be solved due to some currently existing condition. The problem should be tried again immediately. +// +#define STATUS_GRAPHICS_TRY_AGAIN_NOW ((NTSTATUS)0xC01E0105L) + +// +// MessageId: STATUS_GRAPHICS_ALLOCATION_INVALID +// +// MessageText: +// +// The allocation is invalid. +// +#define STATUS_GRAPHICS_ALLOCATION_INVALID ((NTSTATUS)0xC01E0106L) + +// +// MessageId: STATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNAVAILABLE +// +// MessageText: +// +// No more unswizzling aperture are currently available. +// +#define STATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNAVAILABLE ((NTSTATUS)0xC01E0107L) + +// +// MessageId: STATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNSUPPORTED +// +// MessageText: +// +// The current allocation can't be unswizzled by an aperture. +// +#define STATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNSUPPORTED ((NTSTATUS)0xC01E0108L) + +// +// MessageId: STATUS_GRAPHICS_CANT_EVICT_PINNED_ALLOCATION +// +// MessageText: +// +// The request failed because a pinned allocation can't be evicted. +// +#define STATUS_GRAPHICS_CANT_EVICT_PINNED_ALLOCATION ((NTSTATUS)0xC01E0109L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_ALLOCATION_USAGE +// +// MessageText: +// +// The allocation can't be used from it's current segment location for the specified operation. +// +#define STATUS_GRAPHICS_INVALID_ALLOCATION_USAGE ((NTSTATUS)0xC01E0110L) + +// +// MessageId: STATUS_GRAPHICS_CANT_RENDER_LOCKED_ALLOCATION +// +// MessageText: +// +// A locked allocation can't be used in the current command buffer. +// +#define STATUS_GRAPHICS_CANT_RENDER_LOCKED_ALLOCATION ((NTSTATUS)0xC01E0111L) + +// +// MessageId: STATUS_GRAPHICS_ALLOCATION_CLOSED +// +// MessageText: +// +// The allocation being referenced has been closed permanently. +// +#define STATUS_GRAPHICS_ALLOCATION_CLOSED ((NTSTATUS)0xC01E0112L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_ALLOCATION_INSTANCE +// +// MessageText: +// +// An invalid allocation instance is being referenced. +// +#define STATUS_GRAPHICS_INVALID_ALLOCATION_INSTANCE ((NTSTATUS)0xC01E0113L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_ALLOCATION_HANDLE +// +// MessageText: +// +// An invalid allocation handle is being referenced. +// +#define STATUS_GRAPHICS_INVALID_ALLOCATION_HANDLE ((NTSTATUS)0xC01E0114L) + +// +// MessageId: STATUS_GRAPHICS_WRONG_ALLOCATION_DEVICE +// +// MessageText: +// +// The allocation being referenced doesn't belong to the current device. +// +#define STATUS_GRAPHICS_WRONG_ALLOCATION_DEVICE ((NTSTATUS)0xC01E0115L) + +// +// MessageId: STATUS_GRAPHICS_ALLOCATION_CONTENT_LOST +// +// MessageText: +// +// The specified allocation lost its content. +// +#define STATUS_GRAPHICS_ALLOCATION_CONTENT_LOST ((NTSTATUS)0xC01E0116L) + +// +// Video GPU Scheduler (VidSch) specific status codes {0x0200..0x02ff} +// +// +// MessageId: STATUS_GRAPHICS_GPU_EXCEPTION_ON_DEVICE +// +// MessageText: +// +// GPU exception is detected on the given device. The device is not able to be scheduled. +// +#define STATUS_GRAPHICS_GPU_EXCEPTION_ON_DEVICE ((NTSTATUS)0xC01E0200L) + +// +// Video Present Network Management (VidPNMgr) specific status codes {0x0300..0x03ff} +// +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY +// +// MessageText: +// +// Specified VidPN topology is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY ((NTSTATUS)0xC01E0300L) + +// +// MessageId: STATUS_GRAPHICS_VIDPN_TOPOLOGY_NOT_SUPPORTED +// +// MessageText: +// +// Specified VidPN topology is valid but is not supported by this model of the display adapter. +// +#define STATUS_GRAPHICS_VIDPN_TOPOLOGY_NOT_SUPPORTED ((NTSTATUS)0xC01E0301L) + +// +// MessageId: STATUS_GRAPHICS_VIDPN_TOPOLOGY_CURRENTLY_NOT_SUPPORTED +// +// MessageText: +// +// Specified VidPN topology is valid but is not supported by the display adapter at this time, due to current allocation of its resources. +// +#define STATUS_GRAPHICS_VIDPN_TOPOLOGY_CURRENTLY_NOT_SUPPORTED ((NTSTATUS)0xC01E0302L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDPN +// +// MessageText: +// +// Specified VidPN handle is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDPN ((NTSTATUS)0xC01E0303L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE +// +// MessageText: +// +// Specified video present source is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE ((NTSTATUS)0xC01E0304L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET +// +// MessageText: +// +// Specified video present target is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET ((NTSTATUS)0xC01E0305L) + +// +// MessageId: STATUS_GRAPHICS_VIDPN_MODALITY_NOT_SUPPORTED +// +// MessageText: +// +// Specified VidPN modality is not supported (e.g. at least two of the pinned modes are not cofunctional). +// +#define STATUS_GRAPHICS_VIDPN_MODALITY_NOT_SUPPORTED ((NTSTATUS)0xC01E0306L) + +// +// MessageId: STATUS_GRAPHICS_MODE_NOT_PINNED +// +// MessageText: +// +// No mode is pinned on the specified VidPN source/target. +// +#define STATUS_GRAPHICS_MODE_NOT_PINNED ((NTSTATUS)0x401E0307L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDPN_SOURCEMODESET +// +// MessageText: +// +// Specified VidPN source mode set is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDPN_SOURCEMODESET ((NTSTATUS)0xC01E0308L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDPN_TARGETMODESET +// +// MessageText: +// +// Specified VidPN target mode set is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDPN_TARGETMODESET ((NTSTATUS)0xC01E0309L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_FREQUENCY +// +// MessageText: +// +// Specified video signal frequency is invalid. +// +#define STATUS_GRAPHICS_INVALID_FREQUENCY ((NTSTATUS)0xC01E030AL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_ACTIVE_REGION +// +// MessageText: +// +// Specified video signal active region is invalid. +// +#define STATUS_GRAPHICS_INVALID_ACTIVE_REGION ((NTSTATUS)0xC01E030BL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_TOTAL_REGION +// +// MessageText: +// +// Specified video signal total region is invalid. +// +#define STATUS_GRAPHICS_INVALID_TOTAL_REGION ((NTSTATUS)0xC01E030CL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE_MODE +// +// MessageText: +// +// Specified video present source mode is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE_MODE ((NTSTATUS)0xC01E0310L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET_MODE +// +// MessageText: +// +// Specified video present target mode is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET_MODE ((NTSTATUS)0xC01E0311L) + +// +// MessageId: STATUS_GRAPHICS_PINNED_MODE_MUST_REMAIN_IN_SET +// +// MessageText: +// +// Pinned mode must remain in the set on VidPN's cofunctional modality enumeration. +// +#define STATUS_GRAPHICS_PINNED_MODE_MUST_REMAIN_IN_SET ((NTSTATUS)0xC01E0312L) + +// +// MessageId: STATUS_GRAPHICS_PATH_ALREADY_IN_TOPOLOGY +// +// MessageText: +// +// Specified video present path is already in VidPN's topology. +// +#define STATUS_GRAPHICS_PATH_ALREADY_IN_TOPOLOGY ((NTSTATUS)0xC01E0313L) + +// +// MessageId: STATUS_GRAPHICS_MODE_ALREADY_IN_MODESET +// +// MessageText: +// +// Specified mode is already in the mode set. +// +#define STATUS_GRAPHICS_MODE_ALREADY_IN_MODESET ((NTSTATUS)0xC01E0314L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDEOPRESENTSOURCESET +// +// MessageText: +// +// Specified video present source set is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDEOPRESENTSOURCESET ((NTSTATUS)0xC01E0315L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDEOPRESENTTARGETSET +// +// MessageText: +// +// Specified video present target set is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDEOPRESENTTARGETSET ((NTSTATUS)0xC01E0316L) + +// +// MessageId: STATUS_GRAPHICS_SOURCE_ALREADY_IN_SET +// +// MessageText: +// +// Specified video present source is already in the video present source set. +// +#define STATUS_GRAPHICS_SOURCE_ALREADY_IN_SET ((NTSTATUS)0xC01E0317L) + +// +// MessageId: STATUS_GRAPHICS_TARGET_ALREADY_IN_SET +// +// MessageText: +// +// Specified video present target is already in the video present target set. +// +#define STATUS_GRAPHICS_TARGET_ALREADY_IN_SET ((NTSTATUS)0xC01E0318L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDPN_PRESENT_PATH +// +// MessageText: +// +// Specified VidPN present path is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDPN_PRESENT_PATH ((NTSTATUS)0xC01E0319L) + +// +// MessageId: STATUS_GRAPHICS_NO_RECOMMENDED_VIDPN_TOPOLOGY +// +// MessageText: +// +// Miniport has no recommendation for augmentation of the specified VidPN's topology. +// +#define STATUS_GRAPHICS_NO_RECOMMENDED_VIDPN_TOPOLOGY ((NTSTATUS)0xC01E031AL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGESET +// +// MessageText: +// +// Specified monitor frequency range set is invalid. +// +#define STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGESET ((NTSTATUS)0xC01E031BL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE +// +// MessageText: +// +// Specified monitor frequency range is invalid. +// +#define STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE ((NTSTATUS)0xC01E031CL) + +// +// MessageId: STATUS_GRAPHICS_FREQUENCYRANGE_NOT_IN_SET +// +// MessageText: +// +// Specified frequency range is not in the specified monitor frequency range set. +// +#define STATUS_GRAPHICS_FREQUENCYRANGE_NOT_IN_SET ((NTSTATUS)0xC01E031DL) + +// +// MessageId: STATUS_GRAPHICS_NO_PREFERRED_MODE +// +// MessageText: +// +// Specified mode set does not specify preference for one of its modes. +// +#define STATUS_GRAPHICS_NO_PREFERRED_MODE ((NTSTATUS)0x401E031EL) + +// +// MessageId: STATUS_GRAPHICS_FREQUENCYRANGE_ALREADY_IN_SET +// +// MessageText: +// +// Specified frequency range is already in the specified monitor frequency range set. +// +#define STATUS_GRAPHICS_FREQUENCYRANGE_ALREADY_IN_SET ((NTSTATUS)0xC01E031FL) + +// +// MessageId: STATUS_GRAPHICS_STALE_MODESET +// +// MessageText: +// +// Specified mode set is stale. Please reacquire the new mode set. +// +#define STATUS_GRAPHICS_STALE_MODESET ((NTSTATUS)0xC01E0320L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_MONITOR_SOURCEMODESET +// +// MessageText: +// +// Specified monitor source mode set is invalid. +// +#define STATUS_GRAPHICS_INVALID_MONITOR_SOURCEMODESET ((NTSTATUS)0xC01E0321L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_MONITOR_SOURCE_MODE +// +// MessageText: +// +// Specified monitor source mode is invalid. +// +#define STATUS_GRAPHICS_INVALID_MONITOR_SOURCE_MODE ((NTSTATUS)0xC01E0322L) + +// +// MessageId: STATUS_GRAPHICS_NO_RECOMMENDED_FUNCTIONAL_VIDPN +// +// MessageText: +// +// Miniport does not have any recommendation regarding the request to provide a functional VidPN given the current display adapter configuration. +// +#define STATUS_GRAPHICS_NO_RECOMMENDED_FUNCTIONAL_VIDPN ((NTSTATUS)0xC01E0323L) + +// +// MessageId: STATUS_GRAPHICS_MODE_ID_MUST_BE_UNIQUE +// +// MessageText: +// +// ID of the specified mode is already used by another mode in the set. +// +#define STATUS_GRAPHICS_MODE_ID_MUST_BE_UNIQUE ((NTSTATUS)0xC01E0324L) + +// +// MessageId: STATUS_GRAPHICS_EMPTY_ADAPTER_MONITOR_MODE_SUPPORT_INTERSECTION +// +// MessageText: +// +// System failed to determine a mode that is supported by both the display adapter and the monitor connected to it. +// +#define STATUS_GRAPHICS_EMPTY_ADAPTER_MONITOR_MODE_SUPPORT_INTERSECTION ((NTSTATUS)0xC01E0325L) + +// +// MessageId: STATUS_GRAPHICS_VIDEO_PRESENT_TARGETS_LESS_THAN_SOURCES +// +// MessageText: +// +// Number of video present targets must be greater than or equal to the number of video present sources. +// +#define STATUS_GRAPHICS_VIDEO_PRESENT_TARGETS_LESS_THAN_SOURCES ((NTSTATUS)0xC01E0326L) + +// +// MessageId: STATUS_GRAPHICS_PATH_NOT_IN_TOPOLOGY +// +// MessageText: +// +// Specified present path is not in VidPN's topology. +// +#define STATUS_GRAPHICS_PATH_NOT_IN_TOPOLOGY ((NTSTATUS)0xC01E0327L) + +// +// MessageId: STATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_SOURCE +// +// MessageText: +// +// Display adapter must have at least one video present source. +// +#define STATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_SOURCE ((NTSTATUS)0xC01E0328L) + +// +// MessageId: STATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_TARGET +// +// MessageText: +// +// Display adapter must have at least one video present target. +// +#define STATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_TARGET ((NTSTATUS)0xC01E0329L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_MONITORDESCRIPTORSET +// +// MessageText: +// +// Specified monitor descriptor set is invalid. +// +#define STATUS_GRAPHICS_INVALID_MONITORDESCRIPTORSET ((NTSTATUS)0xC01E032AL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_MONITORDESCRIPTOR +// +// MessageText: +// +// Specified monitor descriptor is invalid. +// +#define STATUS_GRAPHICS_INVALID_MONITORDESCRIPTOR ((NTSTATUS)0xC01E032BL) + +// +// MessageId: STATUS_GRAPHICS_MONITORDESCRIPTOR_NOT_IN_SET +// +// MessageText: +// +// Specified descriptor is not in the specified monitor descriptor set. +// +#define STATUS_GRAPHICS_MONITORDESCRIPTOR_NOT_IN_SET ((NTSTATUS)0xC01E032CL) + +// +// MessageId: STATUS_GRAPHICS_MONITORDESCRIPTOR_ALREADY_IN_SET +// +// MessageText: +// +// Specified descriptor is already in the specified monitor descriptor set. +// +#define STATUS_GRAPHICS_MONITORDESCRIPTOR_ALREADY_IN_SET ((NTSTATUS)0xC01E032DL) + +// +// MessageId: STATUS_GRAPHICS_MONITORDESCRIPTOR_ID_MUST_BE_UNIQUE +// +// MessageText: +// +// ID of the specified monitor descriptor is already used by another descriptor in the set. +// +#define STATUS_GRAPHICS_MONITORDESCRIPTOR_ID_MUST_BE_UNIQUE ((NTSTATUS)0xC01E032EL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDPN_TARGET_SUBSET_TYPE +// +// MessageText: +// +// Specified video present target subset type is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDPN_TARGET_SUBSET_TYPE ((NTSTATUS)0xC01E032FL) + +// +// MessageId: STATUS_GRAPHICS_RESOURCES_NOT_RELATED +// +// MessageText: +// +// Two or more of the specified resources are not related to each other, as defined by the interface semantics. +// +#define STATUS_GRAPHICS_RESOURCES_NOT_RELATED ((NTSTATUS)0xC01E0330L) + +// +// MessageId: STATUS_GRAPHICS_SOURCE_ID_MUST_BE_UNIQUE +// +// MessageText: +// +// ID of the specified video present source is already used by another source in the set. +// +#define STATUS_GRAPHICS_SOURCE_ID_MUST_BE_UNIQUE ((NTSTATUS)0xC01E0331L) + +// +// MessageId: STATUS_GRAPHICS_TARGET_ID_MUST_BE_UNIQUE +// +// MessageText: +// +// ID of the specified video present target is already used by another target in the set. +// +#define STATUS_GRAPHICS_TARGET_ID_MUST_BE_UNIQUE ((NTSTATUS)0xC01E0332L) + +// +// MessageId: STATUS_GRAPHICS_NO_AVAILABLE_VIDPN_TARGET +// +// MessageText: +// +// Specified VidPN source cannot be used because there is no available VidPN target to connect it to. +// +#define STATUS_GRAPHICS_NO_AVAILABLE_VIDPN_TARGET ((NTSTATUS)0xC01E0333L) + +// +// MessageId: STATUS_GRAPHICS_MONITOR_COULD_NOT_BE_ASSOCIATED_WITH_ADAPTER +// +// MessageText: +// +// Newly arrived monitor could not be associated with a display adapter. +// +#define STATUS_GRAPHICS_MONITOR_COULD_NOT_BE_ASSOCIATED_WITH_ADAPTER ((NTSTATUS)0xC01E0334L) + +// +// MessageId: STATUS_GRAPHICS_NO_VIDPNMGR +// +// MessageText: +// +// Display adapter in question does not have an associated VidPN manager. +// +#define STATUS_GRAPHICS_NO_VIDPNMGR ((NTSTATUS)0xC01E0335L) + +// +// MessageId: STATUS_GRAPHICS_NO_ACTIVE_VIDPN +// +// MessageText: +// +// VidPN manager of the display adapter in question does not have an active VidPN. +// +#define STATUS_GRAPHICS_NO_ACTIVE_VIDPN ((NTSTATUS)0xC01E0336L) + +// +// MessageId: STATUS_GRAPHICS_STALE_VIDPN_TOPOLOGY +// +// MessageText: +// +// Specified VidPN topology is stale. Please reacquire the new topology. +// +#define STATUS_GRAPHICS_STALE_VIDPN_TOPOLOGY ((NTSTATUS)0xC01E0337L) + +// +// MessageId: STATUS_GRAPHICS_MONITOR_NOT_CONNECTED +// +// MessageText: +// +// There is no monitor connected on the specified video present target. +// +#define STATUS_GRAPHICS_MONITOR_NOT_CONNECTED ((NTSTATUS)0xC01E0338L) + +// +// MessageId: STATUS_GRAPHICS_SOURCE_NOT_IN_TOPOLOGY +// +// MessageText: +// +// Specified source is not part of the specified VidPN's topology. +// +#define STATUS_GRAPHICS_SOURCE_NOT_IN_TOPOLOGY ((NTSTATUS)0xC01E0339L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_PRIMARYSURFACE_SIZE +// +// MessageText: +// +// Specified primary surface size is invalid. +// +#define STATUS_GRAPHICS_INVALID_PRIMARYSURFACE_SIZE ((NTSTATUS)0xC01E033AL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VISIBLEREGION_SIZE +// +// MessageText: +// +// Specified visible region size is invalid. +// +#define STATUS_GRAPHICS_INVALID_VISIBLEREGION_SIZE ((NTSTATUS)0xC01E033BL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_STRIDE +// +// MessageText: +// +// Specified stride is invalid. +// +#define STATUS_GRAPHICS_INVALID_STRIDE ((NTSTATUS)0xC01E033CL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_PIXELFORMAT +// +// MessageText: +// +// Specified pixel format is invalid. +// +#define STATUS_GRAPHICS_INVALID_PIXELFORMAT ((NTSTATUS)0xC01E033DL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_COLORBASIS +// +// MessageText: +// +// Specified color basis is invalid. +// +#define STATUS_GRAPHICS_INVALID_COLORBASIS ((NTSTATUS)0xC01E033EL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_PIXELVALUEACCESSMODE +// +// MessageText: +// +// Specified pixel value access mode is invalid. +// +#define STATUS_GRAPHICS_INVALID_PIXELVALUEACCESSMODE ((NTSTATUS)0xC01E033FL) + +// +// MessageId: STATUS_GRAPHICS_TARGET_NOT_IN_TOPOLOGY +// +// MessageText: +// +// Specified target is not part of the specified VidPN's topology. +// +#define STATUS_GRAPHICS_TARGET_NOT_IN_TOPOLOGY ((NTSTATUS)0xC01E0340L) + +// +// MessageId: STATUS_GRAPHICS_NO_DISPLAY_MODE_MANAGEMENT_SUPPORT +// +// MessageText: +// +// Failed to acquire display mode management interface. +// +#define STATUS_GRAPHICS_NO_DISPLAY_MODE_MANAGEMENT_SUPPORT ((NTSTATUS)0xC01E0341L) + +// +// MessageId: STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE +// +// MessageText: +// +// Specified VidPN source is already owned by a DMM client and cannot be used until that client releases it. +// +#define STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE ((NTSTATUS)0xC01E0342L) + +// +// MessageId: STATUS_GRAPHICS_CANT_ACCESS_ACTIVE_VIDPN +// +// MessageText: +// +// Specified VidPN is active and cannot be accessed. +// +#define STATUS_GRAPHICS_CANT_ACCESS_ACTIVE_VIDPN ((NTSTATUS)0xC01E0343L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_PATH_IMPORTANCE_ORDINAL +// +// MessageText: +// +// Specified VidPN present path importance ordinal is invalid. +// +#define STATUS_GRAPHICS_INVALID_PATH_IMPORTANCE_ORDINAL ((NTSTATUS)0xC01E0344L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_PATH_CONTENT_GEOMETRY_TRANSFORMATION +// +// MessageText: +// +// Specified VidPN present path content geometry transformation is invalid. +// +#define STATUS_GRAPHICS_INVALID_PATH_CONTENT_GEOMETRY_TRANSFORMATION ((NTSTATUS)0xC01E0345L) + +// +// MessageId: STATUS_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_SUPPORTED +// +// MessageText: +// +// Specified content geometry transformation is not supported on the respective VidPN present path. +// +#define STATUS_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_SUPPORTED ((NTSTATUS)0xC01E0346L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_GAMMA_RAMP +// +// MessageText: +// +// Specified gamma ramp is invalid. +// +#define STATUS_GRAPHICS_INVALID_GAMMA_RAMP ((NTSTATUS)0xC01E0347L) + +// +// MessageId: STATUS_GRAPHICS_GAMMA_RAMP_NOT_SUPPORTED +// +// MessageText: +// +// Specified gamma ramp is not supported on the respective VidPN present path. +// +#define STATUS_GRAPHICS_GAMMA_RAMP_NOT_SUPPORTED ((NTSTATUS)0xC01E0348L) + +// +// MessageId: STATUS_GRAPHICS_MULTISAMPLING_NOT_SUPPORTED +// +// MessageText: +// +// Multi-sampling is not supported on the respective VidPN present path. +// +#define STATUS_GRAPHICS_MULTISAMPLING_NOT_SUPPORTED ((NTSTATUS)0xC01E0349L) + +// +// MessageId: STATUS_GRAPHICS_MODE_NOT_IN_MODESET +// +// MessageText: +// +// Specified mode is not in the specified mode set. +// +#define STATUS_GRAPHICS_MODE_NOT_IN_MODESET ((NTSTATUS)0xC01E034AL) + +// +// MessageId: STATUS_GRAPHICS_DATASET_IS_EMPTY +// +// MessageText: +// +// Specified data set (e.g. mode set, frequency range set, descriptor set, topology, etc.) is empty. +// +#define STATUS_GRAPHICS_DATASET_IS_EMPTY ((NTSTATUS)0x401E034BL) + +// +// MessageId: STATUS_GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET +// +// MessageText: +// +// Specified data set (e.g. mode set, frequency range set, descriptor set, topology, etc.) does not contain any more elements. +// +#define STATUS_GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET ((NTSTATUS)0x401E034CL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY_RECOMMENDATION_REASON +// +// MessageText: +// +// Specified VidPN topology recommendation reason is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY_RECOMMENDATION_REASON ((NTSTATUS)0xC01E034DL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_PATH_CONTENT_TYPE +// +// MessageText: +// +// Specified VidPN present path content type is invalid. +// +#define STATUS_GRAPHICS_INVALID_PATH_CONTENT_TYPE ((NTSTATUS)0xC01E034EL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_COPYPROTECTION_TYPE +// +// MessageText: +// +// Specified VidPN present path copy protection type is invalid. +// +#define STATUS_GRAPHICS_INVALID_COPYPROTECTION_TYPE ((NTSTATUS)0xC01E034FL) + +// +// MessageId: STATUS_GRAPHICS_UNASSIGNED_MODESET_ALREADY_EXISTS +// +// MessageText: +// +// No more than one unassigned mode set can exist at any given time for a given VidPN source/target. +// +#define STATUS_GRAPHICS_UNASSIGNED_MODESET_ALREADY_EXISTS ((NTSTATUS)0xC01E0350L) + +// +// MessageId: STATUS_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_PINNED +// +// MessageText: +// +// Specified content transformation is not pinned on the specified VidPN present path. +// +#define STATUS_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_PINNED ((NTSTATUS)0x401E0351L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_SCANLINE_ORDERING +// +// MessageText: +// +// Specified scanline ordering type is invalid. +// +#define STATUS_GRAPHICS_INVALID_SCANLINE_ORDERING ((NTSTATUS)0xC01E0352L) + +// +// MessageId: STATUS_GRAPHICS_TOPOLOGY_CHANGES_NOT_ALLOWED +// +// MessageText: +// +// Topology changes are not allowed for the specified VidPN. +// +#define STATUS_GRAPHICS_TOPOLOGY_CHANGES_NOT_ALLOWED ((NTSTATUS)0xC01E0353L) + +// +// MessageId: STATUS_GRAPHICS_NO_AVAILABLE_IMPORTANCE_ORDINALS +// +// MessageText: +// +// All available importance ordinals are already used in specified topology. +// +#define STATUS_GRAPHICS_NO_AVAILABLE_IMPORTANCE_ORDINALS ((NTSTATUS)0xC01E0354L) + +// +// MessageId: STATUS_GRAPHICS_INCOMPATIBLE_PRIVATE_FORMAT +// +// MessageText: +// +// Specified primary surface has a different private format attribute than the current primary surface +// +#define STATUS_GRAPHICS_INCOMPATIBLE_PRIVATE_FORMAT ((NTSTATUS)0xC01E0355L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_MODE_PRUNING_ALGORITHM +// +// MessageText: +// +// Specified mode pruning algorithm is invalid +// +#define STATUS_GRAPHICS_INVALID_MODE_PRUNING_ALGORITHM ((NTSTATUS)0xC01E0356L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_MONITOR_CAPABILITY_ORIGIN +// +// MessageText: +// +// Specified monitor capability origin is invalid. +// +#define STATUS_GRAPHICS_INVALID_MONITOR_CAPABILITY_ORIGIN ((NTSTATUS)0xC01E0357L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE_CONSTRAINT +// +// MessageText: +// +// Specified monitor frequency range constraint is invalid. +// +#define STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE_CONSTRAINT ((NTSTATUS)0xC01E0358L) + +// +// MessageId: STATUS_GRAPHICS_MAX_NUM_PATHS_REACHED +// +// MessageText: +// +// Maximum supported number of present paths has been reached. +// +#define STATUS_GRAPHICS_MAX_NUM_PATHS_REACHED ((NTSTATUS)0xC01E0359L) + +// +// MessageId: STATUS_GRAPHICS_CANCEL_VIDPN_TOPOLOGY_AUGMENTATION +// +// MessageText: +// +// Miniport requested that augmentation be cancelled for the specified source of the specified VidPN's topology. +// +#define STATUS_GRAPHICS_CANCEL_VIDPN_TOPOLOGY_AUGMENTATION ((NTSTATUS)0xC01E035AL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_CLIENT_TYPE +// +// MessageText: +// +// Specified client type was not recognized. +// +#define STATUS_GRAPHICS_INVALID_CLIENT_TYPE ((NTSTATUS)0xC01E035BL) + +// +// MessageId: STATUS_GRAPHICS_CLIENTVIDPN_NOT_SET +// +// MessageText: +// +// Client VidPN is not set on this adapter (e.g. no user mode initiated mode changes took place on this adapter yet). +// +#define STATUS_GRAPHICS_CLIENTVIDPN_NOT_SET ((NTSTATUS)0xC01E035CL) + +// +// Port specific status codes {0x0400..0x04ff} +// +// +// MessageId: STATUS_GRAPHICS_SPECIFIED_CHILD_ALREADY_CONNECTED +// +// MessageText: +// +// Specified display adapter child device already has an external device connected to it. +// +#define STATUS_GRAPHICS_SPECIFIED_CHILD_ALREADY_CONNECTED ((NTSTATUS)0xC01E0400L) + +// +// MessageId: STATUS_GRAPHICS_CHILD_DESCRIPTOR_NOT_SUPPORTED +// +// MessageText: +// +// Specified display adapter child device does not support descriptor exposure. +// +#define STATUS_GRAPHICS_CHILD_DESCRIPTOR_NOT_SUPPORTED ((NTSTATUS)0xC01E0401L) + +// +// MessageId: STATUS_GRAPHICS_UNKNOWN_CHILD_STATUS +// +// MessageText: +// +// Child device presence was not reliably detected. +// +#define STATUS_GRAPHICS_UNKNOWN_CHILD_STATUS ((NTSTATUS)0x401E042FL) + +// +// MessageId: STATUS_GRAPHICS_NOT_A_LINKED_ADAPTER +// +// MessageText: +// +// The display adapter is not linked to any other adapters. +// +#define STATUS_GRAPHICS_NOT_A_LINKED_ADAPTER ((NTSTATUS)0xC01E0430L) + +// +// MessageId: STATUS_GRAPHICS_LEADLINK_NOT_ENUMERATED +// +// MessageText: +// +// Lead adapter in a linked configuration was not enumerated yet. +// +#define STATUS_GRAPHICS_LEADLINK_NOT_ENUMERATED ((NTSTATUS)0xC01E0431L) + +// +// MessageId: STATUS_GRAPHICS_CHAINLINKS_NOT_ENUMERATED +// +// MessageText: +// +// Some chain adapters in a linked configuration were not enumerated yet. +// +#define STATUS_GRAPHICS_CHAINLINKS_NOT_ENUMERATED ((NTSTATUS)0xC01E0432L) + +// +// MessageId: STATUS_GRAPHICS_ADAPTER_CHAIN_NOT_READY +// +// MessageText: +// +// The chain of linked adapters is not ready to start because of an unknown failure. +// +#define STATUS_GRAPHICS_ADAPTER_CHAIN_NOT_READY ((NTSTATUS)0xC01E0433L) + +// +// MessageId: STATUS_GRAPHICS_CHAINLINKS_NOT_STARTED +// +// MessageText: +// +// An attempt was made to start a lead link display adapter when the chain links were not started yet. +// +#define STATUS_GRAPHICS_CHAINLINKS_NOT_STARTED ((NTSTATUS)0xC01E0434L) + +// +// MessageId: STATUS_GRAPHICS_CHAINLINKS_NOT_POWERED_ON +// +// MessageText: +// +// An attempt was made to power up a lead link display adapter when the chain links were powered down. +// +#define STATUS_GRAPHICS_CHAINLINKS_NOT_POWERED_ON ((NTSTATUS)0xC01E0435L) + +// +// MessageId: STATUS_GRAPHICS_INCONSISTENT_DEVICE_LINK_STATE +// +// MessageText: +// +// The adapter link was found to be in an inconsistent state. Not all adapters are in an expected PNP/Power state. +// +#define STATUS_GRAPHICS_INCONSISTENT_DEVICE_LINK_STATE ((NTSTATUS)0xC01E0436L) + +// +// MessageId: STATUS_GRAPHICS_LEADLINK_START_DEFERRED +// +// MessageText: +// +// Starting the leadlink adapter has been deferred temporarily. +// +#define STATUS_GRAPHICS_LEADLINK_START_DEFERRED ((NTSTATUS)0x401E0437L) + +// +// MessageId: STATUS_GRAPHICS_NOT_POST_DEVICE_DRIVER +// +// MessageText: +// +// The driver trying to start is not the same as the driver for the POSTed display adapter. +// +#define STATUS_GRAPHICS_NOT_POST_DEVICE_DRIVER ((NTSTATUS)0xC01E0438L) + +// +// MessageId: STATUS_GRAPHICS_POLLING_TOO_FREQUENTLY +// +// MessageText: +// +// The display adapter is being polled for children too frequently at the same polling level. +// +#define STATUS_GRAPHICS_POLLING_TOO_FREQUENTLY ((NTSTATUS)0x401E0439L) + +// +// MessageId: STATUS_GRAPHICS_START_DEFERRED +// +// MessageText: +// +// Starting the adapter has been deferred temporarily. +// +#define STATUS_GRAPHICS_START_DEFERRED ((NTSTATUS)0x401E043AL) + +// +// MessageId: STATUS_GRAPHICS_ADAPTER_ACCESS_NOT_EXCLUDED +// +// MessageText: +// +// An operation is being attempted that requires the display adapter to be in a quiescent state. +// +#define STATUS_GRAPHICS_ADAPTER_ACCESS_NOT_EXCLUDED ((NTSTATUS)0xC01E043BL) + +// +// OPM, PVP and UAB status codes {0x0500..0x057F} +// +// +// MessageId: STATUS_GRAPHICS_OPM_NOT_SUPPORTED +// +// MessageText: +// +// The driver does not support OPM. +// +#define STATUS_GRAPHICS_OPM_NOT_SUPPORTED ((NTSTATUS)0xC01E0500L) + +// +// MessageId: STATUS_GRAPHICS_COPP_NOT_SUPPORTED +// +// MessageText: +// +// The driver does not support COPP. +// +#define STATUS_GRAPHICS_COPP_NOT_SUPPORTED ((NTSTATUS)0xC01E0501L) + +// +// MessageId: STATUS_GRAPHICS_UAB_NOT_SUPPORTED +// +// MessageText: +// +// The driver does not support UAB. +// +#define STATUS_GRAPHICS_UAB_NOT_SUPPORTED ((NTSTATUS)0xC01E0502L) + +// +// MessageId: STATUS_GRAPHICS_OPM_INVALID_ENCRYPTED_PARAMETERS +// +// MessageText: +// +// The specified encrypted parameters are invalid. +// +#define STATUS_GRAPHICS_OPM_INVALID_ENCRYPTED_PARAMETERS ((NTSTATUS)0xC01E0503L) + +// +// MessageId: STATUS_GRAPHICS_OPM_NO_PROTECTED_OUTPUTS_EXIST +// +// MessageText: +// +// The GDI display device passed to this function does not have any active protected outputs. +// +#define STATUS_GRAPHICS_OPM_NO_PROTECTED_OUTPUTS_EXIST ((NTSTATUS)0xC01E0505L) + +// +// MessageId: STATUS_GRAPHICS_OPM_INTERNAL_ERROR +// +// MessageText: +// +// An internal error caused an operation to fail. +// +#define STATUS_GRAPHICS_OPM_INTERNAL_ERROR ((NTSTATUS)0xC01E050BL) + +// +// MessageId: STATUS_GRAPHICS_OPM_INVALID_HANDLE +// +// MessageText: +// +// The function failed because the caller passed in an invalid OPM user mode handle. +// +#define STATUS_GRAPHICS_OPM_INVALID_HANDLE ((NTSTATUS)0xC01E050CL) + +// +// MessageId: STATUS_GRAPHICS_PVP_INVALID_CERTIFICATE_LENGTH +// +// MessageText: +// +// A certificate could not be returned because the certificate buffer passed to the function was too small. +// +#define STATUS_GRAPHICS_PVP_INVALID_CERTIFICATE_LENGTH ((NTSTATUS)0xC01E050EL) + +// +// MessageId: STATUS_GRAPHICS_OPM_SPANNING_MODE_ENABLED +// +// MessageText: +// +// The DxgkDdiOpmCreateProtectedOutput function could not create a protected output because the Video Present Target is in spanning mode. +// +#define STATUS_GRAPHICS_OPM_SPANNING_MODE_ENABLED ((NTSTATUS)0xC01E050FL) + +// +// MessageId: STATUS_GRAPHICS_OPM_THEATER_MODE_ENABLED +// +// MessageText: +// +// The DxgkDdiOpmCreateProtectedOutput function could not create a protected output because the Video Present Target is in theater mode. +// +#define STATUS_GRAPHICS_OPM_THEATER_MODE_ENABLED ((NTSTATUS)0xC01E0510L) + +// +// MessageId: STATUS_GRAPHICS_PVP_HFS_FAILED +// +// MessageText: +// +// The function failed because the display adapter's Hardware Functionality Scan failed to validate the graphics hardware. +// +#define STATUS_GRAPHICS_PVP_HFS_FAILED ((NTSTATUS)0xC01E0511L) + +// +// MessageId: STATUS_GRAPHICS_OPM_INVALID_SRM +// +// MessageText: +// +// The HDCP System Renewability Message passed to this function did not comply with section 5 of the HDCP 1.1 specification. +// +#define STATUS_GRAPHICS_OPM_INVALID_SRM ((NTSTATUS)0xC01E0512L) + +// +// MessageId: STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_HDCP +// +// MessageText: +// +// The protected output cannot enable the High-bandwidth Digital Content Protection (HDCP) System because it does not support HDCP. +// +#define STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_HDCP ((NTSTATUS)0xC01E0513L) + +// +// MessageId: STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_ACP +// +// MessageText: +// +// The protected output cannot enable Analogue Copy Protection (ACP) because it does not support ACP. +// +#define STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_ACP ((NTSTATUS)0xC01E0514L) + +// +// MessageId: STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_CGMSA +// +// MessageText: +// +// The protected output cannot enable the Content Generation Management System Analogue (CGMS-A) protection technology because it does not support CGMS-A. +// +#define STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_CGMSA ((NTSTATUS)0xC01E0515L) + +// +// MessageId: STATUS_GRAPHICS_OPM_HDCP_SRM_NEVER_SET +// +// MessageText: +// +// The DxgkDdiOPMGetInformation function cannot return the version of the SRM being used because the application never successfully passed an SRM to the protected output. +// +#define STATUS_GRAPHICS_OPM_HDCP_SRM_NEVER_SET ((NTSTATUS)0xC01E0516L) + +// +// MessageId: STATUS_GRAPHICS_OPM_RESOLUTION_TOO_HIGH +// +// MessageText: +// +// The DxgkDdiOPMConfigureProtectedOutput function cannot enable the specified output protection technology because the output's screen resolution is too high. +// +#define STATUS_GRAPHICS_OPM_RESOLUTION_TOO_HIGH ((NTSTATUS)0xC01E0517L) + +// +// MessageId: STATUS_GRAPHICS_OPM_ALL_HDCP_HARDWARE_ALREADY_IN_USE +// +// MessageText: +// +// The DxgkDdiOPMConfigureProtectedOutput function cannot enable HDCP because the display adapter's HDCP hardware is already being used by other physical outputs. +// +#define STATUS_GRAPHICS_OPM_ALL_HDCP_HARDWARE_ALREADY_IN_USE ((NTSTATUS)0xC01E0518L) + +// +// MessageId: STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_NO_LONGER_EXISTS +// +// MessageText: +// +// The operating system asynchronously destroyed this OPM protected output because the operating system's state changed. This error typically occurs because the monitor PDO associated with this protected output was removed, the monitor PDO associated with this protected output was stopped, or the protected output's session became a non-console session. +// +#define STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_NO_LONGER_EXISTS ((NTSTATUS)0xC01E051AL) + +// +// MessageId: STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_COPP_SEMANTICS +// +// MessageText: +// +// Either the DxgkDdiOPMGetCOPPCompatibleInformation, DxgkDdiOPMGetInformation, or DxgkDdiOPMConfigureProtectedOutput function failed. This error is returned when the caller tries to use a COPP specific command while the protected output has OPM semantics only. +// +#define STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_COPP_SEMANTICS ((NTSTATUS)0xC01E051CL) + +// +// MessageId: STATUS_GRAPHICS_OPM_INVALID_INFORMATION_REQUEST +// +// MessageText: +// +// The DxgkDdiOPMGetInformation and DxgkDdiOPMGetCOPPCompatibleInformation functions return this error code if the passed in sequence number is not the expected sequence number or the passed in OMAC value is invalid. +// +#define STATUS_GRAPHICS_OPM_INVALID_INFORMATION_REQUEST ((NTSTATUS)0xC01E051DL) + +// +// MessageId: STATUS_GRAPHICS_OPM_DRIVER_INTERNAL_ERROR +// +// MessageText: +// +// The function failed because an unexpected error occurred inside of a display driver. +// +#define STATUS_GRAPHICS_OPM_DRIVER_INTERNAL_ERROR ((NTSTATUS)0xC01E051EL) + +// +// MessageId: STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_OPM_SEMANTICS +// +// MessageText: +// +// Either the DxgkDdiOPMGetCOPPCompatibleInformation, DxgkDdiOPMGetInformation, or DxgkDdiOPMConfigureProtectedOutput function failed. This error is returned when the caller tries to use an OPM specific command while the protected output has COPP semantics only. +// +#define STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_OPM_SEMANTICS ((NTSTATUS)0xC01E051FL) + +// +// MessageId: STATUS_GRAPHICS_OPM_SIGNALING_NOT_SUPPORTED +// +// MessageText: +// +// The DxgkDdiOPMGetCOPPCompatibleInformation and DxgkDdiOPMConfigureProtectedOutput functions return this error if the display driver does not support the DXGKMDT_OPM_GET_ACP_AND_CGMSA_SIGNALING and DXGKMDT_OPM_SET_ACP_AND_CGMSA_SIGNALING GUIDs. +// +#define STATUS_GRAPHICS_OPM_SIGNALING_NOT_SUPPORTED ((NTSTATUS)0xC01E0520L) + +// +// MessageId: STATUS_GRAPHICS_OPM_INVALID_CONFIGURATION_REQUEST +// +// MessageText: +// +// The DxgkDdiOPMConfigureProtectedOutput function returns this error code if the passed in sequence number is not the expected sequence number or the passed in OMAC value is invalid. +// +#define STATUS_GRAPHICS_OPM_INVALID_CONFIGURATION_REQUEST ((NTSTATUS)0xC01E0521L) + +// +// Monitor Configuration API status codes {0x0580..0x05DF} +// +// +// MessageId: STATUS_GRAPHICS_I2C_NOT_SUPPORTED +// +// MessageText: +// +// The monitor connected to the specified video output does not have an I2C bus. +// +#define STATUS_GRAPHICS_I2C_NOT_SUPPORTED ((NTSTATUS)0xC01E0580L) + +// +// MessageId: STATUS_GRAPHICS_I2C_DEVICE_DOES_NOT_EXIST +// +// MessageText: +// +// No device on the I2C bus has the specified address. +// +#define STATUS_GRAPHICS_I2C_DEVICE_DOES_NOT_EXIST ((NTSTATUS)0xC01E0581L) + +// +// MessageId: STATUS_GRAPHICS_I2C_ERROR_TRANSMITTING_DATA +// +// MessageText: +// +// An error occurred while transmitting data to the device on the I2C bus. +// +#define STATUS_GRAPHICS_I2C_ERROR_TRANSMITTING_DATA ((NTSTATUS)0xC01E0582L) + +// +// MessageId: STATUS_GRAPHICS_I2C_ERROR_RECEIVING_DATA +// +// MessageText: +// +// An error occurred while receiving data from the device on the I2C bus. +// +#define STATUS_GRAPHICS_I2C_ERROR_RECEIVING_DATA ((NTSTATUS)0xC01E0583L) + +// +// MessageId: STATUS_GRAPHICS_DDCCI_VCP_NOT_SUPPORTED +// +// MessageText: +// +// The monitor does not support the specified VCP code. +// +#define STATUS_GRAPHICS_DDCCI_VCP_NOT_SUPPORTED ((NTSTATUS)0xC01E0584L) + +// +// MessageId: STATUS_GRAPHICS_DDCCI_INVALID_DATA +// +// MessageText: +// +// The data received from the monitor is invalid. +// +#define STATUS_GRAPHICS_DDCCI_INVALID_DATA ((NTSTATUS)0xC01E0585L) + +// +// MessageId: STATUS_GRAPHICS_DDCCI_MONITOR_RETURNED_INVALID_TIMING_STATUS_BYTE +// +// MessageText: +// +// The function failed because a monitor returned an invalid Timing Status byte when the operating system used the DDC/CI Get Timing Report & Timing Message command to get a timing report from a monitor. +// +#define STATUS_GRAPHICS_DDCCI_MONITOR_RETURNED_INVALID_TIMING_STATUS_BYTE ((NTSTATUS)0xC01E0586L) + +// +// MessageId: STATUS_GRAPHICS_DDCCI_INVALID_CAPABILITIES_STRING +// +// MessageText: +// +// A monitor returned a DDC/CI capabilities string which did not comply with the ACCESS.bus 3.0, DDC/CI 1.1, or MCCS 2 Revision 1 specification. +// +#define STATUS_GRAPHICS_DDCCI_INVALID_CAPABILITIES_STRING ((NTSTATUS)0xC01E0587L) + +// +// MessageId: STATUS_GRAPHICS_MCA_INTERNAL_ERROR +// +// MessageText: +// +// An internal error caused an operation to fail. +// +#define STATUS_GRAPHICS_MCA_INTERNAL_ERROR ((NTSTATUS)0xC01E0588L) + +// +// MessageId: STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_COMMAND +// +// MessageText: +// +// An operation failed because a DDC/CI message had an invalid value in its command field. +// +#define STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_COMMAND ((NTSTATUS)0xC01E0589L) + +// +// MessageId: STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_LENGTH +// +// MessageText: +// +// An error occurred because the field length of a DDC/CI message contained an invalid value. +// +#define STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_LENGTH ((NTSTATUS)0xC01E058AL) + +// +// MessageId: STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_CHECKSUM +// +// MessageText: +// +// An error occurred because the checksum field in a DDC/CI message did not match the message's computed checksum value. This error implies that the data was corrupted while it was being transmitted from a monitor to a computer. +// +#define STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_CHECKSUM ((NTSTATUS)0xC01E058BL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_PHYSICAL_MONITOR_HANDLE +// +// MessageText: +// +// This function failed because an invalid monitor handle was passed to it. +// +#define STATUS_GRAPHICS_INVALID_PHYSICAL_MONITOR_HANDLE ((NTSTATUS)0xC01E058CL) + +// +// MessageId: STATUS_GRAPHICS_MONITOR_NO_LONGER_EXISTS +// +// MessageText: +// +// The operating system asynchronously destroyed the monitor which corresponds to this handle because the operating system's state changed. This error typically occurs because the monitor PDO associated with this handle was removed, the monitor PDO associated with this handle was stopped, or a display mode change occurred. A display mode change occurs when windows sends a WM_DISPLAYCHANGE windows message to applications. +// +#define STATUS_GRAPHICS_MONITOR_NO_LONGER_EXISTS ((NTSTATUS)0xC01E058DL) + +// +// OPM, UAB, PVP and DDC/CI shared status codes {0x25E0..0x25FF} +// +// +// MessageId: STATUS_GRAPHICS_ONLY_CONSOLE_SESSION_SUPPORTED +// +// MessageText: +// +// This function can only be used if a program is running in the local console session. It cannot be used if a program is running on a remote desktop session or on a terminal server session. +// +#define STATUS_GRAPHICS_ONLY_CONSOLE_SESSION_SUPPORTED ((NTSTATUS)0xC01E05E0L) + +// +// MessageId: STATUS_GRAPHICS_NO_DISPLAY_DEVICE_CORRESPONDS_TO_NAME +// +// MessageText: +// +// This function cannot find an actual GDI display device which corresponds to the specified GDI display device name. +// +#define STATUS_GRAPHICS_NO_DISPLAY_DEVICE_CORRESPONDS_TO_NAME ((NTSTATUS)0xC01E05E1L) + +// +// MessageId: STATUS_GRAPHICS_DISPLAY_DEVICE_NOT_ATTACHED_TO_DESKTOP +// +// MessageText: +// +// The function failed because the specified GDI display device was not attached to the Windows desktop. +// +#define STATUS_GRAPHICS_DISPLAY_DEVICE_NOT_ATTACHED_TO_DESKTOP ((NTSTATUS)0xC01E05E2L) + +// +// MessageId: STATUS_GRAPHICS_MIRRORING_DEVICES_NOT_SUPPORTED +// +// MessageText: +// +// This function does not support GDI mirroring display devices because GDI mirroring display devices do not have any physical monitors associated with them. +// +#define STATUS_GRAPHICS_MIRRORING_DEVICES_NOT_SUPPORTED ((NTSTATUS)0xC01E05E3L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_POINTER +// +// MessageText: +// +// The function failed because an invalid pointer parameter was passed to it. A pointer parameter is invalid if it is NULL, it points to an invalid address, it points to a kernel mode address or it is not correctly aligned. +// +#define STATUS_GRAPHICS_INVALID_POINTER ((NTSTATUS)0xC01E05E4L) + +// +// MessageId: STATUS_GRAPHICS_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE +// +// MessageText: +// +// This function failed because the GDI device passed to it did not have any monitors associated with it. +// +#define STATUS_GRAPHICS_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE ((NTSTATUS)0xC01E05E5L) + +// +// MessageId: STATUS_GRAPHICS_PARAMETER_ARRAY_TOO_SMALL +// +// MessageText: +// +// An array passed to the function cannot hold all of the data that the function must copy into the array. +// +#define STATUS_GRAPHICS_PARAMETER_ARRAY_TOO_SMALL ((NTSTATUS)0xC01E05E6L) + +// +// MessageId: STATUS_GRAPHICS_INTERNAL_ERROR +// +// MessageText: +// +// An internal error caused an operation to fail. +// +#define STATUS_GRAPHICS_INTERNAL_ERROR ((NTSTATUS)0xC01E05E7L) + +// +// MessageId: STATUS_GRAPHICS_SESSION_TYPE_CHANGE_IN_PROGRESS +// +// MessageText: +// +// The function failed because the current session is changing its type. This function cannot be called when the current session is changing its type. There are currently three types of sessions: console, disconnected and remote. +// +#define STATUS_GRAPHICS_SESSION_TYPE_CHANGE_IN_PROGRESS ((NTSTATUS)0xC01E05E8L) + + +// +// Full Volume Encryption Error codes (fvevol.sys) +// + +// +// MessageId: STATUS_FVE_LOCKED_VOLUME +// +// MessageText: +// +// This volume is locked by BitLocker Drive Encryption. +// +#define STATUS_FVE_LOCKED_VOLUME ((NTSTATUS)0xC0210000L) + +// +// MessageId: STATUS_FVE_NOT_ENCRYPTED +// +// MessageText: +// +// The volume is not encrypted, no key is available. +// +#define STATUS_FVE_NOT_ENCRYPTED ((NTSTATUS)0xC0210001L) + +// +// MessageId: STATUS_FVE_BAD_INFORMATION +// +// MessageText: +// +// The control block for the encrypted volume is not valid. +// +#define STATUS_FVE_BAD_INFORMATION ((NTSTATUS)0xC0210002L) + +// +// MessageId: STATUS_FVE_TOO_SMALL +// +// MessageText: +// +// The volume cannot be encrypted because it does not have enough free space. +// +#define STATUS_FVE_TOO_SMALL ((NTSTATUS)0xC0210003L) + +// +// MessageId: STATUS_FVE_FAILED_WRONG_FS +// +// MessageText: +// +// The volume cannot be encrypted because the file system is not supported. +// +#define STATUS_FVE_FAILED_WRONG_FS ((NTSTATUS)0xC0210004L) + +// +// MessageId: STATUS_FVE_BAD_PARTITION_SIZE +// +// MessageText: +// +// The file system size is larger than the partition size in the partition table. +// +#define STATUS_FVE_BAD_PARTITION_SIZE ((NTSTATUS)0xC0210005L) + +// +// MessageId: STATUS_FVE_FS_NOT_EXTENDED +// +// MessageText: +// +// The file system does not extend to the end of the volume. +// +#define STATUS_FVE_FS_NOT_EXTENDED ((NTSTATUS)0xC0210006L) + +// +// MessageId: STATUS_FVE_FS_MOUNTED +// +// MessageText: +// +// This operation cannot be performed while a file system is mounted on the volume. +// +#define STATUS_FVE_FS_MOUNTED ((NTSTATUS)0xC0210007L) + +// +// MessageId: STATUS_FVE_NO_LICENSE +// +// MessageText: +// +// BitLocker Drive Encryption is not included with this version of Windows. +// +#define STATUS_FVE_NO_LICENSE ((NTSTATUS)0xC0210008L) + +// +// MessageId: STATUS_FVE_ACTION_NOT_ALLOWED +// +// MessageText: +// +// Requested action not allowed in the current volume state. +// +#define STATUS_FVE_ACTION_NOT_ALLOWED ((NTSTATUS)0xC0210009L) + +// +// MessageId: STATUS_FVE_BAD_DATA +// +// MessageText: +// +// Data supplied is malformed. +// +#define STATUS_FVE_BAD_DATA ((NTSTATUS)0xC021000AL) + +// +// MessageId: STATUS_FVE_VOLUME_NOT_BOUND +// +// MessageText: +// +// The volume is not bound to the system. +// +#define STATUS_FVE_VOLUME_NOT_BOUND ((NTSTATUS)0xC021000BL) + +// +// MessageId: STATUS_FVE_NOT_DATA_VOLUME +// +// MessageText: +// +// That volume is not a data volume. +// +#define STATUS_FVE_NOT_DATA_VOLUME ((NTSTATUS)0xC021000CL) + +// +// MessageId: STATUS_FVE_CONV_READ_ERROR +// +// MessageText: +// +// A read operation failed while converting the volume. +// +#define STATUS_FVE_CONV_READ_ERROR ((NTSTATUS)0xC021000DL) + +// +// MessageId: STATUS_FVE_CONV_WRITE_ERROR +// +// MessageText: +// +// A write operation failed while converting the volume. +// +#define STATUS_FVE_CONV_WRITE_ERROR ((NTSTATUS)0xC021000EL) + +// +// MessageId: STATUS_FVE_OVERLAPPED_UPDATE +// +// MessageText: +// +// The control block for the encrypted volume was updated by another thread. Try again. +// +#define STATUS_FVE_OVERLAPPED_UPDATE ((NTSTATUS)0xC021000FL) + +// +// MessageId: STATUS_FVE_FAILED_SECTOR_SIZE +// +// MessageText: +// +// The encryption algorithm does not support the sector size of that volume. +// +#define STATUS_FVE_FAILED_SECTOR_SIZE ((NTSTATUS)0xC0210010L) + +// +// MessageId: STATUS_FVE_FAILED_AUTHENTICATION +// +// MessageText: +// +// BitLocker recovery authentication failed. +// +#define STATUS_FVE_FAILED_AUTHENTICATION ((NTSTATUS)0xC0210011L) + +// +// MessageId: STATUS_FVE_NOT_OS_VOLUME +// +// MessageText: +// +// That volume is not the OS volume. +// +#define STATUS_FVE_NOT_OS_VOLUME ((NTSTATUS)0xC0210012L) + +// +// MessageId: STATUS_FVE_KEYFILE_NOT_FOUND +// +// MessageText: +// +// The BitLocker startup key or recovery password could not be read from external media. +// +#define STATUS_FVE_KEYFILE_NOT_FOUND ((NTSTATUS)0xC0210013L) + +// +// MessageId: STATUS_FVE_KEYFILE_INVALID +// +// MessageText: +// +// The BitLocker startup key or recovery password file is corrupt or invalid. +// +#define STATUS_FVE_KEYFILE_INVALID ((NTSTATUS)0xC0210014L) + +// +// MessageId: STATUS_FVE_KEYFILE_NO_VMK +// +// MessageText: +// +// The BitLocker encryption key could not be obtained from the startup key or recovery password. +// +#define STATUS_FVE_KEYFILE_NO_VMK ((NTSTATUS)0xC0210015L) + +// +// MessageId: STATUS_FVE_TPM_DISABLED +// +// MessageText: +// +// The Trusted Platform Module (TPM) is disabled. +// +#define STATUS_FVE_TPM_DISABLED ((NTSTATUS)0xC0210016L) + +// +// MessageId: STATUS_FVE_TPM_SRK_AUTH_NOT_ZERO +// +// MessageText: +// +// The authorization data for the Storage Root Key (SRK) of the Trusted Platform Module (TPM) is not zero. +// +#define STATUS_FVE_TPM_SRK_AUTH_NOT_ZERO ((NTSTATUS)0xC0210017L) + +// +// MessageId: STATUS_FVE_TPM_INVALID_PCR +// +// MessageText: +// +// The system boot information changed or the Trusted Platform Module (TPM) locked out access to BitLocker encryption keys until the computer is restarted. +// +#define STATUS_FVE_TPM_INVALID_PCR ((NTSTATUS)0xC0210018L) + +// +// MessageId: STATUS_FVE_TPM_NO_VMK +// +// MessageText: +// +// The BitLocker encryption key could not be obtained from the Trusted Platform Module (TPM). +// +#define STATUS_FVE_TPM_NO_VMK ((NTSTATUS)0xC0210019L) + +// +// MessageId: STATUS_FVE_PIN_INVALID +// +// MessageText: +// +// The BitLocker encryption key could not be obtained from the Trusted Platform Module (TPM) and PIN. +// +#define STATUS_FVE_PIN_INVALID ((NTSTATUS)0xC021001AL) + +// +// MessageId: STATUS_FVE_AUTH_INVALID_APPLICATION +// +// MessageText: +// +// A boot application hash does not match the hash computed when BitLocker was turned on. +// +#define STATUS_FVE_AUTH_INVALID_APPLICATION ((NTSTATUS)0xC021001BL) + +// +// MessageId: STATUS_FVE_AUTH_INVALID_CONFIG +// +// MessageText: +// +// The Boot Configuration Data (BCD) settings are not supported or have changed since BitLocker was enabled. +// +#define STATUS_FVE_AUTH_INVALID_CONFIG ((NTSTATUS)0xC021001CL) + +// +// MessageId: STATUS_FVE_DEBUGGER_ENABLED +// +// MessageText: +// +// Boot debugging is enabled. Run bcdedit to turn it off. +// +#define STATUS_FVE_DEBUGGER_ENABLED ((NTSTATUS)0xC021001DL) + +// +// MessageId: STATUS_FVE_DRY_RUN_FAILED +// +// MessageText: +// +// The BitLocker encryption key could not be obtained. +// +#define STATUS_FVE_DRY_RUN_FAILED ((NTSTATUS)0xC021001EL) + +// +// MessageId: STATUS_FVE_BAD_METADATA_POINTER +// +// MessageText: +// +// The metadata disk region pointer is incorrect. +// +#define STATUS_FVE_BAD_METADATA_POINTER ((NTSTATUS)0xC021001FL) + +// +// MessageId: STATUS_FVE_OLD_METADATA_COPY +// +// MessageText: +// +// The backup copy of the metadata is out of date. +// +#define STATUS_FVE_OLD_METADATA_COPY ((NTSTATUS)0xC0210020L) + +// +// MessageId: STATUS_FVE_REBOOT_REQUIRED +// +// MessageText: +// +// No action was taken as a system reboot is required. +// +#define STATUS_FVE_REBOOT_REQUIRED ((NTSTATUS)0xC0210021L) + +// +// MessageId: STATUS_FVE_RAW_ACCESS +// +// MessageText: +// +// No action was taken as BitLocker Drive Encryption is in RAW access mode. +// +#define STATUS_FVE_RAW_ACCESS ((NTSTATUS)0xC0210022L) + +// +// MessageId: STATUS_FVE_RAW_BLOCKED +// +// MessageText: +// +// BitLocker Drive Encryption cannot enter raw access mode for this volume. +// +#define STATUS_FVE_RAW_BLOCKED ((NTSTATUS)0xC0210023L) + +// +// MessageId: STATUS_FVE_NO_AUTOUNLOCK_MASTER_KEY +// +// MessageText: +// +// The auto-unlock master key was not available from the operating system volume. Retry the operation using the BitLocker WMI interface. +// +#define STATUS_FVE_NO_AUTOUNLOCK_MASTER_KEY ((NTSTATUS)0xC0210024L) + +// +// MessageId: STATUS_FVE_MOR_FAILED +// +// MessageText: +// +// The system firmware failed to enable clearing of system memory on reboot. +// +#define STATUS_FVE_MOR_FAILED ((NTSTATUS)0xC0210025L) + +// +// MessageId: STATUS_FVE_NO_FEATURE_LICENSE +// +// MessageText: +// +// This feature of BitLocker Drive Encryption is not included with this version of Windows. +// +#define STATUS_FVE_NO_FEATURE_LICENSE ((NTSTATUS)0xC0210026L) + +// +// MessageId: STATUS_FVE_POLICY_USER_DISABLE_RDV_NOT_ALLOWED +// +// MessageText: +// +// Group policy does not permit turning off BitLocker Drive Encryption on roaming data volumes. +// +#define STATUS_FVE_POLICY_USER_DISABLE_RDV_NOT_ALLOWED ((NTSTATUS)0xC0210027L) + +// +// MessageId: STATUS_FVE_CONV_RECOVERY_FAILED +// +// MessageText: +// +// Bitlocker Drive Encryption failed to recover from aborted conversion. This could be due to either all conversion logs being corrupted or the media being write-protected. +// +#define STATUS_FVE_CONV_RECOVERY_FAILED ((NTSTATUS)0xC0210028L) + +// +// MessageId: STATUS_FVE_VIRTUALIZED_SPACE_TOO_BIG +// +// MessageText: +// +// The requested virtualization size is too big. +// +#define STATUS_FVE_VIRTUALIZED_SPACE_TOO_BIG ((NTSTATUS)0xC0210029L) + +// +// MessageId: STATUS_FVE_INVALID_DATUM_TYPE +// +// MessageText: +// +// The management information stored on the drive contained an unknown type. If you are using an old version of Windows, try accessing the drive from the latest version. +// +#define STATUS_FVE_INVALID_DATUM_TYPE ((NTSTATUS)0xC021002AL) + +// +// MessageId: STATUS_FVE_VOLUME_TOO_SMALL +// +// MessageText: +// +// The drive is too small to be protected using BitLocker Drive Encryption. +// +#define STATUS_FVE_VOLUME_TOO_SMALL ((NTSTATUS)0xC0210030L) + +// +// MessageId: STATUS_FVE_ENH_PIN_INVALID +// +// MessageText: +// +// The BitLocker encryption key could not be obtained from the Trusted Platform Module (TPM) and enhanced PIN. Try using a PIN containing only numerals. +// +#define STATUS_FVE_ENH_PIN_INVALID ((NTSTATUS)0xC0210031L) + + +// +// FWP error codes (fwpkclnt.sys) +// + +// +// MessageId: STATUS_FWP_CALLOUT_NOT_FOUND +// +// MessageText: +// +// The callout does not exist. +// +#define STATUS_FWP_CALLOUT_NOT_FOUND ((NTSTATUS)0xC0220001L) + +// +// MessageId: STATUS_FWP_CONDITION_NOT_FOUND +// +// MessageText: +// +// The filter condition does not exist. +// +#define STATUS_FWP_CONDITION_NOT_FOUND ((NTSTATUS)0xC0220002L) + +// +// MessageId: STATUS_FWP_FILTER_NOT_FOUND +// +// MessageText: +// +// The filter does not exist. +// +#define STATUS_FWP_FILTER_NOT_FOUND ((NTSTATUS)0xC0220003L) + +// +// MessageId: STATUS_FWP_LAYER_NOT_FOUND +// +// MessageText: +// +// The layer does not exist. +// +#define STATUS_FWP_LAYER_NOT_FOUND ((NTSTATUS)0xC0220004L) + +// +// MessageId: STATUS_FWP_PROVIDER_NOT_FOUND +// +// MessageText: +// +// The provider does not exist. +// +#define STATUS_FWP_PROVIDER_NOT_FOUND ((NTSTATUS)0xC0220005L) + +// +// MessageId: STATUS_FWP_PROVIDER_CONTEXT_NOT_FOUND +// +// MessageText: +// +// The provider context does not exist. +// +#define STATUS_FWP_PROVIDER_CONTEXT_NOT_FOUND ((NTSTATUS)0xC0220006L) + +// +// MessageId: STATUS_FWP_SUBLAYER_NOT_FOUND +// +// MessageText: +// +// The sublayer does not exist. +// +#define STATUS_FWP_SUBLAYER_NOT_FOUND ((NTSTATUS)0xC0220007L) + +// +// MessageId: STATUS_FWP_NOT_FOUND +// +// MessageText: +// +// The object does not exist. +// +#define STATUS_FWP_NOT_FOUND ((NTSTATUS)0xC0220008L) + +// +// MessageId: STATUS_FWP_ALREADY_EXISTS +// +// MessageText: +// +// An object with that GUID or LUID already exists. +// +#define STATUS_FWP_ALREADY_EXISTS ((NTSTATUS)0xC0220009L) + +// +// MessageId: STATUS_FWP_IN_USE +// +// MessageText: +// +// The object is referenced by other objects so cannot be deleted. +// +#define STATUS_FWP_IN_USE ((NTSTATUS)0xC022000AL) + +// +// MessageId: STATUS_FWP_DYNAMIC_SESSION_IN_PROGRESS +// +// MessageText: +// +// The call is not allowed from within a dynamic session. +// +#define STATUS_FWP_DYNAMIC_SESSION_IN_PROGRESS ((NTSTATUS)0xC022000BL) + +// +// MessageId: STATUS_FWP_WRONG_SESSION +// +// MessageText: +// +// The call was made from the wrong session so cannot be completed. +// +#define STATUS_FWP_WRONG_SESSION ((NTSTATUS)0xC022000CL) + +// +// MessageId: STATUS_FWP_NO_TXN_IN_PROGRESS +// +// MessageText: +// +// The call must be made from within an explicit transaction. +// +#define STATUS_FWP_NO_TXN_IN_PROGRESS ((NTSTATUS)0xC022000DL) + +// +// MessageId: STATUS_FWP_TXN_IN_PROGRESS +// +// MessageText: +// +// The call is not allowed from within an explicit transaction. +// +#define STATUS_FWP_TXN_IN_PROGRESS ((NTSTATUS)0xC022000EL) + +// +// MessageId: STATUS_FWP_TXN_ABORTED +// +// MessageText: +// +// The explicit transaction has been forcibly cancelled. +// +#define STATUS_FWP_TXN_ABORTED ((NTSTATUS)0xC022000FL) + +// +// MessageId: STATUS_FWP_SESSION_ABORTED +// +// MessageText: +// +// The session has been cancelled. +// +#define STATUS_FWP_SESSION_ABORTED ((NTSTATUS)0xC0220010L) + +// +// MessageId: STATUS_FWP_INCOMPATIBLE_TXN +// +// MessageText: +// +// The call is not allowed from within a read-only transaction. +// +#define STATUS_FWP_INCOMPATIBLE_TXN ((NTSTATUS)0xC0220011L) + +// +// MessageId: STATUS_FWP_TIMEOUT +// +// MessageText: +// +// The call timed out while waiting to acquire the transaction lock. +// +#define STATUS_FWP_TIMEOUT ((NTSTATUS)0xC0220012L) + +// +// MessageId: STATUS_FWP_NET_EVENTS_DISABLED +// +// MessageText: +// +// Collection of network diagnostic events is disabled. +// +#define STATUS_FWP_NET_EVENTS_DISABLED ((NTSTATUS)0xC0220013L) + +// +// MessageId: STATUS_FWP_INCOMPATIBLE_LAYER +// +// MessageText: +// +// The operation is not supported by the specified layer. +// +#define STATUS_FWP_INCOMPATIBLE_LAYER ((NTSTATUS)0xC0220014L) + +// +// MessageId: STATUS_FWP_KM_CLIENTS_ONLY +// +// MessageText: +// +// The call is allowed for kernel-mode callers only. +// +#define STATUS_FWP_KM_CLIENTS_ONLY ((NTSTATUS)0xC0220015L) + +// +// MessageId: STATUS_FWP_LIFETIME_MISMATCH +// +// MessageText: +// +// The call tried to associate two objects with incompatible lifetimes. +// +#define STATUS_FWP_LIFETIME_MISMATCH ((NTSTATUS)0xC0220016L) + +// +// MessageId: STATUS_FWP_BUILTIN_OBJECT +// +// MessageText: +// +// The object is built in so cannot be deleted. +// +#define STATUS_FWP_BUILTIN_OBJECT ((NTSTATUS)0xC0220017L) + +// +// MessageId: STATUS_FWP_TOO_MANY_CALLOUTS +// +// MessageText: +// +// The maximum number of callouts has been reached. +// +#define STATUS_FWP_TOO_MANY_CALLOUTS ((NTSTATUS)0xC0220018L) + +// +// MessageId: STATUS_FWP_NOTIFICATION_DROPPED +// +// MessageText: +// +// A notification could not be delivered because a message queue is at its maximum capacity. +// +#define STATUS_FWP_NOTIFICATION_DROPPED ((NTSTATUS)0xC0220019L) + +// +// MessageId: STATUS_FWP_TRAFFIC_MISMATCH +// +// MessageText: +// +// The traffic parameters do not match those for the security association context. +// +#define STATUS_FWP_TRAFFIC_MISMATCH ((NTSTATUS)0xC022001AL) + +// +// MessageId: STATUS_FWP_INCOMPATIBLE_SA_STATE +// +// MessageText: +// +// The call is not allowed for the current security association state. +// +#define STATUS_FWP_INCOMPATIBLE_SA_STATE ((NTSTATUS)0xC022001BL) + +// +// MessageId: STATUS_FWP_NULL_POINTER +// +// MessageText: +// +// A required pointer is null. +// +#define STATUS_FWP_NULL_POINTER ((NTSTATUS)0xC022001CL) + +// +// MessageId: STATUS_FWP_INVALID_ENUMERATOR +// +// MessageText: +// +// An enumerator is not valid. +// +#define STATUS_FWP_INVALID_ENUMERATOR ((NTSTATUS)0xC022001DL) + +// +// MessageId: STATUS_FWP_INVALID_FLAGS +// +// MessageText: +// +// The flags field contains an invalid value. +// +#define STATUS_FWP_INVALID_FLAGS ((NTSTATUS)0xC022001EL) + +// +// MessageId: STATUS_FWP_INVALID_NET_MASK +// +// MessageText: +// +// A network mask is not valid. +// +#define STATUS_FWP_INVALID_NET_MASK ((NTSTATUS)0xC022001FL) + +// +// MessageId: STATUS_FWP_INVALID_RANGE +// +// MessageText: +// +// An FWP_RANGE is not valid. +// +#define STATUS_FWP_INVALID_RANGE ((NTSTATUS)0xC0220020L) + +// +// MessageId: STATUS_FWP_INVALID_INTERVAL +// +// MessageText: +// +// The time interval is not valid. +// +#define STATUS_FWP_INVALID_INTERVAL ((NTSTATUS)0xC0220021L) + +// +// MessageId: STATUS_FWP_ZERO_LENGTH_ARRAY +// +// MessageText: +// +// An array that must contain at least one element is zero length. +// +#define STATUS_FWP_ZERO_LENGTH_ARRAY ((NTSTATUS)0xC0220022L) + +// +// MessageId: STATUS_FWP_NULL_DISPLAY_NAME +// +// MessageText: +// +// The displayData.name field cannot be null. +// +#define STATUS_FWP_NULL_DISPLAY_NAME ((NTSTATUS)0xC0220023L) + +// +// MessageId: STATUS_FWP_INVALID_ACTION_TYPE +// +// MessageText: +// +// The action type is not one of the allowed action types for a filter. +// +#define STATUS_FWP_INVALID_ACTION_TYPE ((NTSTATUS)0xC0220024L) + +// +// MessageId: STATUS_FWP_INVALID_WEIGHT +// +// MessageText: +// +// The filter weight is not valid. +// +#define STATUS_FWP_INVALID_WEIGHT ((NTSTATUS)0xC0220025L) + +// +// MessageId: STATUS_FWP_MATCH_TYPE_MISMATCH +// +// MessageText: +// +// A filter condition contains a match type that is not compatible with the operands. +// +#define STATUS_FWP_MATCH_TYPE_MISMATCH ((NTSTATUS)0xC0220026L) + +// +// MessageId: STATUS_FWP_TYPE_MISMATCH +// +// MessageText: +// +// An FWP_VALUE or FWPM_CONDITION_VALUE is of the wrong type. +// +#define STATUS_FWP_TYPE_MISMATCH ((NTSTATUS)0xC0220027L) + +// +// MessageId: STATUS_FWP_OUT_OF_BOUNDS +// +// MessageText: +// +// An integer value is outside the allowed range. +// +#define STATUS_FWP_OUT_OF_BOUNDS ((NTSTATUS)0xC0220028L) + +// +// MessageId: STATUS_FWP_RESERVED +// +// MessageText: +// +// A reserved field is non-zero. +// +#define STATUS_FWP_RESERVED ((NTSTATUS)0xC0220029L) + +// +// MessageId: STATUS_FWP_DUPLICATE_CONDITION +// +// MessageText: +// +// A filter cannot contain multiple conditions operating on a single field. +// +#define STATUS_FWP_DUPLICATE_CONDITION ((NTSTATUS)0xC022002AL) + +// +// MessageId: STATUS_FWP_DUPLICATE_KEYMOD +// +// MessageText: +// +// A policy cannot contain the same keying module more than once. +// +#define STATUS_FWP_DUPLICATE_KEYMOD ((NTSTATUS)0xC022002BL) + +// +// MessageId: STATUS_FWP_ACTION_INCOMPATIBLE_WITH_LAYER +// +// MessageText: +// +// The action type is not compatible with the layer. +// +#define STATUS_FWP_ACTION_INCOMPATIBLE_WITH_LAYER ((NTSTATUS)0xC022002CL) + +// +// MessageId: STATUS_FWP_ACTION_INCOMPATIBLE_WITH_SUBLAYER +// +// MessageText: +// +// The action type is not compatible with the sublayer. +// +#define STATUS_FWP_ACTION_INCOMPATIBLE_WITH_SUBLAYER ((NTSTATUS)0xC022002DL) + +// +// MessageId: STATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_LAYER +// +// MessageText: +// +// The raw context or the provider context is not compatible with the layer. +// +#define STATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_LAYER ((NTSTATUS)0xC022002EL) + +// +// MessageId: STATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_CALLOUT +// +// MessageText: +// +// The raw context or the provider context is not compatible with the callout. +// +#define STATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_CALLOUT ((NTSTATUS)0xC022002FL) + +// +// MessageId: STATUS_FWP_INCOMPATIBLE_AUTH_METHOD +// +// MessageText: +// +// The authentication method is not compatible with the policy type. +// +#define STATUS_FWP_INCOMPATIBLE_AUTH_METHOD ((NTSTATUS)0xC0220030L) + +// +// MessageId: STATUS_FWP_INCOMPATIBLE_DH_GROUP +// +// MessageText: +// +// The Diffie-Hellman group is not compatible with the policy type. +// +#define STATUS_FWP_INCOMPATIBLE_DH_GROUP ((NTSTATUS)0xC0220031L) + +// +// MessageId: STATUS_FWP_EM_NOT_SUPPORTED +// +// MessageText: +// +// An IKE policy cannot contain an Extended Mode policy. +// +#define STATUS_FWP_EM_NOT_SUPPORTED ((NTSTATUS)0xC0220032L) + +// +// MessageId: STATUS_FWP_NEVER_MATCH +// +// MessageText: +// +// The enumeration template or subscription will never match any objects. +// +#define STATUS_FWP_NEVER_MATCH ((NTSTATUS)0xC0220033L) + +// +// MessageId: STATUS_FWP_PROVIDER_CONTEXT_MISMATCH +// +// MessageText: +// +// The provider context is of the wrong type. +// +#define STATUS_FWP_PROVIDER_CONTEXT_MISMATCH ((NTSTATUS)0xC0220034L) + +// +// MessageId: STATUS_FWP_INVALID_PARAMETER +// +// MessageText: +// +// The parameter is incorrect. +// +#define STATUS_FWP_INVALID_PARAMETER ((NTSTATUS)0xC0220035L) + +// +// MessageId: STATUS_FWP_TOO_MANY_SUBLAYERS +// +// MessageText: +// +// The maximum number of sublayers has been reached. +// +#define STATUS_FWP_TOO_MANY_SUBLAYERS ((NTSTATUS)0xC0220036L) + +// +// MessageId: STATUS_FWP_CALLOUT_NOTIFICATION_FAILED +// +// MessageText: +// +// The notification function for a callout returned an error. +// +#define STATUS_FWP_CALLOUT_NOTIFICATION_FAILED ((NTSTATUS)0xC0220037L) + +// +// MessageId: STATUS_FWP_INVALID_AUTH_TRANSFORM +// +// MessageText: +// +// The IPsec authentication transform is not valid. +// +#define STATUS_FWP_INVALID_AUTH_TRANSFORM ((NTSTATUS)0xC0220038L) + +// +// MessageId: STATUS_FWP_INVALID_CIPHER_TRANSFORM +// +// MessageText: +// +// The IPsec cipher transform is not valid. +// +#define STATUS_FWP_INVALID_CIPHER_TRANSFORM ((NTSTATUS)0xC0220039L) + +// +// MessageId: STATUS_FWP_INCOMPATIBLE_CIPHER_TRANSFORM +// +// MessageText: +// +// The IPsec cipher transform is not compatible with the policy. +// +#define STATUS_FWP_INCOMPATIBLE_CIPHER_TRANSFORM ((NTSTATUS)0xC022003AL) + +// +// MessageId: STATUS_FWP_INVALID_TRANSFORM_COMBINATION +// +// MessageText: +// +// The combination of IPsec transform types is not valid. +// +#define STATUS_FWP_INVALID_TRANSFORM_COMBINATION ((NTSTATUS)0xC022003BL) + +// +// MessageId: STATUS_FWP_DUPLICATE_AUTH_METHOD +// +// MessageText: +// +// A policy cannot contain the same auth method more than once. +// +#define STATUS_FWP_DUPLICATE_AUTH_METHOD ((NTSTATUS)0xC022003CL) + +// +// MessageId: STATUS_FWP_TCPIP_NOT_READY +// +// MessageText: +// +// The TCP/IP stack is not ready. +// +#define STATUS_FWP_TCPIP_NOT_READY ((NTSTATUS)0xC0220100L) + +// +// MessageId: STATUS_FWP_INJECT_HANDLE_CLOSING +// +// MessageText: +// +// The injection handle is being closed by another thread. +// +#define STATUS_FWP_INJECT_HANDLE_CLOSING ((NTSTATUS)0xC0220101L) + +// +// MessageId: STATUS_FWP_INJECT_HANDLE_STALE +// +// MessageText: +// +// The injection handle is stale. +// +#define STATUS_FWP_INJECT_HANDLE_STALE ((NTSTATUS)0xC0220102L) + +// +// MessageId: STATUS_FWP_CANNOT_PEND +// +// MessageText: +// +// The classify cannot be pended. +// +#define STATUS_FWP_CANNOT_PEND ((NTSTATUS)0xC0220103L) + +// +// MessageId: STATUS_FWP_DROP_NOICMP +// +// MessageText: +// +// The packet should be dropped, no ICMP should be sent. +// +#define STATUS_FWP_DROP_NOICMP ((NTSTATUS)0xC0220104L) + + +// +// NDIS error codes (ndis.sys) +// + +// +// MessageId: STATUS_NDIS_CLOSING +// +// MessageText: +// +// The binding to the network interface is being closed. +// +#define STATUS_NDIS_CLOSING ((NTSTATUS)0xC0230002L) + +// +// MessageId: STATUS_NDIS_BAD_VERSION +// +// MessageText: +// +// An invalid version was specified. +// +#define STATUS_NDIS_BAD_VERSION ((NTSTATUS)0xC0230004L) + +// +// MessageId: STATUS_NDIS_BAD_CHARACTERISTICS +// +// MessageText: +// +// An invalid characteristics table was used. +// +#define STATUS_NDIS_BAD_CHARACTERISTICS ((NTSTATUS)0xC0230005L) + +// +// MessageId: STATUS_NDIS_ADAPTER_NOT_FOUND +// +// MessageText: +// +// Failed to find the network interface or network interface is not ready. +// +#define STATUS_NDIS_ADAPTER_NOT_FOUND ((NTSTATUS)0xC0230006L) + +// +// MessageId: STATUS_NDIS_OPEN_FAILED +// +// MessageText: +// +// Failed to open the network interface. +// +#define STATUS_NDIS_OPEN_FAILED ((NTSTATUS)0xC0230007L) + +// +// MessageId: STATUS_NDIS_DEVICE_FAILED +// +// MessageText: +// +// Network interface has encountered an internal unrecoverable failure. +// +#define STATUS_NDIS_DEVICE_FAILED ((NTSTATUS)0xC0230008L) + +// +// MessageId: STATUS_NDIS_MULTICAST_FULL +// +// MessageText: +// +// The multicast list on the network interface is full. +// +#define STATUS_NDIS_MULTICAST_FULL ((NTSTATUS)0xC0230009L) + +// +// MessageId: STATUS_NDIS_MULTICAST_EXISTS +// +// MessageText: +// +// An attempt was made to add a duplicate multicast address to the list. +// +#define STATUS_NDIS_MULTICAST_EXISTS ((NTSTATUS)0xC023000AL) + +// +// MessageId: STATUS_NDIS_MULTICAST_NOT_FOUND +// +// MessageText: +// +// At attempt was made to remove a multicast address that was never added. +// +#define STATUS_NDIS_MULTICAST_NOT_FOUND ((NTSTATUS)0xC023000BL) + +// +// MessageId: STATUS_NDIS_REQUEST_ABORTED +// +// MessageText: +// +// Netowork interface aborted the request. +// +#define STATUS_NDIS_REQUEST_ABORTED ((NTSTATUS)0xC023000CL) + +// +// MessageId: STATUS_NDIS_RESET_IN_PROGRESS +// +// MessageText: +// +// Network interface can not process the request because it is being reset. +// +#define STATUS_NDIS_RESET_IN_PROGRESS ((NTSTATUS)0xC023000DL) + +// +// MessageId: STATUS_NDIS_NOT_SUPPORTED +// +// MessageText: +// +// Netword interface does not support this request. +// +#define STATUS_NDIS_NOT_SUPPORTED ((NTSTATUS)0xC02300BBL) + +// +// MessageId: STATUS_NDIS_INVALID_PACKET +// +// MessageText: +// +// An attempt was made to send an invalid packet on a network interface. +// +#define STATUS_NDIS_INVALID_PACKET ((NTSTATUS)0xC023000FL) + +// +// MessageId: STATUS_NDIS_ADAPTER_NOT_READY +// +// MessageText: +// +// Network interface is not ready to complete this operation. +// +#define STATUS_NDIS_ADAPTER_NOT_READY ((NTSTATUS)0xC0230011L) + +// +// MessageId: STATUS_NDIS_INVALID_LENGTH +// +// MessageText: +// +// The length of the buffer submitted for this operation is not valid. +// +#define STATUS_NDIS_INVALID_LENGTH ((NTSTATUS)0xC0230014L) + +// +// MessageId: STATUS_NDIS_INVALID_DATA +// +// MessageText: +// +// The data used for this operation is not valid. +// +#define STATUS_NDIS_INVALID_DATA ((NTSTATUS)0xC0230015L) + +// +// MessageId: STATUS_NDIS_BUFFER_TOO_SHORT +// +// MessageText: +// +// The length of buffer submitted for this operation is too small. +// +#define STATUS_NDIS_BUFFER_TOO_SHORT ((NTSTATUS)0xC0230016L) + +// +// MessageId: STATUS_NDIS_INVALID_OID +// +// MessageText: +// +// Network interface does not support this OID (Object Identifier) +// +#define STATUS_NDIS_INVALID_OID ((NTSTATUS)0xC0230017L) + +// +// MessageId: STATUS_NDIS_ADAPTER_REMOVED +// +// MessageText: +// +// The network interface has been removed. +// +#define STATUS_NDIS_ADAPTER_REMOVED ((NTSTATUS)0xC0230018L) + +// +// MessageId: STATUS_NDIS_UNSUPPORTED_MEDIA +// +// MessageText: +// +// Network interface does not support this media type. +// +#define STATUS_NDIS_UNSUPPORTED_MEDIA ((NTSTATUS)0xC0230019L) + +// +// MessageId: STATUS_NDIS_GROUP_ADDRESS_IN_USE +// +// MessageText: +// +// An attempt was made to remove a token ring group address that is in use by other components. +// +#define STATUS_NDIS_GROUP_ADDRESS_IN_USE ((NTSTATUS)0xC023001AL) + +// +// MessageId: STATUS_NDIS_FILE_NOT_FOUND +// +// MessageText: +// +// An attempt was made to map a file that can not be found. +// +#define STATUS_NDIS_FILE_NOT_FOUND ((NTSTATUS)0xC023001BL) + +// +// MessageId: STATUS_NDIS_ERROR_READING_FILE +// +// MessageText: +// +// An error occured while NDIS tried to map the file. +// +#define STATUS_NDIS_ERROR_READING_FILE ((NTSTATUS)0xC023001CL) + +// +// MessageId: STATUS_NDIS_ALREADY_MAPPED +// +// MessageText: +// +// An attempt was made to map a file that is alreay mapped. +// +#define STATUS_NDIS_ALREADY_MAPPED ((NTSTATUS)0xC023001DL) + +// +// MessageId: STATUS_NDIS_RESOURCE_CONFLICT +// +// MessageText: +// +// An attempt to allocate a hardware resource failed because the resource is used by another component. +// +#define STATUS_NDIS_RESOURCE_CONFLICT ((NTSTATUS)0xC023001EL) + +// +// MessageId: STATUS_NDIS_MEDIA_DISCONNECTED +// +// MessageText: +// +// The I/O operation failed because network media is disconnected or wireless access point is out of range. +// +#define STATUS_NDIS_MEDIA_DISCONNECTED ((NTSTATUS)0xC023001FL) + +// +// MessageId: STATUS_NDIS_INVALID_ADDRESS +// +// MessageText: +// +// The network address used in the request is invalid. +// +#define STATUS_NDIS_INVALID_ADDRESS ((NTSTATUS)0xC0230022L) + +// +// MessageId: STATUS_NDIS_INVALID_DEVICE_REQUEST +// +// MessageText: +// +// The specified request is not a valid operation for the target device. +// +#define STATUS_NDIS_INVALID_DEVICE_REQUEST ((NTSTATUS)0xC0230010L) + +// +// MessageId: STATUS_NDIS_PAUSED +// +// MessageText: +// +// The offload operation on the network interface has been paused. +// +#define STATUS_NDIS_PAUSED ((NTSTATUS)0xC023002AL) + +// +// MessageId: STATUS_NDIS_INTERFACE_NOT_FOUND +// +// MessageText: +// +// Network interface was not found. +// +#define STATUS_NDIS_INTERFACE_NOT_FOUND ((NTSTATUS)0xC023002BL) + +// +// MessageId: STATUS_NDIS_UNSUPPORTED_REVISION +// +// MessageText: +// +// The revision number specified in the structure is not supported. +// +#define STATUS_NDIS_UNSUPPORTED_REVISION ((NTSTATUS)0xC023002CL) + +// +// MessageId: STATUS_NDIS_INVALID_PORT +// +// MessageText: +// +// The specified port does not exist on this network interface. +// +#define STATUS_NDIS_INVALID_PORT ((NTSTATUS)0xC023002DL) + +// +// MessageId: STATUS_NDIS_INVALID_PORT_STATE +// +// MessageText: +// +// The current state of the specified port on this network interface does not support the requested operation. +// +#define STATUS_NDIS_INVALID_PORT_STATE ((NTSTATUS)0xC023002EL) + +// +// MessageId: STATUS_NDIS_LOW_POWER_STATE +// +// MessageText: +// +// The miniport adapter is in lower power state. +// +#define STATUS_NDIS_LOW_POWER_STATE ((NTSTATUS)0xC023002FL) + + +// +// NDIS error codes (802.11 wireless LAN) +// + +// +// MessageId: STATUS_NDIS_DOT11_AUTO_CONFIG_ENABLED +// +// MessageText: +// +// The wireless local area network interface is in auto configuration mode and doesn't support the requested parameter change operation. +// +#define STATUS_NDIS_DOT11_AUTO_CONFIG_ENABLED ((NTSTATUS)0xC0232000L) + +// +// MessageId: STATUS_NDIS_DOT11_MEDIA_IN_USE +// +// MessageText: +// +// The wireless local area network interface is busy and can not perform the requested operation. +// +#define STATUS_NDIS_DOT11_MEDIA_IN_USE ((NTSTATUS)0xC0232001L) + +// +// MessageId: STATUS_NDIS_DOT11_POWER_STATE_INVALID +// +// MessageText: +// +// The wireless local area network interface is power down and doesn't support the requested operation. +// +#define STATUS_NDIS_DOT11_POWER_STATE_INVALID ((NTSTATUS)0xC0232002L) + +// +// MessageId: STATUS_NDIS_PM_WOL_PATTERN_LIST_FULL +// +// MessageText: +// +// The list of wake on LAN patterns is full. +// +#define STATUS_NDIS_PM_WOL_PATTERN_LIST_FULL ((NTSTATUS)0xC0232003L) + +// +// MessageId: STATUS_NDIS_PM_PROTOCOL_OFFLOAD_LIST_FULL +// +// MessageText: +// +// The list of low power protocol offloads is full. +// +#define STATUS_NDIS_PM_PROTOCOL_OFFLOAD_LIST_FULL ((NTSTATUS)0xC0232004L) + +// +// NDIS informational codes(ndis.sys) +// + +// +// MessageId: STATUS_NDIS_INDICATION_REQUIRED +// +// MessageText: +// +// The request will be completed later by NDIS status indication. +// +#define STATUS_NDIS_INDICATION_REQUIRED ((NTSTATUS)0x40230001L) + +// +// NDIS Chimney Offload codes (ndis.sys) +// + +// +// MessageId: STATUS_NDIS_OFFLOAD_POLICY +// +// MessageText: +// +// The TCP connection is not offloadable because of a local policy setting. +// +#define STATUS_NDIS_OFFLOAD_POLICY ((NTSTATUS)0xC023100FL) + +// +// MessageId: STATUS_NDIS_OFFLOAD_CONNECTION_REJECTED +// +// MessageText: +// +// The TCP connection is not offloadable by the Chimney offload target. +// +#define STATUS_NDIS_OFFLOAD_CONNECTION_REJECTED ((NTSTATUS)0xC0231012L) + +// +// MessageId: STATUS_NDIS_OFFLOAD_PATH_REJECTED +// +// MessageText: +// +// The IP Path object is not in an offloadable state. +// +#define STATUS_NDIS_OFFLOAD_PATH_REJECTED ((NTSTATUS)0xC0231013L) + +// +// Hypervisor error codes - changes to these codes must be reflected in HvStatus.h +// + +// +// MessageId: STATUS_HV_INVALID_HYPERCALL_CODE +// +// MessageText: +// +// The hypervisor does not support the operation because the specified hypercall code is not supported. +// +#define STATUS_HV_INVALID_HYPERCALL_CODE ((NTSTATUS)0xC0350002L) + +// +// MessageId: STATUS_HV_INVALID_HYPERCALL_INPUT +// +// MessageText: +// +// The hypervisor does not support the operation because the encoding for the hypercall input register is not supported. +// +#define STATUS_HV_INVALID_HYPERCALL_INPUT ((NTSTATUS)0xC0350003L) + +// +// MessageId: STATUS_HV_INVALID_ALIGNMENT +// +// MessageText: +// +// The hypervisor could not perform the operation beacuse a parameter has an invalid alignment. +// +#define STATUS_HV_INVALID_ALIGNMENT ((NTSTATUS)0xC0350004L) + +// +// MessageId: STATUS_HV_INVALID_PARAMETER +// +// MessageText: +// +// The hypervisor could not perform the operation beacuse an invalid parameter was specified. +// +#define STATUS_HV_INVALID_PARAMETER ((NTSTATUS)0xC0350005L) + +// +// MessageId: STATUS_HV_ACCESS_DENIED +// +// MessageText: +// +// Access to the specified object was denied. +// +#define STATUS_HV_ACCESS_DENIED ((NTSTATUS)0xC0350006L) + +// +// MessageId: STATUS_HV_INVALID_PARTITION_STATE +// +// MessageText: +// +// The hypervisor could not perform the operation because the partition is entering or in an invalid state. +// +#define STATUS_HV_INVALID_PARTITION_STATE ((NTSTATUS)0xC0350007L) + +// +// MessageId: STATUS_HV_OPERATION_DENIED +// +// MessageText: +// +// The operation is not allowed in the current state. +// +#define STATUS_HV_OPERATION_DENIED ((NTSTATUS)0xC0350008L) + +// +// MessageId: STATUS_HV_UNKNOWN_PROPERTY +// +// MessageText: +// +// The hypervisor does not recognize the specified partition property. +// +#define STATUS_HV_UNKNOWN_PROPERTY ((NTSTATUS)0xC0350009L) + +// +// MessageId: STATUS_HV_PROPERTY_VALUE_OUT_OF_RANGE +// +// MessageText: +// +// The specified value of a partition property is out of range or violates an invariant. +// +#define STATUS_HV_PROPERTY_VALUE_OUT_OF_RANGE ((NTSTATUS)0xC035000AL) + +// +// MessageId: STATUS_HV_INSUFFICIENT_MEMORY +// +// MessageText: +// +// There is not enough memory in the hypervisor pool to complete the operation. +// +#define STATUS_HV_INSUFFICIENT_MEMORY ((NTSTATUS)0xC035000BL) + +// +// MessageId: STATUS_HV_PARTITION_TOO_DEEP +// +// MessageText: +// +// The maximum partition depth has been exceeded for the partition hierarchy. +// +#define STATUS_HV_PARTITION_TOO_DEEP ((NTSTATUS)0xC035000CL) + +// +// MessageId: STATUS_HV_INVALID_PARTITION_ID +// +// MessageText: +// +// A partition with the specified partition Id does not exist. +// +#define STATUS_HV_INVALID_PARTITION_ID ((NTSTATUS)0xC035000DL) + +// +// MessageId: STATUS_HV_INVALID_VP_INDEX +// +// MessageText: +// +// The hypervisor could not perform the operation because the specified VP index is invalid. +// +#define STATUS_HV_INVALID_VP_INDEX ((NTSTATUS)0xC035000EL) + +// +// MessageId: STATUS_HV_INVALID_PORT_ID +// +// MessageText: +// +// The hypervisor could not perform the operation because the specified port identifier is invalid. +// +#define STATUS_HV_INVALID_PORT_ID ((NTSTATUS)0xC0350011L) + +// +// MessageId: STATUS_HV_INVALID_CONNECTION_ID +// +// MessageText: +// +// The hypervisor could not perform the operation because the specified connection identifier is invalid. +// +#define STATUS_HV_INVALID_CONNECTION_ID ((NTSTATUS)0xC0350012L) + +// +// MessageId: STATUS_HV_INSUFFICIENT_BUFFERS +// +// MessageText: +// +// Not enough buffers were supplied to send a message. +// +#define STATUS_HV_INSUFFICIENT_BUFFERS ((NTSTATUS)0xC0350013L) + +// +// MessageId: STATUS_HV_NOT_ACKNOWLEDGED +// +// MessageText: +// +// The previous virtual interrupt has not been acknowledged. +// +#define STATUS_HV_NOT_ACKNOWLEDGED ((NTSTATUS)0xC0350014L) + +// +// MessageId: STATUS_HV_ACKNOWLEDGED +// +// MessageText: +// +// The previous virtual interrupt has already been acknowledged. +// +#define STATUS_HV_ACKNOWLEDGED ((NTSTATUS)0xC0350016L) + +// +// MessageId: STATUS_HV_INVALID_SAVE_RESTORE_STATE +// +// MessageText: +// +// The indicated partition is not in a valid state for saving or restoring. +// +#define STATUS_HV_INVALID_SAVE_RESTORE_STATE ((NTSTATUS)0xC0350017L) + +// +// MessageId: STATUS_HV_INVALID_SYNIC_STATE +// +// MessageText: +// +// The hypervisor could not complete the operation because a required feature of the synthetic interrupt controller (SynIC) was disabled. +// +#define STATUS_HV_INVALID_SYNIC_STATE ((NTSTATUS)0xC0350018L) + +// +// MessageId: STATUS_HV_OBJECT_IN_USE +// +// MessageText: +// +// The hypervisor could not perform the operation because the object or value was either already in use or being used for a purpose that would not permit completing the operation. +// +#define STATUS_HV_OBJECT_IN_USE ((NTSTATUS)0xC0350019L) + +// +// MessageId: STATUS_HV_INVALID_PROXIMITY_DOMAIN_INFO +// +// MessageText: +// +// The proximity domain information is invalid. +// +#define STATUS_HV_INVALID_PROXIMITY_DOMAIN_INFO ((NTSTATUS)0xC035001AL) + +// +// MessageId: STATUS_HV_NO_DATA +// +// MessageText: +// +// An attempt to retrieve debugging data failed because none was available. +// +#define STATUS_HV_NO_DATA ((NTSTATUS)0xC035001BL) + +// +// MessageId: STATUS_HV_INACTIVE +// +// MessageText: +// +// The physical connection being used for debuggging has not recorded any receive activity since the last operation. +// +#define STATUS_HV_INACTIVE ((NTSTATUS)0xC035001CL) + +// +// MessageId: STATUS_HV_NO_RESOURCES +// +// MessageText: +// +// There are not enough resources to complete the operation. +// +#define STATUS_HV_NO_RESOURCES ((NTSTATUS)0xC035001DL) + +// +// MessageId: STATUS_HV_FEATURE_UNAVAILABLE +// +// MessageText: +// +// A hypervisor feature is not available to the user. +// +#define STATUS_HV_FEATURE_UNAVAILABLE ((NTSTATUS)0xC035001EL) + +// +// MessageId: STATUS_HV_NOT_PRESENT +// +// MessageText: +// +// No hypervisor is present on this system. +// +#define STATUS_HV_NOT_PRESENT ((NTSTATUS)0xC0351000L) + +// +// Virtualization status codes - these codes are used by the Virtualization Infrustructure Driver (VID) and other components +// of the virtualization stack. +// +// +// Errors: +// + +// +// MessageId: STATUS_VID_DUPLICATE_HANDLER +// +// MessageText: +// +// The handler for the virtualization infrastructure driver is already registered. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_DUPLICATE_HANDLER ((NTSTATUS)0xC0370001L) + +// +// MessageId: STATUS_VID_TOO_MANY_HANDLERS +// +// MessageText: +// +// The number of registered handlers for the virtualization infrastructure driver exceeded the maximum. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_TOO_MANY_HANDLERS ((NTSTATUS)0xC0370002L) + +// +// MessageId: STATUS_VID_QUEUE_FULL +// +// MessageText: +// +// The message queue for the virtualization infrastructure driver is full and cannot accept new messages. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_QUEUE_FULL ((NTSTATUS)0xC0370003L) + +// +// MessageId: STATUS_VID_HANDLER_NOT_PRESENT +// +// MessageText: +// +// No handler exists to handle the message for the virtualization infrastructure driver. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_HANDLER_NOT_PRESENT ((NTSTATUS)0xC0370004L) + +// +// MessageId: STATUS_VID_INVALID_OBJECT_NAME +// +// MessageText: +// +// The name of the partition or message queue for the virtualization infrastructure driver is invalid. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_INVALID_OBJECT_NAME ((NTSTATUS)0xC0370005L) + +// +// MessageId: STATUS_VID_PARTITION_NAME_TOO_LONG +// +// MessageText: +// +// The partition name of the virtualization infrastructure driver exceeds the maximum. +// +#define STATUS_VID_PARTITION_NAME_TOO_LONG ((NTSTATUS)0xC0370006L) + +// +// MessageId: STATUS_VID_MESSAGE_QUEUE_NAME_TOO_LONG +// +// MessageText: +// +// The message queue name of the virtualization infrastructure driver exceeds the maximum. +// +#define STATUS_VID_MESSAGE_QUEUE_NAME_TOO_LONG ((NTSTATUS)0xC0370007L) + +// +// MessageId: STATUS_VID_PARTITION_ALREADY_EXISTS +// +// MessageText: +// +// Cannot create the partition for the virtualization infrastructure driver because another partition with the same name already exists. +// +#define STATUS_VID_PARTITION_ALREADY_EXISTS ((NTSTATUS)0xC0370008L) + +// +// MessageId: STATUS_VID_PARTITION_DOES_NOT_EXIST +// +// MessageText: +// +// The virtualization infrastructure driver has encountered an error. The requested partition does not exist. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_PARTITION_DOES_NOT_EXIST ((NTSTATUS)0xC0370009L) + +// +// MessageId: STATUS_VID_PARTITION_NAME_NOT_FOUND +// +// MessageText: +// +// The virtualization infrastructure driver has encountered an error. Could not find the requested partition. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_PARTITION_NAME_NOT_FOUND ((NTSTATUS)0xC037000AL) + +// +// MessageId: STATUS_VID_MESSAGE_QUEUE_ALREADY_EXISTS +// +// MessageText: +// +// A message queue with the same name already exists for the virtualization infrastructure driver. +// +#define STATUS_VID_MESSAGE_QUEUE_ALREADY_EXISTS ((NTSTATUS)0xC037000BL) + +// +// MessageId: STATUS_VID_EXCEEDED_MBP_ENTRY_MAP_LIMIT +// +// MessageText: +// +// The memory block page for the virtualization infrastructure driver cannot be mapped because the page map limit has been reached. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_EXCEEDED_MBP_ENTRY_MAP_LIMIT ((NTSTATUS)0xC037000CL) + +// +// MessageId: STATUS_VID_MB_STILL_REFERENCED +// +// MessageText: +// +// The memory block for the virtualization infrastructure driver is still being used and cannot be destroyed. +// +#define STATUS_VID_MB_STILL_REFERENCED ((NTSTATUS)0xC037000DL) + +// +// MessageId: STATUS_VID_CHILD_GPA_PAGE_SET_CORRUPTED +// +// MessageText: +// +// Cannot unlock the page array for the guest operating system memory address because it does not match a previous lock request. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_CHILD_GPA_PAGE_SET_CORRUPTED ((NTSTATUS)0xC037000EL) + +// +// MessageId: STATUS_VID_INVALID_NUMA_SETTINGS +// +// MessageText: +// +// The non-uniform memory access (NUMA) node settings do not match the system NUMA topology. In order to start the virtual machine, you will need to modify the NUMA configuration. For detailed information, seehttp://go.microsoft.com/fwlink/?LinkId=92362. +// +#define STATUS_VID_INVALID_NUMA_SETTINGS ((NTSTATUS)0xC037000FL) + +// +// MessageId: STATUS_VID_INVALID_NUMA_NODE_INDEX +// +// MessageText: +// +// The non-uniform memory access (NUMA) node index does not match a valid index in the system NUMA topology. +// +#define STATUS_VID_INVALID_NUMA_NODE_INDEX ((NTSTATUS)0xC0370010L) + +// +// MessageId: STATUS_VID_NOTIFICATION_QUEUE_ALREADY_ASSOCIATED +// +// MessageText: +// +// The memory block for the virtualization infrastructure driver is already associated with a message queue. +// +#define STATUS_VID_NOTIFICATION_QUEUE_ALREADY_ASSOCIATED ((NTSTATUS)0xC0370011L) + +// +// MessageId: STATUS_VID_INVALID_MEMORY_BLOCK_HANDLE +// +// MessageText: +// +// The handle is not a valid memory block handle for the virtualization infrastructure driver. +// +#define STATUS_VID_INVALID_MEMORY_BLOCK_HANDLE ((NTSTATUS)0xC0370012L) + +// +// MessageId: STATUS_VID_PAGE_RANGE_OVERFLOW +// +// MessageText: +// +// The request exceeded the memory block page limit for the virtualization infrastructure driver. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_PAGE_RANGE_OVERFLOW ((NTSTATUS)0xC0370013L) + +// +// MessageId: STATUS_VID_INVALID_MESSAGE_QUEUE_HANDLE +// +// MessageText: +// +// The handle is not a valid message queue handle for the virtualization infrastructure driver. +// +#define STATUS_VID_INVALID_MESSAGE_QUEUE_HANDLE ((NTSTATUS)0xC0370014L) + +// +// MessageId: STATUS_VID_INVALID_GPA_RANGE_HANDLE +// +// MessageText: +// +// The handle is not a valid page range handle for the virtualization infrastructure driver. +// +#define STATUS_VID_INVALID_GPA_RANGE_HANDLE ((NTSTATUS)0xC0370015L) + +// +// MessageId: STATUS_VID_NO_MEMORY_BLOCK_NOTIFICATION_QUEUE +// +// MessageText: +// +// Cannot install client notifications because no message queue for the virtualization infrastructure driver is associated with the memory block. +// +#define STATUS_VID_NO_MEMORY_BLOCK_NOTIFICATION_QUEUE ((NTSTATUS)0xC0370016L) + +// +// MessageId: STATUS_VID_MEMORY_BLOCK_LOCK_COUNT_EXCEEDED +// +// MessageText: +// +// The request to lock or map a memory block page failed because the virtualization infrastructure driver memory block limit has been reached. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_MEMORY_BLOCK_LOCK_COUNT_EXCEEDED ((NTSTATUS)0xC0370017L) + +// +// MessageId: STATUS_VID_INVALID_PPM_HANDLE +// +// MessageText: +// +// The handle is not a valid parent partition mapping handle for the virtualization infrastructure driver. +// +#define STATUS_VID_INVALID_PPM_HANDLE ((NTSTATUS)0xC0370018L) + +// +// MessageId: STATUS_VID_MBPS_ARE_LOCKED +// +// MessageText: +// +// Notifications cannot be created on the memory block because it is use. +// +#define STATUS_VID_MBPS_ARE_LOCKED ((NTSTATUS)0xC0370019L) + +// +// MessageId: STATUS_VID_MESSAGE_QUEUE_CLOSED +// +// MessageText: +// +// The message queue for the virtualization infrastructure driver has been closed. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_MESSAGE_QUEUE_CLOSED ((NTSTATUS)0xC037001AL) + +// +// MessageId: STATUS_VID_VIRTUAL_PROCESSOR_LIMIT_EXCEEDED +// +// MessageText: +// +// Cannot add a virtual processor to the partition because the maximum has been reached. +// +#define STATUS_VID_VIRTUAL_PROCESSOR_LIMIT_EXCEEDED ((NTSTATUS)0xC037001BL) + +// +// MessageId: STATUS_VID_STOP_PENDING +// +// MessageText: +// +// Cannot stop the virtual processor immediately because of a pending intercept. +// +#define STATUS_VID_STOP_PENDING ((NTSTATUS)0xC037001CL) + +// +// MessageId: STATUS_VID_INVALID_PROCESSOR_STATE +// +// MessageText: +// +// Invalid state for the virtual processor. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_INVALID_PROCESSOR_STATE ((NTSTATUS)0xC037001DL) + +// +// MessageId: STATUS_VID_EXCEEDED_KM_CONTEXT_COUNT_LIMIT +// +// MessageText: +// +// The maximum number of kernel mode clients for the virtualization infrastructure driver has been reached. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_EXCEEDED_KM_CONTEXT_COUNT_LIMIT ((NTSTATUS)0xC037001EL) + +// +// MessageId: STATUS_VID_KM_INTERFACE_ALREADY_INITIALIZED +// +// MessageText: +// +// This kernel mode interface for the virtualization infrastructure driver has already been initialized. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_KM_INTERFACE_ALREADY_INITIALIZED ((NTSTATUS)0xC037001FL) + +// +// MessageId: STATUS_VID_MB_PROPERTY_ALREADY_SET_RESET +// +// MessageText: +// +// Cannot set or reset the memory block property more than once for the virtualization infrastructure driver. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_MB_PROPERTY_ALREADY_SET_RESET ((NTSTATUS)0xC0370020L) + +// +// MessageId: STATUS_VID_MMIO_RANGE_DESTROYED +// +// MessageText: +// +// The memory mapped I/O for this page range no longer exists. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_MMIO_RANGE_DESTROYED ((NTSTATUS)0xC0370021L) + +// +// MessageId: STATUS_VID_INVALID_CHILD_GPA_PAGE_SET +// +// MessageText: +// +// The lock or unlock request uses an invalid guest operating system memory address. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_INVALID_CHILD_GPA_PAGE_SET ((NTSTATUS)0xC0370022L) + +// +// MessageId: STATUS_VID_RESERVE_PAGE_SET_IS_BEING_USED +// +// MessageText: +// +// Cannot destroy or reuse the reserve page set for the virtualization infrastructure driver because it is in use. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_RESERVE_PAGE_SET_IS_BEING_USED ((NTSTATUS)0xC0370023L) + +// +// MessageId: STATUS_VID_RESERVE_PAGE_SET_TOO_SMALL +// +// MessageText: +// +// The reserve page set for the virtualization infrastructure driver is too small to use in the lock request. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_RESERVE_PAGE_SET_TOO_SMALL ((NTSTATUS)0xC0370024L) + +// +// MessageId: STATUS_VID_MBP_ALREADY_LOCKED_USING_RESERVED_PAGE +// +// MessageText: +// +// Cannot lock or map the memory block page for the virtualization infrastructure driver because it has already been locked using a reserve page set page. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_MBP_ALREADY_LOCKED_USING_RESERVED_PAGE ((NTSTATUS)0xC0370025L) + +// +// MessageId: STATUS_VID_MBP_COUNT_EXCEEDED_LIMIT +// +// MessageText: +// +// Cannot create the memory block for the virtualization infrastructure driver because the requested number of pages exceeded the limit. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_MBP_COUNT_EXCEEDED_LIMIT ((NTSTATUS)0xC0370026L) + +// +// MessageId: STATUS_VID_SAVED_STATE_CORRUPT +// +// MessageText: +// +// Cannot restore this virtual machine because the saved state data cannot be read. Delete the saved state data and then try to start the virtual machine. +// +#define STATUS_VID_SAVED_STATE_CORRUPT ((NTSTATUS)0xC0370027L) + +// +// MessageId: STATUS_VID_SAVED_STATE_UNRECOGNIZED_ITEM +// +// MessageText: +// +// Cannot restore this virtual machine because an item read from the saved state data is not recognized. Delete the saved state data and then try to start the virtual machine. +// +#define STATUS_VID_SAVED_STATE_UNRECOGNIZED_ITEM ((NTSTATUS)0xC0370028L) + +// +// MessageId: STATUS_VID_SAVED_STATE_INCOMPATIBLE +// +// MessageText: +// +// Cannot restore this virtual machine to the saved state because of hypervisor incompatibility. Delete the saved state data and then try to start the virtual machine. +// +#define STATUS_VID_SAVED_STATE_INCOMPATIBLE ((NTSTATUS)0xC0370029L) + +// +// Warnings: +// +// +// MessageId: STATUS_VID_REMOTE_NODE_PARENT_GPA_PAGES_USED +// +// MessageText: +// +// A virtual machine is running with its memory allocated across multiple NUMA nodes. This does not indicate a problem unless the performance of your virtual machine is unusually slow. If you are experiencing performance problems, you may need to modify the NUMA configuration. For detailed information, seehttp://go.microsoft.com/fwlink/?LinkId=92362. +// +#define STATUS_VID_REMOTE_NODE_PARENT_GPA_PAGES_USED ((NTSTATUS)0x80370001L) + + +// +// IPSEC error codes (tcpip.sys) +// + +// +// MessageId: STATUS_IPSEC_BAD_SPI +// +// MessageText: +// +// The SPI in the packet does not match a valid IPsec SA. +// +#define STATUS_IPSEC_BAD_SPI ((NTSTATUS)0xC0360001L) + +// +// MessageId: STATUS_IPSEC_SA_LIFETIME_EXPIRED +// +// MessageText: +// +// Packet was received on an IPsec SA whose lifetime has expired. +// +#define STATUS_IPSEC_SA_LIFETIME_EXPIRED ((NTSTATUS)0xC0360002L) + +// +// MessageId: STATUS_IPSEC_WRONG_SA +// +// MessageText: +// +// Packet was received on an IPsec SA that does not match the packet characteristics. +// +#define STATUS_IPSEC_WRONG_SA ((NTSTATUS)0xC0360003L) + +// +// MessageId: STATUS_IPSEC_REPLAY_CHECK_FAILED +// +// MessageText: +// +// Packet sequence number replay check failed. +// +#define STATUS_IPSEC_REPLAY_CHECK_FAILED ((NTSTATUS)0xC0360004L) + +// +// MessageId: STATUS_IPSEC_INVALID_PACKET +// +// MessageText: +// +// IPsec header and/or trailer in the packet is invalid. +// +#define STATUS_IPSEC_INVALID_PACKET ((NTSTATUS)0xC0360005L) + +// +// MessageId: STATUS_IPSEC_INTEGRITY_CHECK_FAILED +// +// MessageText: +// +// IPsec integrity check failed. +// +#define STATUS_IPSEC_INTEGRITY_CHECK_FAILED ((NTSTATUS)0xC0360006L) + +// +// MessageId: STATUS_IPSEC_CLEAR_TEXT_DROP +// +// MessageText: +// +// IPsec dropped a clear text packet. +// +#define STATUS_IPSEC_CLEAR_TEXT_DROP ((NTSTATUS)0xC0360007L) + +// +// MessageId: STATUS_IPSEC_AUTH_FIREWALL_DROP +// +// MessageText: +// +// IPsec dropped an incoming ESP packet in authenticated firewall mode. This drop is benign. +// +#define STATUS_IPSEC_AUTH_FIREWALL_DROP ((NTSTATUS)0xC0360008L) + +// +// MessageId: STATUS_IPSEC_THROTTLE_DROP +// +// MessageText: +// +// IPsec dropped a packet due to DoS throttling. +// +#define STATUS_IPSEC_THROTTLE_DROP ((NTSTATUS)0xC0360009L) + +// +// MessageId: STATUS_IPSEC_DOSP_BLOCK +// +// MessageText: +// +// IPsec DoS Protection matched an explicit block rule. +// +#define STATUS_IPSEC_DOSP_BLOCK ((NTSTATUS)0xC0368000L) + +// +// MessageId: STATUS_IPSEC_DOSP_RECEIVED_MULTICAST +// +// MessageText: +// +// IPsec DoS Protection received an IPsec specific multicast packet which is not allowed. +// +#define STATUS_IPSEC_DOSP_RECEIVED_MULTICAST ((NTSTATUS)0xC0368001L) + +// +// MessageId: STATUS_IPSEC_DOSP_INVALID_PACKET +// +// MessageText: +// +// IPsec DoS Protection received an incorrectly formatted packet. +// +#define STATUS_IPSEC_DOSP_INVALID_PACKET ((NTSTATUS)0xC0368002L) + +// +// MessageId: STATUS_IPSEC_DOSP_STATE_LOOKUP_FAILED +// +// MessageText: +// +// IPsec DoS Protection failed to look up state. +// +#define STATUS_IPSEC_DOSP_STATE_LOOKUP_FAILED ((NTSTATUS)0xC0368003L) + +// +// MessageId: STATUS_IPSEC_DOSP_MAX_ENTRIES +// +// MessageText: +// +// IPsec DoS Protection failed to create state because the maximum number of entries allowed by policy has been reached. +// +#define STATUS_IPSEC_DOSP_MAX_ENTRIES ((NTSTATUS)0xC0368004L) + +// +// MessageId: STATUS_IPSEC_DOSP_KEYMOD_NOT_ALLOWED +// +// MessageText: +// +// IPsec DoS Protection received an IPsec negotiation packet for a keying module which is not allowed by policy. +// +#define STATUS_IPSEC_DOSP_KEYMOD_NOT_ALLOWED ((NTSTATUS)0xC0368005L) + +// +// MessageId: STATUS_IPSEC_DOSP_MAX_PER_IP_RATELIMIT_QUEUES +// +// MessageText: +// +// IPsec DoS Protection failed to create a per internal IP rate limit queue because the maximum number of queues allowed by policy has been reached. +// +#define STATUS_IPSEC_DOSP_MAX_PER_IP_RATELIMIT_QUEUES ((NTSTATUS)0xC0368006L) + + +// +// Volume manager status codes (volmgr.sys and volmgrx.sys) +// + +// +// WARNINGS +// +// +// MessageId: STATUS_VOLMGR_INCOMPLETE_REGENERATION +// +// MessageText: +// +// The regeneration operation was not able to copy all data from the active plexes due to bad sectors. +// +#define STATUS_VOLMGR_INCOMPLETE_REGENERATION ((NTSTATUS)0x80380001L) + +// +// MessageId: STATUS_VOLMGR_INCOMPLETE_DISK_MIGRATION +// +// MessageText: +// +// One or more disks were not fully migrated to the target pack. They may or may not require reimport after fixing the hardware problems. +// +#define STATUS_VOLMGR_INCOMPLETE_DISK_MIGRATION ((NTSTATUS)0x80380002L) + +// +// ERRORS +// +// +// MessageId: STATUS_VOLMGR_DATABASE_FULL +// +// MessageText: +// +// The configuration database is full. +// +#define STATUS_VOLMGR_DATABASE_FULL ((NTSTATUS)0xC0380001L) + +// +// MessageId: STATUS_VOLMGR_DISK_CONFIGURATION_CORRUPTED +// +// MessageText: +// +// The configuration data on the disk is corrupted. +// +#define STATUS_VOLMGR_DISK_CONFIGURATION_CORRUPTED ((NTSTATUS)0xC0380002L) + +// +// MessageId: STATUS_VOLMGR_DISK_CONFIGURATION_NOT_IN_SYNC +// +// MessageText: +// +// The configuration on the disk is not insync with the in-memory configuration. +// +#define STATUS_VOLMGR_DISK_CONFIGURATION_NOT_IN_SYNC ((NTSTATUS)0xC0380003L) + +// +// MessageId: STATUS_VOLMGR_PACK_CONFIG_UPDATE_FAILED +// +// MessageText: +// +// A majority of disks failed to be updated with the new configuration. +// +#define STATUS_VOLMGR_PACK_CONFIG_UPDATE_FAILED ((NTSTATUS)0xC0380004L) + +// +// MessageId: STATUS_VOLMGR_DISK_CONTAINS_NON_SIMPLE_VOLUME +// +// MessageText: +// +// The disk contains non-simple volumes. +// +#define STATUS_VOLMGR_DISK_CONTAINS_NON_SIMPLE_VOLUME ((NTSTATUS)0xC0380005L) + +// +// MessageId: STATUS_VOLMGR_DISK_DUPLICATE +// +// MessageText: +// +// The same disk was specified more than once in the migration list. +// +#define STATUS_VOLMGR_DISK_DUPLICATE ((NTSTATUS)0xC0380006L) + +// +// MessageId: STATUS_VOLMGR_DISK_DYNAMIC +// +// MessageText: +// +// The disk is already dynamic. +// +#define STATUS_VOLMGR_DISK_DYNAMIC ((NTSTATUS)0xC0380007L) + +// +// MessageId: STATUS_VOLMGR_DISK_ID_INVALID +// +// MessageText: +// +// The specified disk id is invalid. There are no disks with the specified disk id. +// +#define STATUS_VOLMGR_DISK_ID_INVALID ((NTSTATUS)0xC0380008L) + +// +// MessageId: STATUS_VOLMGR_DISK_INVALID +// +// MessageText: +// +// The specified disk is an invalid disk. Operation cannot complete on an invalid disk. +// +#define STATUS_VOLMGR_DISK_INVALID ((NTSTATUS)0xC0380009L) + +// +// MessageId: STATUS_VOLMGR_DISK_LAST_VOTER +// +// MessageText: +// +// The specified disk(s) cannot be removed since it is the last remaining voter. +// +#define STATUS_VOLMGR_DISK_LAST_VOTER ((NTSTATUS)0xC038000AL) + +// +// MessageId: STATUS_VOLMGR_DISK_LAYOUT_INVALID +// +// MessageText: +// +// The specified disk has an invalid disk layout. +// +#define STATUS_VOLMGR_DISK_LAYOUT_INVALID ((NTSTATUS)0xC038000BL) + +// +// MessageId: STATUS_VOLMGR_DISK_LAYOUT_NON_BASIC_BETWEEN_BASIC_PARTITIONS +// +// MessageText: +// +// The disk layout contains non-basic partitions which appear after basic paritions. This is an invalid disk layout. +// +#define STATUS_VOLMGR_DISK_LAYOUT_NON_BASIC_BETWEEN_BASIC_PARTITIONS ((NTSTATUS)0xC038000CL) + +// +// MessageId: STATUS_VOLMGR_DISK_LAYOUT_NOT_CYLINDER_ALIGNED +// +// MessageText: +// +// The disk layout contains partitions which are not cylinder aligned. +// +#define STATUS_VOLMGR_DISK_LAYOUT_NOT_CYLINDER_ALIGNED ((NTSTATUS)0xC038000DL) + +// +// MessageId: STATUS_VOLMGR_DISK_LAYOUT_PARTITIONS_TOO_SMALL +// +// MessageText: +// +// The disk layout contains partitions which are samller than the minimum size. +// +#define STATUS_VOLMGR_DISK_LAYOUT_PARTITIONS_TOO_SMALL ((NTSTATUS)0xC038000EL) + +// +// MessageId: STATUS_VOLMGR_DISK_LAYOUT_PRIMARY_BETWEEN_LOGICAL_PARTITIONS +// +// MessageText: +// +// The disk layout contains primary partitions in between logical drives. This is an invalid disk layout. +// +#define STATUS_VOLMGR_DISK_LAYOUT_PRIMARY_BETWEEN_LOGICAL_PARTITIONS ((NTSTATUS)0xC038000FL) + +// +// MessageId: STATUS_VOLMGR_DISK_LAYOUT_TOO_MANY_PARTITIONS +// +// MessageText: +// +// The disk layout contains more than the maximum number of supported partitions. +// +#define STATUS_VOLMGR_DISK_LAYOUT_TOO_MANY_PARTITIONS ((NTSTATUS)0xC0380010L) + +// +// MessageId: STATUS_VOLMGR_DISK_MISSING +// +// MessageText: +// +// The specified disk is missing. The operation cannot complete on a missing disk. +// +#define STATUS_VOLMGR_DISK_MISSING ((NTSTATUS)0xC0380011L) + +// +// MessageId: STATUS_VOLMGR_DISK_NOT_EMPTY +// +// MessageText: +// +// The specified disk is not empty. +// +#define STATUS_VOLMGR_DISK_NOT_EMPTY ((NTSTATUS)0xC0380012L) + +// +// MessageId: STATUS_VOLMGR_DISK_NOT_ENOUGH_SPACE +// +// MessageText: +// +// There is not enough usable space for this operation. +// +#define STATUS_VOLMGR_DISK_NOT_ENOUGH_SPACE ((NTSTATUS)0xC0380013L) + +// +// MessageId: STATUS_VOLMGR_DISK_REVECTORING_FAILED +// +// MessageText: +// +// The force revectoring of bad sectors failed. +// +#define STATUS_VOLMGR_DISK_REVECTORING_FAILED ((NTSTATUS)0xC0380014L) + +// +// MessageId: STATUS_VOLMGR_DISK_SECTOR_SIZE_INVALID +// +// MessageText: +// +// The specified disk has an invalid sector size. +// +#define STATUS_VOLMGR_DISK_SECTOR_SIZE_INVALID ((NTSTATUS)0xC0380015L) + +// +// MessageId: STATUS_VOLMGR_DISK_SET_NOT_CONTAINED +// +// MessageText: +// +// The specified disk set contains volumes which exist on disks outside of the set. +// +#define STATUS_VOLMGR_DISK_SET_NOT_CONTAINED ((NTSTATUS)0xC0380016L) + +// +// MessageId: STATUS_VOLMGR_DISK_USED_BY_MULTIPLE_MEMBERS +// +// MessageText: +// +// A disk in the volume layout provides extents to more than one member of a plex. +// +#define STATUS_VOLMGR_DISK_USED_BY_MULTIPLE_MEMBERS ((NTSTATUS)0xC0380017L) + +// +// MessageId: STATUS_VOLMGR_DISK_USED_BY_MULTIPLE_PLEXES +// +// MessageText: +// +// A disk in the volume layout provides extents to more than one plex. +// +#define STATUS_VOLMGR_DISK_USED_BY_MULTIPLE_PLEXES ((NTSTATUS)0xC0380018L) + +// +// MessageId: STATUS_VOLMGR_DYNAMIC_DISK_NOT_SUPPORTED +// +// MessageText: +// +// Dynamic disks are not supported on this system. +// +#define STATUS_VOLMGR_DYNAMIC_DISK_NOT_SUPPORTED ((NTSTATUS)0xC0380019L) + +// +// MessageId: STATUS_VOLMGR_EXTENT_ALREADY_USED +// +// MessageText: +// +// The specified extent is already used by other volumes. +// +#define STATUS_VOLMGR_EXTENT_ALREADY_USED ((NTSTATUS)0xC038001AL) + +// +// MessageId: STATUS_VOLMGR_EXTENT_NOT_CONTIGUOUS +// +// MessageText: +// +// The specified volume is retained and can only be extended into a contiguous extent. The specified extent to grow the volume is not contiguous with the specified volume. +// +#define STATUS_VOLMGR_EXTENT_NOT_CONTIGUOUS ((NTSTATUS)0xC038001BL) + +// +// MessageId: STATUS_VOLMGR_EXTENT_NOT_IN_PUBLIC_REGION +// +// MessageText: +// +// The specified volume extent is not within the public region of the disk. +// +#define STATUS_VOLMGR_EXTENT_NOT_IN_PUBLIC_REGION ((NTSTATUS)0xC038001CL) + +// +// MessageId: STATUS_VOLMGR_EXTENT_NOT_SECTOR_ALIGNED +// +// MessageText: +// +// The specifed volume extent is not sector aligned. +// +#define STATUS_VOLMGR_EXTENT_NOT_SECTOR_ALIGNED ((NTSTATUS)0xC038001DL) + +// +// MessageId: STATUS_VOLMGR_EXTENT_OVERLAPS_EBR_PARTITION +// +// MessageText: +// +// The specified parition overlaps an EBR (the first track of an extended partition on a MBR disks). +// +#define STATUS_VOLMGR_EXTENT_OVERLAPS_EBR_PARTITION ((NTSTATUS)0xC038001EL) + +// +// MessageId: STATUS_VOLMGR_EXTENT_VOLUME_LENGTHS_DO_NOT_MATCH +// +// MessageText: +// +// The specified extent lengths cannot be used to construct a volume with specified length. +// +#define STATUS_VOLMGR_EXTENT_VOLUME_LENGTHS_DO_NOT_MATCH ((NTSTATUS)0xC038001FL) + +// +// MessageId: STATUS_VOLMGR_FAULT_TOLERANT_NOT_SUPPORTED +// +// MessageText: +// +// The system does not support fault tolerant volumes. +// +#define STATUS_VOLMGR_FAULT_TOLERANT_NOT_SUPPORTED ((NTSTATUS)0xC0380020L) + +// +// MessageId: STATUS_VOLMGR_INTERLEAVE_LENGTH_INVALID +// +// MessageText: +// +// The specified interleave length is invalid. +// +#define STATUS_VOLMGR_INTERLEAVE_LENGTH_INVALID ((NTSTATUS)0xC0380021L) + +// +// MessageId: STATUS_VOLMGR_MAXIMUM_REGISTERED_USERS +// +// MessageText: +// +// There is already a maximum number of registered users. +// +#define STATUS_VOLMGR_MAXIMUM_REGISTERED_USERS ((NTSTATUS)0xC0380022L) + +// +// MessageId: STATUS_VOLMGR_MEMBER_IN_SYNC +// +// MessageText: +// +// The specified member is already in-sync with the other active members. It does not need to be regenerated. +// +#define STATUS_VOLMGR_MEMBER_IN_SYNC ((NTSTATUS)0xC0380023L) + +// +// MessageId: STATUS_VOLMGR_MEMBER_INDEX_DUPLICATE +// +// MessageText: +// +// The same member index was specified more than once. +// +#define STATUS_VOLMGR_MEMBER_INDEX_DUPLICATE ((NTSTATUS)0xC0380024L) + +// +// MessageId: STATUS_VOLMGR_MEMBER_INDEX_INVALID +// +// MessageText: +// +// The specified member index is greater or equal than the number of members in the volume plex. +// +#define STATUS_VOLMGR_MEMBER_INDEX_INVALID ((NTSTATUS)0xC0380025L) + +// +// MessageId: STATUS_VOLMGR_MEMBER_MISSING +// +// MessageText: +// +// The specified member is missing. It cannot be regenerated. +// +#define STATUS_VOLMGR_MEMBER_MISSING ((NTSTATUS)0xC0380026L) + +// +// MessageId: STATUS_VOLMGR_MEMBER_NOT_DETACHED +// +// MessageText: +// +// The specified member is not detached. Cannot replace a member which is not detached. +// +#define STATUS_VOLMGR_MEMBER_NOT_DETACHED ((NTSTATUS)0xC0380027L) + +// +// MessageId: STATUS_VOLMGR_MEMBER_REGENERATING +// +// MessageText: +// +// The specified member is already regenerating. +// +#define STATUS_VOLMGR_MEMBER_REGENERATING ((NTSTATUS)0xC0380028L) + +// +// MessageId: STATUS_VOLMGR_ALL_DISKS_FAILED +// +// MessageText: +// +// All disks belonging to the pack failed. +// +#define STATUS_VOLMGR_ALL_DISKS_FAILED ((NTSTATUS)0xC0380029L) + +// +// MessageId: STATUS_VOLMGR_NO_REGISTERED_USERS +// +// MessageText: +// +// There are currently no registered users for notifications. The task number is irrelevant unless there are registered users. +// +#define STATUS_VOLMGR_NO_REGISTERED_USERS ((NTSTATUS)0xC038002AL) + +// +// MessageId: STATUS_VOLMGR_NO_SUCH_USER +// +// MessageText: +// +// The specified notification user does not exist. Failed to unregister user for notifications. +// +#define STATUS_VOLMGR_NO_SUCH_USER ((NTSTATUS)0xC038002BL) + +// +// MessageId: STATUS_VOLMGR_NOTIFICATION_RESET +// +// MessageText: +// +// The notifications have been reset. Notifications for the current user are invalid. Unregister and re-register for notifications. +// +#define STATUS_VOLMGR_NOTIFICATION_RESET ((NTSTATUS)0xC038002CL) + +// +// MessageId: STATUS_VOLMGR_NUMBER_OF_MEMBERS_INVALID +// +// MessageText: +// +// The specified number of members is invalid. +// +#define STATUS_VOLMGR_NUMBER_OF_MEMBERS_INVALID ((NTSTATUS)0xC038002DL) + +// +// MessageId: STATUS_VOLMGR_NUMBER_OF_PLEXES_INVALID +// +// MessageText: +// +// The specified number of plexes is invalid. +// +#define STATUS_VOLMGR_NUMBER_OF_PLEXES_INVALID ((NTSTATUS)0xC038002EL) + +// +// MessageId: STATUS_VOLMGR_PACK_DUPLICATE +// +// MessageText: +// +// The specified source and target packs are identical. +// +#define STATUS_VOLMGR_PACK_DUPLICATE ((NTSTATUS)0xC038002FL) + +// +// MessageId: STATUS_VOLMGR_PACK_ID_INVALID +// +// MessageText: +// +// The specified pack id is invalid. There are no packs with the specified pack id. +// +#define STATUS_VOLMGR_PACK_ID_INVALID ((NTSTATUS)0xC0380030L) + +// +// MessageId: STATUS_VOLMGR_PACK_INVALID +// +// MessageText: +// +// The specified pack is the invalid pack. The operation cannot complete with the invalid pack. +// +#define STATUS_VOLMGR_PACK_INVALID ((NTSTATUS)0xC0380031L) + +// +// MessageId: STATUS_VOLMGR_PACK_NAME_INVALID +// +// MessageText: +// +// The specified pack name is invalid. +// +#define STATUS_VOLMGR_PACK_NAME_INVALID ((NTSTATUS)0xC0380032L) + +// +// MessageId: STATUS_VOLMGR_PACK_OFFLINE +// +// MessageText: +// +// The specified pack is offline. +// +#define STATUS_VOLMGR_PACK_OFFLINE ((NTSTATUS)0xC0380033L) + +// +// MessageId: STATUS_VOLMGR_PACK_HAS_QUORUM +// +// MessageText: +// +// The specified pack already has a quorum of healthy disks. +// +#define STATUS_VOLMGR_PACK_HAS_QUORUM ((NTSTATUS)0xC0380034L) + +// +// MessageId: STATUS_VOLMGR_PACK_WITHOUT_QUORUM +// +// MessageText: +// +// The pack does not have a quorum of healthy disks. +// +#define STATUS_VOLMGR_PACK_WITHOUT_QUORUM ((NTSTATUS)0xC0380035L) + +// +// MessageId: STATUS_VOLMGR_PARTITION_STYLE_INVALID +// +// MessageText: +// +// The specified disk has an unsupported partition style. Only MBR and GPT partition styles are supported. +// +#define STATUS_VOLMGR_PARTITION_STYLE_INVALID ((NTSTATUS)0xC0380036L) + +// +// MessageId: STATUS_VOLMGR_PARTITION_UPDATE_FAILED +// +// MessageText: +// +// Failed to update the disk's partition layout. +// +#define STATUS_VOLMGR_PARTITION_UPDATE_FAILED ((NTSTATUS)0xC0380037L) + +// +// MessageId: STATUS_VOLMGR_PLEX_IN_SYNC +// +// MessageText: +// +// The specified plex is already in-sync with the other active plexes. It does not need to be regenerated. +// +#define STATUS_VOLMGR_PLEX_IN_SYNC ((NTSTATUS)0xC0380038L) + +// +// MessageId: STATUS_VOLMGR_PLEX_INDEX_DUPLICATE +// +// MessageText: +// +// The same plex index was specified more than once. +// +#define STATUS_VOLMGR_PLEX_INDEX_DUPLICATE ((NTSTATUS)0xC0380039L) + +// +// MessageId: STATUS_VOLMGR_PLEX_INDEX_INVALID +// +// MessageText: +// +// The specified plex index is greater or equal than the number of plexes in the volume. +// +#define STATUS_VOLMGR_PLEX_INDEX_INVALID ((NTSTATUS)0xC038003AL) + +// +// MessageId: STATUS_VOLMGR_PLEX_LAST_ACTIVE +// +// MessageText: +// +// The specified plex is the last active plex in the volume. The plex cannot be removed or else the volume will go offline. +// +#define STATUS_VOLMGR_PLEX_LAST_ACTIVE ((NTSTATUS)0xC038003BL) + +// +// MessageId: STATUS_VOLMGR_PLEX_MISSING +// +// MessageText: +// +// The specified plex is missing. +// +#define STATUS_VOLMGR_PLEX_MISSING ((NTSTATUS)0xC038003CL) + +// +// MessageId: STATUS_VOLMGR_PLEX_REGENERATING +// +// MessageText: +// +// The specified plex is currently regenerating. +// +#define STATUS_VOLMGR_PLEX_REGENERATING ((NTSTATUS)0xC038003DL) + +// +// MessageId: STATUS_VOLMGR_PLEX_TYPE_INVALID +// +// MessageText: +// +// The specified plex type is invalid. +// +#define STATUS_VOLMGR_PLEX_TYPE_INVALID ((NTSTATUS)0xC038003EL) + +// +// MessageId: STATUS_VOLMGR_PLEX_NOT_RAID5 +// +// MessageText: +// +// The operation is only supported on RAID-5 plexes. +// +#define STATUS_VOLMGR_PLEX_NOT_RAID5 ((NTSTATUS)0xC038003FL) + +// +// MessageId: STATUS_VOLMGR_PLEX_NOT_SIMPLE +// +// MessageText: +// +// The operation is only supported on simple plexes. +// +#define STATUS_VOLMGR_PLEX_NOT_SIMPLE ((NTSTATUS)0xC0380040L) + +// +// MessageId: STATUS_VOLMGR_STRUCTURE_SIZE_INVALID +// +// MessageText: +// +// The Size fields in the VM_VOLUME_LAYOUT input structure are incorrectly set. +// +#define STATUS_VOLMGR_STRUCTURE_SIZE_INVALID ((NTSTATUS)0xC0380041L) + +// +// MessageId: STATUS_VOLMGR_TOO_MANY_NOTIFICATION_REQUESTS +// +// MessageText: +// +// There is already a pending request for notifications. Wait for the existing request to return before requesting for more notifications. +// +#define STATUS_VOLMGR_TOO_MANY_NOTIFICATION_REQUESTS ((NTSTATUS)0xC0380042L) + +// +// MessageId: STATUS_VOLMGR_TRANSACTION_IN_PROGRESS +// +// MessageText: +// +// There is currently a transaction in process. +// +#define STATUS_VOLMGR_TRANSACTION_IN_PROGRESS ((NTSTATUS)0xC0380043L) + +// +// MessageId: STATUS_VOLMGR_UNEXPECTED_DISK_LAYOUT_CHANGE +// +// MessageText: +// +// An unexpected layout change occurred outside of the volume manager. +// +#define STATUS_VOLMGR_UNEXPECTED_DISK_LAYOUT_CHANGE ((NTSTATUS)0xC0380044L) + +// +// MessageId: STATUS_VOLMGR_VOLUME_CONTAINS_MISSING_DISK +// +// MessageText: +// +// The specified volume contains a missing disk. +// +#define STATUS_VOLMGR_VOLUME_CONTAINS_MISSING_DISK ((NTSTATUS)0xC0380045L) + +// +// MessageId: STATUS_VOLMGR_VOLUME_ID_INVALID +// +// MessageText: +// +// The specified volume id is invalid. There are no volumes with the specified volume id. +// +#define STATUS_VOLMGR_VOLUME_ID_INVALID ((NTSTATUS)0xC0380046L) + +// +// MessageId: STATUS_VOLMGR_VOLUME_LENGTH_INVALID +// +// MessageText: +// +// The specified volume length is invalid. +// +#define STATUS_VOLMGR_VOLUME_LENGTH_INVALID ((NTSTATUS)0xC0380047L) + +// +// MessageId: STATUS_VOLMGR_VOLUME_LENGTH_NOT_SECTOR_SIZE_MULTIPLE +// +// MessageText: +// +// The specified size for the volume is not a multiple of the sector size. +// +#define STATUS_VOLMGR_VOLUME_LENGTH_NOT_SECTOR_SIZE_MULTIPLE ((NTSTATUS)0xC0380048L) + +// +// MessageId: STATUS_VOLMGR_VOLUME_NOT_MIRRORED +// +// MessageText: +// +// The operation is only supported on mirrored volumes. +// +#define STATUS_VOLMGR_VOLUME_NOT_MIRRORED ((NTSTATUS)0xC0380049L) + +// +// MessageId: STATUS_VOLMGR_VOLUME_NOT_RETAINED +// +// MessageText: +// +// The specified volume does not have a retain partition. +// +#define STATUS_VOLMGR_VOLUME_NOT_RETAINED ((NTSTATUS)0xC038004AL) + +// +// MessageId: STATUS_VOLMGR_VOLUME_OFFLINE +// +// MessageText: +// +// The specified volume is offline. +// +#define STATUS_VOLMGR_VOLUME_OFFLINE ((NTSTATUS)0xC038004BL) + +// +// MessageId: STATUS_VOLMGR_VOLUME_RETAINED +// +// MessageText: +// +// The specified volume already has a retain partition. +// +#define STATUS_VOLMGR_VOLUME_RETAINED ((NTSTATUS)0xC038004CL) + +// +// MessageId: STATUS_VOLMGR_NUMBER_OF_EXTENTS_INVALID +// +// MessageText: +// +// The specified number of extents is invalid. +// +#define STATUS_VOLMGR_NUMBER_OF_EXTENTS_INVALID ((NTSTATUS)0xC038004DL) + +// +// MessageId: STATUS_VOLMGR_DIFFERENT_SECTOR_SIZE +// +// MessageText: +// +// All disks participating to the volume must have the same sector size. +// +#define STATUS_VOLMGR_DIFFERENT_SECTOR_SIZE ((NTSTATUS)0xC038004EL) + +// +// MessageId: STATUS_VOLMGR_BAD_BOOT_DISK +// +// MessageText: +// +// The boot disk experienced failures. +// +#define STATUS_VOLMGR_BAD_BOOT_DISK ((NTSTATUS)0xC038004FL) + +// +// MessageId: STATUS_VOLMGR_PACK_CONFIG_OFFLINE +// +// MessageText: +// +// The configuration of the pack is offline. +// +#define STATUS_VOLMGR_PACK_CONFIG_OFFLINE ((NTSTATUS)0xC0380050L) + +// +// MessageId: STATUS_VOLMGR_PACK_CONFIG_ONLINE +// +// MessageText: +// +// The configuration of the pack is online. +// +#define STATUS_VOLMGR_PACK_CONFIG_ONLINE ((NTSTATUS)0xC0380051L) + +// +// MessageId: STATUS_VOLMGR_NOT_PRIMARY_PACK +// +// MessageText: +// +// The specified pack is not the primary pack. +// +#define STATUS_VOLMGR_NOT_PRIMARY_PACK ((NTSTATUS)0xC0380052L) + +// +// MessageId: STATUS_VOLMGR_PACK_LOG_UPDATE_FAILED +// +// MessageText: +// +// All disks failed to be updated with the new content of the log. +// +#define STATUS_VOLMGR_PACK_LOG_UPDATE_FAILED ((NTSTATUS)0xC0380053L) + +// +// MessageId: STATUS_VOLMGR_NUMBER_OF_DISKS_IN_PLEX_INVALID +// +// MessageText: +// +// The specified number of disks in a plex is invalid. +// +#define STATUS_VOLMGR_NUMBER_OF_DISKS_IN_PLEX_INVALID ((NTSTATUS)0xC0380054L) + +// +// MessageId: STATUS_VOLMGR_NUMBER_OF_DISKS_IN_MEMBER_INVALID +// +// MessageText: +// +// The specified number of disks in a plex member is invalid. +// +#define STATUS_VOLMGR_NUMBER_OF_DISKS_IN_MEMBER_INVALID ((NTSTATUS)0xC0380055L) + +// +// MessageId: STATUS_VOLMGR_VOLUME_MIRRORED +// +// MessageText: +// +// The operation is not supported on mirrored volumes. +// +#define STATUS_VOLMGR_VOLUME_MIRRORED ((NTSTATUS)0xC0380056L) + +// +// MessageId: STATUS_VOLMGR_PLEX_NOT_SIMPLE_SPANNED +// +// MessageText: +// +// The operation is only supported on simple and spanned plexes. +// +#define STATUS_VOLMGR_PLEX_NOT_SIMPLE_SPANNED ((NTSTATUS)0xC0380057L) + +// +// MessageId: STATUS_VOLMGR_NO_VALID_LOG_COPIES +// +// MessageText: +// +// The pack has no valid log copies. +// +#define STATUS_VOLMGR_NO_VALID_LOG_COPIES ((NTSTATUS)0xC0380058L) + +// +// MessageId: STATUS_VOLMGR_PRIMARY_PACK_PRESENT +// +// MessageText: +// +// A primary pack is already present. +// +#define STATUS_VOLMGR_PRIMARY_PACK_PRESENT ((NTSTATUS)0xC0380059L) + +// +// MessageId: STATUS_VOLMGR_NUMBER_OF_DISKS_INVALID +// +// MessageText: +// +// The specified number of disks is invalid. +// +#define STATUS_VOLMGR_NUMBER_OF_DISKS_INVALID ((NTSTATUS)0xC038005AL) + +// +// MessageId: STATUS_VOLMGR_MIRROR_NOT_SUPPORTED +// +// MessageText: +// +// The system does not support mirrored volumes. +// +#define STATUS_VOLMGR_MIRROR_NOT_SUPPORTED ((NTSTATUS)0xC038005BL) + +// +// MessageId: STATUS_VOLMGR_RAID5_NOT_SUPPORTED +// +// MessageText: +// +// The system does not support RAID-5 volumes. +// +#define STATUS_VOLMGR_RAID5_NOT_SUPPORTED ((NTSTATUS)0xC038005CL) + +// +// Boot Code Data (BCD) status codes +// + +// +// MessageId: STATUS_BCD_NOT_ALL_ENTRIES_IMPORTED +// +// MessageText: +// +// Some BCD entries were not imported correctly from the BCD store. +// +#define STATUS_BCD_NOT_ALL_ENTRIES_IMPORTED ((NTSTATUS)0x80390001L) + +// +// MessageId: STATUS_BCD_TOO_MANY_ELEMENTS +// +// MessageText: +// +// Entries enumerated have exceeded the allowed threshold. +// +#define STATUS_BCD_TOO_MANY_ELEMENTS ((NTSTATUS)0xC0390002L) + +// +// MessageId: STATUS_BCD_NOT_ALL_ENTRIES_SYNCHRONIZED +// +// MessageText: +// +// Some BCD entries were not synchronized correctly with the firmware. +// +#define STATUS_BCD_NOT_ALL_ENTRIES_SYNCHRONIZED ((NTSTATUS)0x80390003L) + + +// +// vhdparser error codes (vhdparser.sys) +// + +// +// MessageId: STATUS_VHD_DRIVE_FOOTER_MISSING +// +// MessageText: +// +// The virtual hard disk is corrupted. The virtual hard disk drive footer is missing. +// +#define STATUS_VHD_DRIVE_FOOTER_MISSING ((NTSTATUS)0xC03A0001L) + +// +// MessageId: STATUS_VHD_DRIVE_FOOTER_CHECKSUM_MISMATCH +// +// MessageText: +// +// The virtual hard disk is corrupted. The virtual hard disk drive footer checksum does not match the on-disk checksum. +// +#define STATUS_VHD_DRIVE_FOOTER_CHECKSUM_MISMATCH ((NTSTATUS)0xC03A0002L) + +// +// MessageId: STATUS_VHD_DRIVE_FOOTER_CORRUPT +// +// MessageText: +// +// The virtual hard disk is corrupted. The virtual hard disk drive footer in the virtual hard disk is corrupted. +// +#define STATUS_VHD_DRIVE_FOOTER_CORRUPT ((NTSTATUS)0xC03A0003L) + +// +// MessageId: STATUS_VHD_FORMAT_UNKNOWN +// +// MessageText: +// +// The system does not recognize the file format of this virtual hard disk. +// +#define STATUS_VHD_FORMAT_UNKNOWN ((NTSTATUS)0xC03A0004L) + +// +// MessageId: STATUS_VHD_FORMAT_UNSUPPORTED_VERSION +// +// MessageText: +// +// The version does not support this version of the file format. +// +#define STATUS_VHD_FORMAT_UNSUPPORTED_VERSION ((NTSTATUS)0xC03A0005L) + +// +// MessageId: STATUS_VHD_SPARSE_HEADER_CHECKSUM_MISMATCH +// +// MessageText: +// +// The virtual hard disk is corrupted. The sparse header checksum does not match the on-disk checksum. +// +#define STATUS_VHD_SPARSE_HEADER_CHECKSUM_MISMATCH ((NTSTATUS)0xC03A0006L) + +// +// MessageId: STATUS_VHD_SPARSE_HEADER_UNSUPPORTED_VERSION +// +// MessageText: +// +// The system does not support this version of the virtual hard disk.This version of the sparse header is not supported. +// +#define STATUS_VHD_SPARSE_HEADER_UNSUPPORTED_VERSION ((NTSTATUS)0xC03A0007L) + +// +// MessageId: STATUS_VHD_SPARSE_HEADER_CORRUPT +// +// MessageText: +// +// The virtual hard disk is corrupted. The sparse header in the virtual hard disk is corrupt. +// +#define STATUS_VHD_SPARSE_HEADER_CORRUPT ((NTSTATUS)0xC03A0008L) + +// +// MessageId: STATUS_VHD_BLOCK_ALLOCATION_FAILURE +// +// MessageText: +// +// Failed to write to the virtual hard disk failed because the system failed to allocate a new block in the virtual hard disk. +// +#define STATUS_VHD_BLOCK_ALLOCATION_FAILURE ((NTSTATUS)0xC03A0009L) + +// +// MessageId: STATUS_VHD_BLOCK_ALLOCATION_TABLE_CORRUPT +// +// MessageText: +// +// The virtual hard disk is corrupted. The block allocation table in the virtual hard disk is corrupt. +// +#define STATUS_VHD_BLOCK_ALLOCATION_TABLE_CORRUPT ((NTSTATUS)0xC03A000AL) + +// +// MessageId: STATUS_VHD_INVALID_BLOCK_SIZE +// +// MessageText: +// +// The system does not support this version of the virtual hard disk. The block size is invalid. +// +#define STATUS_VHD_INVALID_BLOCK_SIZE ((NTSTATUS)0xC03A000BL) + +// +// MessageId: STATUS_VHD_BITMAP_MISMATCH +// +// MessageText: +// +// The virtual hard disk is corrupted. The block bitmap does not match with the block data present in the virtual hard disk. +// +#define STATUS_VHD_BITMAP_MISMATCH ((NTSTATUS)0xC03A000CL) + +// +// MessageId: STATUS_VHD_PARENT_VHD_NOT_FOUND +// +// MessageText: +// +// The chain of virtual hard disks is broken. The system cannot locate the parent virtual hard disk for the differencing disk. +// +#define STATUS_VHD_PARENT_VHD_NOT_FOUND ((NTSTATUS)0xC03A000DL) + +// +// MessageId: STATUS_VHD_CHILD_PARENT_ID_MISMATCH +// +// MessageText: +// +// The chain of virtual hard disks is corrupted. There is a mismatch in the identifiers of the parent virtual hard disk and differencing disk. +// +#define STATUS_VHD_CHILD_PARENT_ID_MISMATCH ((NTSTATUS)0xC03A000EL) + +// +// MessageId: STATUS_VHD_CHILD_PARENT_TIMESTAMP_MISMATCH +// +// MessageText: +// +// The chain of virtual hard disks is corrupted. The time stamp of the parent virtual hard disk does not match the time stamp of the differencing disk. +// +#define STATUS_VHD_CHILD_PARENT_TIMESTAMP_MISMATCH ((NTSTATUS)0xC03A000FL) + +// +// MessageId: STATUS_VHD_METADATA_READ_FAILURE +// +// MessageText: +// +// Failed to read the metadata of the virtual hard disk. +// +#define STATUS_VHD_METADATA_READ_FAILURE ((NTSTATUS)0xC03A0010L) + +// +// MessageId: STATUS_VHD_METADATA_WRITE_FAILURE +// +// MessageText: +// +// Failed to write to the metadata of the virtual hard disk. +// +#define STATUS_VHD_METADATA_WRITE_FAILURE ((NTSTATUS)0xC03A0011L) + +// +// MessageId: STATUS_VHD_INVALID_SIZE +// +// MessageText: +// +// The size of the virtual hard disk is not valid. +// +#define STATUS_VHD_INVALID_SIZE ((NTSTATUS)0xC03A0012L) + +// +// MessageId: STATUS_VHD_INVALID_FILE_SIZE +// +// MessageText: +// +// The file size of this virtual hard disk is not valid. +// +#define STATUS_VHD_INVALID_FILE_SIZE ((NTSTATUS)0xC03A0013L) + +// +// MessageId: STATUS_VIRTDISK_PROVIDER_NOT_FOUND +// +// MessageText: +// +// A virtual disk support provider for the specified file was not found. +// +#define STATUS_VIRTDISK_PROVIDER_NOT_FOUND ((NTSTATUS)0xC03A0014L) + +// +// MessageId: STATUS_VIRTDISK_NOT_VIRTUAL_DISK +// +// MessageText: +// +// The specified disk is not a virtual disk. +// +#define STATUS_VIRTDISK_NOT_VIRTUAL_DISK ((NTSTATUS)0xC03A0015L) + +// +// MessageId: STATUS_VHD_PARENT_VHD_ACCESS_DENIED +// +// MessageText: +// +// The chain of virtual hard disks is inaccessible. The process has not been granted access rights to the parent virtual hard disk for the differencing disk. +// +#define STATUS_VHD_PARENT_VHD_ACCESS_DENIED ((NTSTATUS)0xC03A0016L) + +// +// MessageId: STATUS_VHD_CHILD_PARENT_SIZE_MISMATCH +// +// MessageText: +// +// The chain of virtual hard disks is corrupted. There is a mismatch in the virtual sizes of the parent virtual hard disk and differencing disk. +// +#define STATUS_VHD_CHILD_PARENT_SIZE_MISMATCH ((NTSTATUS)0xC03A0017L) + +// +// MessageId: STATUS_VHD_DIFFERENCING_CHAIN_CYCLE_DETECTED +// +// MessageText: +// +// The chain of virtual hard disks is corrupted. A differencing disk is indicated in its own parent chain. +// +#define STATUS_VHD_DIFFERENCING_CHAIN_CYCLE_DETECTED ((NTSTATUS)0xC03A0018L) + +// +// MessageId: STATUS_VHD_DIFFERENCING_CHAIN_ERROR_IN_PARENT +// +// MessageText: +// +// The chain of virtual hard disks is inaccessible. There was an error opening a virtual hard disk further up the chain. +// +#define STATUS_VHD_DIFFERENCING_CHAIN_ERROR_IN_PARENT ((NTSTATUS)0xC03A0019L) + +// +// MessageId: STATUS_VIRTUAL_DISK_LIMITATION +// +// MessageText: +// +// The requested operation could not be completed due to a virtual disk system limitation. Virtual disks are only supported on NTFS volumes and must be both uncompressed and unencrypted. +// +#define STATUS_VIRTUAL_DISK_LIMITATION ((NTSTATUS)0xC03A001AL) + +// +// MessageId: STATUS_VHD_INVALID_TYPE +// +// MessageText: +// +// The requested operation cannot be performed on a virtual disk of this type. +// +#define STATUS_VHD_INVALID_TYPE ((NTSTATUS)0xC03A001BL) + +// +// MessageId: STATUS_VHD_INVALID_STATE +// +// MessageText: +// +// The requested operation cannot be performed on the virtual disk in its current state. +// +#define STATUS_VHD_INVALID_STATE ((NTSTATUS)0xC03A001CL) + +// +// MessageId: STATUS_VIRTDISK_UNSUPPORTED_DISK_SECTOR_SIZE +// +// MessageText: +// +// The sector size of the physical disk on which the virtual disk resides is not supported. +// +#define STATUS_VIRTDISK_UNSUPPORTED_DISK_SECTOR_SIZE ((NTSTATUS)0xC03A001DL) + + +// +// Vhd warnings. +// + +// +// MessageId: STATUS_QUERY_STORAGE_ERROR +// +// MessageText: +// +// The virtualization storage subsystem has generated an error. +// +#define STATUS_QUERY_STORAGE_ERROR ((NTSTATUS)0x803A0001L) + + +// +// Derived Indexed Store (DIS) error messages. +// +// +// MessageId: STATUS_DIS_NOT_PRESENT +// +// MessageText: +// +// The Derived Indexed Store is not present (or currently loaded) on this system. +// +#define STATUS_DIS_NOT_PRESENT ((NTSTATUS)0xC03C0001L) + +// +// MessageId: STATUS_DIS_ATTRIBUTE_NOT_FOUND +// +// MessageText: +// +// The Attribute was not found in the store for a given object. +// +#define STATUS_DIS_ATTRIBUTE_NOT_FOUND ((NTSTATUS)0xC03C0002L) + +// +// MessageId: STATUS_DIS_UNRECOGNIZED_ATTRIBUTE +// +// MessageText: +// +// This is not a recognized built-in attribute. +// +#define STATUS_DIS_UNRECOGNIZED_ATTRIBUTE ((NTSTATUS)0xC03C0003L) + +// +// MessageId: STATUS_DIS_PARTIAL_DATA +// +// MessageText: +// +// Partial data was successfully returned, some attributes need to be calculated from elsewhere. +// +#define STATUS_DIS_PARTIAL_DATA ((NTSTATUS)0xC03C0004L) + +// +// Map a WIN32 error value into an NTSTATUS +// Note: This assumes that WIN32 errors fall in the range -32k to 32k. +// + +#define __NTSTATUS_FROM_WIN32(x) ((NTSTATUS)(x) <= 0 ? ((NTSTATUS)(x)) : ((NTSTATUS) (((x) & 0x0000FFFF) | (FACILITY_NTWIN32 << 16) | ERROR_SEVERITY_ERROR))) + +#ifdef INLINE_NTSTATUS_FROM_WIN32 +#ifndef __midl +__inline NTSTATUS_FROM_WIN32(long x) { return x <= 0 ? (NTSTATUS)x : (NTSTATUS) (((x) & 0x0000FFFF) | (FACILITY_NTWIN32 << 16) | ERROR_SEVERITY_ERROR);} +#else +#define NTSTATUS_FROM_WIN32(x) __NTSTATUS_FROM_WIN32(x) +#endif +#else +#define NTSTATUS_FROM_WIN32(x) __NTSTATUS_FROM_WIN32(x) +#endif + + +/*lint -restore */ // Resume checking for different macro definitions // winnt +// end_ntsecapi + +#endif // WIN32_NO_STATUS // winnt +#endif // _NTSTATUS_ + +/*++ BUILD Version: 0005 // Increment this if a change has global effects + +Copyright (c) Microsoft Corporation. All rights reserved. + +Module Name: + + ntstatus.h + +Abstract: + + Constant definitions for the NTSTATUS values. + +Author: + + Portable Systems Group 30-Mar-1989 + +Revision History: + +Notes: + + This file is generated by the MC tool from the ntstatus.mc file. + + Please add new error values to the end of the file. To do otherwise + will jumble the error values. + +--*/ + +#ifndef _NTSTATUS_ +#define _NTSTATUS_ + +#if defined (_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +#ifndef WIN32_NO_STATUS // winnt +// begin_ntsecapi + +/*lint -save -e767 */ // Don't complain about different definitions // winnt + + +///////////////////////////////////////////////////////////////////////// +// +// Please update FACILITY_MAXIMUM_VALUE when adding new facility values. +// (This value should be greater than the highest value above) +// +///////////////////////////////////////////////////////////////////////// + +///////////////////////////////////////////////////////////////////////// +// +// Standard Success values +// +// +///////////////////////////////////////////////////////////////////////// + + +// +// The success status codes 0 - 63 are reserved for wait completion status. +// FacilityCodes 0x5 - 0xF have been allocated by various drivers. +// +#define STATUS_SUCCESS ((NTSTATUS)0x00000000L) // ntsubauth + +// +// Values are 32 bit values laid out as follows: +// +// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 +// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 +// +---+-+-+-----------------------+-------------------------------+ +// |Sev|C|R| Facility | Code | +// +---+-+-+-----------------------+-------------------------------+ +// +// where +// +// Sev - is the severity code +// +// 00 - Success +// 01 - Informational +// 10 - Warning +// 11 - Error +// +// C - is the Customer code flag +// +// R - is a reserved bit +// +// Facility - is the facility code +// +// Code - is the facility's status code +// +// +// Define the facility codes +// +#define FACILITY_VOLMGR 0x38 +#define FACILITY_VIRTUALIZATION 0x37 +#define FACILITY_VIDEO 0x1B +#define FACILITY_USB_ERROR_CODE 0x10 +#define FACILITY_TRANSACTION 0x19 +#define FACILITY_TERMINAL_SERVER 0xA +#define FACILITY_SXS_ERROR_CODE 0x15 +#define FACILITY_NTSSPI 0x9 +#define FACILITY_RPC_STUBS 0x3 +#define FACILITY_RPC_RUNTIME 0x2 +#define FACILITY_NTWIN32 0x7 +#define FACILITY_WIN32K_NTUSER 0x3E +#define FACILITY_WIN32K_NTGDI 0x3F +#define FACILITY_NDIS_ERROR_CODE 0x23 +#define FACILTIY_MUI_ERROR_CODE 0xB +#define FACILITY_MONITOR 0x1D +#define FACILITY_MAXIMUM_VALUE 0x3F +#define FACILITY_IPSEC 0x36 +#define FACILITY_IO_ERROR_CODE 0x4 +#define FACILITY_HYPERVISOR 0x35 +#define FACILITY_HID_ERROR_CODE 0x11 +#define FACILITY_GRAPHICS_KERNEL 0x1E +#define FACILITY_FWP_ERROR_CODE 0x22 +#define FACILITY_FVE_ERROR_CODE 0x21 +#define FACILITY_FIREWIRE_ERROR_CODE 0x12 +#define FACILITY_FILTER_MANAGER 0x1C +#define FACILITY_DRIVER_FRAMEWORK 0x20 +#define FACILITY_DIS 0x3C +#define FACILITY_DEBUGGER 0x1 +#define FACILITY_COMMONLOG 0x1A +#define FACILITY_CLUSTER_ERROR_CODE 0x13 +#define FACILITY_NTCERT 0x8 +#define FACILITY_BCD_ERROR_CODE 0x39 +#define FACILITY_ACPI_ERROR_CODE 0x14 + + +// +// Define the severity codes +// +#define STATUS_SEVERITY_WARNING 0x2 +#define STATUS_SEVERITY_SUCCESS 0x0 +#define STATUS_SEVERITY_INFORMATIONAL 0x1 +#define STATUS_SEVERITY_ERROR 0x3 + + +// +// MessageId: STATUS_WAIT_0 +// +// MessageText: +// +// STATUS_WAIT_0 +// +#define STATUS_WAIT_0 ((NTSTATUS)0x00000000L) // winnt + +// +// MessageId: STATUS_WAIT_1 +// +// MessageText: +// +// STATUS_WAIT_1 +// +#define STATUS_WAIT_1 ((NTSTATUS)0x00000001L) + +// +// MessageId: STATUS_WAIT_2 +// +// MessageText: +// +// STATUS_WAIT_2 +// +#define STATUS_WAIT_2 ((NTSTATUS)0x00000002L) + +// +// MessageId: STATUS_WAIT_3 +// +// MessageText: +// +// STATUS_WAIT_3 +// +#define STATUS_WAIT_3 ((NTSTATUS)0x00000003L) + +// +// MessageId: STATUS_WAIT_63 +// +// MessageText: +// +// STATUS_WAIT_63 +// +#define STATUS_WAIT_63 ((NTSTATUS)0x0000003FL) + + +// +// The success status codes 128 - 191 are reserved for wait completion +// status with an abandoned mutant object. +// +#define STATUS_ABANDONED ((NTSTATUS)0x00000080L) + +// +// MessageId: STATUS_ABANDONED_WAIT_0 +// +// MessageText: +// +// STATUS_ABANDONED_WAIT_0 +// +#define STATUS_ABANDONED_WAIT_0 ((NTSTATUS)0x00000080L) // winnt + +// +// MessageId: STATUS_ABANDONED_WAIT_63 +// +// MessageText: +// +// STATUS_ABANDONED_WAIT_63 +// +#define STATUS_ABANDONED_WAIT_63 ((NTSTATUS)0x000000BFL) + + +// +// The success status codes 256, 257, 258, and 258 are reserved for +// User APC, Kernel APC, Alerted, and Timeout. +// +// +// MessageId: STATUS_USER_APC +// +// MessageText: +// +// STATUS_USER_APC +// +#define STATUS_USER_APC ((NTSTATUS)0x000000C0L) // winnt + +// +// MessageId: STATUS_KERNEL_APC +// +// MessageText: +// +// STATUS_KERNEL_APC +// +#define STATUS_KERNEL_APC ((NTSTATUS)0x00000100L) + +// +// MessageId: STATUS_ALERTED +// +// MessageText: +// +// STATUS_ALERTED +// +#define STATUS_ALERTED ((NTSTATUS)0x00000101L) + +// +// MessageId: STATUS_TIMEOUT +// +// MessageText: +// +// STATUS_TIMEOUT +// +#define STATUS_TIMEOUT ((NTSTATUS)0x00000102L) // winnt + +// +// MessageId: STATUS_PENDING +// +// MessageText: +// +// The operation that was requested is pending completion. +// +#define STATUS_PENDING ((NTSTATUS)0x00000103L) // winnt + +// +// MessageId: STATUS_REPARSE +// +// MessageText: +// +// A reparse should be performed by the Object Manager since the name of the file resulted in a symbolic link. +// +#define STATUS_REPARSE ((NTSTATUS)0x00000104L) + +// +// MessageId: STATUS_MORE_ENTRIES +// +// MessageText: +// +// Returned by enumeration APIs to indicate more information is available to successive calls. +// +#define STATUS_MORE_ENTRIES ((NTSTATUS)0x00000105L) + +// +// MessageId: STATUS_NOT_ALL_ASSIGNED +// +// MessageText: +// +// Indicates not all privileges or groups referenced are assigned to the caller. +// This allows, for example, all privileges to be disabled without having to know exactly which privileges are assigned. +// +#define STATUS_NOT_ALL_ASSIGNED ((NTSTATUS)0x00000106L) + +// +// MessageId: STATUS_SOME_NOT_MAPPED +// +// MessageText: +// +// Some of the information to be translated has not been translated. +// +#define STATUS_SOME_NOT_MAPPED ((NTSTATUS)0x00000107L) + +// +// MessageId: STATUS_OPLOCK_BREAK_IN_PROGRESS +// +// MessageText: +// +// An open/create operation completed while an oplock break is underway. +// +#define STATUS_OPLOCK_BREAK_IN_PROGRESS ((NTSTATUS)0x00000108L) + +// +// MessageId: STATUS_VOLUME_MOUNTED +// +// MessageText: +// +// A new volume has been mounted by a file system. +// +#define STATUS_VOLUME_MOUNTED ((NTSTATUS)0x00000109L) + +// +// MessageId: STATUS_RXACT_COMMITTED +// +// MessageText: +// +// This success level status indicates that the transaction state already exists for the registry sub-tree, but that a transaction commit was previously aborted. The commit has now been completed. +// +#define STATUS_RXACT_COMMITTED ((NTSTATUS)0x0000010AL) + +// +// MessageId: STATUS_NOTIFY_CLEANUP +// +// MessageText: +// +// This indicates that a notify change request has been completed due to closing the handle which made the notify change request. +// +#define STATUS_NOTIFY_CLEANUP ((NTSTATUS)0x0000010BL) + +// +// MessageId: STATUS_NOTIFY_ENUM_DIR +// +// MessageText: +// +// This indicates that a notify change request is being completed and that the information is not being returned in the caller's buffer. +// The caller now needs to enumerate the files to find the changes. +// +#define STATUS_NOTIFY_ENUM_DIR ((NTSTATUS)0x0000010CL) + +// +// MessageId: STATUS_NO_QUOTAS_FOR_ACCOUNT +// +// MessageText: +// +// {No Quotas} +// No system quota limits are specifically set for this account. +// +#define STATUS_NO_QUOTAS_FOR_ACCOUNT ((NTSTATUS)0x0000010DL) + +// +// MessageId: STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED +// +// MessageText: +// +// {Connect Failure on Primary Transport} +// An attempt was made to connect to the remote server %hs on the primary transport, but the connection failed. +// The computer WAS able to connect on a secondary transport. +// +#define STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED ((NTSTATUS)0x0000010EL) + +// +// MessageId: STATUS_PAGE_FAULT_TRANSITION +// +// MessageText: +// +// Page fault was a transition fault. +// +#define STATUS_PAGE_FAULT_TRANSITION ((NTSTATUS)0x00000110L) + +// +// MessageId: STATUS_PAGE_FAULT_DEMAND_ZERO +// +// MessageText: +// +// Page fault was a demand zero fault. +// +#define STATUS_PAGE_FAULT_DEMAND_ZERO ((NTSTATUS)0x00000111L) + +// +// MessageId: STATUS_PAGE_FAULT_COPY_ON_WRITE +// +// MessageText: +// +// Page fault was a demand zero fault. +// +#define STATUS_PAGE_FAULT_COPY_ON_WRITE ((NTSTATUS)0x00000112L) + +// +// MessageId: STATUS_PAGE_FAULT_GUARD_PAGE +// +// MessageText: +// +// Page fault was a demand zero fault. +// +#define STATUS_PAGE_FAULT_GUARD_PAGE ((NTSTATUS)0x00000113L) + +// +// MessageId: STATUS_PAGE_FAULT_PAGING_FILE +// +// MessageText: +// +// Page fault was satisfied by reading from a secondary storage device. +// +#define STATUS_PAGE_FAULT_PAGING_FILE ((NTSTATUS)0x00000114L) + +// +// MessageId: STATUS_CACHE_PAGE_LOCKED +// +// MessageText: +// +// Cached page was locked during operation. +// +#define STATUS_CACHE_PAGE_LOCKED ((NTSTATUS)0x00000115L) + +// +// MessageId: STATUS_CRASH_DUMP +// +// MessageText: +// +// Crash dump exists in paging file. +// +#define STATUS_CRASH_DUMP ((NTSTATUS)0x00000116L) + +// +// MessageId: STATUS_BUFFER_ALL_ZEROS +// +// MessageText: +// +// Specified buffer contains all zeros. +// +#define STATUS_BUFFER_ALL_ZEROS ((NTSTATUS)0x00000117L) + +// +// MessageId: STATUS_REPARSE_OBJECT +// +// MessageText: +// +// A reparse should be performed by the Object Manager since the name of the file resulted in a symbolic link. +// +#define STATUS_REPARSE_OBJECT ((NTSTATUS)0x00000118L) + +// +// MessageId: STATUS_RESOURCE_REQUIREMENTS_CHANGED +// +// MessageText: +// +// The device has succeeded a query-stop and its resource requirements have changed. +// +#define STATUS_RESOURCE_REQUIREMENTS_CHANGED ((NTSTATUS)0x00000119L) + +// +// MessageId: STATUS_TRANSLATION_COMPLETE +// +// MessageText: +// +// The translator has translated these resources into the global space and no further translations should be performed. +// +#define STATUS_TRANSLATION_COMPLETE ((NTSTATUS)0x00000120L) + +// +// MessageId: STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY +// +// MessageText: +// +// The directory service evaluated group memberships locally, as it was unable to contact a global catalog server. +// +#define STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY ((NTSTATUS)0x00000121L) + +// +// MessageId: STATUS_NOTHING_TO_TERMINATE +// +// MessageText: +// +// A process being terminated has no threads to terminate. +// +#define STATUS_NOTHING_TO_TERMINATE ((NTSTATUS)0x00000122L) + +// +// MessageId: STATUS_PROCESS_NOT_IN_JOB +// +// MessageText: +// +// The specified process is not part of a job. +// +#define STATUS_PROCESS_NOT_IN_JOB ((NTSTATUS)0x00000123L) + +// +// MessageId: STATUS_PROCESS_IN_JOB +// +// MessageText: +// +// The specified process is part of a job. +// +#define STATUS_PROCESS_IN_JOB ((NTSTATUS)0x00000124L) + +// +// MessageId: STATUS_VOLSNAP_HIBERNATE_READY +// +// MessageText: +// +// {Volume Shadow Copy Service} +// The system is now ready for hibernation. +// +#define STATUS_VOLSNAP_HIBERNATE_READY ((NTSTATUS)0x00000125L) + +// +// MessageId: STATUS_FSFILTER_OP_COMPLETED_SUCCESSFULLY +// +// MessageText: +// +// A file system or file system filter driver has successfully completed an FsFilter operation. +// +#define STATUS_FSFILTER_OP_COMPLETED_SUCCESSFULLY ((NTSTATUS)0x00000126L) + +// +// MessageId: STATUS_INTERRUPT_VECTOR_ALREADY_CONNECTED +// +// MessageText: +// +// The specified interrupt vector was already connected. +// +#define STATUS_INTERRUPT_VECTOR_ALREADY_CONNECTED ((NTSTATUS)0x00000127L) + +// +// MessageId: STATUS_INTERRUPT_STILL_CONNECTED +// +// MessageText: +// +// The specified interrupt vector is still connected. +// +#define STATUS_INTERRUPT_STILL_CONNECTED ((NTSTATUS)0x00000128L) + +// +// MessageId: STATUS_PROCESS_CLONED +// +// MessageText: +// +// The current process is a cloned process. +// +#define STATUS_PROCESS_CLONED ((NTSTATUS)0x00000129L) + +// +// MessageId: STATUS_FILE_LOCKED_WITH_ONLY_READERS +// +// MessageText: +// +// The file was locked and all users of the file can only read. +// +#define STATUS_FILE_LOCKED_WITH_ONLY_READERS ((NTSTATUS)0x0000012AL) + +// +// MessageId: STATUS_FILE_LOCKED_WITH_WRITERS +// +// MessageText: +// +// The file was locked and at least one user of the file can write. +// +#define STATUS_FILE_LOCKED_WITH_WRITERS ((NTSTATUS)0x0000012BL) + +// +// MessageId: STATUS_RESOURCEMANAGER_READ_ONLY +// +// MessageText: +// +// The specified ResourceManager made no changes or updates to the resource under this transaction. +// +#define STATUS_RESOURCEMANAGER_READ_ONLY ((NTSTATUS)0x00000202L) + +// +// MessageId: STATUS_RING_PREVIOUSLY_EMPTY +// +// MessageText: +// +// The specified ring buffer was empty before the packet was successfully inserted. +// +#define STATUS_RING_PREVIOUSLY_EMPTY ((NTSTATUS)0x00000210L) + +// +// MessageId: STATUS_RING_PREVIOUSLY_FULL +// +// MessageText: +// +// The specified ring buffer was full before the packet was successfully removed. +// +#define STATUS_RING_PREVIOUSLY_FULL ((NTSTATUS)0x00000211L) + +// +// MessageId: STATUS_RING_PREVIOUSLY_ABOVE_QUOTA +// +// MessageText: +// +// The specified ring buffer has dropped below its quota of outstanding transactions. +// +#define STATUS_RING_PREVIOUSLY_ABOVE_QUOTA ((NTSTATUS)0x00000212L) + +// +// MessageId: STATUS_RING_NEWLY_EMPTY +// +// MessageText: +// +// The specified ring buffer has, with the removal of the current packet, now become empty. +// +#define STATUS_RING_NEWLY_EMPTY ((NTSTATUS)0x00000213L) + +// +// MessageId: STATUS_RING_SIGNAL_OPPOSITE_ENDPOINT +// +// MessageText: +// +// The specified ring buffer was either previously empty or previously full which implies that the caller should signal the opposite endpoint. +// +#define STATUS_RING_SIGNAL_OPPOSITE_ENDPOINT ((NTSTATUS)0x00000214L) + +// +// MessageId: STATUS_OPLOCK_SWITCHED_TO_NEW_HANDLE +// +// MessageText: +// +// The oplock that was associated with this handle is now associated with a different handle. +// +#define STATUS_OPLOCK_SWITCHED_TO_NEW_HANDLE ((NTSTATUS)0x00000215L) + +// +// MessageId: STATUS_OPLOCK_HANDLE_CLOSED +// +// MessageText: +// +// The handle with which this oplock was associated has been closed. The oplock is now broken. +// +#define STATUS_OPLOCK_HANDLE_CLOSED ((NTSTATUS)0x00000216L) + +// +// MessageId: STATUS_WAIT_FOR_OPLOCK +// +// MessageText: +// +// An operation is blocked waiting for an oplock. +// +#define STATUS_WAIT_FOR_OPLOCK ((NTSTATUS)0x00000367L) + +// +// MessageId: DBG_EXCEPTION_HANDLED +// +// MessageText: +// +// Debugger handled exception +// +#define DBG_EXCEPTION_HANDLED ((NTSTATUS)0x00010001L) // winnt + +// +// MessageId: DBG_CONTINUE +// +// MessageText: +// +// Debugger continued +// +#define DBG_CONTINUE ((NTSTATUS)0x00010002L) // winnt + +// +// MessageId: STATUS_FLT_IO_COMPLETE +// +// MessageText: +// +// The IO was completed by a filter. +// +#define STATUS_FLT_IO_COMPLETE ((NTSTATUS)0x001C0001L) + +// +// MessageId: STATUS_DIS_ATTRIBUTE_BUILT +// +// MessageText: +// +// An attribute was successfully built. +// +#define STATUS_DIS_ATTRIBUTE_BUILT ((NTSTATUS)0x003C0001L) + +///////////////////////////////////////////////////////////////////////// +// +// Standard Information values +// +///////////////////////////////////////////////////////////////////////// + +// +// MessageId: STATUS_OBJECT_NAME_EXISTS +// +// MessageText: +// +// {Object Exists} +// An attempt was made to create an object and the object name already existed. +// +#define STATUS_OBJECT_NAME_EXISTS ((NTSTATUS)0x40000000L) + +// +// MessageId: STATUS_THREAD_WAS_SUSPENDED +// +// MessageText: +// +// {Thread Suspended} +// A thread termination occurred while the thread was suspended. The thread was resumed, and termination proceeded. +// +#define STATUS_THREAD_WAS_SUSPENDED ((NTSTATUS)0x40000001L) + +// +// MessageId: STATUS_WORKING_SET_LIMIT_RANGE +// +// MessageText: +// +// {Working Set Range Error} +// An attempt was made to set the working set minimum or maximum to values which are outside of the allowable range. +// +#define STATUS_WORKING_SET_LIMIT_RANGE ((NTSTATUS)0x40000002L) + +// +// MessageId: STATUS_IMAGE_NOT_AT_BASE +// +// MessageText: +// +// {Image Relocated} +// An image file could not be mapped at the address specified in the image file. Local fixups must be performed on this image. +// +#define STATUS_IMAGE_NOT_AT_BASE ((NTSTATUS)0x40000003L) + +// +// MessageId: STATUS_RXACT_STATE_CREATED +// +// MessageText: +// +// This informational level status indicates that a specified registry sub-tree transaction state did not yet exist and had to be created. +// +#define STATUS_RXACT_STATE_CREATED ((NTSTATUS)0x40000004L) + +// +// MessageId: STATUS_SEGMENT_NOTIFICATION +// +// MessageText: +// +// {Segment Load} +// A virtual DOS machine (VDM) is loading, unloading, or moving an MS-DOS or Win16 program segment image. +// An exception is raised so a debugger can load, unload or track symbols and breakpoints within these 16-bit segments. +// +#define STATUS_SEGMENT_NOTIFICATION ((NTSTATUS)0x40000005L) // winnt + +// +// MessageId: STATUS_LOCAL_USER_SESSION_KEY +// +// MessageText: +// +// {Local Session Key} +// A user session key was requested for a local RPC connection. The session key returned is a constant value and not unique to this connection. +// +#define STATUS_LOCAL_USER_SESSION_KEY ((NTSTATUS)0x40000006L) + +// +// MessageId: STATUS_BAD_CURRENT_DIRECTORY +// +// MessageText: +// +// {Invalid Current Directory} +// The process cannot switch to the startup current directory %hs. +// Select OK to set current directory to %hs, or select CANCEL to exit. +// +#define STATUS_BAD_CURRENT_DIRECTORY ((NTSTATUS)0x40000007L) + +// +// MessageId: STATUS_SERIAL_MORE_WRITES +// +// MessageText: +// +// {Serial IOCTL Complete} +// A serial I/O operation was completed by another write to a serial port. +// (The IOCTL_SERIAL_XOFF_COUNTER reached zero.) +// +#define STATUS_SERIAL_MORE_WRITES ((NTSTATUS)0x40000008L) + +// +// MessageId: STATUS_REGISTRY_RECOVERED +// +// MessageText: +// +// {Registry Recovery} +// One of the files containing the system's Registry data had to be recovered by use of a log or alternate copy. The recovery was successful. +// +#define STATUS_REGISTRY_RECOVERED ((NTSTATUS)0x40000009L) + +// +// MessageId: STATUS_FT_READ_RECOVERY_FROM_BACKUP +// +// MessageText: +// +// {Redundant Read} +// To satisfy a read request, the NT fault-tolerant file system successfully read the requested data from a redundant copy. +// This was done because the file system encountered a failure on a member of the fault-tolerant volume, but was unable to reassign the failing area of the device. +// +#define STATUS_FT_READ_RECOVERY_FROM_BACKUP ((NTSTATUS)0x4000000AL) + +// +// MessageId: STATUS_FT_WRITE_RECOVERY +// +// MessageText: +// +// {Redundant Write} +// To satisfy a write request, the NT fault-tolerant file system successfully wrote a redundant copy of the information. +// This was done because the file system encountered a failure on a member of the fault-tolerant volume, but was not able to reassign the failing area of the device. +// +#define STATUS_FT_WRITE_RECOVERY ((NTSTATUS)0x4000000BL) + +// +// MessageId: STATUS_SERIAL_COUNTER_TIMEOUT +// +// MessageText: +// +// {Serial IOCTL Timeout} +// A serial I/O operation completed because the time-out period expired. (The IOCTL_SERIAL_XOFF_COUNTER had not reached zero.) +// +#define STATUS_SERIAL_COUNTER_TIMEOUT ((NTSTATUS)0x4000000CL) + +// +// MessageId: STATUS_NULL_LM_PASSWORD +// +// MessageText: +// +// {Password Too Complex} +// The Windows password is too complex to be converted to a LAN Manager password. The LAN Manager password returned is a NULL string. +// +#define STATUS_NULL_LM_PASSWORD ((NTSTATUS)0x4000000DL) + +// +// MessageId: STATUS_IMAGE_MACHINE_TYPE_MISMATCH +// +// MessageText: +// +// {Machine Type Mismatch} +// The image file %hs is valid, but is for a machine type other than the current machine. Select OK to continue, or CANCEL to fail the DLL load. +// +#define STATUS_IMAGE_MACHINE_TYPE_MISMATCH ((NTSTATUS)0x4000000EL) + +// +// MessageId: STATUS_RECEIVE_PARTIAL +// +// MessageText: +// +// {Partial Data Received} +// The network transport returned partial data to its client. The remaining data will be sent later. +// +#define STATUS_RECEIVE_PARTIAL ((NTSTATUS)0x4000000FL) + +// +// MessageId: STATUS_RECEIVE_EXPEDITED +// +// MessageText: +// +// {Expedited Data Received} +// The network transport returned data to its client that was marked as expedited by the remote system. +// +#define STATUS_RECEIVE_EXPEDITED ((NTSTATUS)0x40000010L) + +// +// MessageId: STATUS_RECEIVE_PARTIAL_EXPEDITED +// +// MessageText: +// +// {Partial Expedited Data Received} +// The network transport returned partial data to its client and this data was marked as expedited by the remote system. The remaining data will be sent later. +// +#define STATUS_RECEIVE_PARTIAL_EXPEDITED ((NTSTATUS)0x40000011L) + +// +// MessageId: STATUS_EVENT_DONE +// +// MessageText: +// +// {TDI Event Done} +// The TDI indication has completed successfully. +// +#define STATUS_EVENT_DONE ((NTSTATUS)0x40000012L) + +// +// MessageId: STATUS_EVENT_PENDING +// +// MessageText: +// +// {TDI Event Pending} +// The TDI indication has entered the pending state. +// +#define STATUS_EVENT_PENDING ((NTSTATUS)0x40000013L) + +// +// MessageId: STATUS_CHECKING_FILE_SYSTEM +// +// MessageText: +// +// Checking file system on %wZ +// +#define STATUS_CHECKING_FILE_SYSTEM ((NTSTATUS)0x40000014L) + +// +// MessageId: STATUS_FATAL_APP_EXIT +// +// MessageText: +// +// {Fatal Application Exit} +// %hs +// +#define STATUS_FATAL_APP_EXIT ((NTSTATUS)0x40000015L) + +// +// MessageId: STATUS_PREDEFINED_HANDLE +// +// MessageText: +// +// The specified registry key is referenced by a predefined handle. +// +#define STATUS_PREDEFINED_HANDLE ((NTSTATUS)0x40000016L) + +// +// MessageId: STATUS_WAS_UNLOCKED +// +// MessageText: +// +// {Page Unlocked} +// The page protection of a locked page was changed to 'No Access' and the page was unlocked from memory and from the process. +// +#define STATUS_WAS_UNLOCKED ((NTSTATUS)0x40000017L) + +// +// MessageId: STATUS_SERVICE_NOTIFICATION +// +// MessageText: +// +// %hs +// +#define STATUS_SERVICE_NOTIFICATION ((NTSTATUS)0x40000018L) + +// +// MessageId: STATUS_WAS_LOCKED +// +// MessageText: +// +// {Page Locked} +// One of the pages to lock was already locked. +// +#define STATUS_WAS_LOCKED ((NTSTATUS)0x40000019L) + +// +// MessageId: STATUS_LOG_HARD_ERROR +// +// MessageText: +// +// Application popup: %1 : %2 +// +#define STATUS_LOG_HARD_ERROR ((NTSTATUS)0x4000001AL) + +// +// MessageId: STATUS_ALREADY_WIN32 +// +// MessageText: +// +// STATUS_ALREADY_WIN32 +// +#define STATUS_ALREADY_WIN32 ((NTSTATUS)0x4000001BL) + +// +// MessageId: STATUS_WX86_UNSIMULATE +// +// MessageText: +// +// Exception status code used by Win32 x86 emulation subsystem. +// +#define STATUS_WX86_UNSIMULATE ((NTSTATUS)0x4000001CL) + +// +// MessageId: STATUS_WX86_CONTINUE +// +// MessageText: +// +// Exception status code used by Win32 x86 emulation subsystem. +// +#define STATUS_WX86_CONTINUE ((NTSTATUS)0x4000001DL) + +// +// MessageId: STATUS_WX86_SINGLE_STEP +// +// MessageText: +// +// Exception status code used by Win32 x86 emulation subsystem. +// +#define STATUS_WX86_SINGLE_STEP ((NTSTATUS)0x4000001EL) + +// +// MessageId: STATUS_WX86_BREAKPOINT +// +// MessageText: +// +// Exception status code used by Win32 x86 emulation subsystem. +// +#define STATUS_WX86_BREAKPOINT ((NTSTATUS)0x4000001FL) + +// +// MessageId: STATUS_WX86_EXCEPTION_CONTINUE +// +// MessageText: +// +// Exception status code used by Win32 x86 emulation subsystem. +// +#define STATUS_WX86_EXCEPTION_CONTINUE ((NTSTATUS)0x40000020L) + +// +// MessageId: STATUS_WX86_EXCEPTION_LASTCHANCE +// +// MessageText: +// +// Exception status code used by Win32 x86 emulation subsystem. +// +#define STATUS_WX86_EXCEPTION_LASTCHANCE ((NTSTATUS)0x40000021L) + +// +// MessageId: STATUS_WX86_EXCEPTION_CHAIN +// +// MessageText: +// +// Exception status code used by Win32 x86 emulation subsystem. +// +#define STATUS_WX86_EXCEPTION_CHAIN ((NTSTATUS)0x40000022L) + +// +// MessageId: STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE +// +// MessageText: +// +// {Machine Type Mismatch} +// The image file %hs is valid, but is for a machine type other than the current machine. +// +#define STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE ((NTSTATUS)0x40000023L) + +// +// MessageId: STATUS_NO_YIELD_PERFORMED +// +// MessageText: +// +// A yield execution was performed and no thread was available to run. +// +#define STATUS_NO_YIELD_PERFORMED ((NTSTATUS)0x40000024L) + +// +// MessageId: STATUS_TIMER_RESUME_IGNORED +// +// MessageText: +// +// The resumable flag to a timer API was ignored. +// +#define STATUS_TIMER_RESUME_IGNORED ((NTSTATUS)0x40000025L) + +// +// MessageId: STATUS_ARBITRATION_UNHANDLED +// +// MessageText: +// +// The arbiter has deferred arbitration of these resources to its parent +// +#define STATUS_ARBITRATION_UNHANDLED ((NTSTATUS)0x40000026L) + +// +// MessageId: STATUS_CARDBUS_NOT_SUPPORTED +// +// MessageText: +// +// The device "%hs" has detected a CardBus card in its slot, but the firmware on this system is not configured to allow the CardBus controller to be run in CardBus mode. +// The operating system will currently accept only 16-bit (R2) pc-cards on this controller. +// +#define STATUS_CARDBUS_NOT_SUPPORTED ((NTSTATUS)0x40000027L) + +// +// MessageId: STATUS_WX86_CREATEWX86TIB +// +// MessageText: +// +// Exception status code used by Win32 x86 emulation subsystem. +// +#define STATUS_WX86_CREATEWX86TIB ((NTSTATUS)0x40000028L) + +// +// MessageId: STATUS_MP_PROCESSOR_MISMATCH +// +// MessageText: +// +// The CPUs in this multiprocessor system are not all the same revision level. To use all processors the operating system restricts itself to the features of the least capable processor in the system. Should problems occur with this system, contact the CPU manufacturer to see if this mix of processors is supported. +// +#define STATUS_MP_PROCESSOR_MISMATCH ((NTSTATUS)0x40000029L) + +// +// MessageId: STATUS_HIBERNATED +// +// MessageText: +// +// The system was put into hibernation. +// +#define STATUS_HIBERNATED ((NTSTATUS)0x4000002AL) + +// +// MessageId: STATUS_RESUME_HIBERNATION +// +// MessageText: +// +// The system was resumed from hibernation. +// +#define STATUS_RESUME_HIBERNATION ((NTSTATUS)0x4000002BL) + +// +// MessageId: STATUS_FIRMWARE_UPDATED +// +// MessageText: +// +// Windows has detected that the system firmware (BIOS) was updated [previous firmware date = %2, current firmware date %3]. +// +#define STATUS_FIRMWARE_UPDATED ((NTSTATUS)0x4000002CL) + +// +// MessageId: STATUS_DRIVERS_LEAKING_LOCKED_PAGES +// +// MessageText: +// +// A device driver is leaking locked I/O pages causing system degradation. The system has automatically enabled tracking code in order to try and catch the culprit. +// +#define STATUS_DRIVERS_LEAKING_LOCKED_PAGES ((NTSTATUS)0x4000002DL) + +// +// MessageId: STATUS_MESSAGE_RETRIEVED +// +// MessageText: +// +// The ALPC message being canceled has already been retrieved from the queue on the other side. +// +#define STATUS_MESSAGE_RETRIEVED ((NTSTATUS)0x4000002EL) + +// +// MessageId: STATUS_SYSTEM_POWERSTATE_TRANSITION +// +// MessageText: +// +// The system power state is transitioning from %2 to %3. +// +#define STATUS_SYSTEM_POWERSTATE_TRANSITION ((NTSTATUS)0x4000002FL) + +// +// MessageId: STATUS_ALPC_CHECK_COMPLETION_LIST +// +// MessageText: +// +// The receive operation was successful. Check the ALPC completion list for the received message. +// +#define STATUS_ALPC_CHECK_COMPLETION_LIST ((NTSTATUS)0x40000030L) + +// +// MessageId: STATUS_SYSTEM_POWERSTATE_COMPLEX_TRANSITION +// +// MessageText: +// +// The system power state is transitioning from %2 to %3 but could enter %4. +// +#define STATUS_SYSTEM_POWERSTATE_COMPLEX_TRANSITION ((NTSTATUS)0x40000031L) + +// +// MessageId: STATUS_ACCESS_AUDIT_BY_POLICY +// +// MessageText: +// +// Access to %1 is monitored by policy rule %2. +// +#define STATUS_ACCESS_AUDIT_BY_POLICY ((NTSTATUS)0x40000032L) + +// +// MessageId: STATUS_ABANDON_HIBERFILE +// +// MessageText: +// +// A valid hibernation file has been invalidated and should be abandoned. +// +#define STATUS_ABANDON_HIBERFILE ((NTSTATUS)0x40000033L) + +// +// MessageId: STATUS_BIZRULES_NOT_ENABLED +// +// MessageText: +// +// Business rule scripts are disabled for the calling application. +// +#define STATUS_BIZRULES_NOT_ENABLED ((NTSTATUS)0x40000034L) + +// +// MessageId: DBG_REPLY_LATER +// +// MessageText: +// +// Debugger will reply later. +// +#define DBG_REPLY_LATER ((NTSTATUS)0x40010001L) + +// +// MessageId: DBG_UNABLE_TO_PROVIDE_HANDLE +// +// MessageText: +// +// Debugger cannot provide handle. +// +#define DBG_UNABLE_TO_PROVIDE_HANDLE ((NTSTATUS)0x40010002L) + +// +// MessageId: DBG_TERMINATE_THREAD +// +// MessageText: +// +// Debugger terminated thread. +// +#define DBG_TERMINATE_THREAD ((NTSTATUS)0x40010003L) // winnt + +// +// MessageId: DBG_TERMINATE_PROCESS +// +// MessageText: +// +// Debugger terminated process. +// +#define DBG_TERMINATE_PROCESS ((NTSTATUS)0x40010004L) // winnt + +// +// MessageId: DBG_CONTROL_C +// +// MessageText: +// +// Debugger got control C. +// +#define DBG_CONTROL_C ((NTSTATUS)0x40010005L) // winnt + +// +// MessageId: DBG_PRINTEXCEPTION_C +// +// MessageText: +// +// Debugger printed exception on control C. +// +#define DBG_PRINTEXCEPTION_C ((NTSTATUS)0x40010006L) // winnt + +// +// MessageId: DBG_RIPEXCEPTION +// +// MessageText: +// +// Debugger received RIP exception. +// +#define DBG_RIPEXCEPTION ((NTSTATUS)0x40010007L) // winnt + +// +// MessageId: DBG_CONTROL_BREAK +// +// MessageText: +// +// Debugger received control break. +// +#define DBG_CONTROL_BREAK ((NTSTATUS)0x40010008L) // winnt + +// +// MessageId: DBG_COMMAND_EXCEPTION +// +// MessageText: +// +// Debugger command communication exception. +// +#define DBG_COMMAND_EXCEPTION ((NTSTATUS)0x40010009L) // winnt + +///////////////////////////////////////////////////////////////////////// +// +// Standard Warning values +// +// +// Note: Do NOT use the value 0x80000000L, as this is a non-portable value +// for the NT_SUCCESS macro. Warning values start with a code of 1. +// +///////////////////////////////////////////////////////////////////////// + +// +// MessageId: STATUS_GUARD_PAGE_VIOLATION +// +// MessageText: +// +// {EXCEPTION} +// Guard Page Exception +// A page of memory that marks the end of a data structure, such as a stack or an array, has been accessed. +// +#define STATUS_GUARD_PAGE_VIOLATION ((NTSTATUS)0x80000001L) // winnt + +// +// MessageId: STATUS_DATATYPE_MISALIGNMENT +// +// MessageText: +// +// {EXCEPTION} +// Alignment Fault +// A datatype misalignment was detected in a load or store instruction. +// +#define STATUS_DATATYPE_MISALIGNMENT ((NTSTATUS)0x80000002L) // winnt + +// +// MessageId: STATUS_BREAKPOINT +// +// MessageText: +// +// {EXCEPTION} +// Breakpoint +// A breakpoint has been reached. +// +#define STATUS_BREAKPOINT ((NTSTATUS)0x80000003L) // winnt + +// +// MessageId: STATUS_SINGLE_STEP +// +// MessageText: +// +// {EXCEPTION} +// Single Step +// A single step or trace operation has just been completed. +// +#define STATUS_SINGLE_STEP ((NTSTATUS)0x80000004L) // winnt + +// +// MessageId: STATUS_BUFFER_OVERFLOW +// +// MessageText: +// +// {Buffer Overflow} +// The data was too large to fit into the specified buffer. +// +#define STATUS_BUFFER_OVERFLOW ((NTSTATUS)0x80000005L) + +// +// MessageId: STATUS_NO_MORE_FILES +// +// MessageText: +// +// {No More Files} +// No more files were found which match the file specification. +// +#define STATUS_NO_MORE_FILES ((NTSTATUS)0x80000006L) + +// +// MessageId: STATUS_WAKE_SYSTEM_DEBUGGER +// +// MessageText: +// +// {Kernel Debugger Awakened} +// the system debugger was awakened by an interrupt. +// +#define STATUS_WAKE_SYSTEM_DEBUGGER ((NTSTATUS)0x80000007L) + +// +// MessageId: STATUS_HANDLES_CLOSED +// +// MessageText: +// +// {Handles Closed} +// Handles to objects have been automatically closed as a result of the requested operation. +// +#define STATUS_HANDLES_CLOSED ((NTSTATUS)0x8000000AL) + +// +// MessageId: STATUS_NO_INHERITANCE +// +// MessageText: +// +// {Non-Inheritable ACL} +// An access control list (ACL) contains no components that can be inherited. +// +#define STATUS_NO_INHERITANCE ((NTSTATUS)0x8000000BL) + +// +// MessageId: STATUS_GUID_SUBSTITUTION_MADE +// +// MessageText: +// +// {GUID Substitution} +// During the translation of a global identifier (GUID) to a Windows security ID (SID), no administratively-defined GUID prefix was found. A substitute prefix was used, which will not compromise system security. However, this may provide a more restrictive access than intended. +// +#define STATUS_GUID_SUBSTITUTION_MADE ((NTSTATUS)0x8000000CL) + +// +// MessageId: STATUS_PARTIAL_COPY +// +// MessageText: +// +// {Partial Copy} +// Due to protection conflicts not all the requested bytes could be copied. +// +#define STATUS_PARTIAL_COPY ((NTSTATUS)0x8000000DL) + +// +// MessageId: STATUS_DEVICE_PAPER_EMPTY +// +// MessageText: +// +// {Out of Paper} +// The printer is out of paper. +// +#define STATUS_DEVICE_PAPER_EMPTY ((NTSTATUS)0x8000000EL) + +// +// MessageId: STATUS_DEVICE_POWERED_OFF +// +// MessageText: +// +// {Device Power Is Off} +// The printer power has been turned off. +// +#define STATUS_DEVICE_POWERED_OFF ((NTSTATUS)0x8000000FL) + +// +// MessageId: STATUS_DEVICE_OFF_LINE +// +// MessageText: +// +// {Device Offline} +// The printer has been taken offline. +// +#define STATUS_DEVICE_OFF_LINE ((NTSTATUS)0x80000010L) + +// +// MessageId: STATUS_DEVICE_BUSY +// +// MessageText: +// +// {Device Busy} +// The device is currently busy. +// +#define STATUS_DEVICE_BUSY ((NTSTATUS)0x80000011L) + +// +// MessageId: STATUS_NO_MORE_EAS +// +// MessageText: +// +// {No More EAs} +// No more extended attributes (EAs) were found for the file. +// +#define STATUS_NO_MORE_EAS ((NTSTATUS)0x80000012L) + +// +// MessageId: STATUS_INVALID_EA_NAME +// +// MessageText: +// +// {Illegal EA} +// The specified extended attribute (EA) name contains at least one illegal character. +// +#define STATUS_INVALID_EA_NAME ((NTSTATUS)0x80000013L) + +// +// MessageId: STATUS_EA_LIST_INCONSISTENT +// +// MessageText: +// +// {Inconsistent EA List} +// The extended attribute (EA) list is inconsistent. +// +#define STATUS_EA_LIST_INCONSISTENT ((NTSTATUS)0x80000014L) + +// +// MessageId: STATUS_INVALID_EA_FLAG +// +// MessageText: +// +// {Invalid EA Flag} +// An invalid extended attribute (EA) flag was set. +// +#define STATUS_INVALID_EA_FLAG ((NTSTATUS)0x80000015L) + +// +// MessageId: STATUS_VERIFY_REQUIRED +// +// MessageText: +// +// {Verifying Disk} +// The media has changed and a verify operation is in progress so no reads or writes may be performed to the device, except those used in the verify operation. +// +#define STATUS_VERIFY_REQUIRED ((NTSTATUS)0x80000016L) + +// +// MessageId: STATUS_EXTRANEOUS_INFORMATION +// +// MessageText: +// +// {Too Much Information} +// The specified access control list (ACL) contained more information than was expected. +// +#define STATUS_EXTRANEOUS_INFORMATION ((NTSTATUS)0x80000017L) + +// +// MessageId: STATUS_RXACT_COMMIT_NECESSARY +// +// MessageText: +// +// This warning level status indicates that the transaction state already exists for the registry sub-tree, but that a transaction commit was previously aborted. +// The commit has NOT been completed, but has not been rolled back either (so it may still be committed if desired). +// +#define STATUS_RXACT_COMMIT_NECESSARY ((NTSTATUS)0x80000018L) + +// +// MessageId: STATUS_NO_MORE_ENTRIES +// +// MessageText: +// +// {No More Entries} +// No more entries are available from an enumeration operation. +// +#define STATUS_NO_MORE_ENTRIES ((NTSTATUS)0x8000001AL) + +// +// MessageId: STATUS_FILEMARK_DETECTED +// +// MessageText: +// +// {Filemark Found} +// A filemark was detected. +// +#define STATUS_FILEMARK_DETECTED ((NTSTATUS)0x8000001BL) + +// +// MessageId: STATUS_MEDIA_CHANGED +// +// MessageText: +// +// {Media Changed} +// The media may have changed. +// +#define STATUS_MEDIA_CHANGED ((NTSTATUS)0x8000001CL) + +// +// MessageId: STATUS_BUS_RESET +// +// MessageText: +// +// {I/O Bus Reset} +// An I/O bus reset was detected. +// +#define STATUS_BUS_RESET ((NTSTATUS)0x8000001DL) + +// +// MessageId: STATUS_END_OF_MEDIA +// +// MessageText: +// +// {End of Media} +// The end of the media was encountered. +// +#define STATUS_END_OF_MEDIA ((NTSTATUS)0x8000001EL) + +// +// MessageId: STATUS_BEGINNING_OF_MEDIA +// +// MessageText: +// +// Beginning of tape or partition has been detected. +// +#define STATUS_BEGINNING_OF_MEDIA ((NTSTATUS)0x8000001FL) + +// +// MessageId: STATUS_MEDIA_CHECK +// +// MessageText: +// +// {Media Changed} +// The media may have changed. +// +#define STATUS_MEDIA_CHECK ((NTSTATUS)0x80000020L) + +// +// MessageId: STATUS_SETMARK_DETECTED +// +// MessageText: +// +// A tape access reached a setmark. +// +#define STATUS_SETMARK_DETECTED ((NTSTATUS)0x80000021L) + +// +// MessageId: STATUS_NO_DATA_DETECTED +// +// MessageText: +// +// During a tape access, the end of the data written is reached. +// +#define STATUS_NO_DATA_DETECTED ((NTSTATUS)0x80000022L) + +// +// MessageId: STATUS_REDIRECTOR_HAS_OPEN_HANDLES +// +// MessageText: +// +// The redirector is in use and cannot be unloaded. +// +#define STATUS_REDIRECTOR_HAS_OPEN_HANDLES ((NTSTATUS)0x80000023L) + +// +// MessageId: STATUS_SERVER_HAS_OPEN_HANDLES +// +// MessageText: +// +// The server is in use and cannot be unloaded. +// +#define STATUS_SERVER_HAS_OPEN_HANDLES ((NTSTATUS)0x80000024L) + +// +// MessageId: STATUS_ALREADY_DISCONNECTED +// +// MessageText: +// +// The specified connection has already been disconnected. +// +#define STATUS_ALREADY_DISCONNECTED ((NTSTATUS)0x80000025L) + +// +// MessageId: STATUS_LONGJUMP +// +// MessageText: +// +// A long jump has been executed. +// +#define STATUS_LONGJUMP ((NTSTATUS)0x80000026L) // winnt + +// +// MessageId: STATUS_CLEANER_CARTRIDGE_INSTALLED +// +// MessageText: +// +// A cleaner cartridge is present in the tape library. +// +#define STATUS_CLEANER_CARTRIDGE_INSTALLED ((NTSTATUS)0x80000027L) + +// +// MessageId: STATUS_PLUGPLAY_QUERY_VETOED +// +// MessageText: +// +// The Plug and Play query operation was not successful. +// +#define STATUS_PLUGPLAY_QUERY_VETOED ((NTSTATUS)0x80000028L) + +// +// MessageId: STATUS_UNWIND_CONSOLIDATE +// +// MessageText: +// +// A frame consolidation has been executed. +// +#define STATUS_UNWIND_CONSOLIDATE ((NTSTATUS)0x80000029L) // winnt + +// +// MessageId: STATUS_REGISTRY_HIVE_RECOVERED +// +// MessageText: +// +// {Registry Hive Recovered} +// Registry hive (file): +// %hs +// was corrupted and it has been recovered. Some data might have been lost. +// +#define STATUS_REGISTRY_HIVE_RECOVERED ((NTSTATUS)0x8000002AL) + +// +// MessageId: STATUS_DLL_MIGHT_BE_INSECURE +// +// MessageText: +// +// The application is attempting to run executable code from the module %hs. This may be insecure. An alternative, %hs, is available. Should the application use the secure module %hs? +// +#define STATUS_DLL_MIGHT_BE_INSECURE ((NTSTATUS)0x8000002BL) + +// +// MessageId: STATUS_DLL_MIGHT_BE_INCOMPATIBLE +// +// MessageText: +// +// The application is loading executable code from the module %hs. This is secure, but may be incompatible with previous releases of the operating system. An alternative, %hs, is available. Should the application use the secure module %hs? +// +#define STATUS_DLL_MIGHT_BE_INCOMPATIBLE ((NTSTATUS)0x8000002CL) + +// +// MessageId: STATUS_STOPPED_ON_SYMLINK +// +// MessageText: +// +// The create operation stopped after reaching a symbolic link. +// +#define STATUS_STOPPED_ON_SYMLINK ((NTSTATUS)0x8000002DL) + +// +// MessageId: STATUS_CANNOT_GRANT_REQUESTED_OPLOCK +// +// MessageText: +// +// An oplock of the requested level cannot be granted. An oplock of a lower level may be available. +// +#define STATUS_CANNOT_GRANT_REQUESTED_OPLOCK ((NTSTATUS)0x8000002EL) + +// +// MessageId: STATUS_NO_ACE_CONDITION +// +// MessageText: +// +// {No ACE Condition} +// The specified access control entry (ACE) does not contain a condition. +// +#define STATUS_NO_ACE_CONDITION ((NTSTATUS)0x8000002FL) + +// +// MessageId: DBG_EXCEPTION_NOT_HANDLED +// +// MessageText: +// +// Debugger did not handle the exception. +// +#define DBG_EXCEPTION_NOT_HANDLED ((NTSTATUS)0x80010001L) // winnt + +// +// MessageId: STATUS_CLUSTER_NODE_ALREADY_UP +// +// MessageText: +// +// The cluster node is already up. +// +#define STATUS_CLUSTER_NODE_ALREADY_UP ((NTSTATUS)0x80130001L) + +// +// MessageId: STATUS_CLUSTER_NODE_ALREADY_DOWN +// +// MessageText: +// +// The cluster node is already down. +// +#define STATUS_CLUSTER_NODE_ALREADY_DOWN ((NTSTATUS)0x80130002L) + +// +// MessageId: STATUS_CLUSTER_NETWORK_ALREADY_ONLINE +// +// MessageText: +// +// The cluster network is already online. +// +#define STATUS_CLUSTER_NETWORK_ALREADY_ONLINE ((NTSTATUS)0x80130003L) + +// +// MessageId: STATUS_CLUSTER_NETWORK_ALREADY_OFFLINE +// +// MessageText: +// +// The cluster network is already offline. +// +#define STATUS_CLUSTER_NETWORK_ALREADY_OFFLINE ((NTSTATUS)0x80130004L) + +// +// MessageId: STATUS_CLUSTER_NODE_ALREADY_MEMBER +// +// MessageText: +// +// The cluster node is already a member of the cluster. +// +#define STATUS_CLUSTER_NODE_ALREADY_MEMBER ((NTSTATUS)0x80130005L) + +// +// MessageId: STATUS_FLT_BUFFER_TOO_SMALL +// +// MessageText: +// +// {Buffer too small} +// The buffer is too small to contain the entry. No information has been written to the buffer. +// +#define STATUS_FLT_BUFFER_TOO_SMALL ((NTSTATUS)0x801C0001L) + +// +// MessageId: STATUS_FVE_PARTIAL_METADATA +// +// MessageText: +// +// Volume Metadata read or write is incomplete. +// +#define STATUS_FVE_PARTIAL_METADATA ((NTSTATUS)0x80210001L) + +// +// MessageId: STATUS_FVE_TRANSIENT_STATE +// +// MessageText: +// +// BitLocker encryption keys were ignored because the volume was in a transient state. +// +#define STATUS_FVE_TRANSIENT_STATE ((NTSTATUS)0x80210002L) + +///////////////////////////////////////////////////////////////////////// +// +// Standard Error values +// +///////////////////////////////////////////////////////////////////////// + +// +// MessageId: STATUS_UNSUCCESSFUL +// +// MessageText: +// +// {Operation Failed} +// The requested operation was unsuccessful. +// +#define STATUS_UNSUCCESSFUL ((NTSTATUS)0xC0000001L) + +// +// MessageId: STATUS_NOT_IMPLEMENTED +// +// MessageText: +// +// {Not Implemented} +// The requested operation is not implemented. +// +#define STATUS_NOT_IMPLEMENTED ((NTSTATUS)0xC0000002L) + +// +// MessageId: STATUS_INVALID_INFO_CLASS +// +// MessageText: +// +// {Invalid Parameter} +// The specified information class is not a valid information class for the specified object. +// +#define STATUS_INVALID_INFO_CLASS ((NTSTATUS)0xC0000003L) // ntsubauth + +// +// MessageId: STATUS_INFO_LENGTH_MISMATCH +// +// MessageText: +// +// The specified information record length does not match the length required for the specified information class. +// +#define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS)0xC0000004L) + +// +// MessageId: STATUS_ACCESS_VIOLATION +// +// MessageText: +// +// The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s. +// +#define STATUS_ACCESS_VIOLATION ((NTSTATUS)0xC0000005L) // winnt + +// +// MessageId: STATUS_IN_PAGE_ERROR +// +// MessageText: +// +// The instruction at 0x%p referenced memory at 0x%p. The required data was not placed into memory because of an I/O error status of 0x%x. +// +#define STATUS_IN_PAGE_ERROR ((NTSTATUS)0xC0000006L) // winnt + +// +// MessageId: STATUS_PAGEFILE_QUOTA +// +// MessageText: +// +// The pagefile quota for the process has been exhausted. +// +#define STATUS_PAGEFILE_QUOTA ((NTSTATUS)0xC0000007L) + +// +// MessageId: STATUS_INVALID_HANDLE +// +// MessageText: +// +// An invalid HANDLE was specified. +// +#define STATUS_INVALID_HANDLE ((NTSTATUS)0xC0000008L) // winnt + +// +// MessageId: STATUS_BAD_INITIAL_STACK +// +// MessageText: +// +// An invalid initial stack was specified in a call to NtCreateThread. +// +#define STATUS_BAD_INITIAL_STACK ((NTSTATUS)0xC0000009L) + +// +// MessageId: STATUS_BAD_INITIAL_PC +// +// MessageText: +// +// An invalid initial start address was specified in a call to NtCreateThread. +// +#define STATUS_BAD_INITIAL_PC ((NTSTATUS)0xC000000AL) + +// +// MessageId: STATUS_INVALID_CID +// +// MessageText: +// +// An invalid Client ID was specified. +// +#define STATUS_INVALID_CID ((NTSTATUS)0xC000000BL) + +// +// MessageId: STATUS_TIMER_NOT_CANCELED +// +// MessageText: +// +// An attempt was made to cancel or set a timer that has an associated APC and the subject thread is not the thread that originally set the timer with an associated APC routine. +// +#define STATUS_TIMER_NOT_CANCELED ((NTSTATUS)0xC000000CL) + +// +// MessageId: STATUS_INVALID_PARAMETER +// +// MessageText: +// +// An invalid parameter was passed to a service or function. +// +#define STATUS_INVALID_PARAMETER ((NTSTATUS)0xC000000DL) // winnt + +// +// MessageId: STATUS_NO_SUCH_DEVICE +// +// MessageText: +// +// A device which does not exist was specified. +// +#define STATUS_NO_SUCH_DEVICE ((NTSTATUS)0xC000000EL) + +// +// MessageId: STATUS_NO_SUCH_FILE +// +// MessageText: +// +// {File Not Found} +// The file %hs does not exist. +// +#define STATUS_NO_SUCH_FILE ((NTSTATUS)0xC000000FL) + +// +// MessageId: STATUS_INVALID_DEVICE_REQUEST +// +// MessageText: +// +// The specified request is not a valid operation for the target device. +// +#define STATUS_INVALID_DEVICE_REQUEST ((NTSTATUS)0xC0000010L) + +// +// MessageId: STATUS_END_OF_FILE +// +// MessageText: +// +// The end-of-file marker has been reached. There is no valid data in the file beyond this marker. +// +#define STATUS_END_OF_FILE ((NTSTATUS)0xC0000011L) + +// +// MessageId: STATUS_WRONG_VOLUME +// +// MessageText: +// +// {Wrong Volume} +// The wrong volume is in the drive. +// Please insert volume %hs into drive %hs. +// +#define STATUS_WRONG_VOLUME ((NTSTATUS)0xC0000012L) + +// +// MessageId: STATUS_NO_MEDIA_IN_DEVICE +// +// MessageText: +// +// {No Disk} +// There is no disk in the drive. +// Please insert a disk into drive %hs. +// +#define STATUS_NO_MEDIA_IN_DEVICE ((NTSTATUS)0xC0000013L) + +// +// MessageId: STATUS_UNRECOGNIZED_MEDIA +// +// MessageText: +// +// {Unknown Disk Format} +// The disk in drive %hs is not formatted properly. +// Please check the disk, and reformat if necessary. +// +#define STATUS_UNRECOGNIZED_MEDIA ((NTSTATUS)0xC0000014L) + +// +// MessageId: STATUS_NONEXISTENT_SECTOR +// +// MessageText: +// +// {Sector Not Found} +// The specified sector does not exist. +// +#define STATUS_NONEXISTENT_SECTOR ((NTSTATUS)0xC0000015L) + +// +// MessageId: STATUS_MORE_PROCESSING_REQUIRED +// +// MessageText: +// +// {Still Busy} +// The specified I/O request packet (IRP) cannot be disposed of because the I/O operation is not complete. +// +#define STATUS_MORE_PROCESSING_REQUIRED ((NTSTATUS)0xC0000016L) + +// +// MessageId: STATUS_NO_MEMORY +// +// MessageText: +// +// {Not Enough Quota} +// Not enough virtual memory or paging file quota is available to complete the specified operation. +// +#define STATUS_NO_MEMORY ((NTSTATUS)0xC0000017L) // winnt + +// +// MessageId: STATUS_CONFLICTING_ADDRESSES +// +// MessageText: +// +// {Conflicting Address Range} +// The specified address range conflicts with the address space. +// +#define STATUS_CONFLICTING_ADDRESSES ((NTSTATUS)0xC0000018L) + +// +// MessageId: STATUS_NOT_MAPPED_VIEW +// +// MessageText: +// +// Address range to unmap is not a mapped view. +// +#define STATUS_NOT_MAPPED_VIEW ((NTSTATUS)0xC0000019L) + +// +// MessageId: STATUS_UNABLE_TO_FREE_VM +// +// MessageText: +// +// Virtual memory cannot be freed. +// +#define STATUS_UNABLE_TO_FREE_VM ((NTSTATUS)0xC000001AL) + +// +// MessageId: STATUS_UNABLE_TO_DELETE_SECTION +// +// MessageText: +// +// Specified section cannot be deleted. +// +#define STATUS_UNABLE_TO_DELETE_SECTION ((NTSTATUS)0xC000001BL) + +// +// MessageId: STATUS_INVALID_SYSTEM_SERVICE +// +// MessageText: +// +// An invalid system service was specified in a system service call. +// +#define STATUS_INVALID_SYSTEM_SERVICE ((NTSTATUS)0xC000001CL) + +// +// MessageId: STATUS_ILLEGAL_INSTRUCTION +// +// MessageText: +// +// {EXCEPTION} +// Illegal Instruction +// An attempt was made to execute an illegal instruction. +// +#define STATUS_ILLEGAL_INSTRUCTION ((NTSTATUS)0xC000001DL) // winnt + +// +// MessageId: STATUS_INVALID_LOCK_SEQUENCE +// +// MessageText: +// +// {Invalid Lock Sequence} +// An attempt was made to execute an invalid lock sequence. +// +#define STATUS_INVALID_LOCK_SEQUENCE ((NTSTATUS)0xC000001EL) + +// +// MessageId: STATUS_INVALID_VIEW_SIZE +// +// MessageText: +// +// {Invalid Mapping} +// An attempt was made to create a view for a section which is bigger than the section. +// +#define STATUS_INVALID_VIEW_SIZE ((NTSTATUS)0xC000001FL) + +// +// MessageId: STATUS_INVALID_FILE_FOR_SECTION +// +// MessageText: +// +// {Bad File} +// The attributes of the specified mapping file for a section of memory cannot be read. +// +#define STATUS_INVALID_FILE_FOR_SECTION ((NTSTATUS)0xC0000020L) + +// +// MessageId: STATUS_ALREADY_COMMITTED +// +// MessageText: +// +// {Already Committed} +// The specified address range is already committed. +// +#define STATUS_ALREADY_COMMITTED ((NTSTATUS)0xC0000021L) + +// +// MessageId: STATUS_ACCESS_DENIED +// +// MessageText: +// +// {Access Denied} +// A process has requested access to an object, but has not been granted those access rights. +// +#define STATUS_ACCESS_DENIED ((NTSTATUS)0xC0000022L) + +// +// MessageId: STATUS_BUFFER_TOO_SMALL +// +// MessageText: +// +// {Buffer Too Small} +// The buffer is too small to contain the entry. No information has been written to the buffer. +// +#define STATUS_BUFFER_TOO_SMALL ((NTSTATUS)0xC0000023L) + +// +// MessageId: STATUS_OBJECT_TYPE_MISMATCH +// +// MessageText: +// +// {Wrong Type} +// There is a mismatch between the type of object required by the requested operation and the type of object that is specified in the request. +// +#define STATUS_OBJECT_TYPE_MISMATCH ((NTSTATUS)0xC0000024L) + +// +// MessageId: STATUS_NONCONTINUABLE_EXCEPTION +// +// MessageText: +// +// {EXCEPTION} +// Cannot Continue +// Windows cannot continue from this exception. +// +#define STATUS_NONCONTINUABLE_EXCEPTION ((NTSTATUS)0xC0000025L) // winnt + +// +// MessageId: STATUS_INVALID_DISPOSITION +// +// MessageText: +// +// An invalid exception disposition was returned by an exception handler. +// +#define STATUS_INVALID_DISPOSITION ((NTSTATUS)0xC0000026L) // winnt + +// +// MessageId: STATUS_UNWIND +// +// MessageText: +// +// Unwind exception code. +// +#define STATUS_UNWIND ((NTSTATUS)0xC0000027L) + +// +// MessageId: STATUS_BAD_STACK +// +// MessageText: +// +// An invalid or unaligned stack was encountered during an unwind operation. +// +#define STATUS_BAD_STACK ((NTSTATUS)0xC0000028L) + +// +// MessageId: STATUS_INVALID_UNWIND_TARGET +// +// MessageText: +// +// An invalid unwind target was encountered during an unwind operation. +// +#define STATUS_INVALID_UNWIND_TARGET ((NTSTATUS)0xC0000029L) + +// +// MessageId: STATUS_NOT_LOCKED +// +// MessageText: +// +// An attempt was made to unlock a page of memory which was not locked. +// +#define STATUS_NOT_LOCKED ((NTSTATUS)0xC000002AL) + +// +// MessageId: STATUS_PARITY_ERROR +// +// MessageText: +// +// Device parity error on I/O operation. +// +#define STATUS_PARITY_ERROR ((NTSTATUS)0xC000002BL) + +// +// MessageId: STATUS_UNABLE_TO_DECOMMIT_VM +// +// MessageText: +// +// An attempt was made to decommit uncommitted virtual memory. +// +#define STATUS_UNABLE_TO_DECOMMIT_VM ((NTSTATUS)0xC000002CL) + +// +// MessageId: STATUS_NOT_COMMITTED +// +// MessageText: +// +// An attempt was made to change the attributes on memory that has not been committed. +// +#define STATUS_NOT_COMMITTED ((NTSTATUS)0xC000002DL) + +// +// MessageId: STATUS_INVALID_PORT_ATTRIBUTES +// +// MessageText: +// +// Invalid Object Attributes specified to NtCreatePort or invalid Port Attributes specified to NtConnectPort +// +#define STATUS_INVALID_PORT_ATTRIBUTES ((NTSTATUS)0xC000002EL) + +// +// MessageId: STATUS_PORT_MESSAGE_TOO_LONG +// +// MessageText: +// +// Length of message passed to NtRequestPort or NtRequestWaitReplyPort was longer than the maximum message allowed by the port. +// +#define STATUS_PORT_MESSAGE_TOO_LONG ((NTSTATUS)0xC000002FL) + +// +// MessageId: STATUS_INVALID_PARAMETER_MIX +// +// MessageText: +// +// An invalid combination of parameters was specified. +// +#define STATUS_INVALID_PARAMETER_MIX ((NTSTATUS)0xC0000030L) + +// +// MessageId: STATUS_INVALID_QUOTA_LOWER +// +// MessageText: +// +// An attempt was made to lower a quota limit below the current usage. +// +#define STATUS_INVALID_QUOTA_LOWER ((NTSTATUS)0xC0000031L) + +// +// MessageId: STATUS_DISK_CORRUPT_ERROR +// +// MessageText: +// +// {Corrupt Disk} +// The file system structure on the disk is corrupt and unusable. +// Please run the Chkdsk utility on the volume %hs. +// +#define STATUS_DISK_CORRUPT_ERROR ((NTSTATUS)0xC0000032L) + +// +// MessageId: STATUS_OBJECT_NAME_INVALID +// +// MessageText: +// +// Object Name invalid. +// +#define STATUS_OBJECT_NAME_INVALID ((NTSTATUS)0xC0000033L) + +// +// MessageId: STATUS_OBJECT_NAME_NOT_FOUND +// +// MessageText: +// +// Object Name not found. +// +#define STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS)0xC0000034L) + +// +// MessageId: STATUS_OBJECT_NAME_COLLISION +// +// MessageText: +// +// Object Name already exists. +// +#define STATUS_OBJECT_NAME_COLLISION ((NTSTATUS)0xC0000035L) + +// +// MessageId: STATUS_PORT_DISCONNECTED +// +// MessageText: +// +// Attempt to send a message to a disconnected communication port. +// +#define STATUS_PORT_DISCONNECTED ((NTSTATUS)0xC0000037L) + +// +// MessageId: STATUS_DEVICE_ALREADY_ATTACHED +// +// MessageText: +// +// An attempt was made to attach to a device that was already attached to another device. +// +#define STATUS_DEVICE_ALREADY_ATTACHED ((NTSTATUS)0xC0000038L) + +// +// MessageId: STATUS_OBJECT_PATH_INVALID +// +// MessageText: +// +// Object Path Component was not a directory object. +// +#define STATUS_OBJECT_PATH_INVALID ((NTSTATUS)0xC0000039L) + +// +// MessageId: STATUS_OBJECT_PATH_NOT_FOUND +// +// MessageText: +// +// {Path Not Found} +// The path %hs does not exist. +// +#define STATUS_OBJECT_PATH_NOT_FOUND ((NTSTATUS)0xC000003AL) + +// +// MessageId: STATUS_OBJECT_PATH_SYNTAX_BAD +// +// MessageText: +// +// Object Path Component was not a directory object. +// +#define STATUS_OBJECT_PATH_SYNTAX_BAD ((NTSTATUS)0xC000003BL) + +// +// MessageId: STATUS_DATA_OVERRUN +// +// MessageText: +// +// {Data Overrun} +// A data overrun error occurred. +// +#define STATUS_DATA_OVERRUN ((NTSTATUS)0xC000003CL) + +// +// MessageId: STATUS_DATA_LATE_ERROR +// +// MessageText: +// +// {Data Late} +// A data late error occurred. +// +#define STATUS_DATA_LATE_ERROR ((NTSTATUS)0xC000003DL) + +// +// MessageId: STATUS_DATA_ERROR +// +// MessageText: +// +// {Data Error} +// An error in reading or writing data occurred. +// +#define STATUS_DATA_ERROR ((NTSTATUS)0xC000003EL) + +// +// MessageId: STATUS_CRC_ERROR +// +// MessageText: +// +// {Bad CRC} +// A cyclic redundancy check (CRC) checksum error occurred. +// +#define STATUS_CRC_ERROR ((NTSTATUS)0xC000003FL) + +// +// MessageId: STATUS_SECTION_TOO_BIG +// +// MessageText: +// +// {Section Too Large} +// The specified section is too big to map the file. +// +#define STATUS_SECTION_TOO_BIG ((NTSTATUS)0xC0000040L) + +// +// MessageId: STATUS_PORT_CONNECTION_REFUSED +// +// MessageText: +// +// The NtConnectPort request is refused. +// +#define STATUS_PORT_CONNECTION_REFUSED ((NTSTATUS)0xC0000041L) + +// +// MessageId: STATUS_INVALID_PORT_HANDLE +// +// MessageText: +// +// The type of port handle is invalid for the operation requested. +// +#define STATUS_INVALID_PORT_HANDLE ((NTSTATUS)0xC0000042L) + +// +// MessageId: STATUS_SHARING_VIOLATION +// +// MessageText: +// +// A file cannot be opened because the share access flags are incompatible. +// +#define STATUS_SHARING_VIOLATION ((NTSTATUS)0xC0000043L) + +// +// MessageId: STATUS_QUOTA_EXCEEDED +// +// MessageText: +// +// Insufficient quota exists to complete the operation +// +#define STATUS_QUOTA_EXCEEDED ((NTSTATUS)0xC0000044L) + +// +// MessageId: STATUS_INVALID_PAGE_PROTECTION +// +// MessageText: +// +// The specified page protection was not valid. +// +#define STATUS_INVALID_PAGE_PROTECTION ((NTSTATUS)0xC0000045L) + +// +// MessageId: STATUS_MUTANT_NOT_OWNED +// +// MessageText: +// +// An attempt to release a mutant object was made by a thread that was not the owner of the mutant object. +// +#define STATUS_MUTANT_NOT_OWNED ((NTSTATUS)0xC0000046L) + +// +// MessageId: STATUS_SEMAPHORE_LIMIT_EXCEEDED +// +// MessageText: +// +// An attempt was made to release a semaphore such that its maximum count would have been exceeded. +// +#define STATUS_SEMAPHORE_LIMIT_EXCEEDED ((NTSTATUS)0xC0000047L) + +// +// MessageId: STATUS_PORT_ALREADY_SET +// +// MessageText: +// +// An attempt to set a process's DebugPort or ExceptionPort was made, but a port already exists in the process or an attempt to set a file's CompletionPort made, but a port was already set in the file or an attempt to set an ALPC port's associated completion port was made, but it is already set. +// +#define STATUS_PORT_ALREADY_SET ((NTSTATUS)0xC0000048L) + +// +// MessageId: STATUS_SECTION_NOT_IMAGE +// +// MessageText: +// +// An attempt was made to query image information on a section which does not map an image. +// +#define STATUS_SECTION_NOT_IMAGE ((NTSTATUS)0xC0000049L) + +// +// MessageId: STATUS_SUSPEND_COUNT_EXCEEDED +// +// MessageText: +// +// An attempt was made to suspend a thread whose suspend count was at its maximum. +// +#define STATUS_SUSPEND_COUNT_EXCEEDED ((NTSTATUS)0xC000004AL) + +// +// MessageId: STATUS_THREAD_IS_TERMINATING +// +// MessageText: +// +// An attempt was made to access a thread that has begun termination. +// +#define STATUS_THREAD_IS_TERMINATING ((NTSTATUS)0xC000004BL) + +// +// MessageId: STATUS_BAD_WORKING_SET_LIMIT +// +// MessageText: +// +// An attempt was made to set the working set limit to an invalid value (minimum greater than maximum, etc). +// +#define STATUS_BAD_WORKING_SET_LIMIT ((NTSTATUS)0xC000004CL) + +// +// MessageId: STATUS_INCOMPATIBLE_FILE_MAP +// +// MessageText: +// +// A section was created to map a file which is not compatible to an already existing section which maps the same file. +// +#define STATUS_INCOMPATIBLE_FILE_MAP ((NTSTATUS)0xC000004DL) + +// +// MessageId: STATUS_SECTION_PROTECTION +// +// MessageText: +// +// A view to a section specifies a protection which is incompatible with the initial view's protection. +// +#define STATUS_SECTION_PROTECTION ((NTSTATUS)0xC000004EL) + +// +// MessageId: STATUS_EAS_NOT_SUPPORTED +// +// MessageText: +// +// An operation involving EAs failed because the file system does not support EAs. +// +#define STATUS_EAS_NOT_SUPPORTED ((NTSTATUS)0xC000004FL) + +// +// MessageId: STATUS_EA_TOO_LARGE +// +// MessageText: +// +// An EA operation failed because EA set is too large. +// +#define STATUS_EA_TOO_LARGE ((NTSTATUS)0xC0000050L) + +// +// MessageId: STATUS_NONEXISTENT_EA_ENTRY +// +// MessageText: +// +// An EA operation failed because the name or EA index is invalid. +// +#define STATUS_NONEXISTENT_EA_ENTRY ((NTSTATUS)0xC0000051L) + +// +// MessageId: STATUS_NO_EAS_ON_FILE +// +// MessageText: +// +// The file for which EAs were requested has no EAs. +// +#define STATUS_NO_EAS_ON_FILE ((NTSTATUS)0xC0000052L) + +// +// MessageId: STATUS_EA_CORRUPT_ERROR +// +// MessageText: +// +// The EA is corrupt and non-readable. +// +#define STATUS_EA_CORRUPT_ERROR ((NTSTATUS)0xC0000053L) + +// +// MessageId: STATUS_FILE_LOCK_CONFLICT +// +// MessageText: +// +// A requested read/write cannot be granted due to a conflicting file lock. +// +#define STATUS_FILE_LOCK_CONFLICT ((NTSTATUS)0xC0000054L) + +// +// MessageId: STATUS_LOCK_NOT_GRANTED +// +// MessageText: +// +// A requested file lock cannot be granted due to other existing locks. +// +#define STATUS_LOCK_NOT_GRANTED ((NTSTATUS)0xC0000055L) + +// +// MessageId: STATUS_DELETE_PENDING +// +// MessageText: +// +// A non close operation has been requested of a file object with a delete pending. +// +#define STATUS_DELETE_PENDING ((NTSTATUS)0xC0000056L) + +// +// MessageId: STATUS_CTL_FILE_NOT_SUPPORTED +// +// MessageText: +// +// An attempt was made to set the control attribute on a file. This attribute is not supported in the target file system. +// +#define STATUS_CTL_FILE_NOT_SUPPORTED ((NTSTATUS)0xC0000057L) + +// +// MessageId: STATUS_UNKNOWN_REVISION +// +// MessageText: +// +// Indicates a revision number encountered or specified is not one known by the service. It may be a more recent revision than the service is aware of. +// +#define STATUS_UNKNOWN_REVISION ((NTSTATUS)0xC0000058L) + +// +// MessageId: STATUS_REVISION_MISMATCH +// +// MessageText: +// +// Indicates two revision levels are incompatible. +// +#define STATUS_REVISION_MISMATCH ((NTSTATUS)0xC0000059L) + +// +// MessageId: STATUS_INVALID_OWNER +// +// MessageText: +// +// Indicates a particular Security ID may not be assigned as the owner of an object. +// +#define STATUS_INVALID_OWNER ((NTSTATUS)0xC000005AL) + +// +// MessageId: STATUS_INVALID_PRIMARY_GROUP +// +// MessageText: +// +// Indicates a particular Security ID may not be assigned as the primary group of an object. +// +#define STATUS_INVALID_PRIMARY_GROUP ((NTSTATUS)0xC000005BL) + +// +// MessageId: STATUS_NO_IMPERSONATION_TOKEN +// +// MessageText: +// +// An attempt has been made to operate on an impersonation token by a thread that is not currently impersonating a client. +// +#define STATUS_NO_IMPERSONATION_TOKEN ((NTSTATUS)0xC000005CL) + +// +// MessageId: STATUS_CANT_DISABLE_MANDATORY +// +// MessageText: +// +// A mandatory group may not be disabled. +// +#define STATUS_CANT_DISABLE_MANDATORY ((NTSTATUS)0xC000005DL) + +// +// MessageId: STATUS_NO_LOGON_SERVERS +// +// MessageText: +// +// There are currently no logon servers available to service the logon request. +// +#define STATUS_NO_LOGON_SERVERS ((NTSTATUS)0xC000005EL) + +// +// MessageId: STATUS_NO_SUCH_LOGON_SESSION +// +// MessageText: +// +// A specified logon session does not exist. It may already have been terminated. +// +#define STATUS_NO_SUCH_LOGON_SESSION ((NTSTATUS)0xC000005FL) + +// +// MessageId: STATUS_NO_SUCH_PRIVILEGE +// +// MessageText: +// +// A specified privilege does not exist. +// +#define STATUS_NO_SUCH_PRIVILEGE ((NTSTATUS)0xC0000060L) + +// +// MessageId: STATUS_PRIVILEGE_NOT_HELD +// +// MessageText: +// +// A required privilege is not held by the client. +// +#define STATUS_PRIVILEGE_NOT_HELD ((NTSTATUS)0xC0000061L) + +// +// MessageId: STATUS_INVALID_ACCOUNT_NAME +// +// MessageText: +// +// The name provided is not a properly formed account name. +// +#define STATUS_INVALID_ACCOUNT_NAME ((NTSTATUS)0xC0000062L) + +// +// MessageId: STATUS_USER_EXISTS +// +// MessageText: +// +// The specified account already exists. +// +#define STATUS_USER_EXISTS ((NTSTATUS)0xC0000063L) + +// +// MessageId: STATUS_NO_SUCH_USER +// +// MessageText: +// +// The specified account does not exist. +// +#define STATUS_NO_SUCH_USER ((NTSTATUS)0xC0000064L) // ntsubauth + +// +// MessageId: STATUS_GROUP_EXISTS +// +// MessageText: +// +// The specified group already exists. +// +#define STATUS_GROUP_EXISTS ((NTSTATUS)0xC0000065L) + +// +// MessageId: STATUS_NO_SUCH_GROUP +// +// MessageText: +// +// The specified group does not exist. +// +#define STATUS_NO_SUCH_GROUP ((NTSTATUS)0xC0000066L) + +// +// MessageId: STATUS_MEMBER_IN_GROUP +// +// MessageText: +// +// The specified user account is already in the specified group account. Also used to indicate a group cannot be deleted because it contains a member. +// +#define STATUS_MEMBER_IN_GROUP ((NTSTATUS)0xC0000067L) + +// +// MessageId: STATUS_MEMBER_NOT_IN_GROUP +// +// MessageText: +// +// The specified user account is not a member of the specified group account. +// +#define STATUS_MEMBER_NOT_IN_GROUP ((NTSTATUS)0xC0000068L) + +// +// MessageId: STATUS_LAST_ADMIN +// +// MessageText: +// +// Indicates the requested operation would disable or delete the last remaining administration account. +// This is not allowed to prevent creating a situation in which the system cannot be administrated. +// +#define STATUS_LAST_ADMIN ((NTSTATUS)0xC0000069L) + +// +// MessageId: STATUS_WRONG_PASSWORD +// +// MessageText: +// +// When trying to update a password, this return status indicates that the value provided as the current password is not correct. +// +#define STATUS_WRONG_PASSWORD ((NTSTATUS)0xC000006AL) // ntsubauth + +// +// MessageId: STATUS_ILL_FORMED_PASSWORD +// +// MessageText: +// +// When trying to update a password, this return status indicates that the value provided for the new password contains values that are not allowed in passwords. +// +#define STATUS_ILL_FORMED_PASSWORD ((NTSTATUS)0xC000006BL) + +// +// MessageId: STATUS_PASSWORD_RESTRICTION +// +// MessageText: +// +// When trying to update a password, this status indicates that some password update rule has been violated. For example, the password may not meet length criteria. +// +#define STATUS_PASSWORD_RESTRICTION ((NTSTATUS)0xC000006CL) // ntsubauth + +// +// MessageId: STATUS_LOGON_FAILURE +// +// MessageText: +// +// The attempted logon is invalid. This is either due to a bad username or authentication information. +// +#define STATUS_LOGON_FAILURE ((NTSTATUS)0xC000006DL) // ntsubauth + +// +// MessageId: STATUS_ACCOUNT_RESTRICTION +// +// MessageText: +// +// Indicates a referenced user name and authentication information are valid, but some user account restriction has prevented successful authentication (such as time-of-day restrictions). +// +#define STATUS_ACCOUNT_RESTRICTION ((NTSTATUS)0xC000006EL) // ntsubauth + +// +// MessageId: STATUS_INVALID_LOGON_HOURS +// +// MessageText: +// +// The user account has time restrictions and may not be logged onto at this time. +// +#define STATUS_INVALID_LOGON_HOURS ((NTSTATUS)0xC000006FL) // ntsubauth + +// +// MessageId: STATUS_INVALID_WORKSTATION +// +// MessageText: +// +// The user account is restricted such that it may not be used to log on from the source workstation. +// +#define STATUS_INVALID_WORKSTATION ((NTSTATUS)0xC0000070L) // ntsubauth + +// +// MessageId: STATUS_PASSWORD_EXPIRED +// +// MessageText: +// +// The user account's password has expired. +// +#define STATUS_PASSWORD_EXPIRED ((NTSTATUS)0xC0000071L) // ntsubauth + +// +// MessageId: STATUS_ACCOUNT_DISABLED +// +// MessageText: +// +// The referenced account is currently disabled and may not be logged on to. +// +#define STATUS_ACCOUNT_DISABLED ((NTSTATUS)0xC0000072L) // ntsubauth + +// +// MessageId: STATUS_NONE_MAPPED +// +// MessageText: +// +// None of the information to be translated has been translated. +// +#define STATUS_NONE_MAPPED ((NTSTATUS)0xC0000073L) + +// +// MessageId: STATUS_TOO_MANY_LUIDS_REQUESTED +// +// MessageText: +// +// The number of LUIDs requested may not be allocated with a single allocation. +// +#define STATUS_TOO_MANY_LUIDS_REQUESTED ((NTSTATUS)0xC0000074L) + +// +// MessageId: STATUS_LUIDS_EXHAUSTED +// +// MessageText: +// +// Indicates there are no more LUIDs to allocate. +// +#define STATUS_LUIDS_EXHAUSTED ((NTSTATUS)0xC0000075L) + +// +// MessageId: STATUS_INVALID_SUB_AUTHORITY +// +// MessageText: +// +// Indicates the sub-authority value is invalid for the particular use. +// +#define STATUS_INVALID_SUB_AUTHORITY ((NTSTATUS)0xC0000076L) + +// +// MessageId: STATUS_INVALID_ACL +// +// MessageText: +// +// Indicates the ACL structure is not valid. +// +#define STATUS_INVALID_ACL ((NTSTATUS)0xC0000077L) + +// +// MessageId: STATUS_INVALID_SID +// +// MessageText: +// +// Indicates the SID structure is not valid. +// +#define STATUS_INVALID_SID ((NTSTATUS)0xC0000078L) + +// +// MessageId: STATUS_INVALID_SECURITY_DESCR +// +// MessageText: +// +// Indicates the SECURITY_DESCRIPTOR structure is not valid. +// +#define STATUS_INVALID_SECURITY_DESCR ((NTSTATUS)0xC0000079L) + +// +// MessageId: STATUS_PROCEDURE_NOT_FOUND +// +// MessageText: +// +// Indicates the specified procedure address cannot be found in the DLL. +// +#define STATUS_PROCEDURE_NOT_FOUND ((NTSTATUS)0xC000007AL) + +// +// MessageId: STATUS_INVALID_IMAGE_FORMAT +// +// MessageText: +// +// {Bad Image} +// %hs is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vendor for support. +// +#define STATUS_INVALID_IMAGE_FORMAT ((NTSTATUS)0xC000007BL) + +// +// MessageId: STATUS_NO_TOKEN +// +// MessageText: +// +// An attempt was made to reference a token that doesn't exist. +// This is typically done by referencing the token associated with a thread when the thread is not impersonating a client. +// +#define STATUS_NO_TOKEN ((NTSTATUS)0xC000007CL) + +// +// MessageId: STATUS_BAD_INHERITANCE_ACL +// +// MessageText: +// +// Indicates that an attempt to build either an inherited ACL or ACE was not successful. +// This can be caused by a number of things. One of the more probable causes is the replacement of a CreatorId with an SID that didn't fit into the ACE or ACL. +// +#define STATUS_BAD_INHERITANCE_ACL ((NTSTATUS)0xC000007DL) + +// +// MessageId: STATUS_RANGE_NOT_LOCKED +// +// MessageText: +// +// The range specified in NtUnlockFile was not locked. +// +#define STATUS_RANGE_NOT_LOCKED ((NTSTATUS)0xC000007EL) + +// +// MessageId: STATUS_DISK_FULL +// +// MessageText: +// +// An operation failed because the disk was full. +// +#define STATUS_DISK_FULL ((NTSTATUS)0xC000007FL) + +// +// MessageId: STATUS_SERVER_DISABLED +// +// MessageText: +// +// The GUID allocation server is [already] disabled at the moment. +// +#define STATUS_SERVER_DISABLED ((NTSTATUS)0xC0000080L) + +// +// MessageId: STATUS_SERVER_NOT_DISABLED +// +// MessageText: +// +// The GUID allocation server is [already] enabled at the moment. +// +#define STATUS_SERVER_NOT_DISABLED ((NTSTATUS)0xC0000081L) + +// +// MessageId: STATUS_TOO_MANY_GUIDS_REQUESTED +// +// MessageText: +// +// Too many GUIDs were requested from the allocation server at once. +// +#define STATUS_TOO_MANY_GUIDS_REQUESTED ((NTSTATUS)0xC0000082L) + +// +// MessageId: STATUS_GUIDS_EXHAUSTED +// +// MessageText: +// +// The GUIDs could not be allocated because the Authority Agent was exhausted. +// +#define STATUS_GUIDS_EXHAUSTED ((NTSTATUS)0xC0000083L) + +// +// MessageId: STATUS_INVALID_ID_AUTHORITY +// +// MessageText: +// +// The value provided was an invalid value for an identifier authority. +// +#define STATUS_INVALID_ID_AUTHORITY ((NTSTATUS)0xC0000084L) + +// +// MessageId: STATUS_AGENTS_EXHAUSTED +// +// MessageText: +// +// There are no more authority agent values available for the given identifier authority value. +// +#define STATUS_AGENTS_EXHAUSTED ((NTSTATUS)0xC0000085L) + +// +// MessageId: STATUS_INVALID_VOLUME_LABEL +// +// MessageText: +// +// An invalid volume label has been specified. +// +#define STATUS_INVALID_VOLUME_LABEL ((NTSTATUS)0xC0000086L) + +// +// MessageId: STATUS_SECTION_NOT_EXTENDED +// +// MessageText: +// +// A mapped section could not be extended. +// +#define STATUS_SECTION_NOT_EXTENDED ((NTSTATUS)0xC0000087L) + +// +// MessageId: STATUS_NOT_MAPPED_DATA +// +// MessageText: +// +// Specified section to flush does not map a data file. +// +#define STATUS_NOT_MAPPED_DATA ((NTSTATUS)0xC0000088L) + +// +// MessageId: STATUS_RESOURCE_DATA_NOT_FOUND +// +// MessageText: +// +// Indicates the specified image file did not contain a resource section. +// +#define STATUS_RESOURCE_DATA_NOT_FOUND ((NTSTATUS)0xC0000089L) + +// +// MessageId: STATUS_RESOURCE_TYPE_NOT_FOUND +// +// MessageText: +// +// Indicates the specified resource type cannot be found in the image file. +// +#define STATUS_RESOURCE_TYPE_NOT_FOUND ((NTSTATUS)0xC000008AL) + +// +// MessageId: STATUS_RESOURCE_NAME_NOT_FOUND +// +// MessageText: +// +// Indicates the specified resource name cannot be found in the image file. +// +#define STATUS_RESOURCE_NAME_NOT_FOUND ((NTSTATUS)0xC000008BL) + +// +// MessageId: STATUS_ARRAY_BOUNDS_EXCEEDED +// +// MessageText: +// +// {EXCEPTION} +// Array bounds exceeded. +// +#define STATUS_ARRAY_BOUNDS_EXCEEDED ((NTSTATUS)0xC000008CL) // winnt + +// +// MessageId: STATUS_FLOAT_DENORMAL_OPERAND +// +// MessageText: +// +// {EXCEPTION} +// Floating-point denormal operand. +// +#define STATUS_FLOAT_DENORMAL_OPERAND ((NTSTATUS)0xC000008DL) // winnt + +// +// MessageId: STATUS_FLOAT_DIVIDE_BY_ZERO +// +// MessageText: +// +// {EXCEPTION} +// Floating-point division by zero. +// +#define STATUS_FLOAT_DIVIDE_BY_ZERO ((NTSTATUS)0xC000008EL) // winnt + +// +// MessageId: STATUS_FLOAT_INEXACT_RESULT +// +// MessageText: +// +// {EXCEPTION} +// Floating-point inexact result. +// +#define STATUS_FLOAT_INEXACT_RESULT ((NTSTATUS)0xC000008FL) // winnt + +// +// MessageId: STATUS_FLOAT_INVALID_OPERATION +// +// MessageText: +// +// {EXCEPTION} +// Floating-point invalid operation. +// +#define STATUS_FLOAT_INVALID_OPERATION ((NTSTATUS)0xC0000090L) // winnt + +// +// MessageId: STATUS_FLOAT_OVERFLOW +// +// MessageText: +// +// {EXCEPTION} +// Floating-point overflow. +// +#define STATUS_FLOAT_OVERFLOW ((NTSTATUS)0xC0000091L) // winnt + +// +// MessageId: STATUS_FLOAT_STACK_CHECK +// +// MessageText: +// +// {EXCEPTION} +// Floating-point stack check. +// +#define STATUS_FLOAT_STACK_CHECK ((NTSTATUS)0xC0000092L) // winnt + +// +// MessageId: STATUS_FLOAT_UNDERFLOW +// +// MessageText: +// +// {EXCEPTION} +// Floating-point underflow. +// +#define STATUS_FLOAT_UNDERFLOW ((NTSTATUS)0xC0000093L) // winnt + +// +// MessageId: STATUS_INTEGER_DIVIDE_BY_ZERO +// +// MessageText: +// +// {EXCEPTION} +// Integer division by zero. +// +#define STATUS_INTEGER_DIVIDE_BY_ZERO ((NTSTATUS)0xC0000094L) // winnt + +// +// MessageId: STATUS_INTEGER_OVERFLOW +// +// MessageText: +// +// {EXCEPTION} +// Integer overflow. +// +#define STATUS_INTEGER_OVERFLOW ((NTSTATUS)0xC0000095L) // winnt + +// +// MessageId: STATUS_PRIVILEGED_INSTRUCTION +// +// MessageText: +// +// {EXCEPTION} +// Privileged instruction. +// +#define STATUS_PRIVILEGED_INSTRUCTION ((NTSTATUS)0xC0000096L) // winnt + +// +// MessageId: STATUS_TOO_MANY_PAGING_FILES +// +// MessageText: +// +// An attempt was made to install more paging files than the system supports. +// +#define STATUS_TOO_MANY_PAGING_FILES ((NTSTATUS)0xC0000097L) + +// +// MessageId: STATUS_FILE_INVALID +// +// MessageText: +// +// The volume for a file has been externally altered such that the opened file is no longer valid. +// +#define STATUS_FILE_INVALID ((NTSTATUS)0xC0000098L) + +// +// MessageId: STATUS_ALLOTTED_SPACE_EXCEEDED +// +// MessageText: +// +// When a block of memory is allotted for future updates, such as the memory allocated to hold discretionary access control and primary group information, successive updates may exceed the amount of memory originally allotted. +// Since quota may already have been charged to several processes which have handles to the object, it is not reasonable to alter the size of the allocated memory. +// Instead, a request that requires more memory than has been allotted must fail and the STATUS_ALLOTED_SPACE_EXCEEDED error returned. +// +#define STATUS_ALLOTTED_SPACE_EXCEEDED ((NTSTATUS)0xC0000099L) + +// +// MessageId: STATUS_INSUFFICIENT_RESOURCES +// +// MessageText: +// +// Insufficient system resources exist to complete the API. +// +#define STATUS_INSUFFICIENT_RESOURCES ((NTSTATUS)0xC000009AL) // ntsubauth + +// +// MessageId: STATUS_DFS_EXIT_PATH_FOUND +// +// MessageText: +// +// An attempt has been made to open a DFS exit path control file. +// +#define STATUS_DFS_EXIT_PATH_FOUND ((NTSTATUS)0xC000009BL) + +// +// MessageId: STATUS_DEVICE_DATA_ERROR +// +// MessageText: +// +// STATUS_DEVICE_DATA_ERROR +// +#define STATUS_DEVICE_DATA_ERROR ((NTSTATUS)0xC000009CL) + +// +// MessageId: STATUS_DEVICE_NOT_CONNECTED +// +// MessageText: +// +// STATUS_DEVICE_NOT_CONNECTED +// +#define STATUS_DEVICE_NOT_CONNECTED ((NTSTATUS)0xC000009DL) + +// +// MessageId: STATUS_DEVICE_POWER_FAILURE +// +// MessageText: +// +// STATUS_DEVICE_POWER_FAILURE +// +#define STATUS_DEVICE_POWER_FAILURE ((NTSTATUS)0xC000009EL) + +// +// MessageId: STATUS_FREE_VM_NOT_AT_BASE +// +// MessageText: +// +// Virtual memory cannot be freed as base address is not the base of the region and a region size of zero was specified. +// +#define STATUS_FREE_VM_NOT_AT_BASE ((NTSTATUS)0xC000009FL) + +// +// MessageId: STATUS_MEMORY_NOT_ALLOCATED +// +// MessageText: +// +// An attempt was made to free virtual memory which is not allocated. +// +#define STATUS_MEMORY_NOT_ALLOCATED ((NTSTATUS)0xC00000A0L) + +// +// MessageId: STATUS_WORKING_SET_QUOTA +// +// MessageText: +// +// The working set is not big enough to allow the requested pages to be locked. +// +#define STATUS_WORKING_SET_QUOTA ((NTSTATUS)0xC00000A1L) + +// +// MessageId: STATUS_MEDIA_WRITE_PROTECTED +// +// MessageText: +// +// {Write Protect Error} +// The disk cannot be written to because it is write protected. Please remove the write protection from the volume %hs in drive %hs. +// +#define STATUS_MEDIA_WRITE_PROTECTED ((NTSTATUS)0xC00000A2L) + +// +// MessageId: STATUS_DEVICE_NOT_READY +// +// MessageText: +// +// {Drive Not Ready} +// The drive is not ready for use; its door may be open. Please check drive %hs and make sure that a disk is inserted and that the drive door is closed. +// +#define STATUS_DEVICE_NOT_READY ((NTSTATUS)0xC00000A3L) + +// +// MessageId: STATUS_INVALID_GROUP_ATTRIBUTES +// +// MessageText: +// +// The specified attributes are invalid, or incompatible with the attributes for the group as a whole. +// +#define STATUS_INVALID_GROUP_ATTRIBUTES ((NTSTATUS)0xC00000A4L) + +// +// MessageId: STATUS_BAD_IMPERSONATION_LEVEL +// +// MessageText: +// +// A specified impersonation level is invalid. +// Also used to indicate a required impersonation level was not provided. +// +#define STATUS_BAD_IMPERSONATION_LEVEL ((NTSTATUS)0xC00000A5L) + +// +// MessageId: STATUS_CANT_OPEN_ANONYMOUS +// +// MessageText: +// +// An attempt was made to open an Anonymous level token. +// Anonymous tokens may not be opened. +// +#define STATUS_CANT_OPEN_ANONYMOUS ((NTSTATUS)0xC00000A6L) + +// +// MessageId: STATUS_BAD_VALIDATION_CLASS +// +// MessageText: +// +// The validation information class requested was invalid. +// +#define STATUS_BAD_VALIDATION_CLASS ((NTSTATUS)0xC00000A7L) + +// +// MessageId: STATUS_BAD_TOKEN_TYPE +// +// MessageText: +// +// The type of a token object is inappropriate for its attempted use. +// +#define STATUS_BAD_TOKEN_TYPE ((NTSTATUS)0xC00000A8L) + +// +// MessageId: STATUS_BAD_MASTER_BOOT_RECORD +// +// MessageText: +// +// The type of a token object is inappropriate for its attempted use. +// +#define STATUS_BAD_MASTER_BOOT_RECORD ((NTSTATUS)0xC00000A9L) + +// +// MessageId: STATUS_INSTRUCTION_MISALIGNMENT +// +// MessageText: +// +// An attempt was made to execute an instruction at an unaligned address and the host system does not support unaligned instruction references. +// +#define STATUS_INSTRUCTION_MISALIGNMENT ((NTSTATUS)0xC00000AAL) + +// +// MessageId: STATUS_INSTANCE_NOT_AVAILABLE +// +// MessageText: +// +// The maximum named pipe instance count has been reached. +// +#define STATUS_INSTANCE_NOT_AVAILABLE ((NTSTATUS)0xC00000ABL) + +// +// MessageId: STATUS_PIPE_NOT_AVAILABLE +// +// MessageText: +// +// An instance of a named pipe cannot be found in the listening state. +// +#define STATUS_PIPE_NOT_AVAILABLE ((NTSTATUS)0xC00000ACL) + +// +// MessageId: STATUS_INVALID_PIPE_STATE +// +// MessageText: +// +// The named pipe is not in the connected or closing state. +// +#define STATUS_INVALID_PIPE_STATE ((NTSTATUS)0xC00000ADL) + +// +// MessageId: STATUS_PIPE_BUSY +// +// MessageText: +// +// The specified pipe is set to complete operations and there are current I/O operations queued so it cannot be changed to queue operations. +// +#define STATUS_PIPE_BUSY ((NTSTATUS)0xC00000AEL) + +// +// MessageId: STATUS_ILLEGAL_FUNCTION +// +// MessageText: +// +// The specified handle is not open to the server end of the named pipe. +// +#define STATUS_ILLEGAL_FUNCTION ((NTSTATUS)0xC00000AFL) + +// +// MessageId: STATUS_PIPE_DISCONNECTED +// +// MessageText: +// +// The specified named pipe is in the disconnected state. +// +#define STATUS_PIPE_DISCONNECTED ((NTSTATUS)0xC00000B0L) + +// +// MessageId: STATUS_PIPE_CLOSING +// +// MessageText: +// +// The specified named pipe is in the closing state. +// +#define STATUS_PIPE_CLOSING ((NTSTATUS)0xC00000B1L) + +// +// MessageId: STATUS_PIPE_CONNECTED +// +// MessageText: +// +// The specified named pipe is in the connected state. +// +#define STATUS_PIPE_CONNECTED ((NTSTATUS)0xC00000B2L) + +// +// MessageId: STATUS_PIPE_LISTENING +// +// MessageText: +// +// The specified named pipe is in the listening state. +// +#define STATUS_PIPE_LISTENING ((NTSTATUS)0xC00000B3L) + +// +// MessageId: STATUS_INVALID_READ_MODE +// +// MessageText: +// +// The specified named pipe is not in message mode. +// +#define STATUS_INVALID_READ_MODE ((NTSTATUS)0xC00000B4L) + +// +// MessageId: STATUS_IO_TIMEOUT +// +// MessageText: +// +// {Device Timeout} +// The specified I/O operation on %hs was not completed before the time-out period expired. +// +#define STATUS_IO_TIMEOUT ((NTSTATUS)0xC00000B5L) + +// +// MessageId: STATUS_FILE_FORCED_CLOSED +// +// MessageText: +// +// The specified file has been closed by another process. +// +#define STATUS_FILE_FORCED_CLOSED ((NTSTATUS)0xC00000B6L) + +// +// MessageId: STATUS_PROFILING_NOT_STARTED +// +// MessageText: +// +// Profiling not started. +// +#define STATUS_PROFILING_NOT_STARTED ((NTSTATUS)0xC00000B7L) + +// +// MessageId: STATUS_PROFILING_NOT_STOPPED +// +// MessageText: +// +// Profiling not stopped. +// +#define STATUS_PROFILING_NOT_STOPPED ((NTSTATUS)0xC00000B8L) + +// +// MessageId: STATUS_COULD_NOT_INTERPRET +// +// MessageText: +// +// The passed ACL did not contain the minimum required information. +// +#define STATUS_COULD_NOT_INTERPRET ((NTSTATUS)0xC00000B9L) + +// +// MessageId: STATUS_FILE_IS_A_DIRECTORY +// +// MessageText: +// +// The file that was specified as a target is a directory and the caller specified that it could be anything but a directory. +// +#define STATUS_FILE_IS_A_DIRECTORY ((NTSTATUS)0xC00000BAL) + +// +// Network specific errors. +// +// +// +// MessageId: STATUS_NOT_SUPPORTED +// +// MessageText: +// +// The request is not supported. +// +#define STATUS_NOT_SUPPORTED ((NTSTATUS)0xC00000BBL) + +// +// MessageId: STATUS_REMOTE_NOT_LISTENING +// +// MessageText: +// +// This remote computer is not listening. +// +#define STATUS_REMOTE_NOT_LISTENING ((NTSTATUS)0xC00000BCL) + +// +// MessageId: STATUS_DUPLICATE_NAME +// +// MessageText: +// +// A duplicate name exists on the network. +// +#define STATUS_DUPLICATE_NAME ((NTSTATUS)0xC00000BDL) + +// +// MessageId: STATUS_BAD_NETWORK_PATH +// +// MessageText: +// +// The network path cannot be located. +// +#define STATUS_BAD_NETWORK_PATH ((NTSTATUS)0xC00000BEL) + +// +// MessageId: STATUS_NETWORK_BUSY +// +// MessageText: +// +// The network is busy. +// +#define STATUS_NETWORK_BUSY ((NTSTATUS)0xC00000BFL) + +// +// MessageId: STATUS_DEVICE_DOES_NOT_EXIST +// +// MessageText: +// +// This device does not exist. +// +#define STATUS_DEVICE_DOES_NOT_EXIST ((NTSTATUS)0xC00000C0L) + +// +// MessageId: STATUS_TOO_MANY_COMMANDS +// +// MessageText: +// +// The network BIOS command limit has been reached. +// +#define STATUS_TOO_MANY_COMMANDS ((NTSTATUS)0xC00000C1L) + +// +// MessageId: STATUS_ADAPTER_HARDWARE_ERROR +// +// MessageText: +// +// An I/O adapter hardware error has occurred. +// +#define STATUS_ADAPTER_HARDWARE_ERROR ((NTSTATUS)0xC00000C2L) + +// +// MessageId: STATUS_INVALID_NETWORK_RESPONSE +// +// MessageText: +// +// The network responded incorrectly. +// +#define STATUS_INVALID_NETWORK_RESPONSE ((NTSTATUS)0xC00000C3L) + +// +// MessageId: STATUS_UNEXPECTED_NETWORK_ERROR +// +// MessageText: +// +// An unexpected network error occurred. +// +#define STATUS_UNEXPECTED_NETWORK_ERROR ((NTSTATUS)0xC00000C4L) + +// +// MessageId: STATUS_BAD_REMOTE_ADAPTER +// +// MessageText: +// +// The remote adapter is not compatible. +// +#define STATUS_BAD_REMOTE_ADAPTER ((NTSTATUS)0xC00000C5L) + +// +// MessageId: STATUS_PRINT_QUEUE_FULL +// +// MessageText: +// +// The printer queue is full. +// +#define STATUS_PRINT_QUEUE_FULL ((NTSTATUS)0xC00000C6L) + +// +// MessageId: STATUS_NO_SPOOL_SPACE +// +// MessageText: +// +// Space to store the file waiting to be printed is not available on the server. +// +#define STATUS_NO_SPOOL_SPACE ((NTSTATUS)0xC00000C7L) + +// +// MessageId: STATUS_PRINT_CANCELLED +// +// MessageText: +// +// The requested print file has been canceled. +// +#define STATUS_PRINT_CANCELLED ((NTSTATUS)0xC00000C8L) + +// +// MessageId: STATUS_NETWORK_NAME_DELETED +// +// MessageText: +// +// The network name was deleted. +// +#define STATUS_NETWORK_NAME_DELETED ((NTSTATUS)0xC00000C9L) + +// +// MessageId: STATUS_NETWORK_ACCESS_DENIED +// +// MessageText: +// +// Network access is denied. +// +#define STATUS_NETWORK_ACCESS_DENIED ((NTSTATUS)0xC00000CAL) + +// +// MessageId: STATUS_BAD_DEVICE_TYPE +// +// MessageText: +// +// {Incorrect Network Resource Type} +// The specified device type (LPT, for example) conflicts with the actual device type on the remote resource. +// +#define STATUS_BAD_DEVICE_TYPE ((NTSTATUS)0xC00000CBL) + +// +// MessageId: STATUS_BAD_NETWORK_NAME +// +// MessageText: +// +// {Network Name Not Found} +// The specified share name cannot be found on the remote server. +// +#define STATUS_BAD_NETWORK_NAME ((NTSTATUS)0xC00000CCL) + +// +// MessageId: STATUS_TOO_MANY_NAMES +// +// MessageText: +// +// The name limit for the local computer network adapter card was exceeded. +// +#define STATUS_TOO_MANY_NAMES ((NTSTATUS)0xC00000CDL) + +// +// MessageId: STATUS_TOO_MANY_SESSIONS +// +// MessageText: +// +// The network BIOS session limit was exceeded. +// +#define STATUS_TOO_MANY_SESSIONS ((NTSTATUS)0xC00000CEL) + +// +// MessageId: STATUS_SHARING_PAUSED +// +// MessageText: +// +// File sharing has been temporarily paused. +// +#define STATUS_SHARING_PAUSED ((NTSTATUS)0xC00000CFL) + +// +// MessageId: STATUS_REQUEST_NOT_ACCEPTED +// +// MessageText: +// +// No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept. +// +#define STATUS_REQUEST_NOT_ACCEPTED ((NTSTATUS)0xC00000D0L) + +// +// MessageId: STATUS_REDIRECTOR_PAUSED +// +// MessageText: +// +// Print or disk redirection is temporarily paused. +// +#define STATUS_REDIRECTOR_PAUSED ((NTSTATUS)0xC00000D1L) + +// +// MessageId: STATUS_NET_WRITE_FAULT +// +// MessageText: +// +// A network data fault occurred. +// +#define STATUS_NET_WRITE_FAULT ((NTSTATUS)0xC00000D2L) + +// +// MessageId: STATUS_PROFILING_AT_LIMIT +// +// MessageText: +// +// The number of active profiling objects is at the maximum and no more may be started. +// +#define STATUS_PROFILING_AT_LIMIT ((NTSTATUS)0xC00000D3L) + +// +// MessageId: STATUS_NOT_SAME_DEVICE +// +// MessageText: +// +// {Incorrect Volume} +// The target file of a rename request is located on a different device than the source of the rename request. +// +#define STATUS_NOT_SAME_DEVICE ((NTSTATUS)0xC00000D4L) + +// +// MessageId: STATUS_FILE_RENAMED +// +// MessageText: +// +// The file specified has been renamed and thus cannot be modified. +// +#define STATUS_FILE_RENAMED ((NTSTATUS)0xC00000D5L) + +// +// MessageId: STATUS_VIRTUAL_CIRCUIT_CLOSED +// +// MessageText: +// +// {Network Request Timeout} +// The session with a remote server has been disconnected because the time-out interval for a request has expired. +// +#define STATUS_VIRTUAL_CIRCUIT_CLOSED ((NTSTATUS)0xC00000D6L) + +// +// MessageId: STATUS_NO_SECURITY_ON_OBJECT +// +// MessageText: +// +// Indicates an attempt was made to operate on the security of an object that does not have security associated with it. +// +#define STATUS_NO_SECURITY_ON_OBJECT ((NTSTATUS)0xC00000D7L) + +// +// MessageId: STATUS_CANT_WAIT +// +// MessageText: +// +// Used to indicate that an operation cannot continue without blocking for I/O. +// +#define STATUS_CANT_WAIT ((NTSTATUS)0xC00000D8L) + +// +// MessageId: STATUS_PIPE_EMPTY +// +// MessageText: +// +// Used to indicate that a read operation was done on an empty pipe. +// +#define STATUS_PIPE_EMPTY ((NTSTATUS)0xC00000D9L) + +// +// MessageId: STATUS_CANT_ACCESS_DOMAIN_INFO +// +// MessageText: +// +// Configuration information could not be read from the domain controller, either because the machine is unavailable, or access has been denied. +// +#define STATUS_CANT_ACCESS_DOMAIN_INFO ((NTSTATUS)0xC00000DAL) + +// +// MessageId: STATUS_CANT_TERMINATE_SELF +// +// MessageText: +// +// Indicates that a thread attempted to terminate itself by default (called NtTerminateThread with NULL) and it was the last thread in the current process. +// +#define STATUS_CANT_TERMINATE_SELF ((NTSTATUS)0xC00000DBL) + +// +// MessageId: STATUS_INVALID_SERVER_STATE +// +// MessageText: +// +// Indicates the Sam Server was in the wrong state to perform the desired operation. +// +#define STATUS_INVALID_SERVER_STATE ((NTSTATUS)0xC00000DCL) + +// +// MessageId: STATUS_INVALID_DOMAIN_STATE +// +// MessageText: +// +// Indicates the Domain was in the wrong state to perform the desired operation. +// +#define STATUS_INVALID_DOMAIN_STATE ((NTSTATUS)0xC00000DDL) + +// +// MessageId: STATUS_INVALID_DOMAIN_ROLE +// +// MessageText: +// +// This operation is only allowed for the Primary Domain Controller of the domain. +// +#define STATUS_INVALID_DOMAIN_ROLE ((NTSTATUS)0xC00000DEL) + +// +// MessageId: STATUS_NO_SUCH_DOMAIN +// +// MessageText: +// +// The specified Domain did not exist. +// +#define STATUS_NO_SUCH_DOMAIN ((NTSTATUS)0xC00000DFL) + +// +// MessageId: STATUS_DOMAIN_EXISTS +// +// MessageText: +// +// The specified Domain already exists. +// +#define STATUS_DOMAIN_EXISTS ((NTSTATUS)0xC00000E0L) + +// +// MessageId: STATUS_DOMAIN_LIMIT_EXCEEDED +// +// MessageText: +// +// An attempt was made to exceed the limit on the number of domains per server for this release. +// +#define STATUS_DOMAIN_LIMIT_EXCEEDED ((NTSTATUS)0xC00000E1L) + +// +// MessageId: STATUS_OPLOCK_NOT_GRANTED +// +// MessageText: +// +// Error status returned when oplock request is denied. +// +#define STATUS_OPLOCK_NOT_GRANTED ((NTSTATUS)0xC00000E2L) + +// +// MessageId: STATUS_INVALID_OPLOCK_PROTOCOL +// +// MessageText: +// +// Error status returned when an invalid oplock acknowledgment is received by a file system. +// +#define STATUS_INVALID_OPLOCK_PROTOCOL ((NTSTATUS)0xC00000E3L) + +// +// MessageId: STATUS_INTERNAL_DB_CORRUPTION +// +// MessageText: +// +// This error indicates that the requested operation cannot be completed due to a catastrophic media failure or on-disk data structure corruption. +// +#define STATUS_INTERNAL_DB_CORRUPTION ((NTSTATUS)0xC00000E4L) + +// +// MessageId: STATUS_INTERNAL_ERROR +// +// MessageText: +// +// An internal error occurred. +// +#define STATUS_INTERNAL_ERROR ((NTSTATUS)0xC00000E5L) + +// +// MessageId: STATUS_GENERIC_NOT_MAPPED +// +// MessageText: +// +// Indicates generic access types were contained in an access mask which should already be mapped to non-generic access types. +// +#define STATUS_GENERIC_NOT_MAPPED ((NTSTATUS)0xC00000E6L) + +// +// MessageId: STATUS_BAD_DESCRIPTOR_FORMAT +// +// MessageText: +// +// Indicates a security descriptor is not in the necessary format (absolute or self-relative). +// +#define STATUS_BAD_DESCRIPTOR_FORMAT ((NTSTATUS)0xC00000E7L) + +// +// Status codes raised by the Cache Manager which must be considered as +// "expected" by its callers. +// +// +// MessageId: STATUS_INVALID_USER_BUFFER +// +// MessageText: +// +// An access to a user buffer failed at an "expected" point in time. This code is defined since the caller does not want to accept STATUS_ACCESS_VIOLATION in its filter. +// +#define STATUS_INVALID_USER_BUFFER ((NTSTATUS)0xC00000E8L) + +// +// MessageId: STATUS_UNEXPECTED_IO_ERROR +// +// MessageText: +// +// If an I/O error is returned which is not defined in the standard FsRtl filter, it is converted to the following error which is guaranteed to be in the filter. In this case information is lost, however, the filter correctly handles the exception. +// +#define STATUS_UNEXPECTED_IO_ERROR ((NTSTATUS)0xC00000E9L) + +// +// MessageId: STATUS_UNEXPECTED_MM_CREATE_ERR +// +// MessageText: +// +// If an MM error is returned which is not defined in the standard FsRtl filter, it is converted to one of the following errors which is guaranteed to be in the filter. In this case information is lost, however, the filter correctly handles the exception. +// +#define STATUS_UNEXPECTED_MM_CREATE_ERR ((NTSTATUS)0xC00000EAL) + +// +// MessageId: STATUS_UNEXPECTED_MM_MAP_ERROR +// +// MessageText: +// +// If an MM error is returned which is not defined in the standard FsRtl filter, it is converted to one of the following errors which is guaranteed to be in the filter. In this case information is lost, however, the filter correctly handles the exception. +// +#define STATUS_UNEXPECTED_MM_MAP_ERROR ((NTSTATUS)0xC00000EBL) + +// +// MessageId: STATUS_UNEXPECTED_MM_EXTEND_ERR +// +// MessageText: +// +// If an MM error is returned which is not defined in the standard FsRtl filter, it is converted to one of the following errors which is guaranteed to be in the filter. In this case information is lost, however, the filter correctly handles the exception. +// +#define STATUS_UNEXPECTED_MM_EXTEND_ERR ((NTSTATUS)0xC00000ECL) + +// +// MessageId: STATUS_NOT_LOGON_PROCESS +// +// MessageText: +// +// The requested action is restricted for use by logon processes only. The calling process has not registered as a logon process. +// +#define STATUS_NOT_LOGON_PROCESS ((NTSTATUS)0xC00000EDL) + +// +// MessageId: STATUS_LOGON_SESSION_EXISTS +// +// MessageText: +// +// An attempt has been made to start a new session manager or LSA logon session with an ID that is already in use. +// +#define STATUS_LOGON_SESSION_EXISTS ((NTSTATUS)0xC00000EEL) + +// +// MessageId: STATUS_INVALID_PARAMETER_1 +// +// MessageText: +// +// An invalid parameter was passed to a service or function as the first argument. +// +#define STATUS_INVALID_PARAMETER_1 ((NTSTATUS)0xC00000EFL) + +// +// MessageId: STATUS_INVALID_PARAMETER_2 +// +// MessageText: +// +// An invalid parameter was passed to a service or function as the second argument. +// +#define STATUS_INVALID_PARAMETER_2 ((NTSTATUS)0xC00000F0L) + +// +// MessageId: STATUS_INVALID_PARAMETER_3 +// +// MessageText: +// +// An invalid parameter was passed to a service or function as the third argument. +// +#define STATUS_INVALID_PARAMETER_3 ((NTSTATUS)0xC00000F1L) + +// +// MessageId: STATUS_INVALID_PARAMETER_4 +// +// MessageText: +// +// An invalid parameter was passed to a service or function as the fourth argument. +// +#define STATUS_INVALID_PARAMETER_4 ((NTSTATUS)0xC00000F2L) + +// +// MessageId: STATUS_INVALID_PARAMETER_5 +// +// MessageText: +// +// An invalid parameter was passed to a service or function as the fifth argument. +// +#define STATUS_INVALID_PARAMETER_5 ((NTSTATUS)0xC00000F3L) + +// +// MessageId: STATUS_INVALID_PARAMETER_6 +// +// MessageText: +// +// An invalid parameter was passed to a service or function as the sixth argument. +// +#define STATUS_INVALID_PARAMETER_6 ((NTSTATUS)0xC00000F4L) + +// +// MessageId: STATUS_INVALID_PARAMETER_7 +// +// MessageText: +// +// An invalid parameter was passed to a service or function as the seventh argument. +// +#define STATUS_INVALID_PARAMETER_7 ((NTSTATUS)0xC00000F5L) + +// +// MessageId: STATUS_INVALID_PARAMETER_8 +// +// MessageText: +// +// An invalid parameter was passed to a service or function as the eighth argument. +// +#define STATUS_INVALID_PARAMETER_8 ((NTSTATUS)0xC00000F6L) + +// +// MessageId: STATUS_INVALID_PARAMETER_9 +// +// MessageText: +// +// An invalid parameter was passed to a service or function as the ninth argument. +// +#define STATUS_INVALID_PARAMETER_9 ((NTSTATUS)0xC00000F7L) + +// +// MessageId: STATUS_INVALID_PARAMETER_10 +// +// MessageText: +// +// An invalid parameter was passed to a service or function as the tenth argument. +// +#define STATUS_INVALID_PARAMETER_10 ((NTSTATUS)0xC00000F8L) + +// +// MessageId: STATUS_INVALID_PARAMETER_11 +// +// MessageText: +// +// An invalid parameter was passed to a service or function as the eleventh argument. +// +#define STATUS_INVALID_PARAMETER_11 ((NTSTATUS)0xC00000F9L) + +// +// MessageId: STATUS_INVALID_PARAMETER_12 +// +// MessageText: +// +// An invalid parameter was passed to a service or function as the twelfth argument. +// +#define STATUS_INVALID_PARAMETER_12 ((NTSTATUS)0xC00000FAL) + +// +// MessageId: STATUS_REDIRECTOR_NOT_STARTED +// +// MessageText: +// +// An attempt was made to access a network file, but the network software was not yet started. +// +#define STATUS_REDIRECTOR_NOT_STARTED ((NTSTATUS)0xC00000FBL) + +// +// MessageId: STATUS_REDIRECTOR_STARTED +// +// MessageText: +// +// An attempt was made to start the redirector, but the redirector has already been started. +// +#define STATUS_REDIRECTOR_STARTED ((NTSTATUS)0xC00000FCL) + +// +// MessageId: STATUS_STACK_OVERFLOW +// +// MessageText: +// +// A new guard page for the stack cannot be created. +// +#define STATUS_STACK_OVERFLOW ((NTSTATUS)0xC00000FDL) // winnt + +// +// MessageId: STATUS_NO_SUCH_PACKAGE +// +// MessageText: +// +// A specified authentication package is unknown. +// +#define STATUS_NO_SUCH_PACKAGE ((NTSTATUS)0xC00000FEL) + +// +// MessageId: STATUS_BAD_FUNCTION_TABLE +// +// MessageText: +// +// A malformed function table was encountered during an unwind operation. +// +#define STATUS_BAD_FUNCTION_TABLE ((NTSTATUS)0xC00000FFL) + +// +// MessageId: STATUS_VARIABLE_NOT_FOUND +// +// MessageText: +// +// Indicates the specified environment variable name was not found in the specified environment block. +// +#define STATUS_VARIABLE_NOT_FOUND ((NTSTATUS)0xC0000100L) + +// +// MessageId: STATUS_DIRECTORY_NOT_EMPTY +// +// MessageText: +// +// Indicates that the directory trying to be deleted is not empty. +// +#define STATUS_DIRECTORY_NOT_EMPTY ((NTSTATUS)0xC0000101L) + +// +// MessageId: STATUS_FILE_CORRUPT_ERROR +// +// MessageText: +// +// {Corrupt File} +// The file or directory %hs is corrupt and unreadable. +// Please run the Chkdsk utility. +// +#define STATUS_FILE_CORRUPT_ERROR ((NTSTATUS)0xC0000102L) + +// +// MessageId: STATUS_NOT_A_DIRECTORY +// +// MessageText: +// +// A requested opened file is not a directory. +// +#define STATUS_NOT_A_DIRECTORY ((NTSTATUS)0xC0000103L) + +// +// MessageId: STATUS_BAD_LOGON_SESSION_STATE +// +// MessageText: +// +// The logon session is not in a state that is consistent with the requested operation. +// +#define STATUS_BAD_LOGON_SESSION_STATE ((NTSTATUS)0xC0000104L) + +// +// MessageId: STATUS_LOGON_SESSION_COLLISION +// +// MessageText: +// +// An internal LSA error has occurred. An authentication package has requested the creation of a Logon Session but the ID of an already existing Logon Session has been specified. +// +#define STATUS_LOGON_SESSION_COLLISION ((NTSTATUS)0xC0000105L) + +// +// MessageId: STATUS_NAME_TOO_LONG +// +// MessageText: +// +// A specified name string is too long for its intended use. +// +#define STATUS_NAME_TOO_LONG ((NTSTATUS)0xC0000106L) + +// +// MessageId: STATUS_FILES_OPEN +// +// MessageText: +// +// The user attempted to force close the files on a redirected drive, but there were opened files on the drive, and the user did not specify a sufficient level of force. +// +#define STATUS_FILES_OPEN ((NTSTATUS)0xC0000107L) + +// +// MessageId: STATUS_CONNECTION_IN_USE +// +// MessageText: +// +// The user attempted to force close the files on a redirected drive, but there were opened directories on the drive, and the user did not specify a sufficient level of force. +// +#define STATUS_CONNECTION_IN_USE ((NTSTATUS)0xC0000108L) + +// +// MessageId: STATUS_MESSAGE_NOT_FOUND +// +// MessageText: +// +// RtlFindMessage could not locate the requested message ID in the message table resource. +// +#define STATUS_MESSAGE_NOT_FOUND ((NTSTATUS)0xC0000109L) + +// +// MessageId: STATUS_PROCESS_IS_TERMINATING +// +// MessageText: +// +// An attempt was made to access an exiting process. +// +#define STATUS_PROCESS_IS_TERMINATING ((NTSTATUS)0xC000010AL) + +// +// MessageId: STATUS_INVALID_LOGON_TYPE +// +// MessageText: +// +// Indicates an invalid value has been provided for the LogonType requested. +// +#define STATUS_INVALID_LOGON_TYPE ((NTSTATUS)0xC000010BL) + +// +// MessageId: STATUS_NO_GUID_TRANSLATION +// +// MessageText: +// +// Indicates that an attempt was made to assign protection to a file system file or directory and one of the SIDs in the security descriptor could not be translated into a GUID that could be stored by the file system. +// This causes the protection attempt to fail, which may cause a file creation attempt to fail. +// +#define STATUS_NO_GUID_TRANSLATION ((NTSTATUS)0xC000010CL) + +// +// MessageId: STATUS_CANNOT_IMPERSONATE +// +// MessageText: +// +// Indicates that an attempt has been made to impersonate via a named pipe that has not yet been read from. +// +#define STATUS_CANNOT_IMPERSONATE ((NTSTATUS)0xC000010DL) + +// +// MessageId: STATUS_IMAGE_ALREADY_LOADED +// +// MessageText: +// +// Indicates that the specified image is already loaded. +// +#define STATUS_IMAGE_ALREADY_LOADED ((NTSTATUS)0xC000010EL) + + +// +// ============================================================ +// NOTE: The following ABIOS error code should be reserved on +// non ABIOS kernel. Eventually, I will remove the ifdef +// ABIOS. +// ============================================================ +// +// +// MessageId: STATUS_ABIOS_NOT_PRESENT +// +// MessageText: +// +// STATUS_ABIOS_NOT_PRESENT +// +#define STATUS_ABIOS_NOT_PRESENT ((NTSTATUS)0xC000010FL) + +// +// MessageId: STATUS_ABIOS_LID_NOT_EXIST +// +// MessageText: +// +// STATUS_ABIOS_LID_NOT_EXIST +// +#define STATUS_ABIOS_LID_NOT_EXIST ((NTSTATUS)0xC0000110L) + +// +// MessageId: STATUS_ABIOS_LID_ALREADY_OWNED +// +// MessageText: +// +// STATUS_ABIOS_LID_ALREADY_OWNED +// +#define STATUS_ABIOS_LID_ALREADY_OWNED ((NTSTATUS)0xC0000111L) + +// +// MessageId: STATUS_ABIOS_NOT_LID_OWNER +// +// MessageText: +// +// STATUS_ABIOS_NOT_LID_OWNER +// +#define STATUS_ABIOS_NOT_LID_OWNER ((NTSTATUS)0xC0000112L) + +// +// MessageId: STATUS_ABIOS_INVALID_COMMAND +// +// MessageText: +// +// STATUS_ABIOS_INVALID_COMMAND +// +#define STATUS_ABIOS_INVALID_COMMAND ((NTSTATUS)0xC0000113L) + +// +// MessageId: STATUS_ABIOS_INVALID_LID +// +// MessageText: +// +// STATUS_ABIOS_INVALID_LID +// +#define STATUS_ABIOS_INVALID_LID ((NTSTATUS)0xC0000114L) + +// +// MessageId: STATUS_ABIOS_SELECTOR_NOT_AVAILABLE +// +// MessageText: +// +// STATUS_ABIOS_SELECTOR_NOT_AVAILABLE +// +#define STATUS_ABIOS_SELECTOR_NOT_AVAILABLE ((NTSTATUS)0xC0000115L) + +// +// MessageId: STATUS_ABIOS_INVALID_SELECTOR +// +// MessageText: +// +// STATUS_ABIOS_INVALID_SELECTOR +// +#define STATUS_ABIOS_INVALID_SELECTOR ((NTSTATUS)0xC0000116L) + +// +// MessageId: STATUS_NO_LDT +// +// MessageText: +// +// Indicates that an attempt was made to change the size of the LDT for a process that has no LDT. +// +#define STATUS_NO_LDT ((NTSTATUS)0xC0000117L) + +// +// MessageId: STATUS_INVALID_LDT_SIZE +// +// MessageText: +// +// Indicates that an attempt was made to grow an LDT by setting its size, or that the size was not an even number of selectors. +// +#define STATUS_INVALID_LDT_SIZE ((NTSTATUS)0xC0000118L) + +// +// MessageId: STATUS_INVALID_LDT_OFFSET +// +// MessageText: +// +// Indicates that the starting value for the LDT information was not an integral multiple of the selector size. +// +#define STATUS_INVALID_LDT_OFFSET ((NTSTATUS)0xC0000119L) + +// +// MessageId: STATUS_INVALID_LDT_DESCRIPTOR +// +// MessageText: +// +// Indicates that the user supplied an invalid descriptor when trying to set up Ldt descriptors. +// +#define STATUS_INVALID_LDT_DESCRIPTOR ((NTSTATUS)0xC000011AL) + +// +// MessageId: STATUS_INVALID_IMAGE_NE_FORMAT +// +// MessageText: +// +// The specified image file did not have the correct format. It appears to be NE format. +// +#define STATUS_INVALID_IMAGE_NE_FORMAT ((NTSTATUS)0xC000011BL) + +// +// MessageId: STATUS_RXACT_INVALID_STATE +// +// MessageText: +// +// Indicates that the transaction state of a registry sub-tree is incompatible with the requested operation. For example, a request has been made to start a new transaction with one already in progress, or a request has been made to apply a transaction when one is not currently in progress. +// +#define STATUS_RXACT_INVALID_STATE ((NTSTATUS)0xC000011CL) + +// +// MessageId: STATUS_RXACT_COMMIT_FAILURE +// +// MessageText: +// +// Indicates an error has occurred during a registry transaction commit. The database has been left in an unknown, but probably inconsistent, state. The state of the registry transaction is left as COMMITTING. +// +#define STATUS_RXACT_COMMIT_FAILURE ((NTSTATUS)0xC000011DL) + +// +// MessageId: STATUS_MAPPED_FILE_SIZE_ZERO +// +// MessageText: +// +// An attempt was made to map a file of size zero with the maximum size specified as zero. +// +#define STATUS_MAPPED_FILE_SIZE_ZERO ((NTSTATUS)0xC000011EL) + +// +// MessageId: STATUS_TOO_MANY_OPENED_FILES +// +// MessageText: +// +// Too many files are opened on a remote server. +// This error should only be returned by the Windows redirector on a remote drive. +// +#define STATUS_TOO_MANY_OPENED_FILES ((NTSTATUS)0xC000011FL) + +// +// MessageId: STATUS_CANCELLED +// +// MessageText: +// +// The I/O request was canceled. +// +#define STATUS_CANCELLED ((NTSTATUS)0xC0000120L) + +// +// MessageId: STATUS_CANNOT_DELETE +// +// MessageText: +// +// An attempt has been made to remove a file or directory that cannot be deleted. +// +#define STATUS_CANNOT_DELETE ((NTSTATUS)0xC0000121L) + +// +// MessageId: STATUS_INVALID_COMPUTER_NAME +// +// MessageText: +// +// Indicates a name specified as a remote computer name is syntactically invalid. +// +#define STATUS_INVALID_COMPUTER_NAME ((NTSTATUS)0xC0000122L) + +// +// MessageId: STATUS_FILE_DELETED +// +// MessageText: +// +// An I/O request other than close was performed on a file after it has been deleted, which can only happen to a request which did not complete before the last handle was closed via NtClose. +// +#define STATUS_FILE_DELETED ((NTSTATUS)0xC0000123L) + +// +// MessageId: STATUS_SPECIAL_ACCOUNT +// +// MessageText: +// +// Indicates an operation has been attempted on a built-in (special) SAM account which is incompatible with built-in accounts. For example, built-in accounts cannot be deleted. +// +#define STATUS_SPECIAL_ACCOUNT ((NTSTATUS)0xC0000124L) + +// +// MessageId: STATUS_SPECIAL_GROUP +// +// MessageText: +// +// The operation requested may not be performed on the specified group because it is a built-in special group. +// +#define STATUS_SPECIAL_GROUP ((NTSTATUS)0xC0000125L) + +// +// MessageId: STATUS_SPECIAL_USER +// +// MessageText: +// +// The operation requested may not be performed on the specified user because it is a built-in special user. +// +#define STATUS_SPECIAL_USER ((NTSTATUS)0xC0000126L) + +// +// MessageId: STATUS_MEMBERS_PRIMARY_GROUP +// +// MessageText: +// +// Indicates a member cannot be removed from a group because the group is currently the member's primary group. +// +#define STATUS_MEMBERS_PRIMARY_GROUP ((NTSTATUS)0xC0000127L) + +// +// MessageId: STATUS_FILE_CLOSED +// +// MessageText: +// +// An I/O request other than close and several other special case operations was attempted using a file object that had already been closed. +// +#define STATUS_FILE_CLOSED ((NTSTATUS)0xC0000128L) + +// +// MessageId: STATUS_TOO_MANY_THREADS +// +// MessageText: +// +// Indicates a process has too many threads to perform the requested action. For example, assignment of a primary token may only be performed when a process has zero or one threads. +// +#define STATUS_TOO_MANY_THREADS ((NTSTATUS)0xC0000129L) + +// +// MessageId: STATUS_THREAD_NOT_IN_PROCESS +// +// MessageText: +// +// An attempt was made to operate on a thread within a specific process, but the thread specified is not in the process specified. +// +#define STATUS_THREAD_NOT_IN_PROCESS ((NTSTATUS)0xC000012AL) + +// +// MessageId: STATUS_TOKEN_ALREADY_IN_USE +// +// MessageText: +// +// An attempt was made to establish a token for use as a primary token but the token is already in use. A token can only be the primary token of one process at a time. +// +#define STATUS_TOKEN_ALREADY_IN_USE ((NTSTATUS)0xC000012BL) + +// +// MessageId: STATUS_PAGEFILE_QUOTA_EXCEEDED +// +// MessageText: +// +// Page file quota was exceeded. +// +#define STATUS_PAGEFILE_QUOTA_EXCEEDED ((NTSTATUS)0xC000012CL) + +// +// MessageId: STATUS_COMMITMENT_LIMIT +// +// MessageText: +// +// {Out of Virtual Memory} +// Your system is low on virtual memory. To ensure that Windows runs properly, increase the size of your virtual memory paging file. For more information, see Help. +// +#define STATUS_COMMITMENT_LIMIT ((NTSTATUS)0xC000012DL) + +// +// MessageId: STATUS_INVALID_IMAGE_LE_FORMAT +// +// MessageText: +// +// The specified image file did not have the correct format, it appears to be LE format. +// +#define STATUS_INVALID_IMAGE_LE_FORMAT ((NTSTATUS)0xC000012EL) + +// +// MessageId: STATUS_INVALID_IMAGE_NOT_MZ +// +// MessageText: +// +// The specified image file did not have the correct format, it did not have an initial MZ. +// +#define STATUS_INVALID_IMAGE_NOT_MZ ((NTSTATUS)0xC000012FL) + +// +// MessageId: STATUS_INVALID_IMAGE_PROTECT +// +// MessageText: +// +// The specified image file did not have the correct format, it did not have a proper e_lfarlc in the MZ header. +// +#define STATUS_INVALID_IMAGE_PROTECT ((NTSTATUS)0xC0000130L) + +// +// MessageId: STATUS_INVALID_IMAGE_WIN_16 +// +// MessageText: +// +// The specified image file did not have the correct format, it appears to be a 16-bit Windows image. +// +#define STATUS_INVALID_IMAGE_WIN_16 ((NTSTATUS)0xC0000131L) + +// +// MessageId: STATUS_LOGON_SERVER_CONFLICT +// +// MessageText: +// +// The Netlogon service cannot start because another Netlogon service running in the domain conflicts with the specified role. +// +#define STATUS_LOGON_SERVER_CONFLICT ((NTSTATUS)0xC0000132L) + +// +// MessageId: STATUS_TIME_DIFFERENCE_AT_DC +// +// MessageText: +// +// The time at the Primary Domain Controller is different than the time at the Backup Domain Controller or member server by too large an amount. +// +#define STATUS_TIME_DIFFERENCE_AT_DC ((NTSTATUS)0xC0000133L) + +// +// MessageId: STATUS_SYNCHRONIZATION_REQUIRED +// +// MessageText: +// +// The SAM database on a Windows Server is significantly out of synchronization with the copy on the Domain Controller. A complete synchronization is required. +// +#define STATUS_SYNCHRONIZATION_REQUIRED ((NTSTATUS)0xC0000134L) + +// +// MessageId: STATUS_DLL_NOT_FOUND +// +// MessageText: +// +// The program can't start because %hs is missing from your computer. Try reinstalling the program to fix this problem. +// +#define STATUS_DLL_NOT_FOUND ((NTSTATUS)0xC0000135L) // winnt + +// +// MessageId: STATUS_OPEN_FAILED +// +// MessageText: +// +// The NtCreateFile API failed. This error should never be returned to an application, it is a place holder for the Windows Lan Manager Redirector to use in its internal error mapping routines. +// +#define STATUS_OPEN_FAILED ((NTSTATUS)0xC0000136L) + +// +// MessageId: STATUS_IO_PRIVILEGE_FAILED +// +// MessageText: +// +// {Privilege Failed} +// The I/O permissions for the process could not be changed. +// +#define STATUS_IO_PRIVILEGE_FAILED ((NTSTATUS)0xC0000137L) + +// +// MessageId: STATUS_ORDINAL_NOT_FOUND +// +// MessageText: +// +// {Ordinal Not Found} +// The ordinal %ld could not be located in the dynamic link library %hs. +// +#define STATUS_ORDINAL_NOT_FOUND ((NTSTATUS)0xC0000138L) // winnt + +// +// MessageId: STATUS_ENTRYPOINT_NOT_FOUND +// +// MessageText: +// +// {Entry Point Not Found} +// The procedure entry point %hs could not be located in the dynamic link library %hs. +// +#define STATUS_ENTRYPOINT_NOT_FOUND ((NTSTATUS)0xC0000139L) // winnt + +// +// MessageId: STATUS_CONTROL_C_EXIT +// +// MessageText: +// +// {Application Exit by CTRL+C} +// The application terminated as a result of a CTRL+C. +// +#define STATUS_CONTROL_C_EXIT ((NTSTATUS)0xC000013AL) // winnt + +// +// MessageId: STATUS_LOCAL_DISCONNECT +// +// MessageText: +// +// {Virtual Circuit Closed} +// The network transport on your computer has closed a network connection. There may or may not be I/O requests outstanding. +// +#define STATUS_LOCAL_DISCONNECT ((NTSTATUS)0xC000013BL) + +// +// MessageId: STATUS_REMOTE_DISCONNECT +// +// MessageText: +// +// {Virtual Circuit Closed} +// The network transport on a remote computer has closed a network connection. There may or may not be I/O requests outstanding. +// +#define STATUS_REMOTE_DISCONNECT ((NTSTATUS)0xC000013CL) + +// +// MessageId: STATUS_REMOTE_RESOURCES +// +// MessageText: +// +// {Insufficient Resources on Remote Computer} +// The remote computer has insufficient resources to complete the network request. For instance, there may not be enough memory available on the remote computer to carry out the request at this time. +// +#define STATUS_REMOTE_RESOURCES ((NTSTATUS)0xC000013DL) + +// +// MessageId: STATUS_LINK_FAILED +// +// MessageText: +// +// {Virtual Circuit Closed} +// An existing connection (virtual circuit) has been broken at the remote computer. There is probably something wrong with the network software protocol or the network hardware on the remote computer. +// +#define STATUS_LINK_FAILED ((NTSTATUS)0xC000013EL) + +// +// MessageId: STATUS_LINK_TIMEOUT +// +// MessageText: +// +// {Virtual Circuit Closed} +// The network transport on your computer has closed a network connection because it had to wait too long for a response from the remote computer. +// +#define STATUS_LINK_TIMEOUT ((NTSTATUS)0xC000013FL) + +// +// MessageId: STATUS_INVALID_CONNECTION +// +// MessageText: +// +// The connection handle given to the transport was invalid. +// +#define STATUS_INVALID_CONNECTION ((NTSTATUS)0xC0000140L) + +// +// MessageId: STATUS_INVALID_ADDRESS +// +// MessageText: +// +// The address handle given to the transport was invalid. +// +#define STATUS_INVALID_ADDRESS ((NTSTATUS)0xC0000141L) + +// +// MessageId: STATUS_DLL_INIT_FAILED +// +// MessageText: +// +// {DLL Initialization Failed} +// Initialization of the dynamic link library %hs failed. The process is terminating abnormally. +// +#define STATUS_DLL_INIT_FAILED ((NTSTATUS)0xC0000142L) // winnt + +// +// MessageId: STATUS_MISSING_SYSTEMFILE +// +// MessageText: +// +// {Missing System File} +// The required system file %hs is bad or missing. +// +#define STATUS_MISSING_SYSTEMFILE ((NTSTATUS)0xC0000143L) + +// +// MessageId: STATUS_UNHANDLED_EXCEPTION +// +// MessageText: +// +// {Application Error} +// The exception %s (0x%08lx) occurred in the application at location 0x%08lx. +// +#define STATUS_UNHANDLED_EXCEPTION ((NTSTATUS)0xC0000144L) + +// +// MessageId: STATUS_APP_INIT_FAILURE +// +// MessageText: +// +// {Application Error} +// The application failed to initialize properly (0x%lx). Click OK to terminate the application. +// +#define STATUS_APP_INIT_FAILURE ((NTSTATUS)0xC0000145L) + +// +// MessageId: STATUS_PAGEFILE_CREATE_FAILED +// +// MessageText: +// +// {Unable to Create Paging File} +// The creation of the paging file %hs failed (%lx). The requested size was %ld. +// +#define STATUS_PAGEFILE_CREATE_FAILED ((NTSTATUS)0xC0000146L) + +// +// MessageId: STATUS_NO_PAGEFILE +// +// MessageText: +// +// {No Paging File Specified} +// No paging file was specified in the system configuration. +// +#define STATUS_NO_PAGEFILE ((NTSTATUS)0xC0000147L) + +// +// MessageId: STATUS_INVALID_LEVEL +// +// MessageText: +// +// {Incorrect System Call Level} +// An invalid level was passed into the specified system call. +// +#define STATUS_INVALID_LEVEL ((NTSTATUS)0xC0000148L) + +// +// MessageId: STATUS_WRONG_PASSWORD_CORE +// +// MessageText: +// +// {Incorrect Password to LAN Manager Server} +// You specified an incorrect password to a LAN Manager 2.x or MS-NET server. +// +#define STATUS_WRONG_PASSWORD_CORE ((NTSTATUS)0xC0000149L) + +// +// MessageId: STATUS_ILLEGAL_FLOAT_CONTEXT +// +// MessageText: +// +// {EXCEPTION} +// A real-mode application issued a floating-point instruction and floating-point hardware is not present. +// +#define STATUS_ILLEGAL_FLOAT_CONTEXT ((NTSTATUS)0xC000014AL) + +// +// MessageId: STATUS_PIPE_BROKEN +// +// MessageText: +// +// The pipe operation has failed because the other end of the pipe has been closed. +// +#define STATUS_PIPE_BROKEN ((NTSTATUS)0xC000014BL) + +// +// MessageId: STATUS_REGISTRY_CORRUPT +// +// MessageText: +// +// {The Registry Is Corrupt} +// The structure of one of the files that contains Registry data is corrupt, or the image of the file in memory is corrupt, or the file could not be recovered because the alternate copy or log was absent or corrupt. +// +#define STATUS_REGISTRY_CORRUPT ((NTSTATUS)0xC000014CL) + +// +// MessageId: STATUS_REGISTRY_IO_FAILED +// +// MessageText: +// +// An I/O operation initiated by the Registry failed unrecoverably. The Registry could not read in, or write out, or flush, one of the files that contain the system's image of the Registry. +// +#define STATUS_REGISTRY_IO_FAILED ((NTSTATUS)0xC000014DL) + +// +// MessageId: STATUS_NO_EVENT_PAIR +// +// MessageText: +// +// An event pair synchronization operation was performed using the thread specific client/server event pair object, but no event pair object was associated with the thread. +// +#define STATUS_NO_EVENT_PAIR ((NTSTATUS)0xC000014EL) + +// +// MessageId: STATUS_UNRECOGNIZED_VOLUME +// +// MessageText: +// +// The volume does not contain a recognized file system. Please make sure that all required file system drivers are loaded and that the volume is not corrupt. +// +#define STATUS_UNRECOGNIZED_VOLUME ((NTSTATUS)0xC000014FL) + +// +// MessageId: STATUS_SERIAL_NO_DEVICE_INITED +// +// MessageText: +// +// No serial device was successfully initialized. The serial driver will unload. +// +#define STATUS_SERIAL_NO_DEVICE_INITED ((NTSTATUS)0xC0000150L) + +// +// MessageId: STATUS_NO_SUCH_ALIAS +// +// MessageText: +// +// The specified local group does not exist. +// +#define STATUS_NO_SUCH_ALIAS ((NTSTATUS)0xC0000151L) + +// +// MessageId: STATUS_MEMBER_NOT_IN_ALIAS +// +// MessageText: +// +// The specified account name is not a member of the group. +// +#define STATUS_MEMBER_NOT_IN_ALIAS ((NTSTATUS)0xC0000152L) + +// +// MessageId: STATUS_MEMBER_IN_ALIAS +// +// MessageText: +// +// The specified account name is already a member of the group. +// +#define STATUS_MEMBER_IN_ALIAS ((NTSTATUS)0xC0000153L) + +// +// MessageId: STATUS_ALIAS_EXISTS +// +// MessageText: +// +// The specified local group already exists. +// +#define STATUS_ALIAS_EXISTS ((NTSTATUS)0xC0000154L) + +// +// MessageId: STATUS_LOGON_NOT_GRANTED +// +// MessageText: +// +// A requested type of logon (e.g., Interactive, Network, Service) is not granted by the target system's local security policy. +// Please ask the system administrator to grant the necessary form of logon. +// +#define STATUS_LOGON_NOT_GRANTED ((NTSTATUS)0xC0000155L) + +// +// MessageId: STATUS_TOO_MANY_SECRETS +// +// MessageText: +// +// The maximum number of secrets that may be stored in a single system has been exceeded. The length and number of secrets is limited to satisfy United States State Department export restrictions. +// +#define STATUS_TOO_MANY_SECRETS ((NTSTATUS)0xC0000156L) + +// +// MessageId: STATUS_SECRET_TOO_LONG +// +// MessageText: +// +// The length of a secret exceeds the maximum length allowed. The length and number of secrets is limited to satisfy United States State Department export restrictions. +// +#define STATUS_SECRET_TOO_LONG ((NTSTATUS)0xC0000157L) + +// +// MessageId: STATUS_INTERNAL_DB_ERROR +// +// MessageText: +// +// The Local Security Authority (LSA) database contains an internal inconsistency. +// +#define STATUS_INTERNAL_DB_ERROR ((NTSTATUS)0xC0000158L) + +// +// MessageId: STATUS_FULLSCREEN_MODE +// +// MessageText: +// +// The requested operation cannot be performed in fullscreen mode. +// +#define STATUS_FULLSCREEN_MODE ((NTSTATUS)0xC0000159L) + +// +// MessageId: STATUS_TOO_MANY_CONTEXT_IDS +// +// MessageText: +// +// During a logon attempt, the user's security context accumulated too many security IDs. This is a very unusual situation. Remove the user from some global or local groups to reduce the number of security ids to incorporate into the security context. +// +#define STATUS_TOO_MANY_CONTEXT_IDS ((NTSTATUS)0xC000015AL) + +// +// MessageId: STATUS_LOGON_TYPE_NOT_GRANTED +// +// MessageText: +// +// A user has requested a type of logon (e.g., interactive or network) that has not been granted. An administrator has control over who may logon interactively and through the network. +// +#define STATUS_LOGON_TYPE_NOT_GRANTED ((NTSTATUS)0xC000015BL) + +// +// MessageId: STATUS_NOT_REGISTRY_FILE +// +// MessageText: +// +// The system has attempted to load or restore a file into the registry, and the specified file is not in the format of a registry file. +// +#define STATUS_NOT_REGISTRY_FILE ((NTSTATUS)0xC000015CL) + +// +// MessageId: STATUS_NT_CROSS_ENCRYPTION_REQUIRED +// +// MessageText: +// +// An attempt was made to change a user password in the security account manager without providing the necessary Windows cross-encrypted password. +// +#define STATUS_NT_CROSS_ENCRYPTION_REQUIRED ((NTSTATUS)0xC000015DL) + +// +// MessageId: STATUS_DOMAIN_CTRLR_CONFIG_ERROR +// +// MessageText: +// +// A Windows Server has an incorrect configuration. +// +#define STATUS_DOMAIN_CTRLR_CONFIG_ERROR ((NTSTATUS)0xC000015EL) + +// +// MessageId: STATUS_FT_MISSING_MEMBER +// +// MessageText: +// +// An attempt was made to explicitly access the secondary copy of information via a device control to the Fault Tolerance driver and the secondary copy is not present in the system. +// +#define STATUS_FT_MISSING_MEMBER ((NTSTATUS)0xC000015FL) + +// +// MessageId: STATUS_ILL_FORMED_SERVICE_ENTRY +// +// MessageText: +// +// A configuration registry node representing a driver service entry was ill-formed and did not contain required value entries. +// +#define STATUS_ILL_FORMED_SERVICE_ENTRY ((NTSTATUS)0xC0000160L) + +// +// MessageId: STATUS_ILLEGAL_CHARACTER +// +// MessageText: +// +// An illegal character was encountered. For a multi-byte character set this includes a lead byte without a succeeding trail byte. For the Unicode character set this includes the characters 0xFFFF and 0xFFFE. +// +#define STATUS_ILLEGAL_CHARACTER ((NTSTATUS)0xC0000161L) + +// +// MessageId: STATUS_UNMAPPABLE_CHARACTER +// +// MessageText: +// +// No mapping for the Unicode character exists in the target multi-byte code page. +// +#define STATUS_UNMAPPABLE_CHARACTER ((NTSTATUS)0xC0000162L) + +// +// MessageId: STATUS_UNDEFINED_CHARACTER +// +// MessageText: +// +// The Unicode character is not defined in the Unicode character set installed on the system. +// +#define STATUS_UNDEFINED_CHARACTER ((NTSTATUS)0xC0000163L) + +// +// MessageId: STATUS_FLOPPY_VOLUME +// +// MessageText: +// +// The paging file cannot be created on a floppy diskette. +// +#define STATUS_FLOPPY_VOLUME ((NTSTATUS)0xC0000164L) + +// +// MessageId: STATUS_FLOPPY_ID_MARK_NOT_FOUND +// +// MessageText: +// +// {Floppy Disk Error} +// While accessing a floppy disk, an ID address mark was not found. +// +#define STATUS_FLOPPY_ID_MARK_NOT_FOUND ((NTSTATUS)0xC0000165L) + +// +// MessageId: STATUS_FLOPPY_WRONG_CYLINDER +// +// MessageText: +// +// {Floppy Disk Error} +// While accessing a floppy disk, the track address from the sector ID field was found to be different than the track address maintained by the controller. +// +#define STATUS_FLOPPY_WRONG_CYLINDER ((NTSTATUS)0xC0000166L) + +// +// MessageId: STATUS_FLOPPY_UNKNOWN_ERROR +// +// MessageText: +// +// {Floppy Disk Error} +// The floppy disk controller reported an error that is not recognized by the floppy disk driver. +// +#define STATUS_FLOPPY_UNKNOWN_ERROR ((NTSTATUS)0xC0000167L) + +// +// MessageId: STATUS_FLOPPY_BAD_REGISTERS +// +// MessageText: +// +// {Floppy Disk Error} +// While accessing a floppy-disk, the controller returned inconsistent results via its registers. +// +#define STATUS_FLOPPY_BAD_REGISTERS ((NTSTATUS)0xC0000168L) + +// +// MessageId: STATUS_DISK_RECALIBRATE_FAILED +// +// MessageText: +// +// {Hard Disk Error} +// While accessing the hard disk, a recalibrate operation failed, even after retries. +// +#define STATUS_DISK_RECALIBRATE_FAILED ((NTSTATUS)0xC0000169L) + +// +// MessageId: STATUS_DISK_OPERATION_FAILED +// +// MessageText: +// +// {Hard Disk Error} +// While accessing the hard disk, a disk operation failed even after retries. +// +#define STATUS_DISK_OPERATION_FAILED ((NTSTATUS)0xC000016AL) + +// +// MessageId: STATUS_DISK_RESET_FAILED +// +// MessageText: +// +// {Hard Disk Error} +// While accessing the hard disk, a disk controller reset was needed, but even that failed. +// +#define STATUS_DISK_RESET_FAILED ((NTSTATUS)0xC000016BL) + +// +// MessageId: STATUS_SHARED_IRQ_BUSY +// +// MessageText: +// +// An attempt was made to open a device that was sharing an IRQ with other devices. +// At least one other device that uses that IRQ was already opened. +// Two concurrent opens of devices that share an IRQ and only work via interrupts is not supported for the particular bus type that the devices use. +// +#define STATUS_SHARED_IRQ_BUSY ((NTSTATUS)0xC000016CL) + +// +// MessageId: STATUS_FT_ORPHANING +// +// MessageText: +// +// {FT Orphaning} +// A disk that is part of a fault-tolerant volume can no longer be accessed. +// +#define STATUS_FT_ORPHANING ((NTSTATUS)0xC000016DL) + +// +// MessageId: STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT +// +// MessageText: +// +// The system bios failed to connect a system interrupt to the device or bus for which the device is connected. +// +#define STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT ((NTSTATUS)0xC000016EL) + +// +// MessageId: STATUS_PARTITION_FAILURE +// +// MessageText: +// +// Tape could not be partitioned. +// +#define STATUS_PARTITION_FAILURE ((NTSTATUS)0xC0000172L) + +// +// MessageId: STATUS_INVALID_BLOCK_LENGTH +// +// MessageText: +// +// When accessing a new tape of a multivolume partition, the current blocksize is incorrect. +// +#define STATUS_INVALID_BLOCK_LENGTH ((NTSTATUS)0xC0000173L) + +// +// MessageId: STATUS_DEVICE_NOT_PARTITIONED +// +// MessageText: +// +// Tape partition information could not be found when loading a tape. +// +#define STATUS_DEVICE_NOT_PARTITIONED ((NTSTATUS)0xC0000174L) + +// +// MessageId: STATUS_UNABLE_TO_LOCK_MEDIA +// +// MessageText: +// +// Attempt to lock the eject media mechanism fails. +// +#define STATUS_UNABLE_TO_LOCK_MEDIA ((NTSTATUS)0xC0000175L) + +// +// MessageId: STATUS_UNABLE_TO_UNLOAD_MEDIA +// +// MessageText: +// +// Unload media fails. +// +#define STATUS_UNABLE_TO_UNLOAD_MEDIA ((NTSTATUS)0xC0000176L) + +// +// MessageId: STATUS_EOM_OVERFLOW +// +// MessageText: +// +// Physical end of tape was detected. +// +#define STATUS_EOM_OVERFLOW ((NTSTATUS)0xC0000177L) + +// +// MessageId: STATUS_NO_MEDIA +// +// MessageText: +// +// {No Media} +// There is no media in the drive. Please insert media into drive %hs. +// +#define STATUS_NO_MEDIA ((NTSTATUS)0xC0000178L) + +// +// MessageId: STATUS_NO_SUCH_MEMBER +// +// MessageText: +// +// A member could not be added to or removed from the local group because the member does not exist. +// +#define STATUS_NO_SUCH_MEMBER ((NTSTATUS)0xC000017AL) + +// +// MessageId: STATUS_INVALID_MEMBER +// +// MessageText: +// +// A new member could not be added to a local group because the member has the wrong account type. +// +#define STATUS_INVALID_MEMBER ((NTSTATUS)0xC000017BL) + +// +// MessageId: STATUS_KEY_DELETED +// +// MessageText: +// +// Illegal operation attempted on a registry key which has been marked for deletion. +// +#define STATUS_KEY_DELETED ((NTSTATUS)0xC000017CL) + +// +// MessageId: STATUS_NO_LOG_SPACE +// +// MessageText: +// +// System could not allocate required space in a registry log. +// +#define STATUS_NO_LOG_SPACE ((NTSTATUS)0xC000017DL) + +// +// MessageId: STATUS_TOO_MANY_SIDS +// +// MessageText: +// +// Too many Sids have been specified. +// +#define STATUS_TOO_MANY_SIDS ((NTSTATUS)0xC000017EL) + +// +// MessageId: STATUS_LM_CROSS_ENCRYPTION_REQUIRED +// +// MessageText: +// +// An attempt was made to change a user password in the security account manager without providing the necessary LM cross-encrypted password. +// +#define STATUS_LM_CROSS_ENCRYPTION_REQUIRED ((NTSTATUS)0xC000017FL) + +// +// MessageId: STATUS_KEY_HAS_CHILDREN +// +// MessageText: +// +// An attempt was made to create a symbolic link in a registry key that already has subkeys or values. +// +#define STATUS_KEY_HAS_CHILDREN ((NTSTATUS)0xC0000180L) + +// +// MessageId: STATUS_CHILD_MUST_BE_VOLATILE +// +// MessageText: +// +// An attempt was made to create a Stable subkey under a Volatile parent key. +// +#define STATUS_CHILD_MUST_BE_VOLATILE ((NTSTATUS)0xC0000181L) + +// +// MessageId: STATUS_DEVICE_CONFIGURATION_ERROR +// +// MessageText: +// +// The I/O device is configured incorrectly or the configuration parameters to the driver are incorrect. +// +#define STATUS_DEVICE_CONFIGURATION_ERROR ((NTSTATUS)0xC0000182L) + +// +// MessageId: STATUS_DRIVER_INTERNAL_ERROR +// +// MessageText: +// +// An error was detected between two drivers or within an I/O driver. +// +#define STATUS_DRIVER_INTERNAL_ERROR ((NTSTATUS)0xC0000183L) + +// +// MessageId: STATUS_INVALID_DEVICE_STATE +// +// MessageText: +// +// The device is not in a valid state to perform this request. +// +#define STATUS_INVALID_DEVICE_STATE ((NTSTATUS)0xC0000184L) + +// +// MessageId: STATUS_IO_DEVICE_ERROR +// +// MessageText: +// +// The I/O device reported an I/O error. +// +#define STATUS_IO_DEVICE_ERROR ((NTSTATUS)0xC0000185L) + +// +// MessageId: STATUS_DEVICE_PROTOCOL_ERROR +// +// MessageText: +// +// A protocol error was detected between the driver and the device. +// +#define STATUS_DEVICE_PROTOCOL_ERROR ((NTSTATUS)0xC0000186L) + +// +// MessageId: STATUS_BACKUP_CONTROLLER +// +// MessageText: +// +// This operation is only allowed for the Primary Domain Controller of the domain. +// +#define STATUS_BACKUP_CONTROLLER ((NTSTATUS)0xC0000187L) + +// +// MessageId: STATUS_LOG_FILE_FULL +// +// MessageText: +// +// Log file space is insufficient to support this operation. +// +#define STATUS_LOG_FILE_FULL ((NTSTATUS)0xC0000188L) + +// +// MessageId: STATUS_TOO_LATE +// +// MessageText: +// +// A write operation was attempted to a volume after it was dismounted. +// +#define STATUS_TOO_LATE ((NTSTATUS)0xC0000189L) + +// +// MessageId: STATUS_NO_TRUST_LSA_SECRET +// +// MessageText: +// +// The workstation does not have a trust secret for the primary domain in the local LSA database. +// +#define STATUS_NO_TRUST_LSA_SECRET ((NTSTATUS)0xC000018AL) + +// +// MessageId: STATUS_NO_TRUST_SAM_ACCOUNT +// +// MessageText: +// +// The SAM database on the Windows Server does not have a computer account for this workstation trust relationship. +// +#define STATUS_NO_TRUST_SAM_ACCOUNT ((NTSTATUS)0xC000018BL) + +// +// MessageId: STATUS_TRUSTED_DOMAIN_FAILURE +// +// MessageText: +// +// The logon request failed because the trust relationship between the primary domain and the trusted domain failed. +// +#define STATUS_TRUSTED_DOMAIN_FAILURE ((NTSTATUS)0xC000018CL) + +// +// MessageId: STATUS_TRUSTED_RELATIONSHIP_FAILURE +// +// MessageText: +// +// The logon request failed because the trust relationship between this workstation and the primary domain failed. +// +#define STATUS_TRUSTED_RELATIONSHIP_FAILURE ((NTSTATUS)0xC000018DL) + +// +// MessageId: STATUS_EVENTLOG_FILE_CORRUPT +// +// MessageText: +// +// The Eventlog log file is corrupt. +// +#define STATUS_EVENTLOG_FILE_CORRUPT ((NTSTATUS)0xC000018EL) + +// +// MessageId: STATUS_EVENTLOG_CANT_START +// +// MessageText: +// +// No Eventlog log file could be opened. The Eventlog service did not start. +// +#define STATUS_EVENTLOG_CANT_START ((NTSTATUS)0xC000018FL) + +// +// MessageId: STATUS_TRUST_FAILURE +// +// MessageText: +// +// The network logon failed. This may be because the validation authority can't be reached. +// +#define STATUS_TRUST_FAILURE ((NTSTATUS)0xC0000190L) + +// +// MessageId: STATUS_MUTANT_LIMIT_EXCEEDED +// +// MessageText: +// +// An attempt was made to acquire a mutant such that its maximum count would have been exceeded. +// +#define STATUS_MUTANT_LIMIT_EXCEEDED ((NTSTATUS)0xC0000191L) + +// +// MessageId: STATUS_NETLOGON_NOT_STARTED +// +// MessageText: +// +// An attempt was made to logon, but the netlogon service was not started. +// +#define STATUS_NETLOGON_NOT_STARTED ((NTSTATUS)0xC0000192L) + +// +// MessageId: STATUS_ACCOUNT_EXPIRED +// +// MessageText: +// +// The user's account has expired. +// +#define STATUS_ACCOUNT_EXPIRED ((NTSTATUS)0xC0000193L) // ntsubauth + +// +// MessageId: STATUS_POSSIBLE_DEADLOCK +// +// MessageText: +// +// {EXCEPTION} +// Possible deadlock condition. +// +#define STATUS_POSSIBLE_DEADLOCK ((NTSTATUS)0xC0000194L) + +// +// MessageId: STATUS_NETWORK_CREDENTIAL_CONFLICT +// +// MessageText: +// +// Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again. +// +#define STATUS_NETWORK_CREDENTIAL_CONFLICT ((NTSTATUS)0xC0000195L) + +// +// MessageId: STATUS_REMOTE_SESSION_LIMIT +// +// MessageText: +// +// An attempt was made to establish a session to a network server, but there are already too many sessions established to that server. +// +#define STATUS_REMOTE_SESSION_LIMIT ((NTSTATUS)0xC0000196L) + +// +// MessageId: STATUS_EVENTLOG_FILE_CHANGED +// +// MessageText: +// +// The log file has changed between reads. +// +#define STATUS_EVENTLOG_FILE_CHANGED ((NTSTATUS)0xC0000197L) + +// +// MessageId: STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT +// +// MessageText: +// +// The account used is an Interdomain Trust account. Use your global user account or local user account to access this server. +// +#define STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT ((NTSTATUS)0xC0000198L) + +// +// MessageId: STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT +// +// MessageText: +// +// The account used is a Computer Account. Use your global user account or local user account to access this server. +// +#define STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT ((NTSTATUS)0xC0000199L) + +// +// MessageId: STATUS_NOLOGON_SERVER_TRUST_ACCOUNT +// +// MessageText: +// +// The account used is an Server Trust account. Use your global user account or local user account to access this server. +// +#define STATUS_NOLOGON_SERVER_TRUST_ACCOUNT ((NTSTATUS)0xC000019AL) + +// +// MessageId: STATUS_DOMAIN_TRUST_INCONSISTENT +// +// MessageText: +// +// The name or SID of the domain specified is inconsistent with the trust information for that domain. +// +#define STATUS_DOMAIN_TRUST_INCONSISTENT ((NTSTATUS)0xC000019BL) + +// +// MessageId: STATUS_FS_DRIVER_REQUIRED +// +// MessageText: +// +// A volume has been accessed for which a file system driver is required that has not yet been loaded. +// +#define STATUS_FS_DRIVER_REQUIRED ((NTSTATUS)0xC000019CL) + +// +// MessageId: STATUS_IMAGE_ALREADY_LOADED_AS_DLL +// +// MessageText: +// +// Indicates that the specified image is already loaded as a DLL. +// +#define STATUS_IMAGE_ALREADY_LOADED_AS_DLL ((NTSTATUS)0xC000019DL) + +// +// MessageId: STATUS_INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING +// +// MessageText: +// +// Short name settings may not be changed on this volume due to the global registry setting. +// +#define STATUS_INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING ((NTSTATUS)0xC000019EL) + +// +// MessageId: STATUS_SHORT_NAMES_NOT_ENABLED_ON_VOLUME +// +// MessageText: +// +// Short names are not enabled on this volume. +// +#define STATUS_SHORT_NAMES_NOT_ENABLED_ON_VOLUME ((NTSTATUS)0xC000019FL) + +// +// MessageId: STATUS_SECURITY_STREAM_IS_INCONSISTENT +// +// MessageText: +// +// The security stream for the given volume is in an inconsistent state. +// Please run CHKDSK on the volume. +// +#define STATUS_SECURITY_STREAM_IS_INCONSISTENT ((NTSTATUS)0xC00001A0L) + +// +// MessageId: STATUS_INVALID_LOCK_RANGE +// +// MessageText: +// +// A requested file lock operation cannot be processed due to an invalid byte range. +// +#define STATUS_INVALID_LOCK_RANGE ((NTSTATUS)0xC00001A1L) + +// +// MessageId: STATUS_INVALID_ACE_CONDITION +// +// MessageText: +// +// {Invalid ACE Condition} +// The specified access control entry (ACE) contains an invalid condition. +// +#define STATUS_INVALID_ACE_CONDITION ((NTSTATUS)0xC00001A2L) + +// +// MessageId: STATUS_IMAGE_SUBSYSTEM_NOT_PRESENT +// +// MessageText: +// +// The subsystem needed to support the image type is not present. +// +#define STATUS_IMAGE_SUBSYSTEM_NOT_PRESENT ((NTSTATUS)0xC00001A3L) + +// +// MessageId: STATUS_NOTIFICATION_GUID_ALREADY_DEFINED +// +// MessageText: +// +// {Invalid ACE Condition} +// The specified file already has a notification GUID associated with it. +// +#define STATUS_NOTIFICATION_GUID_ALREADY_DEFINED ((NTSTATUS)0xC00001A4L) + +// +// Available range of NTSTATUS codes +// +// +// MessageId: STATUS_NETWORK_OPEN_RESTRICTION +// +// MessageText: +// +// A remote open failed because the network open restrictions were not satisfied. +// +#define STATUS_NETWORK_OPEN_RESTRICTION ((NTSTATUS)0xC0000201L) + +// +// MessageId: STATUS_NO_USER_SESSION_KEY +// +// MessageText: +// +// There is no user session key for the specified logon session. +// +#define STATUS_NO_USER_SESSION_KEY ((NTSTATUS)0xC0000202L) + +// +// MessageId: STATUS_USER_SESSION_DELETED +// +// MessageText: +// +// The remote user session has been deleted. +// +#define STATUS_USER_SESSION_DELETED ((NTSTATUS)0xC0000203L) + +// +// MessageId: STATUS_RESOURCE_LANG_NOT_FOUND +// +// MessageText: +// +// Indicates the specified resource language ID cannot be found in the +// image file. +// +#define STATUS_RESOURCE_LANG_NOT_FOUND ((NTSTATUS)0xC0000204L) + +// +// MessageId: STATUS_INSUFF_SERVER_RESOURCES +// +// MessageText: +// +// Insufficient server resources exist to complete the request. +// +#define STATUS_INSUFF_SERVER_RESOURCES ((NTSTATUS)0xC0000205L) + +// +// MessageId: STATUS_INVALID_BUFFER_SIZE +// +// MessageText: +// +// The size of the buffer is invalid for the specified operation. +// +#define STATUS_INVALID_BUFFER_SIZE ((NTSTATUS)0xC0000206L) + +// +// MessageId: STATUS_INVALID_ADDRESS_COMPONENT +// +// MessageText: +// +// The transport rejected the network address specified as invalid. +// +#define STATUS_INVALID_ADDRESS_COMPONENT ((NTSTATUS)0xC0000207L) + +// +// MessageId: STATUS_INVALID_ADDRESS_WILDCARD +// +// MessageText: +// +// The transport rejected the network address specified due to an invalid use of a wildcard. +// +#define STATUS_INVALID_ADDRESS_WILDCARD ((NTSTATUS)0xC0000208L) + +// +// MessageId: STATUS_TOO_MANY_ADDRESSES +// +// MessageText: +// +// The transport address could not be opened because all the available addresses are in use. +// +#define STATUS_TOO_MANY_ADDRESSES ((NTSTATUS)0xC0000209L) + +// +// MessageId: STATUS_ADDRESS_ALREADY_EXISTS +// +// MessageText: +// +// The transport address could not be opened because it already exists. +// +#define STATUS_ADDRESS_ALREADY_EXISTS ((NTSTATUS)0xC000020AL) + +// +// MessageId: STATUS_ADDRESS_CLOSED +// +// MessageText: +// +// The transport address is now closed. +// +#define STATUS_ADDRESS_CLOSED ((NTSTATUS)0xC000020BL) + +// +// MessageId: STATUS_CONNECTION_DISCONNECTED +// +// MessageText: +// +// The transport connection is now disconnected. +// +#define STATUS_CONNECTION_DISCONNECTED ((NTSTATUS)0xC000020CL) + +// +// MessageId: STATUS_CONNECTION_RESET +// +// MessageText: +// +// The transport connection has been reset. +// +#define STATUS_CONNECTION_RESET ((NTSTATUS)0xC000020DL) + +// +// MessageId: STATUS_TOO_MANY_NODES +// +// MessageText: +// +// The transport cannot dynamically acquire any more nodes. +// +#define STATUS_TOO_MANY_NODES ((NTSTATUS)0xC000020EL) + +// +// MessageId: STATUS_TRANSACTION_ABORTED +// +// MessageText: +// +// The transport aborted a pending transaction. +// +#define STATUS_TRANSACTION_ABORTED ((NTSTATUS)0xC000020FL) + +// +// MessageId: STATUS_TRANSACTION_TIMED_OUT +// +// MessageText: +// +// The transport timed out a request waiting for a response. +// +#define STATUS_TRANSACTION_TIMED_OUT ((NTSTATUS)0xC0000210L) + +// +// MessageId: STATUS_TRANSACTION_NO_RELEASE +// +// MessageText: +// +// The transport did not receive a release for a pending response. +// +#define STATUS_TRANSACTION_NO_RELEASE ((NTSTATUS)0xC0000211L) + +// +// MessageId: STATUS_TRANSACTION_NO_MATCH +// +// MessageText: +// +// The transport did not find a transaction matching the specific token. +// +#define STATUS_TRANSACTION_NO_MATCH ((NTSTATUS)0xC0000212L) + +// +// MessageId: STATUS_TRANSACTION_RESPONDED +// +// MessageText: +// +// The transport had previously responded to a transaction request. +// +#define STATUS_TRANSACTION_RESPONDED ((NTSTATUS)0xC0000213L) + +// +// MessageId: STATUS_TRANSACTION_INVALID_ID +// +// MessageText: +// +// The transport does not recognized the transaction request identifier specified. +// +#define STATUS_TRANSACTION_INVALID_ID ((NTSTATUS)0xC0000214L) + +// +// MessageId: STATUS_TRANSACTION_INVALID_TYPE +// +// MessageText: +// +// The transport does not recognize the transaction request type specified. +// +#define STATUS_TRANSACTION_INVALID_TYPE ((NTSTATUS)0xC0000215L) + +// +// MessageId: STATUS_NOT_SERVER_SESSION +// +// MessageText: +// +// The transport can only process the specified request on the server side of a session. +// +#define STATUS_NOT_SERVER_SESSION ((NTSTATUS)0xC0000216L) + +// +// MessageId: STATUS_NOT_CLIENT_SESSION +// +// MessageText: +// +// The transport can only process the specified request on the client side of a session. +// +#define STATUS_NOT_CLIENT_SESSION ((NTSTATUS)0xC0000217L) + +// +// MessageId: STATUS_CANNOT_LOAD_REGISTRY_FILE +// +// MessageText: +// +// {Registry File Failure} +// The registry cannot load the hive (file): +// %hs +// or its log or alternate. +// It is corrupt, absent, or not writable. +// +#define STATUS_CANNOT_LOAD_REGISTRY_FILE ((NTSTATUS)0xC0000218L) + +// +// MessageId: STATUS_DEBUG_ATTACH_FAILED +// +// MessageText: +// +// {Unexpected Failure in DebugActiveProcess} +// An unexpected failure occurred while processing a DebugActiveProcess API request. You may choose OK to terminate the process, or Cancel to ignore the error. +// +#define STATUS_DEBUG_ATTACH_FAILED ((NTSTATUS)0xC0000219L) + +// +// MessageId: STATUS_SYSTEM_PROCESS_TERMINATED +// +// MessageText: +// +// {Fatal System Error} +// The %hs system process terminated unexpectedly with a status of 0x%08x (0x%08x 0x%08x). +// The system has been shut down. +// +#define STATUS_SYSTEM_PROCESS_TERMINATED ((NTSTATUS)0xC000021AL) + +// +// MessageId: STATUS_DATA_NOT_ACCEPTED +// +// MessageText: +// +// {Data Not Accepted} +// The TDI client could not handle the data received during an indication. +// +#define STATUS_DATA_NOT_ACCEPTED ((NTSTATUS)0xC000021BL) + +// +// MessageId: STATUS_NO_BROWSER_SERVERS_FOUND +// +// MessageText: +// +// {Unable to Retrieve Browser Server List} +// The list of servers for this workgroup is not currently available. +// +#define STATUS_NO_BROWSER_SERVERS_FOUND ((NTSTATUS)0xC000021CL) + +// +// MessageId: STATUS_VDM_HARD_ERROR +// +// MessageText: +// +// NTVDM encountered a hard error. +// +#define STATUS_VDM_HARD_ERROR ((NTSTATUS)0xC000021DL) + +// +// MessageId: STATUS_DRIVER_CANCEL_TIMEOUT +// +// MessageText: +// +// {Cancel Timeout} +// The driver %hs failed to complete a cancelled I/O request in the allotted time. +// +#define STATUS_DRIVER_CANCEL_TIMEOUT ((NTSTATUS)0xC000021EL) + +// +// MessageId: STATUS_REPLY_MESSAGE_MISMATCH +// +// MessageText: +// +// {Reply Message Mismatch} +// An attempt was made to reply to an LPC message, but the thread specified by the client ID in the message was not waiting on that message. +// +#define STATUS_REPLY_MESSAGE_MISMATCH ((NTSTATUS)0xC000021FL) + +// +// MessageId: STATUS_MAPPED_ALIGNMENT +// +// MessageText: +// +// {Mapped View Alignment Incorrect} +// An attempt was made to map a view of a file, but either the specified base address or the offset into the file were not aligned on the proper allocation granularity. +// +#define STATUS_MAPPED_ALIGNMENT ((NTSTATUS)0xC0000220L) + +// +// MessageId: STATUS_IMAGE_CHECKSUM_MISMATCH +// +// MessageText: +// +// {Bad Image Checksum} +// The image %hs is possibly corrupt. The header checksum does not match the computed checksum. +// +#define STATUS_IMAGE_CHECKSUM_MISMATCH ((NTSTATUS)0xC0000221L) + +// +// MessageId: STATUS_LOST_WRITEBEHIND_DATA +// +// MessageText: +// +// {Delayed Write Failed} +// Windows was unable to save all the data for the file %hs. The data has been lost. This error may be caused by a failure of your computer hardware or network connection. Please try to save this file elsewhere. +// +#define STATUS_LOST_WRITEBEHIND_DATA ((NTSTATUS)0xC0000222L) + +// +// MessageId: STATUS_CLIENT_SERVER_PARAMETERS_INVALID +// +// MessageText: +// +// The parameter(s) passed to the server in the client/server shared memory window were invalid. Too much data may have been put in the shared memory window. +// +#define STATUS_CLIENT_SERVER_PARAMETERS_INVALID ((NTSTATUS)0xC0000223L) + +// +// MessageId: STATUS_PASSWORD_MUST_CHANGE +// +// MessageText: +// +// The user's password must be changed before logging on the first time. +// +#define STATUS_PASSWORD_MUST_CHANGE ((NTSTATUS)0xC0000224L) // ntsubauth + +// +// MessageId: STATUS_NOT_FOUND +// +// MessageText: +// +// The object was not found. +// +#define STATUS_NOT_FOUND ((NTSTATUS)0xC0000225L) + +// +// MessageId: STATUS_NOT_TINY_STREAM +// +// MessageText: +// +// The stream is not a tiny stream. +// +#define STATUS_NOT_TINY_STREAM ((NTSTATUS)0xC0000226L) + +// +// MessageId: STATUS_RECOVERY_FAILURE +// +// MessageText: +// +// A transaction recover failed. +// +#define STATUS_RECOVERY_FAILURE ((NTSTATUS)0xC0000227L) + +// +// MessageId: STATUS_STACK_OVERFLOW_READ +// +// MessageText: +// +// The request must be handled by the stack overflow code. +// +#define STATUS_STACK_OVERFLOW_READ ((NTSTATUS)0xC0000228L) + +// +// MessageId: STATUS_FAIL_CHECK +// +// MessageText: +// +// A consistency check failed. +// +#define STATUS_FAIL_CHECK ((NTSTATUS)0xC0000229L) + +// +// MessageId: STATUS_DUPLICATE_OBJECTID +// +// MessageText: +// +// The attempt to insert the ID in the index failed because the ID is already in the index. +// +#define STATUS_DUPLICATE_OBJECTID ((NTSTATUS)0xC000022AL) + +// +// MessageId: STATUS_OBJECTID_EXISTS +// +// MessageText: +// +// The attempt to set the object's ID failed because the object already has an ID. +// +#define STATUS_OBJECTID_EXISTS ((NTSTATUS)0xC000022BL) + +// +// MessageId: STATUS_CONVERT_TO_LARGE +// +// MessageText: +// +// Internal OFS status codes indicating how an allocation operation is handled. Either it is retried after the containing onode is moved or the extent stream is converted to a large stream. +// +#define STATUS_CONVERT_TO_LARGE ((NTSTATUS)0xC000022CL) + +// +// MessageId: STATUS_RETRY +// +// MessageText: +// +// The request needs to be retried. +// +#define STATUS_RETRY ((NTSTATUS)0xC000022DL) + +// +// MessageId: STATUS_FOUND_OUT_OF_SCOPE +// +// MessageText: +// +// The attempt to find the object found an object matching by ID on the volume but it is out of the scope of the handle used for the operation. +// +#define STATUS_FOUND_OUT_OF_SCOPE ((NTSTATUS)0xC000022EL) + +// +// MessageId: STATUS_ALLOCATE_BUCKET +// +// MessageText: +// +// The bucket array must be grown. Retry transaction after doing so. +// +#define STATUS_ALLOCATE_BUCKET ((NTSTATUS)0xC000022FL) + +// +// MessageId: STATUS_PROPSET_NOT_FOUND +// +// MessageText: +// +// The property set specified does not exist on the object. +// +#define STATUS_PROPSET_NOT_FOUND ((NTSTATUS)0xC0000230L) + +// +// MessageId: STATUS_MARSHALL_OVERFLOW +// +// MessageText: +// +// The user/kernel marshalling buffer has overflowed. +// +#define STATUS_MARSHALL_OVERFLOW ((NTSTATUS)0xC0000231L) + +// +// MessageId: STATUS_INVALID_VARIANT +// +// MessageText: +// +// The supplied variant structure contains invalid data. +// +#define STATUS_INVALID_VARIANT ((NTSTATUS)0xC0000232L) + +// +// MessageId: STATUS_DOMAIN_CONTROLLER_NOT_FOUND +// +// MessageText: +// +// Could not find a domain controller for this domain. +// +#define STATUS_DOMAIN_CONTROLLER_NOT_FOUND ((NTSTATUS)0xC0000233L) + +// +// MessageId: STATUS_ACCOUNT_LOCKED_OUT +// +// MessageText: +// +// The user account has been automatically locked because too many invalid logon attempts or password change attempts have been requested. +// +#define STATUS_ACCOUNT_LOCKED_OUT ((NTSTATUS)0xC0000234L) // ntsubauth + +// +// MessageId: STATUS_HANDLE_NOT_CLOSABLE +// +// MessageText: +// +// NtClose was called on a handle that was protected from close via NtSetInformationObject. +// +#define STATUS_HANDLE_NOT_CLOSABLE ((NTSTATUS)0xC0000235L) + +// +// MessageId: STATUS_CONNECTION_REFUSED +// +// MessageText: +// +// The transport connection attempt was refused by the remote system. +// +#define STATUS_CONNECTION_REFUSED ((NTSTATUS)0xC0000236L) + +// +// MessageId: STATUS_GRACEFUL_DISCONNECT +// +// MessageText: +// +// The transport connection was gracefully closed. +// +#define STATUS_GRACEFUL_DISCONNECT ((NTSTATUS)0xC0000237L) + +// +// MessageId: STATUS_ADDRESS_ALREADY_ASSOCIATED +// +// MessageText: +// +// The transport endpoint already has an address associated with it. +// +#define STATUS_ADDRESS_ALREADY_ASSOCIATED ((NTSTATUS)0xC0000238L) + +// +// MessageId: STATUS_ADDRESS_NOT_ASSOCIATED +// +// MessageText: +// +// An address has not yet been associated with the transport endpoint. +// +#define STATUS_ADDRESS_NOT_ASSOCIATED ((NTSTATUS)0xC0000239L) + +// +// MessageId: STATUS_CONNECTION_INVALID +// +// MessageText: +// +// An operation was attempted on a nonexistent transport connection. +// +#define STATUS_CONNECTION_INVALID ((NTSTATUS)0xC000023AL) + +// +// MessageId: STATUS_CONNECTION_ACTIVE +// +// MessageText: +// +// An invalid operation was attempted on an active transport connection. +// +#define STATUS_CONNECTION_ACTIVE ((NTSTATUS)0xC000023BL) + +// +// MessageId: STATUS_NETWORK_UNREACHABLE +// +// MessageText: +// +// The remote network is not reachable by the transport. +// +#define STATUS_NETWORK_UNREACHABLE ((NTSTATUS)0xC000023CL) + +// +// MessageId: STATUS_HOST_UNREACHABLE +// +// MessageText: +// +// The remote system is not reachable by the transport. +// +#define STATUS_HOST_UNREACHABLE ((NTSTATUS)0xC000023DL) + +// +// MessageId: STATUS_PROTOCOL_UNREACHABLE +// +// MessageText: +// +// The remote system does not support the transport protocol. +// +#define STATUS_PROTOCOL_UNREACHABLE ((NTSTATUS)0xC000023EL) + +// +// MessageId: STATUS_PORT_UNREACHABLE +// +// MessageText: +// +// No service is operating at the destination port of the transport on the remote system. +// +#define STATUS_PORT_UNREACHABLE ((NTSTATUS)0xC000023FL) + +// +// MessageId: STATUS_REQUEST_ABORTED +// +// MessageText: +// +// The request was aborted. +// +#define STATUS_REQUEST_ABORTED ((NTSTATUS)0xC0000240L) + +// +// MessageId: STATUS_CONNECTION_ABORTED +// +// MessageText: +// +// The transport connection was aborted by the local system. +// +#define STATUS_CONNECTION_ABORTED ((NTSTATUS)0xC0000241L) + +// +// MessageId: STATUS_BAD_COMPRESSION_BUFFER +// +// MessageText: +// +// The specified buffer contains ill-formed data. +// +#define STATUS_BAD_COMPRESSION_BUFFER ((NTSTATUS)0xC0000242L) + +// +// MessageId: STATUS_USER_MAPPED_FILE +// +// MessageText: +// +// The requested operation cannot be performed on a file with a user mapped section open. +// +#define STATUS_USER_MAPPED_FILE ((NTSTATUS)0xC0000243L) + +// +// MessageId: STATUS_AUDIT_FAILED +// +// MessageText: +// +// {Audit Failed} +// An attempt to generate a security audit failed. +// +#define STATUS_AUDIT_FAILED ((NTSTATUS)0xC0000244L) + +// +// MessageId: STATUS_TIMER_RESOLUTION_NOT_SET +// +// MessageText: +// +// The timer resolution was not previously set by the current process. +// +#define STATUS_TIMER_RESOLUTION_NOT_SET ((NTSTATUS)0xC0000245L) + +// +// MessageId: STATUS_CONNECTION_COUNT_LIMIT +// +// MessageText: +// +// A connection to the server could not be made because the limit on the number of concurrent connections for this account has been reached. +// +#define STATUS_CONNECTION_COUNT_LIMIT ((NTSTATUS)0xC0000246L) + +// +// MessageId: STATUS_LOGIN_TIME_RESTRICTION +// +// MessageText: +// +// Attempting to login during an unauthorized time of day for this account. +// +#define STATUS_LOGIN_TIME_RESTRICTION ((NTSTATUS)0xC0000247L) + +// +// MessageId: STATUS_LOGIN_WKSTA_RESTRICTION +// +// MessageText: +// +// The account is not authorized to login from this station. +// +#define STATUS_LOGIN_WKSTA_RESTRICTION ((NTSTATUS)0xC0000248L) + +// +// MessageId: STATUS_IMAGE_MP_UP_MISMATCH +// +// MessageText: +// +// {UP/MP Image Mismatch} +// The image %hs has been modified for use on a uniprocessor system, but you are running it on a multiprocessor machine. +// Please reinstall the image file. +// +#define STATUS_IMAGE_MP_UP_MISMATCH ((NTSTATUS)0xC0000249L) + +// +// MessageId: STATUS_INSUFFICIENT_LOGON_INFO +// +// MessageText: +// +// There is insufficient account information to log you on. +// +#define STATUS_INSUFFICIENT_LOGON_INFO ((NTSTATUS)0xC0000250L) + +// +// MessageId: STATUS_BAD_DLL_ENTRYPOINT +// +// MessageText: +// +// {Invalid DLL Entrypoint} +// The dynamic link library %hs is not written correctly. The stack pointer has been left in an inconsistent state. The entrypoint should be declared as WINAPI or STDCALL. Select YES to fail the DLL load. Select NO to continue execution. Selecting NO may cause the application to operate incorrectly. +// +#define STATUS_BAD_DLL_ENTRYPOINT ((NTSTATUS)0xC0000251L) + +// +// MessageId: STATUS_BAD_SERVICE_ENTRYPOINT +// +// MessageText: +// +// {Invalid Service Callback Entrypoint} +// The %hs service is not written correctly. The stack pointer has been left in an inconsistent state. The callback entrypoint should be declared as WINAPI or STDCALL. Selecting OK will cause the service to continue operation. However, the service process may operate incorrectly. +// +#define STATUS_BAD_SERVICE_ENTRYPOINT ((NTSTATUS)0xC0000252L) + +// +// MessageId: STATUS_LPC_REPLY_LOST +// +// MessageText: +// +// The server received the messages but did not send a reply. +// +#define STATUS_LPC_REPLY_LOST ((NTSTATUS)0xC0000253L) + +// +// MessageId: STATUS_IP_ADDRESS_CONFLICT1 +// +// MessageText: +// +// There is an IP address conflict with another system on the network +// +#define STATUS_IP_ADDRESS_CONFLICT1 ((NTSTATUS)0xC0000254L) + +// +// MessageId: STATUS_IP_ADDRESS_CONFLICT2 +// +// MessageText: +// +// There is an IP address conflict with another system on the network +// +#define STATUS_IP_ADDRESS_CONFLICT2 ((NTSTATUS)0xC0000255L) + +// +// MessageId: STATUS_REGISTRY_QUOTA_LIMIT +// +// MessageText: +// +// {Low On Registry Space} +// The system has reached the maximum size allowed for the system part of the registry. Additional storage requests will be ignored. +// +#define STATUS_REGISTRY_QUOTA_LIMIT ((NTSTATUS)0xC0000256L) + +// +// MessageId: STATUS_PATH_NOT_COVERED +// +// MessageText: +// +// The contacted server does not support the indicated part of the DFS namespace. +// +#define STATUS_PATH_NOT_COVERED ((NTSTATUS)0xC0000257L) + +// +// MessageId: STATUS_NO_CALLBACK_ACTIVE +// +// MessageText: +// +// A callback return system service cannot be executed when no callback is active. +// +#define STATUS_NO_CALLBACK_ACTIVE ((NTSTATUS)0xC0000258L) + +// +// MessageId: STATUS_LICENSE_QUOTA_EXCEEDED +// +// MessageText: +// +// The service being accessed is licensed for a particular number of connections. No more connections can be made to the service at this time because there are already as many connections as the service can accept. +// +#define STATUS_LICENSE_QUOTA_EXCEEDED ((NTSTATUS)0xC0000259L) + +// +// MessageId: STATUS_PWD_TOO_SHORT +// +// MessageText: +// +// The password provided is too short to meet the policy of your user account. Please choose a longer password. +// +#define STATUS_PWD_TOO_SHORT ((NTSTATUS)0xC000025AL) + +// +// MessageId: STATUS_PWD_TOO_RECENT +// +// MessageText: +// +// The policy of your user account does not allow you to change passwords too frequently. This is done to prevent users from changing back to a familiar, but potentially discovered, password. If you feel your password has been compromised then please contact your administrator immediately to have a new one assigned. +// +#define STATUS_PWD_TOO_RECENT ((NTSTATUS)0xC000025BL) + +// +// MessageId: STATUS_PWD_HISTORY_CONFLICT +// +// MessageText: +// +// You have attempted to change your password to one that you have used in the past. The policy of your user account does not allow this. Please select a password that you have not previously used. +// +#define STATUS_PWD_HISTORY_CONFLICT ((NTSTATUS)0xC000025CL) + +// +// MessageId: STATUS_PLUGPLAY_NO_DEVICE +// +// MessageText: +// +// You have attempted to load a legacy device driver while its device instance had been disabled. +// +#define STATUS_PLUGPLAY_NO_DEVICE ((NTSTATUS)0xC000025EL) + +// +// MessageId: STATUS_UNSUPPORTED_COMPRESSION +// +// MessageText: +// +// The specified compression format is unsupported. +// +#define STATUS_UNSUPPORTED_COMPRESSION ((NTSTATUS)0xC000025FL) + +// +// MessageId: STATUS_INVALID_HW_PROFILE +// +// MessageText: +// +// The specified hardware profile configuration is invalid. +// +#define STATUS_INVALID_HW_PROFILE ((NTSTATUS)0xC0000260L) + +// +// MessageId: STATUS_INVALID_PLUGPLAY_DEVICE_PATH +// +// MessageText: +// +// The specified Plug and Play registry device path is invalid. +// +#define STATUS_INVALID_PLUGPLAY_DEVICE_PATH ((NTSTATUS)0xC0000261L) + +// +// MessageId: STATUS_DRIVER_ORDINAL_NOT_FOUND +// +// MessageText: +// +// {Driver Entry Point Not Found} +// The %hs device driver could not locate the ordinal %ld in driver %hs. +// +#define STATUS_DRIVER_ORDINAL_NOT_FOUND ((NTSTATUS)0xC0000262L) + +// +// MessageId: STATUS_DRIVER_ENTRYPOINT_NOT_FOUND +// +// MessageText: +// +// {Driver Entry Point Not Found} +// The %hs device driver could not locate the entry point %hs in driver %hs. +// +#define STATUS_DRIVER_ENTRYPOINT_NOT_FOUND ((NTSTATUS)0xC0000263L) + +// +// MessageId: STATUS_RESOURCE_NOT_OWNED +// +// MessageText: +// +// {Application Error} +// The application attempted to release a resource it did not own. Click OK to terminate the application. +// +#define STATUS_RESOURCE_NOT_OWNED ((NTSTATUS)0xC0000264L) + +// +// MessageId: STATUS_TOO_MANY_LINKS +// +// MessageText: +// +// An attempt was made to create more links on a file than the file system supports. +// +#define STATUS_TOO_MANY_LINKS ((NTSTATUS)0xC0000265L) + +// +// MessageId: STATUS_QUOTA_LIST_INCONSISTENT +// +// MessageText: +// +// The specified quota list is internally inconsistent with its descriptor. +// +#define STATUS_QUOTA_LIST_INCONSISTENT ((NTSTATUS)0xC0000266L) + +// +// MessageId: STATUS_FILE_IS_OFFLINE +// +// MessageText: +// +// The specified file has been relocated to offline storage. +// +#define STATUS_FILE_IS_OFFLINE ((NTSTATUS)0xC0000267L) + +// +// MessageId: STATUS_EVALUATION_EXPIRATION +// +// MessageText: +// +// {Windows Evaluation Notification} +// The evaluation period for this installation of Windows has expired. This system will shutdown in 1 hour. To restore access to this installation of Windows, please upgrade this installation using a licensed distribution of this product. +// +#define STATUS_EVALUATION_EXPIRATION ((NTSTATUS)0xC0000268L) + +// +// MessageId: STATUS_ILLEGAL_DLL_RELOCATION +// +// MessageText: +// +// {Illegal System DLL Relocation} +// The system DLL %hs was relocated in memory. The application will not run properly. The relocation occurred because the DLL %hs occupied an address range reserved for Windows system DLLs. The vendor supplying the DLL should be contacted for a new DLL. +// +#define STATUS_ILLEGAL_DLL_RELOCATION ((NTSTATUS)0xC0000269L) + +// +// MessageId: STATUS_LICENSE_VIOLATION +// +// MessageText: +// +// {License Violation} +// The system has detected tampering with your registered product type. This is a violation of your software license. Tampering with product type is not permitted. +// +#define STATUS_LICENSE_VIOLATION ((NTSTATUS)0xC000026AL) + +// +// MessageId: STATUS_DLL_INIT_FAILED_LOGOFF +// +// MessageText: +// +// {DLL Initialization Failed} +// The application failed to initialize because the window station is shutting down. +// +#define STATUS_DLL_INIT_FAILED_LOGOFF ((NTSTATUS)0xC000026BL) + +// +// MessageId: STATUS_DRIVER_UNABLE_TO_LOAD +// +// MessageText: +// +// {Unable to Load Device Driver} +// %hs device driver could not be loaded. +// Error Status was 0x%x +// +#define STATUS_DRIVER_UNABLE_TO_LOAD ((NTSTATUS)0xC000026CL) + +// +// MessageId: STATUS_DFS_UNAVAILABLE +// +// MessageText: +// +// DFS is unavailable on the contacted server. +// +#define STATUS_DFS_UNAVAILABLE ((NTSTATUS)0xC000026DL) + +// +// MessageId: STATUS_VOLUME_DISMOUNTED +// +// MessageText: +// +// An operation was attempted to a volume after it was dismounted. +// +#define STATUS_VOLUME_DISMOUNTED ((NTSTATUS)0xC000026EL) + +// +// MessageId: STATUS_WX86_INTERNAL_ERROR +// +// MessageText: +// +// An internal error occurred in the Win32 x86 emulation subsystem. +// +#define STATUS_WX86_INTERNAL_ERROR ((NTSTATUS)0xC000026FL) + +// +// MessageId: STATUS_WX86_FLOAT_STACK_CHECK +// +// MessageText: +// +// Win32 x86 emulation subsystem Floating-point stack check. +// +#define STATUS_WX86_FLOAT_STACK_CHECK ((NTSTATUS)0xC0000270L) + +// +// MessageId: STATUS_VALIDATE_CONTINUE +// +// MessageText: +// +// The validation process needs to continue on to the next step. +// +#define STATUS_VALIDATE_CONTINUE ((NTSTATUS)0xC0000271L) + +// +// MessageId: STATUS_NO_MATCH +// +// MessageText: +// +// There was no match for the specified key in the index. +// +#define STATUS_NO_MATCH ((NTSTATUS)0xC0000272L) + +// +// MessageId: STATUS_NO_MORE_MATCHES +// +// MessageText: +// +// There are no more matches for the current index enumeration. +// +#define STATUS_NO_MORE_MATCHES ((NTSTATUS)0xC0000273L) + +// +// MessageId: STATUS_NOT_A_REPARSE_POINT +// +// MessageText: +// +// The NTFS file or directory is not a reparse point. +// +#define STATUS_NOT_A_REPARSE_POINT ((NTSTATUS)0xC0000275L) + +// +// MessageId: STATUS_IO_REPARSE_TAG_INVALID +// +// MessageText: +// +// The Windows I/O reparse tag passed for the NTFS reparse point is invalid. +// +#define STATUS_IO_REPARSE_TAG_INVALID ((NTSTATUS)0xC0000276L) + +// +// MessageId: STATUS_IO_REPARSE_TAG_MISMATCH +// +// MessageText: +// +// The Windows I/O reparse tag does not match the one present in the NTFS reparse point. +// +#define STATUS_IO_REPARSE_TAG_MISMATCH ((NTSTATUS)0xC0000277L) + +// +// MessageId: STATUS_IO_REPARSE_DATA_INVALID +// +// MessageText: +// +// The user data passed for the NTFS reparse point is invalid. +// +#define STATUS_IO_REPARSE_DATA_INVALID ((NTSTATUS)0xC0000278L) + +// +// MessageId: STATUS_IO_REPARSE_TAG_NOT_HANDLED +// +// MessageText: +// +// The layered file system driver for this IO tag did not handle it when needed. +// +#define STATUS_IO_REPARSE_TAG_NOT_HANDLED ((NTSTATUS)0xC0000279L) + +// +// MessageId: STATUS_REPARSE_POINT_NOT_RESOLVED +// +// MessageText: +// +// The NTFS symbolic link could not be resolved even though the initial file name is valid. +// +#define STATUS_REPARSE_POINT_NOT_RESOLVED ((NTSTATUS)0xC0000280L) + +// +// MessageId: STATUS_DIRECTORY_IS_A_REPARSE_POINT +// +// MessageText: +// +// The NTFS directory is a reparse point. +// +#define STATUS_DIRECTORY_IS_A_REPARSE_POINT ((NTSTATUS)0xC0000281L) + +// +// MessageId: STATUS_RANGE_LIST_CONFLICT +// +// MessageText: +// +// The range could not be added to the range list because of a conflict. +// +#define STATUS_RANGE_LIST_CONFLICT ((NTSTATUS)0xC0000282L) + +// +// MessageId: STATUS_SOURCE_ELEMENT_EMPTY +// +// MessageText: +// +// The specified medium changer source element contains no media. +// +#define STATUS_SOURCE_ELEMENT_EMPTY ((NTSTATUS)0xC0000283L) + +// +// MessageId: STATUS_DESTINATION_ELEMENT_FULL +// +// MessageText: +// +// The specified medium changer destination element already contains media. +// +#define STATUS_DESTINATION_ELEMENT_FULL ((NTSTATUS)0xC0000284L) + +// +// MessageId: STATUS_ILLEGAL_ELEMENT_ADDRESS +// +// MessageText: +// +// The specified medium changer element does not exist. +// +#define STATUS_ILLEGAL_ELEMENT_ADDRESS ((NTSTATUS)0xC0000285L) + +// +// MessageId: STATUS_MAGAZINE_NOT_PRESENT +// +// MessageText: +// +// The specified element is contained within a magazine that is no longer present. +// +#define STATUS_MAGAZINE_NOT_PRESENT ((NTSTATUS)0xC0000286L) + +// +// MessageId: STATUS_REINITIALIZATION_NEEDED +// +// MessageText: +// +// The device requires reinitialization due to hardware errors. +// +#define STATUS_REINITIALIZATION_NEEDED ((NTSTATUS)0xC0000287L) + +// +// MessageId: STATUS_DEVICE_REQUIRES_CLEANING +// +// MessageText: +// +// The device has indicated that cleaning is necessary. +// +#define STATUS_DEVICE_REQUIRES_CLEANING ((NTSTATUS)0x80000288L) + +// +// MessageId: STATUS_DEVICE_DOOR_OPEN +// +// MessageText: +// +// The device has indicated that it's door is open. Further operations require it closed and secured. +// +#define STATUS_DEVICE_DOOR_OPEN ((NTSTATUS)0x80000289L) + +// +// MessageId: STATUS_ENCRYPTION_FAILED +// +// MessageText: +// +// The file encryption attempt failed. +// +#define STATUS_ENCRYPTION_FAILED ((NTSTATUS)0xC000028AL) + +// +// MessageId: STATUS_DECRYPTION_FAILED +// +// MessageText: +// +// The file decryption attempt failed. +// +#define STATUS_DECRYPTION_FAILED ((NTSTATUS)0xC000028BL) + +// +// MessageId: STATUS_RANGE_NOT_FOUND +// +// MessageText: +// +// The specified range could not be found in the range list. +// +#define STATUS_RANGE_NOT_FOUND ((NTSTATUS)0xC000028CL) + +// +// MessageId: STATUS_NO_RECOVERY_POLICY +// +// MessageText: +// +// There is no encryption recovery policy configured for this system. +// +#define STATUS_NO_RECOVERY_POLICY ((NTSTATUS)0xC000028DL) + +// +// MessageId: STATUS_NO_EFS +// +// MessageText: +// +// The required encryption driver is not loaded for this system. +// +#define STATUS_NO_EFS ((NTSTATUS)0xC000028EL) + +// +// MessageId: STATUS_WRONG_EFS +// +// MessageText: +// +// The file was encrypted with a different encryption driver than is currently loaded. +// +#define STATUS_WRONG_EFS ((NTSTATUS)0xC000028FL) + +// +// MessageId: STATUS_NO_USER_KEYS +// +// MessageText: +// +// There are no EFS keys defined for the user. +// +#define STATUS_NO_USER_KEYS ((NTSTATUS)0xC0000290L) + +// +// MessageId: STATUS_FILE_NOT_ENCRYPTED +// +// MessageText: +// +// The specified file is not encrypted. +// +#define STATUS_FILE_NOT_ENCRYPTED ((NTSTATUS)0xC0000291L) + +// +// MessageId: STATUS_NOT_EXPORT_FORMAT +// +// MessageText: +// +// The specified file is not in the defined EFS export format. +// +#define STATUS_NOT_EXPORT_FORMAT ((NTSTATUS)0xC0000292L) + +// +// MessageId: STATUS_FILE_ENCRYPTED +// +// MessageText: +// +// The specified file is encrypted and the user does not have the ability to decrypt it. +// +#define STATUS_FILE_ENCRYPTED ((NTSTATUS)0xC0000293L) + +// +// MessageId: STATUS_WAKE_SYSTEM +// +// MessageText: +// +// The system has awoken +// +#define STATUS_WAKE_SYSTEM ((NTSTATUS)0x40000294L) + +// +// MessageId: STATUS_WMI_GUID_NOT_FOUND +// +// MessageText: +// +// The guid passed was not recognized as valid by a WMI data provider. +// +#define STATUS_WMI_GUID_NOT_FOUND ((NTSTATUS)0xC0000295L) + +// +// MessageId: STATUS_WMI_INSTANCE_NOT_FOUND +// +// MessageText: +// +// The instance name passed was not recognized as valid by a WMI data provider. +// +#define STATUS_WMI_INSTANCE_NOT_FOUND ((NTSTATUS)0xC0000296L) + +// +// MessageId: STATUS_WMI_ITEMID_NOT_FOUND +// +// MessageText: +// +// The data item id passed was not recognized as valid by a WMI data provider. +// +#define STATUS_WMI_ITEMID_NOT_FOUND ((NTSTATUS)0xC0000297L) + +// +// MessageId: STATUS_WMI_TRY_AGAIN +// +// MessageText: +// +// The WMI request could not be completed and should be retried. +// +#define STATUS_WMI_TRY_AGAIN ((NTSTATUS)0xC0000298L) + +// +// MessageId: STATUS_SHARED_POLICY +// +// MessageText: +// +// The policy object is shared and can only be modified at the root +// +#define STATUS_SHARED_POLICY ((NTSTATUS)0xC0000299L) + +// +// MessageId: STATUS_POLICY_OBJECT_NOT_FOUND +// +// MessageText: +// +// The policy object does not exist when it should +// +#define STATUS_POLICY_OBJECT_NOT_FOUND ((NTSTATUS)0xC000029AL) + +// +// MessageId: STATUS_POLICY_ONLY_IN_DS +// +// MessageText: +// +// The requested policy information only lives in the Ds +// +#define STATUS_POLICY_ONLY_IN_DS ((NTSTATUS)0xC000029BL) + +// +// MessageId: STATUS_VOLUME_NOT_UPGRADED +// +// MessageText: +// +// The volume must be upgraded to enable this feature +// +#define STATUS_VOLUME_NOT_UPGRADED ((NTSTATUS)0xC000029CL) + +// +// MessageId: STATUS_REMOTE_STORAGE_NOT_ACTIVE +// +// MessageText: +// +// The remote storage service is not operational at this time. +// +#define STATUS_REMOTE_STORAGE_NOT_ACTIVE ((NTSTATUS)0xC000029DL) + +// +// MessageId: STATUS_REMOTE_STORAGE_MEDIA_ERROR +// +// MessageText: +// +// The remote storage service encountered a media error. +// +#define STATUS_REMOTE_STORAGE_MEDIA_ERROR ((NTSTATUS)0xC000029EL) + +// +// MessageId: STATUS_NO_TRACKING_SERVICE +// +// MessageText: +// +// The tracking (workstation) service is not running. +// +#define STATUS_NO_TRACKING_SERVICE ((NTSTATUS)0xC000029FL) + +// +// MessageId: STATUS_SERVER_SID_MISMATCH +// +// MessageText: +// +// The server process is running under a SID different than that required by client. +// +#define STATUS_SERVER_SID_MISMATCH ((NTSTATUS)0xC00002A0L) + +// +// Directory Service specific Errors +// +// +// MessageId: STATUS_DS_NO_ATTRIBUTE_OR_VALUE +// +// MessageText: +// +// The specified directory service attribute or value does not exist. +// +#define STATUS_DS_NO_ATTRIBUTE_OR_VALUE ((NTSTATUS)0xC00002A1L) + +// +// MessageId: STATUS_DS_INVALID_ATTRIBUTE_SYNTAX +// +// MessageText: +// +// The attribute syntax specified to the directory service is invalid. +// +#define STATUS_DS_INVALID_ATTRIBUTE_SYNTAX ((NTSTATUS)0xC00002A2L) + +// +// MessageId: STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED +// +// MessageText: +// +// The attribute type specified to the directory service is not defined. +// +#define STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED ((NTSTATUS)0xC00002A3L) + +// +// MessageId: STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS +// +// MessageText: +// +// The specified directory service attribute or value already exists. +// +#define STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS ((NTSTATUS)0xC00002A4L) + +// +// MessageId: STATUS_DS_BUSY +// +// MessageText: +// +// The directory service is busy. +// +#define STATUS_DS_BUSY ((NTSTATUS)0xC00002A5L) + +// +// MessageId: STATUS_DS_UNAVAILABLE +// +// MessageText: +// +// The directory service is not available. +// +#define STATUS_DS_UNAVAILABLE ((NTSTATUS)0xC00002A6L) + +// +// MessageId: STATUS_DS_NO_RIDS_ALLOCATED +// +// MessageText: +// +// The directory service was unable to allocate a relative identifier. +// +#define STATUS_DS_NO_RIDS_ALLOCATED ((NTSTATUS)0xC00002A7L) + +// +// MessageId: STATUS_DS_NO_MORE_RIDS +// +// MessageText: +// +// The directory service has exhausted the pool of relative identifiers. +// +#define STATUS_DS_NO_MORE_RIDS ((NTSTATUS)0xC00002A8L) + +// +// MessageId: STATUS_DS_INCORRECT_ROLE_OWNER +// +// MessageText: +// +// The requested operation could not be performed because the directory service is not the master for that type of operation. +// +#define STATUS_DS_INCORRECT_ROLE_OWNER ((NTSTATUS)0xC00002A9L) + +// +// MessageId: STATUS_DS_RIDMGR_INIT_ERROR +// +// MessageText: +// +// The directory service was unable to initialize the subsystem that allocates relative identifiers. +// +#define STATUS_DS_RIDMGR_INIT_ERROR ((NTSTATUS)0xC00002AAL) + +// +// MessageId: STATUS_DS_OBJ_CLASS_VIOLATION +// +// MessageText: +// +// The requested operation did not satisfy one or more constraints associated with the class of the object. +// +#define STATUS_DS_OBJ_CLASS_VIOLATION ((NTSTATUS)0xC00002ABL) + +// +// MessageId: STATUS_DS_CANT_ON_NON_LEAF +// +// MessageText: +// +// The directory service can perform the requested operation only on a leaf object. +// +#define STATUS_DS_CANT_ON_NON_LEAF ((NTSTATUS)0xC00002ACL) + +// +// MessageId: STATUS_DS_CANT_ON_RDN +// +// MessageText: +// +// The directory service cannot perform the requested operation on the Relatively Defined Name (RDN) attribute of an object. +// +#define STATUS_DS_CANT_ON_RDN ((NTSTATUS)0xC00002ADL) + +// +// MessageId: STATUS_DS_CANT_MOD_OBJ_CLASS +// +// MessageText: +// +// The directory service detected an attempt to modify the object class of an object. +// +#define STATUS_DS_CANT_MOD_OBJ_CLASS ((NTSTATUS)0xC00002AEL) + +// +// MessageId: STATUS_DS_CROSS_DOM_MOVE_FAILED +// +// MessageText: +// +// An error occurred while performing a cross domain move operation. +// +#define STATUS_DS_CROSS_DOM_MOVE_FAILED ((NTSTATUS)0xC00002AFL) + +// +// MessageId: STATUS_DS_GC_NOT_AVAILABLE +// +// MessageText: +// +// Unable to Contact the Global Catalog Server. +// +#define STATUS_DS_GC_NOT_AVAILABLE ((NTSTATUS)0xC00002B0L) + +// +// MessageId: STATUS_DIRECTORY_SERVICE_REQUIRED +// +// MessageText: +// +// The requested operation requires a directory service, and none was available. +// +#define STATUS_DIRECTORY_SERVICE_REQUIRED ((NTSTATUS)0xC00002B1L) + +// +// MessageId: STATUS_REPARSE_ATTRIBUTE_CONFLICT +// +// MessageText: +// +// The reparse attribute cannot be set as it is incompatible with an existing attribute. +// +#define STATUS_REPARSE_ATTRIBUTE_CONFLICT ((NTSTATUS)0xC00002B2L) + +// +// MessageId: STATUS_CANT_ENABLE_DENY_ONLY +// +// MessageText: +// +// A group marked use for deny only cannot be enabled. +// +#define STATUS_CANT_ENABLE_DENY_ONLY ((NTSTATUS)0xC00002B3L) + +// +// MessageId: STATUS_FLOAT_MULTIPLE_FAULTS +// +// MessageText: +// +// {EXCEPTION} +// Multiple floating point faults. +// +#define STATUS_FLOAT_MULTIPLE_FAULTS ((NTSTATUS)0xC00002B4L) // winnt + +// +// MessageId: STATUS_FLOAT_MULTIPLE_TRAPS +// +// MessageText: +// +// {EXCEPTION} +// Multiple floating point traps. +// +#define STATUS_FLOAT_MULTIPLE_TRAPS ((NTSTATUS)0xC00002B5L) // winnt + +// +// MessageId: STATUS_DEVICE_REMOVED +// +// MessageText: +// +// The device has been removed. +// +#define STATUS_DEVICE_REMOVED ((NTSTATUS)0xC00002B6L) + +// +// MessageId: STATUS_JOURNAL_DELETE_IN_PROGRESS +// +// MessageText: +// +// The volume change journal is being deleted. +// +#define STATUS_JOURNAL_DELETE_IN_PROGRESS ((NTSTATUS)0xC00002B7L) + +// +// MessageId: STATUS_JOURNAL_NOT_ACTIVE +// +// MessageText: +// +// The volume change journal is not active. +// +#define STATUS_JOURNAL_NOT_ACTIVE ((NTSTATUS)0xC00002B8L) + +// +// MessageId: STATUS_NOINTERFACE +// +// MessageText: +// +// The requested interface is not supported. +// +#define STATUS_NOINTERFACE ((NTSTATUS)0xC00002B9L) + +// +// MessageId: STATUS_DS_ADMIN_LIMIT_EXCEEDED +// +// MessageText: +// +// A directory service resource limit has been exceeded. +// +#define STATUS_DS_ADMIN_LIMIT_EXCEEDED ((NTSTATUS)0xC00002C1L) + +// +// MessageId: STATUS_DRIVER_FAILED_SLEEP +// +// MessageText: +// +// {System Standby Failed} +// The driver %hs does not support standby mode. Updating this driver may allow the system to go to standby mode. +// +#define STATUS_DRIVER_FAILED_SLEEP ((NTSTATUS)0xC00002C2L) + +// +// MessageId: STATUS_MUTUAL_AUTHENTICATION_FAILED +// +// MessageText: +// +// Mutual Authentication failed. The server's password is out of date at the domain controller. +// +#define STATUS_MUTUAL_AUTHENTICATION_FAILED ((NTSTATUS)0xC00002C3L) + +// +// MessageId: STATUS_CORRUPT_SYSTEM_FILE +// +// MessageText: +// +// The system file %1 has become corrupt and has been replaced. +// +#define STATUS_CORRUPT_SYSTEM_FILE ((NTSTATUS)0xC00002C4L) + +// +// MessageId: STATUS_DATATYPE_MISALIGNMENT_ERROR +// +// MessageText: +// +// {EXCEPTION} +// Alignment Error +// A datatype misalignment error was detected in a load or store instruction. +// +#define STATUS_DATATYPE_MISALIGNMENT_ERROR ((NTSTATUS)0xC00002C5L) + +// +// MessageId: STATUS_WMI_READ_ONLY +// +// MessageText: +// +// The WMI data item or data block is read only. +// +#define STATUS_WMI_READ_ONLY ((NTSTATUS)0xC00002C6L) + +// +// MessageId: STATUS_WMI_SET_FAILURE +// +// MessageText: +// +// The WMI data item or data block could not be changed. +// +#define STATUS_WMI_SET_FAILURE ((NTSTATUS)0xC00002C7L) + +// +// MessageId: STATUS_COMMITMENT_MINIMUM +// +// MessageText: +// +// {Virtual Memory Minimum Too Low} +// Your system is low on virtual memory. Windows is increasing the size of your virtual memory paging file. During this process, memory requests for some applications may be denied. For more information, see Help. +// +#define STATUS_COMMITMENT_MINIMUM ((NTSTATUS)0xC00002C8L) + +// +// MessageId: STATUS_REG_NAT_CONSUMPTION +// +// MessageText: +// +// {EXCEPTION} +// Register NaT consumption faults. +// A NaT value is consumed on a non speculative instruction. +// +#define STATUS_REG_NAT_CONSUMPTION ((NTSTATUS)0xC00002C9L) // winnt + +// +// MessageId: STATUS_TRANSPORT_FULL +// +// MessageText: +// +// The medium changer's transport element contains media, which is causing the operation to fail. +// +#define STATUS_TRANSPORT_FULL ((NTSTATUS)0xC00002CAL) + +// +// MessageId: STATUS_DS_SAM_INIT_FAILURE +// +// MessageText: +// +// Security Accounts Manager initialization failed because of the following error: +// %hs +// Error Status: 0x%x. +// Please shutdown this system and reboot into Directory Services Restore Mode, check the event log for more detailed information. +// +#define STATUS_DS_SAM_INIT_FAILURE ((NTSTATUS)0xC00002CBL) + +// +// MessageId: STATUS_ONLY_IF_CONNECTED +// +// MessageText: +// +// This operation is supported only when you are connected to the server. +// +#define STATUS_ONLY_IF_CONNECTED ((NTSTATUS)0xC00002CCL) + +// +// MessageId: STATUS_DS_SENSITIVE_GROUP_VIOLATION +// +// MessageText: +// +// Only an administrator can modify the membership list of an administrative group. +// +#define STATUS_DS_SENSITIVE_GROUP_VIOLATION ((NTSTATUS)0xC00002CDL) + +// +// MessageId: STATUS_PNP_RESTART_ENUMERATION +// +// MessageText: +// +// A device was removed so enumeration must be restarted. +// +#define STATUS_PNP_RESTART_ENUMERATION ((NTSTATUS)0xC00002CEL) + +// +// MessageId: STATUS_JOURNAL_ENTRY_DELETED +// +// MessageText: +// +// The journal entry has been deleted from the journal. +// +#define STATUS_JOURNAL_ENTRY_DELETED ((NTSTATUS)0xC00002CFL) + +// +// MessageId: STATUS_DS_CANT_MOD_PRIMARYGROUPID +// +// MessageText: +// +// Cannot change the primary group ID of a domain controller account. +// +#define STATUS_DS_CANT_MOD_PRIMARYGROUPID ((NTSTATUS)0xC00002D0L) + +// +// MessageId: STATUS_SYSTEM_IMAGE_BAD_SIGNATURE +// +// MessageText: +// +// {Fatal System Error} +// The system image %s is not properly signed. The file has been replaced with the signed file. The system has been shut down. +// +#define STATUS_SYSTEM_IMAGE_BAD_SIGNATURE ((NTSTATUS)0xC00002D1L) + +// +// MessageId: STATUS_PNP_REBOOT_REQUIRED +// +// MessageText: +// +// Device will not start without a reboot. +// +#define STATUS_PNP_REBOOT_REQUIRED ((NTSTATUS)0xC00002D2L) + +// +// MessageId: STATUS_POWER_STATE_INVALID +// +// MessageText: +// +// Current device power state cannot support this request. +// +#define STATUS_POWER_STATE_INVALID ((NTSTATUS)0xC00002D3L) + +// +// MessageId: STATUS_DS_INVALID_GROUP_TYPE +// +// MessageText: +// +// The specified group type is invalid. +// +#define STATUS_DS_INVALID_GROUP_TYPE ((NTSTATUS)0xC00002D4L) + +// +// MessageId: STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN +// +// MessageText: +// +// In mixed domain no nesting of global group if group is security enabled. +// +#define STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN ((NTSTATUS)0xC00002D5L) + +// +// MessageId: STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN +// +// MessageText: +// +// In mixed domain, cannot nest local groups with other local groups, if the group is security enabled. +// +#define STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN ((NTSTATUS)0xC00002D6L) + +// +// MessageId: STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER +// +// MessageText: +// +// A global group cannot have a local group as a member. +// +#define STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER ((NTSTATUS)0xC00002D7L) + +// +// MessageId: STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER +// +// MessageText: +// +// A global group cannot have a universal group as a member. +// +#define STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER ((NTSTATUS)0xC00002D8L) + +// +// MessageId: STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER +// +// MessageText: +// +// A universal group cannot have a local group as a member. +// +#define STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER ((NTSTATUS)0xC00002D9L) + +// +// MessageId: STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER +// +// MessageText: +// +// A global group cannot have a cross domain member. +// +#define STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER ((NTSTATUS)0xC00002DAL) + +// +// MessageId: STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER +// +// MessageText: +// +// A local group cannot have another cross domain local group as a member. +// +#define STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER ((NTSTATUS)0xC00002DBL) + +// +// MessageId: STATUS_DS_HAVE_PRIMARY_MEMBERS +// +// MessageText: +// +// Cannot change to security disabled group because of having primary members in this group. +// +#define STATUS_DS_HAVE_PRIMARY_MEMBERS ((NTSTATUS)0xC00002DCL) + +// +// MessageId: STATUS_WMI_NOT_SUPPORTED +// +// MessageText: +// +// The WMI operation is not supported by the data block or method. +// +#define STATUS_WMI_NOT_SUPPORTED ((NTSTATUS)0xC00002DDL) + +// +// MessageId: STATUS_INSUFFICIENT_POWER +// +// MessageText: +// +// There is not enough power to complete the requested operation. +// +#define STATUS_INSUFFICIENT_POWER ((NTSTATUS)0xC00002DEL) + +// +// MessageId: STATUS_SAM_NEED_BOOTKEY_PASSWORD +// +// MessageText: +// +// Security Account Manager needs to get the boot password. +// +#define STATUS_SAM_NEED_BOOTKEY_PASSWORD ((NTSTATUS)0xC00002DFL) + +// +// MessageId: STATUS_SAM_NEED_BOOTKEY_FLOPPY +// +// MessageText: +// +// Security Account Manager needs to get the boot key from floppy disk. +// +#define STATUS_SAM_NEED_BOOTKEY_FLOPPY ((NTSTATUS)0xC00002E0L) + +// +// MessageId: STATUS_DS_CANT_START +// +// MessageText: +// +// Directory Service cannot start. +// +#define STATUS_DS_CANT_START ((NTSTATUS)0xC00002E1L) + +// +// MessageId: STATUS_DS_INIT_FAILURE +// +// MessageText: +// +// Directory Services could not start because of the following error: +// %hs +// Error Status: 0x%x. +// Please shutdown this system and reboot into Directory Services Restore Mode, check the event log for more detailed information. +// +#define STATUS_DS_INIT_FAILURE ((NTSTATUS)0xC00002E2L) + +// +// MessageId: STATUS_SAM_INIT_FAILURE +// +// MessageText: +// +// Security Accounts Manager initialization failed because of the following error: +// %hs +// Error Status: 0x%x. +// Please click OK to shutdown this system and reboot into Safe Mode, check the event log for more detailed information. +// +#define STATUS_SAM_INIT_FAILURE ((NTSTATUS)0xC00002E3L) + +// +// MessageId: STATUS_DS_GC_REQUIRED +// +// MessageText: +// +// The requested operation can be performed only on a global catalog server. +// +#define STATUS_DS_GC_REQUIRED ((NTSTATUS)0xC00002E4L) + +// +// MessageId: STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY +// +// MessageText: +// +// A local group can only be a member of other local groups in the same domain. +// +#define STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY ((NTSTATUS)0xC00002E5L) + +// +// MessageId: STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS +// +// MessageText: +// +// Foreign security principals cannot be members of universal groups. +// +#define STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS ((NTSTATUS)0xC00002E6L) + +// +// MessageId: STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED +// +// MessageText: +// +// Your computer could not be joined to the domain. You have exceeded the maximum number of computer accounts you are allowed to create in this domain. Contact your system administrator to have this limit reset or increased. +// +#define STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED ((NTSTATUS)0xC00002E7L) + +// +// MessageId: STATUS_MULTIPLE_FAULT_VIOLATION +// +// MessageText: +// +// STATUS_MULTIPLE_FAULT_VIOLATION +// +#define STATUS_MULTIPLE_FAULT_VIOLATION ((NTSTATUS)0xC00002E8L) + +// +// MessageId: STATUS_CURRENT_DOMAIN_NOT_ALLOWED +// +// MessageText: +// +// This operation cannot be performed on the current domain. +// +#define STATUS_CURRENT_DOMAIN_NOT_ALLOWED ((NTSTATUS)0xC00002E9L) + +// +// MessageId: STATUS_CANNOT_MAKE +// +// MessageText: +// +// The directory or file cannot be created. +// +#define STATUS_CANNOT_MAKE ((NTSTATUS)0xC00002EAL) + +// +// MessageId: STATUS_SYSTEM_SHUTDOWN +// +// MessageText: +// +// The system is in the process of shutting down. +// +#define STATUS_SYSTEM_SHUTDOWN ((NTSTATUS)0xC00002EBL) + +// +// MessageId: STATUS_DS_INIT_FAILURE_CONSOLE +// +// MessageText: +// +// Directory Services could not start because of the following error: +// %hs +// Error Status: 0x%x. +// Please click OK to shutdown the system. You can use the recovery console to diagnose the system further. +// +#define STATUS_DS_INIT_FAILURE_CONSOLE ((NTSTATUS)0xC00002ECL) + +// +// MessageId: STATUS_DS_SAM_INIT_FAILURE_CONSOLE +// +// MessageText: +// +// Security Accounts Manager initialization failed because of the following error: +// %hs +// Error Status: 0x%x. +// Please click OK to shutdown the system. You can use the recovery console to diagnose the system further. +// +#define STATUS_DS_SAM_INIT_FAILURE_CONSOLE ((NTSTATUS)0xC00002EDL) + +// +// MessageId: STATUS_UNFINISHED_CONTEXT_DELETED +// +// MessageText: +// +// A security context was deleted before the context was completed. This is considered a logon failure. +// +#define STATUS_UNFINISHED_CONTEXT_DELETED ((NTSTATUS)0xC00002EEL) + +// +// MessageId: STATUS_NO_TGT_REPLY +// +// MessageText: +// +// The client is trying to negotiate a context and the server requires user-to-user but didn't send a TGT reply. +// +#define STATUS_NO_TGT_REPLY ((NTSTATUS)0xC00002EFL) + +// +// MessageId: STATUS_OBJECTID_NOT_FOUND +// +// MessageText: +// +// An object ID was not found in the file. +// +#define STATUS_OBJECTID_NOT_FOUND ((NTSTATUS)0xC00002F0L) + +// +// MessageId: STATUS_NO_IP_ADDRESSES +// +// MessageText: +// +// Unable to accomplish the requested task because the local machine does not have any IP addresses. +// +#define STATUS_NO_IP_ADDRESSES ((NTSTATUS)0xC00002F1L) + +// +// MessageId: STATUS_WRONG_CREDENTIAL_HANDLE +// +// MessageText: +// +// The supplied credential handle does not match the credential associated with the security context. +// +#define STATUS_WRONG_CREDENTIAL_HANDLE ((NTSTATUS)0xC00002F2L) + +// +// MessageId: STATUS_CRYPTO_SYSTEM_INVALID +// +// MessageText: +// +// The crypto system or checksum function is invalid because a required function is unavailable. +// +#define STATUS_CRYPTO_SYSTEM_INVALID ((NTSTATUS)0xC00002F3L) + +// +// MessageId: STATUS_MAX_REFERRALS_EXCEEDED +// +// MessageText: +// +// The number of maximum ticket referrals has been exceeded. +// +#define STATUS_MAX_REFERRALS_EXCEEDED ((NTSTATUS)0xC00002F4L) + +// +// MessageId: STATUS_MUST_BE_KDC +// +// MessageText: +// +// The local machine must be a Kerberos KDC (domain controller) and it is not. +// +#define STATUS_MUST_BE_KDC ((NTSTATUS)0xC00002F5L) + +// +// MessageId: STATUS_STRONG_CRYPTO_NOT_SUPPORTED +// +// MessageText: +// +// The other end of the security negotiation is requires strong crypto but it is not supported on the local machine. +// +#define STATUS_STRONG_CRYPTO_NOT_SUPPORTED ((NTSTATUS)0xC00002F6L) + +// +// MessageId: STATUS_TOO_MANY_PRINCIPALS +// +// MessageText: +// +// The KDC reply contained more than one principal name. +// +#define STATUS_TOO_MANY_PRINCIPALS ((NTSTATUS)0xC00002F7L) + +// +// MessageId: STATUS_NO_PA_DATA +// +// MessageText: +// +// Expected to find PA data for a hint of what etype to use, but it was not found. +// +#define STATUS_NO_PA_DATA ((NTSTATUS)0xC00002F8L) + +// +// MessageId: STATUS_PKINIT_NAME_MISMATCH +// +// MessageText: +// +// The client certificate does not contain a valid UPN, or does not match the client name in the logon request. Please contact your administrator. +// +#define STATUS_PKINIT_NAME_MISMATCH ((NTSTATUS)0xC00002F9L) + +// +// MessageId: STATUS_SMARTCARD_LOGON_REQUIRED +// +// MessageText: +// +// Smartcard logon is required and was not used. +// +#define STATUS_SMARTCARD_LOGON_REQUIRED ((NTSTATUS)0xC00002FAL) + +// +// MessageId: STATUS_KDC_INVALID_REQUEST +// +// MessageText: +// +// An invalid request was sent to the KDC. +// +#define STATUS_KDC_INVALID_REQUEST ((NTSTATUS)0xC00002FBL) + +// +// MessageId: STATUS_KDC_UNABLE_TO_REFER +// +// MessageText: +// +// The KDC was unable to generate a referral for the service requested. +// +#define STATUS_KDC_UNABLE_TO_REFER ((NTSTATUS)0xC00002FCL) + +// +// MessageId: STATUS_KDC_UNKNOWN_ETYPE +// +// MessageText: +// +// The encryption type requested is not supported by the KDC. +// +#define STATUS_KDC_UNKNOWN_ETYPE ((NTSTATUS)0xC00002FDL) + +// +// MessageId: STATUS_SHUTDOWN_IN_PROGRESS +// +// MessageText: +// +// A system shutdown is in progress. +// +#define STATUS_SHUTDOWN_IN_PROGRESS ((NTSTATUS)0xC00002FEL) + +// +// MessageId: STATUS_SERVER_SHUTDOWN_IN_PROGRESS +// +// MessageText: +// +// The server machine is shutting down. +// +#define STATUS_SERVER_SHUTDOWN_IN_PROGRESS ((NTSTATUS)0xC00002FFL) + +// +// MessageId: STATUS_NOT_SUPPORTED_ON_SBS +// +// MessageText: +// +// This operation is not supported on a computer running Windows Server 2003 for Small Business Server +// +#define STATUS_NOT_SUPPORTED_ON_SBS ((NTSTATUS)0xC0000300L) + +// +// MessageId: STATUS_WMI_GUID_DISCONNECTED +// +// MessageText: +// +// The WMI GUID is no longer available +// +#define STATUS_WMI_GUID_DISCONNECTED ((NTSTATUS)0xC0000301L) + +// +// MessageId: STATUS_WMI_ALREADY_DISABLED +// +// MessageText: +// +// Collection or events for the WMI GUID is already disabled. +// +#define STATUS_WMI_ALREADY_DISABLED ((NTSTATUS)0xC0000302L) + +// +// MessageId: STATUS_WMI_ALREADY_ENABLED +// +// MessageText: +// +// Collection or events for the WMI GUID is already enabled. +// +#define STATUS_WMI_ALREADY_ENABLED ((NTSTATUS)0xC0000303L) + +// +// MessageId: STATUS_MFT_TOO_FRAGMENTED +// +// MessageText: +// +// The Master File Table on the volume is too fragmented to complete this operation. +// +#define STATUS_MFT_TOO_FRAGMENTED ((NTSTATUS)0xC0000304L) + +// +// MessageId: STATUS_COPY_PROTECTION_FAILURE +// +// MessageText: +// +// Copy protection failure. +// +#define STATUS_COPY_PROTECTION_FAILURE ((NTSTATUS)0xC0000305L) + +// +// MessageId: STATUS_CSS_AUTHENTICATION_FAILURE +// +// MessageText: +// +// Copy protection error - DVD CSS Authentication failed. +// +#define STATUS_CSS_AUTHENTICATION_FAILURE ((NTSTATUS)0xC0000306L) + +// +// MessageId: STATUS_CSS_KEY_NOT_PRESENT +// +// MessageText: +// +// Copy protection error - The given sector does not contain a valid key. +// +#define STATUS_CSS_KEY_NOT_PRESENT ((NTSTATUS)0xC0000307L) + +// +// MessageId: STATUS_CSS_KEY_NOT_ESTABLISHED +// +// MessageText: +// +// Copy protection error - DVD session key not established. +// +#define STATUS_CSS_KEY_NOT_ESTABLISHED ((NTSTATUS)0xC0000308L) + +// +// MessageId: STATUS_CSS_SCRAMBLED_SECTOR +// +// MessageText: +// +// Copy protection error - The read failed because the sector is encrypted. +// +#define STATUS_CSS_SCRAMBLED_SECTOR ((NTSTATUS)0xC0000309L) + +// +// MessageId: STATUS_CSS_REGION_MISMATCH +// +// MessageText: +// +// Copy protection error - The given DVD's region does not correspond to the +// region setting of the drive. +// +#define STATUS_CSS_REGION_MISMATCH ((NTSTATUS)0xC000030AL) + +// +// MessageId: STATUS_CSS_RESETS_EXHAUSTED +// +// MessageText: +// +// Copy protection error - The drive's region setting may be permanent. +// +#define STATUS_CSS_RESETS_EXHAUSTED ((NTSTATUS)0xC000030BL) + +/*++ + + MessageId's 0x030c - 0x031f (inclusive) are reserved for future **STORAGE** + copy protection errors. + +--*/ +// +// MessageId: STATUS_PKINIT_FAILURE +// +// MessageText: +// +// The Kerberos protocol encountered an error while validating the KDC certificate during smartcard Logon. There is more information in the system event log. +// +#define STATUS_PKINIT_FAILURE ((NTSTATUS)0xC0000320L) + +// +// MessageId: STATUS_SMARTCARD_SUBSYSTEM_FAILURE +// +// MessageText: +// +// The Kerberos protocol encountered an error while attempting to utilize the smartcard subsystem. +// +#define STATUS_SMARTCARD_SUBSYSTEM_FAILURE ((NTSTATUS)0xC0000321L) + +// +// MessageId: STATUS_NO_KERB_KEY +// +// MessageText: +// +// The target server does not have acceptable Kerberos credentials. +// +#define STATUS_NO_KERB_KEY ((NTSTATUS)0xC0000322L) + +/*++ + + MessageId's 0x0323 - 0x034f (inclusive) are reserved for other future copy + protection errors. + +--*/ +// +// MessageId: STATUS_HOST_DOWN +// +// MessageText: +// +// The transport determined that the remote system is down. +// +#define STATUS_HOST_DOWN ((NTSTATUS)0xC0000350L) + +// +// MessageId: STATUS_UNSUPPORTED_PREAUTH +// +// MessageText: +// +// An unsupported preauthentication mechanism was presented to the Kerberos package. +// +#define STATUS_UNSUPPORTED_PREAUTH ((NTSTATUS)0xC0000351L) + +// +// MessageId: STATUS_EFS_ALG_BLOB_TOO_BIG +// +// MessageText: +// +// The encryption algorithm used on the source file needs a bigger key buffer than the one used on the destination file. +// +#define STATUS_EFS_ALG_BLOB_TOO_BIG ((NTSTATUS)0xC0000352L) + +// +// MessageId: STATUS_PORT_NOT_SET +// +// MessageText: +// +// An attempt to remove a process's DebugPort was made, but a port was not already associated with the process. +// +#define STATUS_PORT_NOT_SET ((NTSTATUS)0xC0000353L) + +// +// MessageId: STATUS_DEBUGGER_INACTIVE +// +// MessageText: +// +// An attempt to do an operation on a debug port failed because the port is in the process of being deleted. +// +#define STATUS_DEBUGGER_INACTIVE ((NTSTATUS)0xC0000354L) + +// +// MessageId: STATUS_DS_VERSION_CHECK_FAILURE +// +// MessageText: +// +// This version of Windows is not compatible with the behavior version of directory forest, domain or domain controller. +// +#define STATUS_DS_VERSION_CHECK_FAILURE ((NTSTATUS)0xC0000355L) + +// +// MessageId: STATUS_AUDITING_DISABLED +// +// MessageText: +// +// The specified event is currently not being audited. +// +#define STATUS_AUDITING_DISABLED ((NTSTATUS)0xC0000356L) + +// +// MessageId: STATUS_PRENT4_MACHINE_ACCOUNT +// +// MessageText: +// +// The machine account was created pre-NT4. The account needs to be recreated. +// +#define STATUS_PRENT4_MACHINE_ACCOUNT ((NTSTATUS)0xC0000357L) + +// +// MessageId: STATUS_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER +// +// MessageText: +// +// A account group cannot have a universal group as a member. +// +#define STATUS_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER ((NTSTATUS)0xC0000358L) + +// +// MessageId: STATUS_INVALID_IMAGE_WIN_32 +// +// MessageText: +// +// The specified image file did not have the correct format, it appears to be a 32-bit Windows image. +// +#define STATUS_INVALID_IMAGE_WIN_32 ((NTSTATUS)0xC0000359L) + +// +// MessageId: STATUS_INVALID_IMAGE_WIN_64 +// +// MessageText: +// +// The specified image file did not have the correct format, it appears to be a 64-bit Windows image. +// +#define STATUS_INVALID_IMAGE_WIN_64 ((NTSTATUS)0xC000035AL) + +// +// MessageId: STATUS_BAD_BINDINGS +// +// MessageText: +// +// Client's supplied SSPI channel bindings were incorrect. +// +#define STATUS_BAD_BINDINGS ((NTSTATUS)0xC000035BL) + +// +// MessageId: STATUS_NETWORK_SESSION_EXPIRED +// +// MessageText: +// +// The client's session has expired, so the client must reauthenticate to continue accessing the remote resources. +// +#define STATUS_NETWORK_SESSION_EXPIRED ((NTSTATUS)0xC000035CL) + +// +// MessageId: STATUS_APPHELP_BLOCK +// +// MessageText: +// +// AppHelp dialog canceled thus preventing the application from starting. +// +#define STATUS_APPHELP_BLOCK ((NTSTATUS)0xC000035DL) + +// +// MessageId: STATUS_ALL_SIDS_FILTERED +// +// MessageText: +// +// The SID filtering operation removed all SIDs. +// +#define STATUS_ALL_SIDS_FILTERED ((NTSTATUS)0xC000035EL) + +// +// MessageId: STATUS_NOT_SAFE_MODE_DRIVER +// +// MessageText: +// +// The driver was not loaded because the system is booting into safe mode. +// +#define STATUS_NOT_SAFE_MODE_DRIVER ((NTSTATUS)0xC000035FL) + +// +// MessageId: STATUS_ACCESS_DISABLED_BY_POLICY_DEFAULT +// +// MessageText: +// +// Access to %1 has been restricted by your Administrator by the default software restriction policy level. +// +#define STATUS_ACCESS_DISABLED_BY_POLICY_DEFAULT ((NTSTATUS)0xC0000361L) + +// +// MessageId: STATUS_ACCESS_DISABLED_BY_POLICY_PATH +// +// MessageText: +// +// Access to %1 has been restricted by your Administrator by location with policy rule %2 placed on path %3 +// +#define STATUS_ACCESS_DISABLED_BY_POLICY_PATH ((NTSTATUS)0xC0000362L) + +// +// MessageId: STATUS_ACCESS_DISABLED_BY_POLICY_PUBLISHER +// +// MessageText: +// +// Access to %1 has been restricted by your Administrator by software publisher policy. +// +#define STATUS_ACCESS_DISABLED_BY_POLICY_PUBLISHER ((NTSTATUS)0xC0000363L) + +// +// MessageId: STATUS_ACCESS_DISABLED_BY_POLICY_OTHER +// +// MessageText: +// +// Access to %1 has been restricted by your Administrator by policy rule %2. +// +#define STATUS_ACCESS_DISABLED_BY_POLICY_OTHER ((NTSTATUS)0xC0000364L) + +// +// MessageId: STATUS_FAILED_DRIVER_ENTRY +// +// MessageText: +// +// The driver was not loaded because it failed it's initialization call. +// +#define STATUS_FAILED_DRIVER_ENTRY ((NTSTATUS)0xC0000365L) + +// +// MessageId: STATUS_DEVICE_ENUMERATION_ERROR +// +// MessageText: +// +// The "%hs" encountered an error while applying power or reading the device configuration. This may be caused by a failure of your hardware or by a poor connection. +// +#define STATUS_DEVICE_ENUMERATION_ERROR ((NTSTATUS)0xC0000366L) + +// +// MessageId: STATUS_MOUNT_POINT_NOT_RESOLVED +// +// MessageText: +// +// The create operation failed because the name contained at least one mount point which resolves to a volume to which the specified device object is not attached. +// +#define STATUS_MOUNT_POINT_NOT_RESOLVED ((NTSTATUS)0xC0000368L) + +// +// MessageId: STATUS_INVALID_DEVICE_OBJECT_PARAMETER +// +// MessageText: +// +// The device object parameter is either not a valid device object or is not attached to the volume specified by the file name. +// +#define STATUS_INVALID_DEVICE_OBJECT_PARAMETER ((NTSTATUS)0xC0000369L) + +// +// MessageId: STATUS_MCA_OCCURED +// +// MessageText: +// +// A Machine Check Error has occurred. Please check the system eventlog for additional information. +// +#define STATUS_MCA_OCCURED ((NTSTATUS)0xC000036AL) + +// +// MessageId: STATUS_DRIVER_BLOCKED_CRITICAL +// +// MessageText: +// +// Driver %2 has been blocked from loading. +// +#define STATUS_DRIVER_BLOCKED_CRITICAL ((NTSTATUS)0xC000036BL) + +// +// MessageId: STATUS_DRIVER_BLOCKED +// +// MessageText: +// +// Driver %2 has been blocked from loading. +// +#define STATUS_DRIVER_BLOCKED ((NTSTATUS)0xC000036CL) + +// +// MessageId: STATUS_DRIVER_DATABASE_ERROR +// +// MessageText: +// +// There was error [%2] processing the driver database. +// +#define STATUS_DRIVER_DATABASE_ERROR ((NTSTATUS)0xC000036DL) + +// +// MessageId: STATUS_SYSTEM_HIVE_TOO_LARGE +// +// MessageText: +// +// System hive size has exceeded its limit. +// +#define STATUS_SYSTEM_HIVE_TOO_LARGE ((NTSTATUS)0xC000036EL) + +// +// MessageId: STATUS_INVALID_IMPORT_OF_NON_DLL +// +// MessageText: +// +// A dynamic link library (DLL) referenced a module that was neither a DLL nor the process's executable image. +// +#define STATUS_INVALID_IMPORT_OF_NON_DLL ((NTSTATUS)0xC000036FL) + +// +// MessageId: STATUS_DS_SHUTTING_DOWN +// +// MessageText: +// +// The Directory Service is shutting down. +// +#define STATUS_DS_SHUTTING_DOWN ((NTSTATUS)0x40000370L) + +// +// MessageId: STATUS_NO_SECRETS +// +// MessageText: +// +// The local account store does not contain secret material for the specified account. +// +#define STATUS_NO_SECRETS ((NTSTATUS)0xC0000371L) + +// +// MessageId: STATUS_ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY +// +// MessageText: +// +// Access to %1 has been restricted by your Administrator by policy rule %2. +// +#define STATUS_ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY ((NTSTATUS)0xC0000372L) + +// +// MessageId: STATUS_FAILED_STACK_SWITCH +// +// MessageText: +// +// The system was not able to allocate enough memory to perform a stack switch. +// +#define STATUS_FAILED_STACK_SWITCH ((NTSTATUS)0xC0000373L) + +// +// MessageId: STATUS_HEAP_CORRUPTION +// +// MessageText: +// +// A heap has been corrupted. +// +#define STATUS_HEAP_CORRUPTION ((NTSTATUS)0xC0000374L) + +// +// MessageId: STATUS_SMARTCARD_WRONG_PIN +// +// MessageText: +// +// An incorrect PIN was presented to the smart card +// +#define STATUS_SMARTCARD_WRONG_PIN ((NTSTATUS)0xC0000380L) + +// +// MessageId: STATUS_SMARTCARD_CARD_BLOCKED +// +// MessageText: +// +// The smart card is blocked +// +#define STATUS_SMARTCARD_CARD_BLOCKED ((NTSTATUS)0xC0000381L) + +// +// MessageId: STATUS_SMARTCARD_CARD_NOT_AUTHENTICATED +// +// MessageText: +// +// No PIN was presented to the smart card +// +#define STATUS_SMARTCARD_CARD_NOT_AUTHENTICATED ((NTSTATUS)0xC0000382L) + +// +// MessageId: STATUS_SMARTCARD_NO_CARD +// +// MessageText: +// +// No smart card available +// +#define STATUS_SMARTCARD_NO_CARD ((NTSTATUS)0xC0000383L) + +// +// MessageId: STATUS_SMARTCARD_NO_KEY_CONTAINER +// +// MessageText: +// +// The requested key container does not exist on the smart card +// +#define STATUS_SMARTCARD_NO_KEY_CONTAINER ((NTSTATUS)0xC0000384L) + +// +// MessageId: STATUS_SMARTCARD_NO_CERTIFICATE +// +// MessageText: +// +// The requested certificate does not exist on the smart card +// +#define STATUS_SMARTCARD_NO_CERTIFICATE ((NTSTATUS)0xC0000385L) + +// +// MessageId: STATUS_SMARTCARD_NO_KEYSET +// +// MessageText: +// +// The requested keyset does not exist +// +#define STATUS_SMARTCARD_NO_KEYSET ((NTSTATUS)0xC0000386L) + +// +// MessageId: STATUS_SMARTCARD_IO_ERROR +// +// MessageText: +// +// A communication error with the smart card has been detected. +// +#define STATUS_SMARTCARD_IO_ERROR ((NTSTATUS)0xC0000387L) + +// +// MessageId: STATUS_DOWNGRADE_DETECTED +// +// MessageText: +// +// The system detected a possible attempt to compromise security. Please ensure that you can contact the server that authenticated you. +// +#define STATUS_DOWNGRADE_DETECTED ((NTSTATUS)0xC0000388L) + +// +// MessageId: STATUS_SMARTCARD_CERT_REVOKED +// +// MessageText: +// +// The smartcard certificate used for authentication has been revoked. Please contact your system administrator. There may be additional information in the event log. +// +#define STATUS_SMARTCARD_CERT_REVOKED ((NTSTATUS)0xC0000389L) + +// +// MessageId: STATUS_ISSUING_CA_UNTRUSTED +// +// MessageText: +// +// An untrusted certificate authority was detected While processing the smartcard certificate used for authentication. Please contact your system administrator. +// +#define STATUS_ISSUING_CA_UNTRUSTED ((NTSTATUS)0xC000038AL) + +// +// MessageId: STATUS_REVOCATION_OFFLINE_C +// +// MessageText: +// +// The revocation status of the smartcard certificate used for authentication could not be determined. Please contact your system administrator. +// +#define STATUS_REVOCATION_OFFLINE_C ((NTSTATUS)0xC000038BL) + +// +// MessageId: STATUS_PKINIT_CLIENT_FAILURE +// +// MessageText: +// +// The smartcard certificate used for authentication was not trusted. Please contact your system administrator. +// +#define STATUS_PKINIT_CLIENT_FAILURE ((NTSTATUS)0xC000038CL) + +// +// MessageId: STATUS_SMARTCARD_CERT_EXPIRED +// +// MessageText: +// +// The smartcard certificate used for authentication has expired. Please +// contact your system administrator. +// +#define STATUS_SMARTCARD_CERT_EXPIRED ((NTSTATUS)0xC000038DL) + +// +// MessageId: STATUS_DRIVER_FAILED_PRIOR_UNLOAD +// +// MessageText: +// +// The driver could not be loaded because a previous version of the driver is still in memory. +// +#define STATUS_DRIVER_FAILED_PRIOR_UNLOAD ((NTSTATUS)0xC000038EL) + +// +// MessageId: STATUS_SMARTCARD_SILENT_CONTEXT +// +// MessageText: +// +// The smartcard provider could not perform the action since the context was acquired as silent. +// +#define STATUS_SMARTCARD_SILENT_CONTEXT ((NTSTATUS)0xC000038FL) + + /* MessageId up to 0x400 is reserved for smart cards */ +// +// MessageId: STATUS_PER_USER_TRUST_QUOTA_EXCEEDED +// +// MessageText: +// +// The current user's delegated trust creation quota has been exceeded. +// +#define STATUS_PER_USER_TRUST_QUOTA_EXCEEDED ((NTSTATUS)0xC0000401L) + +// +// MessageId: STATUS_ALL_USER_TRUST_QUOTA_EXCEEDED +// +// MessageText: +// +// The total delegated trust creation quota has been exceeded. +// +#define STATUS_ALL_USER_TRUST_QUOTA_EXCEEDED ((NTSTATUS)0xC0000402L) + +// +// MessageId: STATUS_USER_DELETE_TRUST_QUOTA_EXCEEDED +// +// MessageText: +// +// The current user's delegated trust deletion quota has been exceeded. +// +#define STATUS_USER_DELETE_TRUST_QUOTA_EXCEEDED ((NTSTATUS)0xC0000403L) + +// +// MessageId: STATUS_DS_NAME_NOT_UNIQUE +// +// MessageText: +// +// The requested name already exists as a unique identifier. +// +#define STATUS_DS_NAME_NOT_UNIQUE ((NTSTATUS)0xC0000404L) + +// +// MessageId: STATUS_DS_DUPLICATE_ID_FOUND +// +// MessageText: +// +// The requested object has a non-unique identifier and cannot be retrieved. +// +#define STATUS_DS_DUPLICATE_ID_FOUND ((NTSTATUS)0xC0000405L) + +// +// MessageId: STATUS_DS_GROUP_CONVERSION_ERROR +// +// MessageText: +// +// The group cannot be converted due to attribute restrictions on the requested group type. +// +#define STATUS_DS_GROUP_CONVERSION_ERROR ((NTSTATUS)0xC0000406L) + +// +// MessageId: STATUS_VOLSNAP_PREPARE_HIBERNATE +// +// MessageText: +// +// {Volume Shadow Copy Service} +// Please wait while the Volume Shadow Copy Service prepares volume %hs for hibernation. +// +#define STATUS_VOLSNAP_PREPARE_HIBERNATE ((NTSTATUS)0xC0000407L) + +// +// MessageId: STATUS_USER2USER_REQUIRED +// +// MessageText: +// +// Kerberos sub-protocol User2User is required. +// +#define STATUS_USER2USER_REQUIRED ((NTSTATUS)0xC0000408L) + +// +// MessageId: STATUS_STACK_BUFFER_OVERRUN +// +// MessageText: +// +// The system detected an overrun of a stack-based buffer in this application. This overrun could potentially allow a malicious user to gain control of this application. +// +#define STATUS_STACK_BUFFER_OVERRUN ((NTSTATUS)0xC0000409L) // winnt + +// +// MessageId: STATUS_NO_S4U_PROT_SUPPORT +// +// MessageText: +// +// The Kerberos subsystem encountered an error. A service for user protocol request was made against a domain controller which does not support service for user. +// +#define STATUS_NO_S4U_PROT_SUPPORT ((NTSTATUS)0xC000040AL) + +// +// MessageId: STATUS_CROSSREALM_DELEGATION_FAILURE +// +// MessageText: +// +// An attempt was made by this server to make a Kerberos constrained delegation request for a target outside of the server's realm. This is not supported, and indicates a misconfiguration on this server's allowed to delegate to list. Please contact your administrator. +// +#define STATUS_CROSSREALM_DELEGATION_FAILURE ((NTSTATUS)0xC000040BL) + +// +// MessageId: STATUS_REVOCATION_OFFLINE_KDC +// +// MessageText: +// +// The revocation status of the domain controller certificate used for smartcard authentication could not be determined. There is additional information in the system event log. Please contact your system administrator. +// +#define STATUS_REVOCATION_OFFLINE_KDC ((NTSTATUS)0xC000040CL) + +// +// MessageId: STATUS_ISSUING_CA_UNTRUSTED_KDC +// +// MessageText: +// +// An untrusted certificate authority was detected while processing the domain controller certificate used for authentication. There is additional information in the system event log. Please contact your system administrator. +// +#define STATUS_ISSUING_CA_UNTRUSTED_KDC ((NTSTATUS)0xC000040DL) + +// +// MessageId: STATUS_KDC_CERT_EXPIRED +// +// MessageText: +// +// The domain controller certificate used for smartcard logon has expired. Please contact your system administrator with the contents of your system event log. +// +#define STATUS_KDC_CERT_EXPIRED ((NTSTATUS)0xC000040EL) + +// +// MessageId: STATUS_KDC_CERT_REVOKED +// +// MessageText: +// +// The domain controller certificate used for smartcard logon has been revoked. Please contact your system administrator with the contents of your system event log. +// +#define STATUS_KDC_CERT_REVOKED ((NTSTATUS)0xC000040FL) + +// +// MessageId: STATUS_PARAMETER_QUOTA_EXCEEDED +// +// MessageText: +// +// Data present in one of the parameters is more than the function can operate on. +// +#define STATUS_PARAMETER_QUOTA_EXCEEDED ((NTSTATUS)0xC0000410L) + +// +// MessageId: STATUS_HIBERNATION_FAILURE +// +// MessageText: +// +// The system has failed to hibernate (The error code is %hs). Hibernation will be disabled until the system is restarted. +// +#define STATUS_HIBERNATION_FAILURE ((NTSTATUS)0xC0000411L) + +// +// MessageId: STATUS_DELAY_LOAD_FAILED +// +// MessageText: +// +// An attempt to delay-load a .dll or get a function address in a delay-loaded .dll failed. +// +#define STATUS_DELAY_LOAD_FAILED ((NTSTATUS)0xC0000412L) + +// +// MessageId: STATUS_AUTHENTICATION_FIREWALL_FAILED +// +// MessageText: +// +// Logon Failure: The machine you are logging onto is protected by an authentication firewall. The specified account is not allowed to authenticate to the machine. +// +#define STATUS_AUTHENTICATION_FIREWALL_FAILED ((NTSTATUS)0xC0000413L) + +// +// MessageId: STATUS_VDM_DISALLOWED +// +// MessageText: +// +// %hs is a 16-bit application. You do not have permissions to execute 16-bit applications. Check your permissions with your system administrator. +// +#define STATUS_VDM_DISALLOWED ((NTSTATUS)0xC0000414L) + +// +// MessageId: STATUS_HUNG_DISPLAY_DRIVER_THREAD +// +// MessageText: +// +// {Display Driver Stopped Responding} +// The %hs display driver has stopped working normally. Save your work and reboot the system to restore full display functionality. The next time you reboot the machine a dialog will be displayed giving you a chance to report this failure to Microsoft. +// +#define STATUS_HUNG_DISPLAY_DRIVER_THREAD ((NTSTATUS)0xC0000415L) + +// +// MessageId: STATUS_INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE +// +// MessageText: +// +// The Desktop heap encountered an error while allocating session memory. There is more information in the system event log. +// +#define STATUS_INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE ((NTSTATUS)0xC0000416L) + +// +// MessageId: STATUS_INVALID_CRUNTIME_PARAMETER +// +// MessageText: +// +// An invalid parameter was passed to a C runtime function. +// +#define STATUS_INVALID_CRUNTIME_PARAMETER ((NTSTATUS)0xC0000417L) // winnt + +// +// MessageId: STATUS_NTLM_BLOCKED +// +// MessageText: +// +// The authentication failed since NTLM was blocked. +// +#define STATUS_NTLM_BLOCKED ((NTSTATUS)0xC0000418L) + +// +// MessageId: STATUS_DS_SRC_SID_EXISTS_IN_FOREST +// +// MessageText: +// +// The source object's SID already exists in destination forest. +// +#define STATUS_DS_SRC_SID_EXISTS_IN_FOREST ((NTSTATUS)0xC0000419L) + +// +// MessageId: STATUS_DS_DOMAIN_NAME_EXISTS_IN_FOREST +// +// MessageText: +// +// The domain name of the trusted domain already exists in the forest. +// +#define STATUS_DS_DOMAIN_NAME_EXISTS_IN_FOREST ((NTSTATUS)0xC000041AL) + +// +// MessageId: STATUS_DS_FLAT_NAME_EXISTS_IN_FOREST +// +// MessageText: +// +// The flat name of the trusted domain already exists in the forest. +// +#define STATUS_DS_FLAT_NAME_EXISTS_IN_FOREST ((NTSTATUS)0xC000041BL) + +// +// MessageId: STATUS_INVALID_USER_PRINCIPAL_NAME +// +// MessageText: +// +// The User Principal Name (UPN) is invalid. +// +#define STATUS_INVALID_USER_PRINCIPAL_NAME ((NTSTATUS)0xC000041CL) + +// +// MessageId: STATUS_ASSERTION_FAILURE +// +// MessageText: +// +// An assertion failure has occurred. +// +#define STATUS_ASSERTION_FAILURE ((NTSTATUS)0xC0000420L) // winnt + +// +// MessageId: STATUS_VERIFIER_STOP +// +// MessageText: +// +// Application verifier has found an error in the current process. +// +#define STATUS_VERIFIER_STOP ((NTSTATUS)0xC0000421L) + +// +// MessageId: STATUS_CALLBACK_POP_STACK +// +// MessageText: +// +// An exception has occurred in a user mode callback and the kernel callback frame should be removed. +// +#define STATUS_CALLBACK_POP_STACK ((NTSTATUS)0xC0000423L) + +// +// MessageId: STATUS_INCOMPATIBLE_DRIVER_BLOCKED +// +// MessageText: +// +// %2 has been blocked from loading due to incompatibility with this system. Please contact your software vendor for a compatible version of the driver. +// +#define STATUS_INCOMPATIBLE_DRIVER_BLOCKED ((NTSTATUS)0xC0000424L) + +// +// MessageId: STATUS_HIVE_UNLOADED +// +// MessageText: +// +// Illegal operation attempted on a registry key which has already been unloaded. +// +#define STATUS_HIVE_UNLOADED ((NTSTATUS)0xC0000425L) + +// +// MessageId: STATUS_COMPRESSION_DISABLED +// +// MessageText: +// +// Compression is disabled for this volume. +// +#define STATUS_COMPRESSION_DISABLED ((NTSTATUS)0xC0000426L) + +// +// MessageId: STATUS_FILE_SYSTEM_LIMITATION +// +// MessageText: +// +// The requested operation could not be completed due to a file system limitation +// +#define STATUS_FILE_SYSTEM_LIMITATION ((NTSTATUS)0xC0000427L) + +// +// MessageId: STATUS_INVALID_IMAGE_HASH +// +// MessageText: +// +// Windows cannot verify the digital signature for this file. A recent hardware or software change might have installed a file that is signed incorrectly or damaged, or that might be malicious software from an unknown source. +// +#define STATUS_INVALID_IMAGE_HASH ((NTSTATUS)0xC0000428L) + +// +// MessageId: STATUS_NOT_CAPABLE +// +// MessageText: +// +// The implementation is not capable of performing the request. +// +#define STATUS_NOT_CAPABLE ((NTSTATUS)0xC0000429L) + +// +// MessageId: STATUS_REQUEST_OUT_OF_SEQUENCE +// +// MessageText: +// +// The requested operation is out of order with respect to other operations. +// +#define STATUS_REQUEST_OUT_OF_SEQUENCE ((NTSTATUS)0xC000042AL) + +// +// MessageId: STATUS_IMPLEMENTATION_LIMIT +// +// MessageText: +// +// An operation attempted to exceed an implementation-defined limit. +// +#define STATUS_IMPLEMENTATION_LIMIT ((NTSTATUS)0xC000042BL) + +// +// MessageId: STATUS_ELEVATION_REQUIRED +// +// MessageText: +// +// The requested operation requires elevation. +// +#define STATUS_ELEVATION_REQUIRED ((NTSTATUS)0xC000042CL) + +// +// MessageId: STATUS_NO_SECURITY_CONTEXT +// +// MessageText: +// +// The required security context does not exist. +// +#define STATUS_NO_SECURITY_CONTEXT ((NTSTATUS)0xC000042DL) + +// +// MessageId: STATUS_PKU2U_CERT_FAILURE +// +// MessageText: +// +// The PKU2U protocol encountered an error while attempting to utilize the associated certificates. +// +#define STATUS_PKU2U_CERT_FAILURE ((NTSTATUS)0xC000042EL) + +// +// MessageId: STATUS_BEYOND_VDL +// +// MessageText: +// +// The operation was attempted beyond the valid data length of the file. +// +#define STATUS_BEYOND_VDL ((NTSTATUS)0xC0000432L) + +// +// MessageId: STATUS_ENCOUNTERED_WRITE_IN_PROGRESS +// +// MessageText: +// +// The attempted write operation encountered a write already in progress for some portion of the range. +// +#define STATUS_ENCOUNTERED_WRITE_IN_PROGRESS ((NTSTATUS)0xC0000433L) + +// +// MessageId: STATUS_PTE_CHANGED +// +// MessageText: +// +// The page fault mappings changed in the middle of processing a fault so the operation must be retried. +// +#define STATUS_PTE_CHANGED ((NTSTATUS)0xC0000434L) + +// +// MessageId: STATUS_PURGE_FAILED +// +// MessageText: +// +// The attempt to purge this file from memory failed to purge some or all the data from memory. +// +#define STATUS_PURGE_FAILED ((NTSTATUS)0xC0000435L) + +// +// MessageId: STATUS_CRED_REQUIRES_CONFIRMATION +// +// MessageText: +// +// The requested credential requires confirmation. +// +#define STATUS_CRED_REQUIRES_CONFIRMATION ((NTSTATUS)0xC0000440L) + +// +// MessageId: STATUS_CS_ENCRYPTION_INVALID_SERVER_RESPONSE +// +// MessageText: +// +// The remote server sent an invalid response for a file being opened with Client Side Encryption. +// +#define STATUS_CS_ENCRYPTION_INVALID_SERVER_RESPONSE ((NTSTATUS)0xC0000441L) + +// +// MessageId: STATUS_CS_ENCRYPTION_UNSUPPORTED_SERVER +// +// MessageText: +// +// Client Side Encryption is not supported by the remote server even though it claims to support it. +// +#define STATUS_CS_ENCRYPTION_UNSUPPORTED_SERVER ((NTSTATUS)0xC0000442L) + +// +// MessageId: STATUS_CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE +// +// MessageText: +// +// File is encrypted and should be opened in Client Side Encryption mode. +// +#define STATUS_CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE ((NTSTATUS)0xC0000443L) + +// +// MessageId: STATUS_CS_ENCRYPTION_NEW_ENCRYPTED_FILE +// +// MessageText: +// +// A new encrypted file is being created and a $EFS needs to be provided. +// +#define STATUS_CS_ENCRYPTION_NEW_ENCRYPTED_FILE ((NTSTATUS)0xC0000444L) + +// +// MessageId: STATUS_CS_ENCRYPTION_FILE_NOT_CSE +// +// MessageText: +// +// The SMB client requested a CSE FSCTL on a non-CSE file. +// +#define STATUS_CS_ENCRYPTION_FILE_NOT_CSE ((NTSTATUS)0xC0000445L) + +// +// MessageId: STATUS_INVALID_LABEL +// +// MessageText: +// +// Indicates a particular Security ID may not be assigned as the label of an object. +// +#define STATUS_INVALID_LABEL ((NTSTATUS)0xC0000446L) + +// +// MessageId: STATUS_DRIVER_PROCESS_TERMINATED +// +// MessageText: +// +// The process hosting the driver for this device has terminated. +// +#define STATUS_DRIVER_PROCESS_TERMINATED ((NTSTATUS)0xC0000450L) + +// +// MessageId: STATUS_AMBIGUOUS_SYSTEM_DEVICE +// +// MessageText: +// +// The requested system device cannot be identified due to multiple indistinguishable devices potentially matching the identification criteria. +// +#define STATUS_AMBIGUOUS_SYSTEM_DEVICE ((NTSTATUS)0xC0000451L) + +// +// MessageId: STATUS_SYSTEM_DEVICE_NOT_FOUND +// +// MessageText: +// +// The requested system device cannot be found. +// +#define STATUS_SYSTEM_DEVICE_NOT_FOUND ((NTSTATUS)0xC0000452L) + +// +// MessageId: STATUS_RESTART_BOOT_APPLICATION +// +// MessageText: +// +// This boot application must be restarted. +// +#define STATUS_RESTART_BOOT_APPLICATION ((NTSTATUS)0xC0000453L) + +// +// MessageId: STATUS_INSUFFICIENT_NVRAM_RESOURCES +// +// MessageText: +// +// Insufficient NVRAM resources exist to complete the API. A reboot might be required. +// +#define STATUS_INSUFFICIENT_NVRAM_RESOURCES ((NTSTATUS)0xC0000454L) + +// +// MessageId: STATUS_INVALID_TASK_NAME +// +// MessageText: +// +// The specified task name is invalid. +// +#define STATUS_INVALID_TASK_NAME ((NTSTATUS)0xC0000500L) + +// +// MessageId: STATUS_INVALID_TASK_INDEX +// +// MessageText: +// +// The specified task index is invalid. +// +#define STATUS_INVALID_TASK_INDEX ((NTSTATUS)0xC0000501L) + +// +// MessageId: STATUS_THREAD_ALREADY_IN_TASK +// +// MessageText: +// +// The specified thread is already joining a task. +// +#define STATUS_THREAD_ALREADY_IN_TASK ((NTSTATUS)0xC0000502L) + +// +// MessageId: STATUS_CALLBACK_BYPASS +// +// MessageText: +// +// A callback has requested to bypass native code. +// +#define STATUS_CALLBACK_BYPASS ((NTSTATUS)0xC0000503L) + +// +// MessageId: STATUS_FAIL_FAST_EXCEPTION +// +// MessageText: +// +// {Fail Fast Exception} +// A fail fast exception occurred. Exception handlers will not be invoked and the process will be terminated immediately. +// +#define STATUS_FAIL_FAST_EXCEPTION ((NTSTATUS)0xC0000602L) + +// +// MessageId: STATUS_IMAGE_CERT_REVOKED +// +// MessageText: +// +// Windows cannot verify the digital signature for this file. The signing certificate for this file has been revoked. +// +#define STATUS_IMAGE_CERT_REVOKED ((NTSTATUS)0xC0000603L) + +// +// MessageId: STATUS_PORT_CLOSED +// +// MessageText: +// +// The ALPC port is closed. +// +#define STATUS_PORT_CLOSED ((NTSTATUS)0xC0000700L) + +// +// MessageId: STATUS_MESSAGE_LOST +// +// MessageText: +// +// The ALPC message requested is no longer available. +// +#define STATUS_MESSAGE_LOST ((NTSTATUS)0xC0000701L) + +// +// MessageId: STATUS_INVALID_MESSAGE +// +// MessageText: +// +// The ALPC message supplied is invalid. +// +#define STATUS_INVALID_MESSAGE ((NTSTATUS)0xC0000702L) + +// +// MessageId: STATUS_REQUEST_CANCELED +// +// MessageText: +// +// The ALPC message has been canceled. +// +#define STATUS_REQUEST_CANCELED ((NTSTATUS)0xC0000703L) + +// +// MessageId: STATUS_RECURSIVE_DISPATCH +// +// MessageText: +// +// Invalid recursive dispatch attempt. +// +#define STATUS_RECURSIVE_DISPATCH ((NTSTATUS)0xC0000704L) + +// +// MessageId: STATUS_LPC_RECEIVE_BUFFER_EXPECTED +// +// MessageText: +// +// No receive buffer has been supplied in a synchrounus request. +// +#define STATUS_LPC_RECEIVE_BUFFER_EXPECTED ((NTSTATUS)0xC0000705L) + +// +// MessageId: STATUS_LPC_INVALID_CONNECTION_USAGE +// +// MessageText: +// +// The connection port is used in an invalid context. +// +#define STATUS_LPC_INVALID_CONNECTION_USAGE ((NTSTATUS)0xC0000706L) + +// +// MessageId: STATUS_LPC_REQUESTS_NOT_ALLOWED +// +// MessageText: +// +// The ALPC port does not accept new request messages. +// +#define STATUS_LPC_REQUESTS_NOT_ALLOWED ((NTSTATUS)0xC0000707L) + +// +// MessageId: STATUS_RESOURCE_IN_USE +// +// MessageText: +// +// The resource requested is already in use. +// +#define STATUS_RESOURCE_IN_USE ((NTSTATUS)0xC0000708L) + +// +// MessageId: STATUS_HARDWARE_MEMORY_ERROR +// +// MessageText: +// +// The hardware has reported an uncorrectable memory error. +// +#define STATUS_HARDWARE_MEMORY_ERROR ((NTSTATUS)0xC0000709L) + +// +// MessageId: STATUS_THREADPOOL_HANDLE_EXCEPTION +// +// MessageText: +// +// Status 0x%08x was returned, waiting on handle 0x%x for wait 0x%p, in waiter 0x%p. +// +#define STATUS_THREADPOOL_HANDLE_EXCEPTION ((NTSTATUS)0xC000070AL) + +// +// MessageId: STATUS_THREADPOOL_SET_EVENT_ON_COMPLETION_FAILED +// +// MessageText: +// +// After a callback to 0x%p(0x%p), a completion call to SetEvent(0x%p) failed with status 0x%08x. +// +#define STATUS_THREADPOOL_SET_EVENT_ON_COMPLETION_FAILED ((NTSTATUS)0xC000070BL) + +// +// MessageId: STATUS_THREADPOOL_RELEASE_SEMAPHORE_ON_COMPLETION_FAILED +// +// MessageText: +// +// After a callback to 0x%p(0x%p), a completion call to ReleaseSemaphore(0x%p, %d) failed with status 0x%08x. +// +#define STATUS_THREADPOOL_RELEASE_SEMAPHORE_ON_COMPLETION_FAILED ((NTSTATUS)0xC000070CL) + +// +// MessageId: STATUS_THREADPOOL_RELEASE_MUTEX_ON_COMPLETION_FAILED +// +// MessageText: +// +// After a callback to 0x%p(0x%p), a completion call to ReleaseMutex(%p) failed with status 0x%08x. +// +#define STATUS_THREADPOOL_RELEASE_MUTEX_ON_COMPLETION_FAILED ((NTSTATUS)0xC000070DL) + +// +// MessageId: STATUS_THREADPOOL_FREE_LIBRARY_ON_COMPLETION_FAILED +// +// MessageText: +// +// After a callback to 0x%p(0x%p), an completion call to FreeLibrary(%p) failed with status 0x%08x. +// +#define STATUS_THREADPOOL_FREE_LIBRARY_ON_COMPLETION_FAILED ((NTSTATUS)0xC000070EL) + +// +// MessageId: STATUS_THREADPOOL_RELEASED_DURING_OPERATION +// +// MessageText: +// +// The threadpool 0x%p was released while a thread was posting a callback to 0x%p(0x%p) to it. +// +#define STATUS_THREADPOOL_RELEASED_DURING_OPERATION ((NTSTATUS)0xC000070FL) + +// +// MessageId: STATUS_CALLBACK_RETURNED_WHILE_IMPERSONATING +// +// MessageText: +// +// A threadpool worker thread is impersonating a client, after a callback to 0x%p(0x%p). +// This is unexpected, indicating that the callback is missing a call to revert the impersonation. +// +#define STATUS_CALLBACK_RETURNED_WHILE_IMPERSONATING ((NTSTATUS)0xC0000710L) + +// +// MessageId: STATUS_APC_RETURNED_WHILE_IMPERSONATING +// +// MessageText: +// +// A threadpool worker thread is impersonating a client, after executing an APC. +// This is unexpected, indicating that the APC is missing a call to revert the impersonation. +// +#define STATUS_APC_RETURNED_WHILE_IMPERSONATING ((NTSTATUS)0xC0000711L) + +// +// MessageId: STATUS_PROCESS_IS_PROTECTED +// +// MessageText: +// +// Either the target process, or the target thread's containing process, is a protected process. +// +#define STATUS_PROCESS_IS_PROTECTED ((NTSTATUS)0xC0000712L) + +// +// MessageId: STATUS_MCA_EXCEPTION +// +// MessageText: +// +// A Thread is getting dispatched with MCA EXCEPTION because of MCA. +// +#define STATUS_MCA_EXCEPTION ((NTSTATUS)0xC0000713L) + +// +// MessageId: STATUS_CERTIFICATE_MAPPING_NOT_UNIQUE +// +// MessageText: +// +// The client certificate account mapping is not unique. +// +#define STATUS_CERTIFICATE_MAPPING_NOT_UNIQUE ((NTSTATUS)0xC0000714L) + +// +// MessageId: STATUS_SYMLINK_CLASS_DISABLED +// +// MessageText: +// +// The symbolic link cannot be followed because its type is disabled. +// +#define STATUS_SYMLINK_CLASS_DISABLED ((NTSTATUS)0xC0000715L) + +// +// MessageId: STATUS_INVALID_IDN_NORMALIZATION +// +// MessageText: +// +// Indicates that the specified string is not valid for IDN normalization. +// +#define STATUS_INVALID_IDN_NORMALIZATION ((NTSTATUS)0xC0000716L) + +// +// MessageId: STATUS_NO_UNICODE_TRANSLATION +// +// MessageText: +// +// No mapping for the Unicode character exists in the target multi-byte code page. +// +#define STATUS_NO_UNICODE_TRANSLATION ((NTSTATUS)0xC0000717L) + +// +// MessageId: STATUS_ALREADY_REGISTERED +// +// MessageText: +// +// The provided callback is already registered. +// +#define STATUS_ALREADY_REGISTERED ((NTSTATUS)0xC0000718L) + +// +// MessageId: STATUS_CONTEXT_MISMATCH +// +// MessageText: +// +// The provided context did not match the target. +// +#define STATUS_CONTEXT_MISMATCH ((NTSTATUS)0xC0000719L) + +// +// MessageId: STATUS_PORT_ALREADY_HAS_COMPLETION_LIST +// +// MessageText: +// +// The specified port already has a completion list. +// +#define STATUS_PORT_ALREADY_HAS_COMPLETION_LIST ((NTSTATUS)0xC000071AL) + +// +// MessageId: STATUS_CALLBACK_RETURNED_THREAD_PRIORITY +// +// MessageText: +// +// A threadpool worker thread enter a callback at thread base priority 0x%x and exited at priority 0x%x. +// This is unexpected, indicating that the callback missed restoring the priority. +// +#define STATUS_CALLBACK_RETURNED_THREAD_PRIORITY ((NTSTATUS)0xC000071BL) + +// +// MessageId: STATUS_INVALID_THREAD +// +// MessageText: +// +// An invalid thread, handle %p, is specified for this operation. Possibly, a threadpool worker thread was specified. +// +#define STATUS_INVALID_THREAD ((NTSTATUS)0xC000071CL) + +// +// MessageId: STATUS_CALLBACK_RETURNED_TRANSACTION +// +// MessageText: +// +// A threadpool worker thread enter a callback, which left transaction state. +// This is unexpected, indicating that the callback missed clearing the transaction. +// +#define STATUS_CALLBACK_RETURNED_TRANSACTION ((NTSTATUS)0xC000071DL) + +// +// MessageId: STATUS_CALLBACK_RETURNED_LDR_LOCK +// +// MessageText: +// +// A threadpool worker thread enter a callback, which left the loader lock held. +// This is unexpected, indicating that the callback missed releasing the lock. +// +#define STATUS_CALLBACK_RETURNED_LDR_LOCK ((NTSTATUS)0xC000071EL) + +// +// MessageId: STATUS_CALLBACK_RETURNED_LANG +// +// MessageText: +// +// A threadpool worker thread enter a callback, which left with preferred languages set. +// This is unexpected, indicating that the callback missed clearing them. +// +#define STATUS_CALLBACK_RETURNED_LANG ((NTSTATUS)0xC000071FL) + +// +// MessageId: STATUS_CALLBACK_RETURNED_PRI_BACK +// +// MessageText: +// +// A threadpool worker thread enter a callback, which left with background priorities set. +// This is unexpected, indicating that the callback missed restoring the original priorities. +// +#define STATUS_CALLBACK_RETURNED_PRI_BACK ((NTSTATUS)0xC0000720L) + +// +// MessageId: STATUS_CALLBACK_RETURNED_THREAD_AFFINITY +// +// MessageText: +// +// A threadpool worker thread enter a callback at thread affinity %p and exited at affinity %p. +// This is unexpected, indicating that the callback missed restoring the priority. +// +#define STATUS_CALLBACK_RETURNED_THREAD_AFFINITY ((NTSTATUS)0xC0000721L) + +// +// MessageId: STATUS_DISK_REPAIR_DISABLED +// +// MessageText: +// +// The attempted operation required self healing to be enabled. +// +#define STATUS_DISK_REPAIR_DISABLED ((NTSTATUS)0xC0000800L) + +// +// MessageId: STATUS_DS_DOMAIN_RENAME_IN_PROGRESS +// +// MessageText: +// +// The Directory Service cannot perform the requested operation because a domain rename operation is in progress. +// +#define STATUS_DS_DOMAIN_RENAME_IN_PROGRESS ((NTSTATUS)0xC0000801L) + +// +// MessageId: STATUS_DISK_QUOTA_EXCEEDED +// +// MessageText: +// +// The requested file operation failed because the storage quota was exceeded. +// To free up disk space, move files to a different location or delete unnecessary files. For more information, contact your system administrator. +// +#define STATUS_DISK_QUOTA_EXCEEDED ((NTSTATUS)0xC0000802L) + +// +// MessageId: STATUS_DATA_LOST_REPAIR +// +// MessageText: +// +// Windows discovered a corruption in the file "%hs". +// This file has now been repaired. +// Please check if any data in the file was lost because of the corruption. +// +#define STATUS_DATA_LOST_REPAIR ((NTSTATUS)0x80000803L) + +// +// MessageId: STATUS_CONTENT_BLOCKED +// +// MessageText: +// +// The requested file operation failed because the storage policy blocks that type of file. For more information, contact your system administrator. +// +#define STATUS_CONTENT_BLOCKED ((NTSTATUS)0xC0000804L) + +// +// MessageId: STATUS_BAD_CLUSTERS +// +// MessageText: +// +// The operation could not be completed due to bad clusters on disk. +// +#define STATUS_BAD_CLUSTERS ((NTSTATUS)0xC0000805L) + +// +// MessageId: STATUS_VOLUME_DIRTY +// +// MessageText: +// +// The operation could not be completed because the volume is dirty. Please run chkdsk and try again. +// +#define STATUS_VOLUME_DIRTY ((NTSTATUS)0xC0000806L) + +// +// MessageId: STATUS_FILE_CHECKED_OUT +// +// MessageText: +// +// This file is checked out or locked for editing by another user. +// +#define STATUS_FILE_CHECKED_OUT ((NTSTATUS)0xC0000901L) + +// +// MessageId: STATUS_CHECKOUT_REQUIRED +// +// MessageText: +// +// The file must be checked out before saving changes. +// +#define STATUS_CHECKOUT_REQUIRED ((NTSTATUS)0xC0000902L) + +// +// MessageId: STATUS_BAD_FILE_TYPE +// +// MessageText: +// +// The file type being saved or retrieved has been blocked. +// +#define STATUS_BAD_FILE_TYPE ((NTSTATUS)0xC0000903L) + +// +// MessageId: STATUS_FILE_TOO_LARGE +// +// MessageText: +// +// The file size exceeds the limit allowed and cannot be saved. +// +#define STATUS_FILE_TOO_LARGE ((NTSTATUS)0xC0000904L) + +// +// MessageId: STATUS_FORMS_AUTH_REQUIRED +// +// MessageText: +// +// Access Denied. Before opening files in this location, you must first browse to the web site and select the option to login automatically. +// +#define STATUS_FORMS_AUTH_REQUIRED ((NTSTATUS)0xC0000905L) + +// +// MessageId: STATUS_VIRUS_INFECTED +// +// MessageText: +// +// Operation did not complete successfully because the file contains a virus. +// +#define STATUS_VIRUS_INFECTED ((NTSTATUS)0xC0000906L) + +// +// MessageId: STATUS_VIRUS_DELETED +// +// MessageText: +// +// This file contains a virus and cannot be opened. Due to the nature of this virus, the file has been removed from this location. +// +#define STATUS_VIRUS_DELETED ((NTSTATUS)0xC0000907L) + +// +// MessageId: STATUS_BAD_MCFG_TABLE +// +// MessageText: +// +// The resources required for this device conflict with the MCFG table. +// +#define STATUS_BAD_MCFG_TABLE ((NTSTATUS)0xC0000908L) + +// +// MessageId: STATUS_CANNOT_BREAK_OPLOCK +// +// MessageText: +// +// The operation did not complete successfully because it would cause an oplock to be broken. The caller has requested that existing oplocks not be broken. +// +#define STATUS_CANNOT_BREAK_OPLOCK ((NTSTATUS)0xC0000909L) + +// +// MessageId: STATUS_WOW_ASSERTION +// +// MessageText: +// +// WOW Assertion Error. +// +#define STATUS_WOW_ASSERTION ((NTSTATUS)0xC0009898L) + +// +// MessageId: STATUS_INVALID_SIGNATURE +// +// MessageText: +// +// The cryptographic signature is invalid. +// +#define STATUS_INVALID_SIGNATURE ((NTSTATUS)0xC000A000L) + +// +// MessageId: STATUS_HMAC_NOT_SUPPORTED +// +// MessageText: +// +// The cryptographic provider does not support HMAC. +// +#define STATUS_HMAC_NOT_SUPPORTED ((NTSTATUS)0xC000A001L) + +// +// MessageId: STATUS_AUTH_TAG_MISMATCH +// +// MessageText: +// +// The computed authentication tag did not match the input authentication tag. +// +#define STATUS_AUTH_TAG_MISMATCH ((NTSTATUS)0xC000A002L) + +/*++ + + MessageId's 0xa010 - 0xa07f (inclusive) are reserved for TCPIP errors. + +--*/ +// +// MessageId: STATUS_IPSEC_QUEUE_OVERFLOW +// +// MessageText: +// +// The IPSEC queue overflowed. +// +#define STATUS_IPSEC_QUEUE_OVERFLOW ((NTSTATUS)0xC000A010L) + +// +// MessageId: STATUS_ND_QUEUE_OVERFLOW +// +// MessageText: +// +// The neighbor discovery queue overflowed. +// +#define STATUS_ND_QUEUE_OVERFLOW ((NTSTATUS)0xC000A011L) + +// +// MessageId: STATUS_HOPLIMIT_EXCEEDED +// +// MessageText: +// +// An ICMP hop limit exceeded error was received. +// +#define STATUS_HOPLIMIT_EXCEEDED ((NTSTATUS)0xC000A012L) + +// +// MessageId: STATUS_PROTOCOL_NOT_SUPPORTED +// +// MessageText: +// +// The protocol is not installed on the local machine. +// +#define STATUS_PROTOCOL_NOT_SUPPORTED ((NTSTATUS)0xC000A013L) + +// +// MessageId: STATUS_FASTPATH_REJECTED +// +// MessageText: +// +// An operation or data has been rejected while on the network fast path. +// +#define STATUS_FASTPATH_REJECTED ((NTSTATUS)0xC000A014L) + +/*++ + + MessageId's 0xa014 - 0xa07f (inclusive) are reserved for TCPIP errors. + +--*/ +// +// MessageId: STATUS_LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED +// +// MessageText: +// +// {Delayed Write Failed} +// Windows was unable to save all the data for the file %hs; the data has been lost. +// This error may be caused by network connectivity issues. Please try to save this file elsewhere. +// +#define STATUS_LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED ((NTSTATUS)0xC000A080L) + +// +// MessageId: STATUS_LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR +// +// MessageText: +// +// {Delayed Write Failed} +// Windows was unable to save all the data for the file %hs; the data has been lost. +// This error was returned by the server on which the file exists. Please try to save this file elsewhere. +// +#define STATUS_LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR ((NTSTATUS)0xC000A081L) + +// +// MessageId: STATUS_LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR +// +// MessageText: +// +// {Delayed Write Failed} +// Windows was unable to save all the data for the file %hs; the data has been lost. +// This error may be caused if the device has been removed or the media is write-protected. +// +#define STATUS_LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR ((NTSTATUS)0xC000A082L) + +// +// MessageId: STATUS_XML_PARSE_ERROR +// +// MessageText: +// +// Windows was unable to parse the requested XML data. +// +#define STATUS_XML_PARSE_ERROR ((NTSTATUS)0xC000A083L) + +// +// MessageId: STATUS_XMLDSIG_ERROR +// +// MessageText: +// +// An error was encountered while processing an XML digital signature. +// +#define STATUS_XMLDSIG_ERROR ((NTSTATUS)0xC000A084L) + +// +// MessageId: STATUS_WRONG_COMPARTMENT +// +// MessageText: +// +// Indicates that the caller made the connection request in the wrong routing compartment. +// +#define STATUS_WRONG_COMPARTMENT ((NTSTATUS)0xC000A085L) + +// +// MessageId: STATUS_AUTHIP_FAILURE +// +// MessageText: +// +// Indicates that there was an AuthIP failure when attempting to connect to the remote host. +// +#define STATUS_AUTHIP_FAILURE ((NTSTATUS)0xC000A086L) + +// +// MessageId: STATUS_DS_OID_MAPPED_GROUP_CANT_HAVE_MEMBERS +// +// MessageText: +// +// OID mapped groups cannot have members. +// +#define STATUS_DS_OID_MAPPED_GROUP_CANT_HAVE_MEMBERS ((NTSTATUS)0xC000A087L) + +// +// MessageId: STATUS_DS_OID_NOT_FOUND +// +// MessageText: +// +// The specified OID cannot be found. +// +#define STATUS_DS_OID_NOT_FOUND ((NTSTATUS)0xC000A088L) + +/*++ + + MessageId's 0xa100 - 0xa120 (inclusive) are for the SMB Hash Generation Service. + +--*/ +// +// MessageId: STATUS_HASH_NOT_SUPPORTED +// +// MessageText: +// +// Hash generation for the specified version and hash type is not enabled on server. +// +#define STATUS_HASH_NOT_SUPPORTED ((NTSTATUS)0xC000A100L) + +// +// MessageId: STATUS_HASH_NOT_PRESENT +// +// MessageText: +// +// The hash requests is not present or not up to date with the current file contents. +// +#define STATUS_HASH_NOT_PRESENT ((NTSTATUS)0xC000A101L) + + +// +// Debugger error values +// + +// +// MessageId: DBG_NO_STATE_CHANGE +// +// MessageText: +// +// Debugger did not perform a state change. +// +#define DBG_NO_STATE_CHANGE ((NTSTATUS)0xC0010001L) + +// +// MessageId: DBG_APP_NOT_IDLE +// +// MessageText: +// +// Debugger has found the application is not idle. +// +#define DBG_APP_NOT_IDLE ((NTSTATUS)0xC0010002L) + + +// +// RPC error values +// + +// +// MessageId: RPC_NT_INVALID_STRING_BINDING +// +// MessageText: +// +// The string binding is invalid. +// +#define RPC_NT_INVALID_STRING_BINDING ((NTSTATUS)0xC0020001L) + +// +// MessageId: RPC_NT_WRONG_KIND_OF_BINDING +// +// MessageText: +// +// The binding handle is not the correct type. +// +#define RPC_NT_WRONG_KIND_OF_BINDING ((NTSTATUS)0xC0020002L) + +// +// MessageId: RPC_NT_INVALID_BINDING +// +// MessageText: +// +// The binding handle is invalid. +// +#define RPC_NT_INVALID_BINDING ((NTSTATUS)0xC0020003L) + +// +// MessageId: RPC_NT_PROTSEQ_NOT_SUPPORTED +// +// MessageText: +// +// The RPC protocol sequence is not supported. +// +#define RPC_NT_PROTSEQ_NOT_SUPPORTED ((NTSTATUS)0xC0020004L) + +// +// MessageId: RPC_NT_INVALID_RPC_PROTSEQ +// +// MessageText: +// +// The RPC protocol sequence is invalid. +// +#define RPC_NT_INVALID_RPC_PROTSEQ ((NTSTATUS)0xC0020005L) + +// +// MessageId: RPC_NT_INVALID_STRING_UUID +// +// MessageText: +// +// The string UUID is invalid. +// +#define RPC_NT_INVALID_STRING_UUID ((NTSTATUS)0xC0020006L) + +// +// MessageId: RPC_NT_INVALID_ENDPOINT_FORMAT +// +// MessageText: +// +// The endpoint format is invalid. +// +#define RPC_NT_INVALID_ENDPOINT_FORMAT ((NTSTATUS)0xC0020007L) + +// +// MessageId: RPC_NT_INVALID_NET_ADDR +// +// MessageText: +// +// The network address is invalid. +// +#define RPC_NT_INVALID_NET_ADDR ((NTSTATUS)0xC0020008L) + +// +// MessageId: RPC_NT_NO_ENDPOINT_FOUND +// +// MessageText: +// +// No endpoint was found. +// +#define RPC_NT_NO_ENDPOINT_FOUND ((NTSTATUS)0xC0020009L) + +// +// MessageId: RPC_NT_INVALID_TIMEOUT +// +// MessageText: +// +// The timeout value is invalid. +// +#define RPC_NT_INVALID_TIMEOUT ((NTSTATUS)0xC002000AL) + +// +// MessageId: RPC_NT_OBJECT_NOT_FOUND +// +// MessageText: +// +// The object UUID was not found. +// +#define RPC_NT_OBJECT_NOT_FOUND ((NTSTATUS)0xC002000BL) + +// +// MessageId: RPC_NT_ALREADY_REGISTERED +// +// MessageText: +// +// The object UUID has already been registered. +// +#define RPC_NT_ALREADY_REGISTERED ((NTSTATUS)0xC002000CL) + +// +// MessageId: RPC_NT_TYPE_ALREADY_REGISTERED +// +// MessageText: +// +// The type UUID has already been registered. +// +#define RPC_NT_TYPE_ALREADY_REGISTERED ((NTSTATUS)0xC002000DL) + +// +// MessageId: RPC_NT_ALREADY_LISTENING +// +// MessageText: +// +// The RPC server is already listening. +// +#define RPC_NT_ALREADY_LISTENING ((NTSTATUS)0xC002000EL) + +// +// MessageId: RPC_NT_NO_PROTSEQS_REGISTERED +// +// MessageText: +// +// No protocol sequences have been registered. +// +#define RPC_NT_NO_PROTSEQS_REGISTERED ((NTSTATUS)0xC002000FL) + +// +// MessageId: RPC_NT_NOT_LISTENING +// +// MessageText: +// +// The RPC server is not listening. +// +#define RPC_NT_NOT_LISTENING ((NTSTATUS)0xC0020010L) + +// +// MessageId: RPC_NT_UNKNOWN_MGR_TYPE +// +// MessageText: +// +// The manager type is unknown. +// +#define RPC_NT_UNKNOWN_MGR_TYPE ((NTSTATUS)0xC0020011L) + +// +// MessageId: RPC_NT_UNKNOWN_IF +// +// MessageText: +// +// The interface is unknown. +// +#define RPC_NT_UNKNOWN_IF ((NTSTATUS)0xC0020012L) + +// +// MessageId: RPC_NT_NO_BINDINGS +// +// MessageText: +// +// There are no bindings. +// +#define RPC_NT_NO_BINDINGS ((NTSTATUS)0xC0020013L) + +// +// MessageId: RPC_NT_NO_PROTSEQS +// +// MessageText: +// +// There are no protocol sequences. +// +#define RPC_NT_NO_PROTSEQS ((NTSTATUS)0xC0020014L) + +// +// MessageId: RPC_NT_CANT_CREATE_ENDPOINT +// +// MessageText: +// +// The endpoint cannot be created. +// +#define RPC_NT_CANT_CREATE_ENDPOINT ((NTSTATUS)0xC0020015L) + +// +// MessageId: RPC_NT_OUT_OF_RESOURCES +// +// MessageText: +// +// Not enough resources are available to complete this operation. +// +#define RPC_NT_OUT_OF_RESOURCES ((NTSTATUS)0xC0020016L) + +// +// MessageId: RPC_NT_SERVER_UNAVAILABLE +// +// MessageText: +// +// The RPC server is unavailable. +// +#define RPC_NT_SERVER_UNAVAILABLE ((NTSTATUS)0xC0020017L) + +// +// MessageId: RPC_NT_SERVER_TOO_BUSY +// +// MessageText: +// +// The RPC server is too busy to complete this operation. +// +#define RPC_NT_SERVER_TOO_BUSY ((NTSTATUS)0xC0020018L) + +// +// MessageId: RPC_NT_INVALID_NETWORK_OPTIONS +// +// MessageText: +// +// The network options are invalid. +// +#define RPC_NT_INVALID_NETWORK_OPTIONS ((NTSTATUS)0xC0020019L) + +// +// MessageId: RPC_NT_NO_CALL_ACTIVE +// +// MessageText: +// +// There are no remote procedure calls active on this thread. +// +#define RPC_NT_NO_CALL_ACTIVE ((NTSTATUS)0xC002001AL) + +// +// MessageId: RPC_NT_CALL_FAILED +// +// MessageText: +// +// The remote procedure call failed. +// +#define RPC_NT_CALL_FAILED ((NTSTATUS)0xC002001BL) + +// +// MessageId: RPC_NT_CALL_FAILED_DNE +// +// MessageText: +// +// The remote procedure call failed and did not execute. +// +#define RPC_NT_CALL_FAILED_DNE ((NTSTATUS)0xC002001CL) + +// +// MessageId: RPC_NT_PROTOCOL_ERROR +// +// MessageText: +// +// An RPC protocol error occurred. +// +#define RPC_NT_PROTOCOL_ERROR ((NTSTATUS)0xC002001DL) + +// +// MessageId: RPC_NT_UNSUPPORTED_TRANS_SYN +// +// MessageText: +// +// The transfer syntax is not supported by the RPC server. +// +#define RPC_NT_UNSUPPORTED_TRANS_SYN ((NTSTATUS)0xC002001FL) + +// +// MessageId: RPC_NT_UNSUPPORTED_TYPE +// +// MessageText: +// +// The type UUID is not supported. +// +#define RPC_NT_UNSUPPORTED_TYPE ((NTSTATUS)0xC0020021L) + +// +// MessageId: RPC_NT_INVALID_TAG +// +// MessageText: +// +// The tag is invalid. +// +#define RPC_NT_INVALID_TAG ((NTSTATUS)0xC0020022L) + +// +// MessageId: RPC_NT_INVALID_BOUND +// +// MessageText: +// +// The array bounds are invalid. +// +#define RPC_NT_INVALID_BOUND ((NTSTATUS)0xC0020023L) + +// +// MessageId: RPC_NT_NO_ENTRY_NAME +// +// MessageText: +// +// The binding does not contain an entry name. +// +#define RPC_NT_NO_ENTRY_NAME ((NTSTATUS)0xC0020024L) + +// +// MessageId: RPC_NT_INVALID_NAME_SYNTAX +// +// MessageText: +// +// The name syntax is invalid. +// +#define RPC_NT_INVALID_NAME_SYNTAX ((NTSTATUS)0xC0020025L) + +// +// MessageId: RPC_NT_UNSUPPORTED_NAME_SYNTAX +// +// MessageText: +// +// The name syntax is not supported. +// +#define RPC_NT_UNSUPPORTED_NAME_SYNTAX ((NTSTATUS)0xC0020026L) + +// +// MessageId: RPC_NT_UUID_NO_ADDRESS +// +// MessageText: +// +// No network address is available to use to construct a UUID. +// +#define RPC_NT_UUID_NO_ADDRESS ((NTSTATUS)0xC0020028L) + +// +// MessageId: RPC_NT_DUPLICATE_ENDPOINT +// +// MessageText: +// +// The endpoint is a duplicate. +// +#define RPC_NT_DUPLICATE_ENDPOINT ((NTSTATUS)0xC0020029L) + +// +// MessageId: RPC_NT_UNKNOWN_AUTHN_TYPE +// +// MessageText: +// +// The authentication type is unknown. +// +#define RPC_NT_UNKNOWN_AUTHN_TYPE ((NTSTATUS)0xC002002AL) + +// +// MessageId: RPC_NT_MAX_CALLS_TOO_SMALL +// +// MessageText: +// +// The maximum number of calls is too small. +// +#define RPC_NT_MAX_CALLS_TOO_SMALL ((NTSTATUS)0xC002002BL) + +// +// MessageId: RPC_NT_STRING_TOO_LONG +// +// MessageText: +// +// The string is too long. +// +#define RPC_NT_STRING_TOO_LONG ((NTSTATUS)0xC002002CL) + +// +// MessageId: RPC_NT_PROTSEQ_NOT_FOUND +// +// MessageText: +// +// The RPC protocol sequence was not found. +// +#define RPC_NT_PROTSEQ_NOT_FOUND ((NTSTATUS)0xC002002DL) + +// +// MessageId: RPC_NT_PROCNUM_OUT_OF_RANGE +// +// MessageText: +// +// The procedure number is out of range. +// +#define RPC_NT_PROCNUM_OUT_OF_RANGE ((NTSTATUS)0xC002002EL) + +// +// MessageId: RPC_NT_BINDING_HAS_NO_AUTH +// +// MessageText: +// +// The binding does not contain any authentication information. +// +#define RPC_NT_BINDING_HAS_NO_AUTH ((NTSTATUS)0xC002002FL) + +// +// MessageId: RPC_NT_UNKNOWN_AUTHN_SERVICE +// +// MessageText: +// +// The authentication service is unknown. +// +#define RPC_NT_UNKNOWN_AUTHN_SERVICE ((NTSTATUS)0xC0020030L) + +// +// MessageId: RPC_NT_UNKNOWN_AUTHN_LEVEL +// +// MessageText: +// +// The authentication level is unknown. +// +#define RPC_NT_UNKNOWN_AUTHN_LEVEL ((NTSTATUS)0xC0020031L) + +// +// MessageId: RPC_NT_INVALID_AUTH_IDENTITY +// +// MessageText: +// +// The security context is invalid. +// +#define RPC_NT_INVALID_AUTH_IDENTITY ((NTSTATUS)0xC0020032L) + +// +// MessageId: RPC_NT_UNKNOWN_AUTHZ_SERVICE +// +// MessageText: +// +// The authorization service is unknown. +// +#define RPC_NT_UNKNOWN_AUTHZ_SERVICE ((NTSTATUS)0xC0020033L) + +// +// MessageId: EPT_NT_INVALID_ENTRY +// +// MessageText: +// +// The entry is invalid. +// +#define EPT_NT_INVALID_ENTRY ((NTSTATUS)0xC0020034L) + +// +// MessageId: EPT_NT_CANT_PERFORM_OP +// +// MessageText: +// +// The operation cannot be performed. +// +#define EPT_NT_CANT_PERFORM_OP ((NTSTATUS)0xC0020035L) + +// +// MessageId: EPT_NT_NOT_REGISTERED +// +// MessageText: +// +// There are no more endpoints available from the endpoint mapper. +// +#define EPT_NT_NOT_REGISTERED ((NTSTATUS)0xC0020036L) + +// +// MessageId: RPC_NT_NOTHING_TO_EXPORT +// +// MessageText: +// +// No interfaces have been exported. +// +#define RPC_NT_NOTHING_TO_EXPORT ((NTSTATUS)0xC0020037L) + +// +// MessageId: RPC_NT_INCOMPLETE_NAME +// +// MessageText: +// +// The entry name is incomplete. +// +#define RPC_NT_INCOMPLETE_NAME ((NTSTATUS)0xC0020038L) + +// +// MessageId: RPC_NT_INVALID_VERS_OPTION +// +// MessageText: +// +// The version option is invalid. +// +#define RPC_NT_INVALID_VERS_OPTION ((NTSTATUS)0xC0020039L) + +// +// MessageId: RPC_NT_NO_MORE_MEMBERS +// +// MessageText: +// +// There are no more members. +// +#define RPC_NT_NO_MORE_MEMBERS ((NTSTATUS)0xC002003AL) + +// +// MessageId: RPC_NT_NOT_ALL_OBJS_UNEXPORTED +// +// MessageText: +// +// There is nothing to unexport. +// +#define RPC_NT_NOT_ALL_OBJS_UNEXPORTED ((NTSTATUS)0xC002003BL) + +// +// MessageId: RPC_NT_INTERFACE_NOT_FOUND +// +// MessageText: +// +// The interface was not found. +// +#define RPC_NT_INTERFACE_NOT_FOUND ((NTSTATUS)0xC002003CL) + +// +// MessageId: RPC_NT_ENTRY_ALREADY_EXISTS +// +// MessageText: +// +// The entry already exists. +// +#define RPC_NT_ENTRY_ALREADY_EXISTS ((NTSTATUS)0xC002003DL) + +// +// MessageId: RPC_NT_ENTRY_NOT_FOUND +// +// MessageText: +// +// The entry is not found. +// +#define RPC_NT_ENTRY_NOT_FOUND ((NTSTATUS)0xC002003EL) + +// +// MessageId: RPC_NT_NAME_SERVICE_UNAVAILABLE +// +// MessageText: +// +// The name service is unavailable. +// +#define RPC_NT_NAME_SERVICE_UNAVAILABLE ((NTSTATUS)0xC002003FL) + +// +// MessageId: RPC_NT_INVALID_NAF_ID +// +// MessageText: +// +// The network address family is invalid. +// +#define RPC_NT_INVALID_NAF_ID ((NTSTATUS)0xC0020040L) + +// +// MessageId: RPC_NT_CANNOT_SUPPORT +// +// MessageText: +// +// The requested operation is not supported. +// +#define RPC_NT_CANNOT_SUPPORT ((NTSTATUS)0xC0020041L) + +// +// MessageId: RPC_NT_NO_CONTEXT_AVAILABLE +// +// MessageText: +// +// No security context is available to allow impersonation. +// +#define RPC_NT_NO_CONTEXT_AVAILABLE ((NTSTATUS)0xC0020042L) + +// +// MessageId: RPC_NT_INTERNAL_ERROR +// +// MessageText: +// +// An internal error occurred in RPC. +// +#define RPC_NT_INTERNAL_ERROR ((NTSTATUS)0xC0020043L) + +// +// MessageId: RPC_NT_ZERO_DIVIDE +// +// MessageText: +// +// The RPC server attempted an integer divide by zero. +// +#define RPC_NT_ZERO_DIVIDE ((NTSTATUS)0xC0020044L) + +// +// MessageId: RPC_NT_ADDRESS_ERROR +// +// MessageText: +// +// An addressing error occurred in the RPC server. +// +#define RPC_NT_ADDRESS_ERROR ((NTSTATUS)0xC0020045L) + +// +// MessageId: RPC_NT_FP_DIV_ZERO +// +// MessageText: +// +// A floating point operation at the RPC server caused a divide by zero. +// +#define RPC_NT_FP_DIV_ZERO ((NTSTATUS)0xC0020046L) + +// +// MessageId: RPC_NT_FP_UNDERFLOW +// +// MessageText: +// +// A floating point underflow occurred at the RPC server. +// +#define RPC_NT_FP_UNDERFLOW ((NTSTATUS)0xC0020047L) + +// +// MessageId: RPC_NT_FP_OVERFLOW +// +// MessageText: +// +// A floating point overflow occurred at the RPC server. +// +#define RPC_NT_FP_OVERFLOW ((NTSTATUS)0xC0020048L) + +// +// MessageId: RPC_NT_NO_MORE_ENTRIES +// +// MessageText: +// +// The list of RPC servers available for auto-handle binding has been exhausted. +// +#define RPC_NT_NO_MORE_ENTRIES ((NTSTATUS)0xC0030001L) + +// +// MessageId: RPC_NT_SS_CHAR_TRANS_OPEN_FAIL +// +// MessageText: +// +// The file designated by DCERPCCHARTRANS cannot be opened. +// +#define RPC_NT_SS_CHAR_TRANS_OPEN_FAIL ((NTSTATUS)0xC0030002L) + +// +// MessageId: RPC_NT_SS_CHAR_TRANS_SHORT_FILE +// +// MessageText: +// +// The file containing the character translation table has fewer than 512 bytes. +// +#define RPC_NT_SS_CHAR_TRANS_SHORT_FILE ((NTSTATUS)0xC0030003L) + +// +// MessageId: RPC_NT_SS_IN_NULL_CONTEXT +// +// MessageText: +// +// A null context handle is passed as an [in] parameter. +// +#define RPC_NT_SS_IN_NULL_CONTEXT ((NTSTATUS)0xC0030004L) + +// +// MessageId: RPC_NT_SS_CONTEXT_MISMATCH +// +// MessageText: +// +// The context handle does not match any known context handles. +// +#define RPC_NT_SS_CONTEXT_MISMATCH ((NTSTATUS)0xC0030005L) + +// +// MessageId: RPC_NT_SS_CONTEXT_DAMAGED +// +// MessageText: +// +// The context handle changed during a call. +// +#define RPC_NT_SS_CONTEXT_DAMAGED ((NTSTATUS)0xC0030006L) + +// +// MessageId: RPC_NT_SS_HANDLES_MISMATCH +// +// MessageText: +// +// The binding handles passed to a remote procedure call do not match. +// +#define RPC_NT_SS_HANDLES_MISMATCH ((NTSTATUS)0xC0030007L) + +// +// MessageId: RPC_NT_SS_CANNOT_GET_CALL_HANDLE +// +// MessageText: +// +// The stub is unable to get the call handle. +// +#define RPC_NT_SS_CANNOT_GET_CALL_HANDLE ((NTSTATUS)0xC0030008L) + +// +// MessageId: RPC_NT_NULL_REF_POINTER +// +// MessageText: +// +// A null reference pointer was passed to the stub. +// +#define RPC_NT_NULL_REF_POINTER ((NTSTATUS)0xC0030009L) + +// +// MessageId: RPC_NT_ENUM_VALUE_OUT_OF_RANGE +// +// MessageText: +// +// The enumeration value is out of range. +// +#define RPC_NT_ENUM_VALUE_OUT_OF_RANGE ((NTSTATUS)0xC003000AL) + +// +// MessageId: RPC_NT_BYTE_COUNT_TOO_SMALL +// +// MessageText: +// +// The byte count is too small. +// +#define RPC_NT_BYTE_COUNT_TOO_SMALL ((NTSTATUS)0xC003000BL) + +// +// MessageId: RPC_NT_BAD_STUB_DATA +// +// MessageText: +// +// The stub received bad data. +// +#define RPC_NT_BAD_STUB_DATA ((NTSTATUS)0xC003000CL) + +// +// MessageId: RPC_NT_CALL_IN_PROGRESS +// +// MessageText: +// +// A remote procedure call is already in progress for this thread. +// +#define RPC_NT_CALL_IN_PROGRESS ((NTSTATUS)0xC0020049L) + +// +// MessageId: RPC_NT_NO_MORE_BINDINGS +// +// MessageText: +// +// There are no more bindings. +// +#define RPC_NT_NO_MORE_BINDINGS ((NTSTATUS)0xC002004AL) + +// +// MessageId: RPC_NT_GROUP_MEMBER_NOT_FOUND +// +// MessageText: +// +// The group member was not found. +// +#define RPC_NT_GROUP_MEMBER_NOT_FOUND ((NTSTATUS)0xC002004BL) + +// +// MessageId: EPT_NT_CANT_CREATE +// +// MessageText: +// +// The endpoint mapper database entry could not be created. +// +#define EPT_NT_CANT_CREATE ((NTSTATUS)0xC002004CL) + +// +// MessageId: RPC_NT_INVALID_OBJECT +// +// MessageText: +// +// The object UUID is the nil UUID. +// +#define RPC_NT_INVALID_OBJECT ((NTSTATUS)0xC002004DL) + +// +// MessageId: RPC_NT_NO_INTERFACES +// +// MessageText: +// +// No interfaces have been registered. +// +#define RPC_NT_NO_INTERFACES ((NTSTATUS)0xC002004FL) + +// +// MessageId: RPC_NT_CALL_CANCELLED +// +// MessageText: +// +// The remote procedure call was cancelled. +// +#define RPC_NT_CALL_CANCELLED ((NTSTATUS)0xC0020050L) + +// +// MessageId: RPC_NT_BINDING_INCOMPLETE +// +// MessageText: +// +// The binding handle does not contain all required information. +// +#define RPC_NT_BINDING_INCOMPLETE ((NTSTATUS)0xC0020051L) + +// +// MessageId: RPC_NT_COMM_FAILURE +// +// MessageText: +// +// A communications failure occurred during a remote procedure call. +// +#define RPC_NT_COMM_FAILURE ((NTSTATUS)0xC0020052L) + +// +// MessageId: RPC_NT_UNSUPPORTED_AUTHN_LEVEL +// +// MessageText: +// +// The requested authentication level is not supported. +// +#define RPC_NT_UNSUPPORTED_AUTHN_LEVEL ((NTSTATUS)0xC0020053L) + +// +// MessageId: RPC_NT_NO_PRINC_NAME +// +// MessageText: +// +// No principal name registered. +// +#define RPC_NT_NO_PRINC_NAME ((NTSTATUS)0xC0020054L) + +// +// MessageId: RPC_NT_NOT_RPC_ERROR +// +// MessageText: +// +// The error specified is not a valid Windows RPC error code. +// +#define RPC_NT_NOT_RPC_ERROR ((NTSTATUS)0xC0020055L) + +// +// MessageId: RPC_NT_UUID_LOCAL_ONLY +// +// MessageText: +// +// A UUID that is valid only on this computer has been allocated. +// +#define RPC_NT_UUID_LOCAL_ONLY ((NTSTATUS)0x40020056L) + +// +// MessageId: RPC_NT_SEC_PKG_ERROR +// +// MessageText: +// +// A security package specific error occurred. +// +#define RPC_NT_SEC_PKG_ERROR ((NTSTATUS)0xC0020057L) + +// +// MessageId: RPC_NT_NOT_CANCELLED +// +// MessageText: +// +// Thread is not cancelled. +// +#define RPC_NT_NOT_CANCELLED ((NTSTATUS)0xC0020058L) + +// +// MessageId: RPC_NT_INVALID_ES_ACTION +// +// MessageText: +// +// Invalid operation on the encoding/decoding handle. +// +#define RPC_NT_INVALID_ES_ACTION ((NTSTATUS)0xC0030059L) + +// +// MessageId: RPC_NT_WRONG_ES_VERSION +// +// MessageText: +// +// Incompatible version of the serializing package. +// +#define RPC_NT_WRONG_ES_VERSION ((NTSTATUS)0xC003005AL) + +// +// MessageId: RPC_NT_WRONG_STUB_VERSION +// +// MessageText: +// +// Incompatible version of the RPC stub. +// +#define RPC_NT_WRONG_STUB_VERSION ((NTSTATUS)0xC003005BL) + +// +// MessageId: RPC_NT_INVALID_PIPE_OBJECT +// +// MessageText: +// +// The RPC pipe object is invalid or corrupted. +// +#define RPC_NT_INVALID_PIPE_OBJECT ((NTSTATUS)0xC003005CL) + +// +// MessageId: RPC_NT_INVALID_PIPE_OPERATION +// +// MessageText: +// +// An invalid operation was attempted on an RPC pipe object. +// +#define RPC_NT_INVALID_PIPE_OPERATION ((NTSTATUS)0xC003005DL) + +// +// MessageId: RPC_NT_WRONG_PIPE_VERSION +// +// MessageText: +// +// Unsupported RPC pipe version. +// +#define RPC_NT_WRONG_PIPE_VERSION ((NTSTATUS)0xC003005EL) + +// +// MessageId: RPC_NT_PIPE_CLOSED +// +// MessageText: +// +// The RPC pipe object has already been closed. +// +#define RPC_NT_PIPE_CLOSED ((NTSTATUS)0xC003005FL) + +// +// MessageId: RPC_NT_PIPE_DISCIPLINE_ERROR +// +// MessageText: +// +// The RPC call completed before all pipes were processed. +// +#define RPC_NT_PIPE_DISCIPLINE_ERROR ((NTSTATUS)0xC0030060L) + +// +// MessageId: RPC_NT_PIPE_EMPTY +// +// MessageText: +// +// No more data is available from the RPC pipe. +// +#define RPC_NT_PIPE_EMPTY ((NTSTATUS)0xC0030061L) + +// +// MessageId: RPC_NT_INVALID_ASYNC_HANDLE +// +// MessageText: +// +// Invalid asynchronous remote procedure call handle. +// +#define RPC_NT_INVALID_ASYNC_HANDLE ((NTSTATUS)0xC0020062L) + +// +// MessageId: RPC_NT_INVALID_ASYNC_CALL +// +// MessageText: +// +// Invalid asynchronous RPC call handle for this operation. +// +#define RPC_NT_INVALID_ASYNC_CALL ((NTSTATUS)0xC0020063L) + +// +// MessageId: RPC_NT_PROXY_ACCESS_DENIED +// +// MessageText: +// +// Access to the HTTP proxy is denied. +// +#define RPC_NT_PROXY_ACCESS_DENIED ((NTSTATUS)0xC0020064L) + +// +// MessageId: RPC_NT_COOKIE_AUTH_FAILED +// +// MessageText: +// +// HTTP proxy server rejected the connection because the cookie authentication failed. +// +#define RPC_NT_COOKIE_AUTH_FAILED ((NTSTATUS)0xC0020065L) + +// +// MessageId: RPC_NT_SEND_INCOMPLETE +// +// MessageText: +// +// Some data remains to be sent in the request buffer. +// +#define RPC_NT_SEND_INCOMPLETE ((NTSTATUS)0x400200AFL) + + +// +// ACPI error values +// + +// +// MessageId: STATUS_ACPI_INVALID_OPCODE +// +// MessageText: +// +// An attempt was made to run an invalid AML opcode +// +#define STATUS_ACPI_INVALID_OPCODE ((NTSTATUS)0xC0140001L) + +// +// MessageId: STATUS_ACPI_STACK_OVERFLOW +// +// MessageText: +// +// The AML Interpreter Stack has overflowed +// +#define STATUS_ACPI_STACK_OVERFLOW ((NTSTATUS)0xC0140002L) + +// +// MessageId: STATUS_ACPI_ASSERT_FAILED +// +// MessageText: +// +// An inconsistent state has occurred +// +#define STATUS_ACPI_ASSERT_FAILED ((NTSTATUS)0xC0140003L) + +// +// MessageId: STATUS_ACPI_INVALID_INDEX +// +// MessageText: +// +// An attempt was made to access an array outside of its bounds +// +#define STATUS_ACPI_INVALID_INDEX ((NTSTATUS)0xC0140004L) + +// +// MessageId: STATUS_ACPI_INVALID_ARGUMENT +// +// MessageText: +// +// A required argument was not specified +// +#define STATUS_ACPI_INVALID_ARGUMENT ((NTSTATUS)0xC0140005L) + +// +// MessageId: STATUS_ACPI_FATAL +// +// MessageText: +// +// A fatal error has occurred +// +#define STATUS_ACPI_FATAL ((NTSTATUS)0xC0140006L) + +// +// MessageId: STATUS_ACPI_INVALID_SUPERNAME +// +// MessageText: +// +// An invalid SuperName was specified +// +#define STATUS_ACPI_INVALID_SUPERNAME ((NTSTATUS)0xC0140007L) + +// +// MessageId: STATUS_ACPI_INVALID_ARGTYPE +// +// MessageText: +// +// An argument with an incorrect type was specified +// +#define STATUS_ACPI_INVALID_ARGTYPE ((NTSTATUS)0xC0140008L) + +// +// MessageId: STATUS_ACPI_INVALID_OBJTYPE +// +// MessageText: +// +// An object with an incorrect type was specified +// +#define STATUS_ACPI_INVALID_OBJTYPE ((NTSTATUS)0xC0140009L) + +// +// MessageId: STATUS_ACPI_INVALID_TARGETTYPE +// +// MessageText: +// +// A target with an incorrect type was specified +// +#define STATUS_ACPI_INVALID_TARGETTYPE ((NTSTATUS)0xC014000AL) + +// +// MessageId: STATUS_ACPI_INCORRECT_ARGUMENT_COUNT +// +// MessageText: +// +// An incorrect number of arguments were specified +// +#define STATUS_ACPI_INCORRECT_ARGUMENT_COUNT ((NTSTATUS)0xC014000BL) + +// +// MessageId: STATUS_ACPI_ADDRESS_NOT_MAPPED +// +// MessageText: +// +// An address failed to translate +// +#define STATUS_ACPI_ADDRESS_NOT_MAPPED ((NTSTATUS)0xC014000CL) + +// +// MessageId: STATUS_ACPI_INVALID_EVENTTYPE +// +// MessageText: +// +// An incorrect event type was specified +// +#define STATUS_ACPI_INVALID_EVENTTYPE ((NTSTATUS)0xC014000DL) + +// +// MessageId: STATUS_ACPI_HANDLER_COLLISION +// +// MessageText: +// +// A handler for the target already exists +// +#define STATUS_ACPI_HANDLER_COLLISION ((NTSTATUS)0xC014000EL) + +// +// MessageId: STATUS_ACPI_INVALID_DATA +// +// MessageText: +// +// Invalid data for the target was specified +// +#define STATUS_ACPI_INVALID_DATA ((NTSTATUS)0xC014000FL) + +// +// MessageId: STATUS_ACPI_INVALID_REGION +// +// MessageText: +// +// An invalid region for the target was specified +// +#define STATUS_ACPI_INVALID_REGION ((NTSTATUS)0xC0140010L) + +// +// MessageId: STATUS_ACPI_INVALID_ACCESS_SIZE +// +// MessageText: +// +// An attempt was made to access a field outside of the defined range +// +#define STATUS_ACPI_INVALID_ACCESS_SIZE ((NTSTATUS)0xC0140011L) + +// +// MessageId: STATUS_ACPI_ACQUIRE_GLOBAL_LOCK +// +// MessageText: +// +// The Global system lock could not be acquired +// +#define STATUS_ACPI_ACQUIRE_GLOBAL_LOCK ((NTSTATUS)0xC0140012L) + +// +// MessageId: STATUS_ACPI_ALREADY_INITIALIZED +// +// MessageText: +// +// An attempt was made to reinitialize the ACPI subsystem +// +#define STATUS_ACPI_ALREADY_INITIALIZED ((NTSTATUS)0xC0140013L) + +// +// MessageId: STATUS_ACPI_NOT_INITIALIZED +// +// MessageText: +// +// The ACPI subsystem has not been initialized +// +#define STATUS_ACPI_NOT_INITIALIZED ((NTSTATUS)0xC0140014L) + +// +// MessageId: STATUS_ACPI_INVALID_MUTEX_LEVEL +// +// MessageText: +// +// An incorrect mutex was specified +// +#define STATUS_ACPI_INVALID_MUTEX_LEVEL ((NTSTATUS)0xC0140015L) + +// +// MessageId: STATUS_ACPI_MUTEX_NOT_OWNED +// +// MessageText: +// +// The mutex is not currently owned +// +#define STATUS_ACPI_MUTEX_NOT_OWNED ((NTSTATUS)0xC0140016L) + +// +// MessageId: STATUS_ACPI_MUTEX_NOT_OWNER +// +// MessageText: +// +// An attempt was made to access the mutex by a process that was not the owner +// +#define STATUS_ACPI_MUTEX_NOT_OWNER ((NTSTATUS)0xC0140017L) + +// +// MessageId: STATUS_ACPI_RS_ACCESS +// +// MessageText: +// +// An error occurred during an access to Region Space +// +#define STATUS_ACPI_RS_ACCESS ((NTSTATUS)0xC0140018L) + +// +// MessageId: STATUS_ACPI_INVALID_TABLE +// +// MessageText: +// +// An attempt was made to use an incorrect table +// +#define STATUS_ACPI_INVALID_TABLE ((NTSTATUS)0xC0140019L) + +// +// MessageId: STATUS_ACPI_REG_HANDLER_FAILED +// +// MessageText: +// +// The registration of an ACPI event failed +// +#define STATUS_ACPI_REG_HANDLER_FAILED ((NTSTATUS)0xC0140020L) + +// +// MessageId: STATUS_ACPI_POWER_REQUEST_FAILED +// +// MessageText: +// +// An ACPI Power Object failed to transition state +// +#define STATUS_ACPI_POWER_REQUEST_FAILED ((NTSTATUS)0xC0140021L) + +// +// Terminal Server specific Errors +// +// +// MessageId: STATUS_CTX_WINSTATION_NAME_INVALID +// +// MessageText: +// +// Session name %1 is invalid. +// +#define STATUS_CTX_WINSTATION_NAME_INVALID ((NTSTATUS)0xC00A0001L) + +// +// MessageId: STATUS_CTX_INVALID_PD +// +// MessageText: +// +// The protocol driver %1 is invalid. +// +#define STATUS_CTX_INVALID_PD ((NTSTATUS)0xC00A0002L) + +// +// MessageId: STATUS_CTX_PD_NOT_FOUND +// +// MessageText: +// +// The protocol driver %1 was not found in the system path. +// +#define STATUS_CTX_PD_NOT_FOUND ((NTSTATUS)0xC00A0003L) + +// +// MessageId: STATUS_CTX_CDM_CONNECT +// +// MessageText: +// +// The Client Drive Mapping Service Has Connected on Terminal Connection. +// +#define STATUS_CTX_CDM_CONNECT ((NTSTATUS)0x400A0004L) + +// +// MessageId: STATUS_CTX_CDM_DISCONNECT +// +// MessageText: +// +// The Client Drive Mapping Service Has Disconnected on Terminal Connection. +// +#define STATUS_CTX_CDM_DISCONNECT ((NTSTATUS)0x400A0005L) + +// +// MessageId: STATUS_CTX_CLOSE_PENDING +// +// MessageText: +// +// A close operation is pending on the Terminal Connection. +// +#define STATUS_CTX_CLOSE_PENDING ((NTSTATUS)0xC00A0006L) + +// +// MessageId: STATUS_CTX_NO_OUTBUF +// +// MessageText: +// +// There are no free output buffers available. +// +#define STATUS_CTX_NO_OUTBUF ((NTSTATUS)0xC00A0007L) + +// +// MessageId: STATUS_CTX_MODEM_INF_NOT_FOUND +// +// MessageText: +// +// The MODEM.INF file was not found. +// +#define STATUS_CTX_MODEM_INF_NOT_FOUND ((NTSTATUS)0xC00A0008L) + +// +// MessageId: STATUS_CTX_INVALID_MODEMNAME +// +// MessageText: +// +// The modem (%1) was not found in MODEM.INF. +// +#define STATUS_CTX_INVALID_MODEMNAME ((NTSTATUS)0xC00A0009L) + +// +// MessageId: STATUS_CTX_RESPONSE_ERROR +// +// MessageText: +// +// The modem did not accept the command sent to it. +// Verify the configured modem name matches the attached modem. +// +#define STATUS_CTX_RESPONSE_ERROR ((NTSTATUS)0xC00A000AL) + +// +// MessageId: STATUS_CTX_MODEM_RESPONSE_TIMEOUT +// +// MessageText: +// +// The modem did not respond to the command sent to it. +// Verify the modem is properly cabled and powered on. +// +#define STATUS_CTX_MODEM_RESPONSE_TIMEOUT ((NTSTATUS)0xC00A000BL) + +// +// MessageId: STATUS_CTX_MODEM_RESPONSE_NO_CARRIER +// +// MessageText: +// +// Carrier detect has failed or carrier has been dropped due to disconnect. +// +#define STATUS_CTX_MODEM_RESPONSE_NO_CARRIER ((NTSTATUS)0xC00A000CL) + +// +// MessageId: STATUS_CTX_MODEM_RESPONSE_NO_DIALTONE +// +// MessageText: +// +// Dial tone not detected within required time. +// Verify phone cable is properly attached and functional. +// +#define STATUS_CTX_MODEM_RESPONSE_NO_DIALTONE ((NTSTATUS)0xC00A000DL) + +// +// MessageId: STATUS_CTX_MODEM_RESPONSE_BUSY +// +// MessageText: +// +// Busy signal detected at remote site on callback. +// +#define STATUS_CTX_MODEM_RESPONSE_BUSY ((NTSTATUS)0xC00A000EL) + +// +// MessageId: STATUS_CTX_MODEM_RESPONSE_VOICE +// +// MessageText: +// +// Voice detected at remote site on callback. +// +#define STATUS_CTX_MODEM_RESPONSE_VOICE ((NTSTATUS)0xC00A000FL) + +// +// MessageId: STATUS_CTX_TD_ERROR +// +// MessageText: +// +// Transport driver error +// +#define STATUS_CTX_TD_ERROR ((NTSTATUS)0xC00A0010L) + +// +// MessageId: STATUS_CTX_LICENSE_CLIENT_INVALID +// +// MessageText: +// +// The client you are using is not licensed to use this system. Your logon request is denied. +// +#define STATUS_CTX_LICENSE_CLIENT_INVALID ((NTSTATUS)0xC00A0012L) + +// +// MessageId: STATUS_CTX_LICENSE_NOT_AVAILABLE +// +// MessageText: +// +// The system has reached its licensed logon limit. +// Please try again later. +// +#define STATUS_CTX_LICENSE_NOT_AVAILABLE ((NTSTATUS)0xC00A0013L) + +// +// MessageId: STATUS_CTX_LICENSE_EXPIRED +// +// MessageText: +// +// The system license has expired. Your logon request is denied. +// +#define STATUS_CTX_LICENSE_EXPIRED ((NTSTATUS)0xC00A0014L) + +// +// MessageId: STATUS_CTX_WINSTATION_NOT_FOUND +// +// MessageText: +// +// The specified session cannot be found. +// +#define STATUS_CTX_WINSTATION_NOT_FOUND ((NTSTATUS)0xC00A0015L) + +// +// MessageId: STATUS_CTX_WINSTATION_NAME_COLLISION +// +// MessageText: +// +// The specified session name is already in use. +// +#define STATUS_CTX_WINSTATION_NAME_COLLISION ((NTSTATUS)0xC00A0016L) + +// +// MessageId: STATUS_CTX_WINSTATION_BUSY +// +// MessageText: +// +// The requested operation cannot be completed because the Terminal Connection is currently busy processing a connect, disconnect, reset, or delete operation. +// +#define STATUS_CTX_WINSTATION_BUSY ((NTSTATUS)0xC00A0017L) + +// +// MessageId: STATUS_CTX_BAD_VIDEO_MODE +// +// MessageText: +// +// An attempt has been made to connect to a session whose video mode is not supported by the current client. +// +#define STATUS_CTX_BAD_VIDEO_MODE ((NTSTATUS)0xC00A0018L) + +// +// MessageId: STATUS_CTX_GRAPHICS_INVALID +// +// MessageText: +// +// The application attempted to enable DOS graphics mode. +// DOS graphics mode is not supported. +// +#define STATUS_CTX_GRAPHICS_INVALID ((NTSTATUS)0xC00A0022L) + +// +// MessageId: STATUS_CTX_NOT_CONSOLE +// +// MessageText: +// +// The requested operation can be performed only on the system console. +// This is most often the result of a driver or system DLL requiring direct console access. +// +#define STATUS_CTX_NOT_CONSOLE ((NTSTATUS)0xC00A0024L) + +// +// MessageId: STATUS_CTX_CLIENT_QUERY_TIMEOUT +// +// MessageText: +// +// The client failed to respond to the server connect message. +// +#define STATUS_CTX_CLIENT_QUERY_TIMEOUT ((NTSTATUS)0xC00A0026L) + +// +// MessageId: STATUS_CTX_CONSOLE_DISCONNECT +// +// MessageText: +// +// Disconnecting the console session is not supported. +// +#define STATUS_CTX_CONSOLE_DISCONNECT ((NTSTATUS)0xC00A0027L) + +// +// MessageId: STATUS_CTX_CONSOLE_CONNECT +// +// MessageText: +// +// Reconnecting a disconnected session to the console is not supported. +// +#define STATUS_CTX_CONSOLE_CONNECT ((NTSTATUS)0xC00A0028L) + +// +// MessageId: STATUS_CTX_SHADOW_DENIED +// +// MessageText: +// +// The request to control another session remotely was denied. +// +#define STATUS_CTX_SHADOW_DENIED ((NTSTATUS)0xC00A002AL) + +// +// MessageId: STATUS_CTX_WINSTATION_ACCESS_DENIED +// +// MessageText: +// +// A process has requested access to a session, but has not been granted those access rights. +// +#define STATUS_CTX_WINSTATION_ACCESS_DENIED ((NTSTATUS)0xC00A002BL) + +// +// MessageId: STATUS_CTX_INVALID_WD +// +// MessageText: +// +// The Terminal Connection driver %1 is invalid. +// +#define STATUS_CTX_INVALID_WD ((NTSTATUS)0xC00A002EL) + +// +// MessageId: STATUS_CTX_WD_NOT_FOUND +// +// MessageText: +// +// The Terminal Connection driver %1 was not found in the system path. +// +#define STATUS_CTX_WD_NOT_FOUND ((NTSTATUS)0xC00A002FL) + +// +// MessageId: STATUS_CTX_SHADOW_INVALID +// +// MessageText: +// +// The requested session cannot be controlled remotely. +// You cannot control your own session, a session that is trying to control your session, +// a session that has no user logged on, nor control other sessions from the console. +// +#define STATUS_CTX_SHADOW_INVALID ((NTSTATUS)0xC00A0030L) + +// +// MessageId: STATUS_CTX_SHADOW_DISABLED +// +// MessageText: +// +// The requested session is not configured to allow remote control. +// +#define STATUS_CTX_SHADOW_DISABLED ((NTSTATUS)0xC00A0031L) + +// +// MessageId: STATUS_RDP_PROTOCOL_ERROR +// +// MessageText: +// +// The RDP protocol component %2 detected an error in the protocol stream and has disconnected the client. +// +#define STATUS_RDP_PROTOCOL_ERROR ((NTSTATUS)0xC00A0032L) + +// +// MessageId: STATUS_CTX_CLIENT_LICENSE_NOT_SET +// +// MessageText: +// +// Your request to connect to this Terminal server has been rejected. +// Your Terminal Server Client license number has not been entered for this copy of the Terminal Client. +// Please call your system administrator for help in entering a valid, unique license number for this Terminal Server Client. +// Click OK to continue. +// +#define STATUS_CTX_CLIENT_LICENSE_NOT_SET ((NTSTATUS)0xC00A0033L) + +// +// MessageId: STATUS_CTX_CLIENT_LICENSE_IN_USE +// +// MessageText: +// +// Your request to connect to this Terminal server has been rejected. +// Your Terminal Server Client license number is currently being used by another user. +// Please call your system administrator to obtain a new copy of the Terminal Server Client with a valid, unique license number. +// Click OK to continue. +// +#define STATUS_CTX_CLIENT_LICENSE_IN_USE ((NTSTATUS)0xC00A0034L) + +// +// MessageId: STATUS_CTX_SHADOW_ENDED_BY_MODE_CHANGE +// +// MessageText: +// +// The remote control of the console was terminated because the display mode was changed. Changing the display mode in a remote control session is not supported. +// +#define STATUS_CTX_SHADOW_ENDED_BY_MODE_CHANGE ((NTSTATUS)0xC00A0035L) + +// +// MessageId: STATUS_CTX_SHADOW_NOT_RUNNING +// +// MessageText: +// +// Remote control could not be terminated because the specified session is not currently being remotely controlled. +// +#define STATUS_CTX_SHADOW_NOT_RUNNING ((NTSTATUS)0xC00A0036L) + +// +// MessageId: STATUS_CTX_LOGON_DISABLED +// +// MessageText: +// +// Your interactive logon privilege has been disabled. +// Please contact your system administrator. +// +#define STATUS_CTX_LOGON_DISABLED ((NTSTATUS)0xC00A0037L) + +// +// MessageId: STATUS_CTX_SECURITY_LAYER_ERROR +// +// MessageText: +// +// The Terminal Server security layer detected an error in the protocol stream and has disconnected the client. +// +#define STATUS_CTX_SECURITY_LAYER_ERROR ((NTSTATUS)0xC00A0038L) + +// +// MessageId: STATUS_TS_INCOMPATIBLE_SESSIONS +// +// MessageText: +// +// The target session is incompatible with the current session. +// +#define STATUS_TS_INCOMPATIBLE_SESSIONS ((NTSTATUS)0xC00A0039L) + + +// +// IO error values +// + +// +// MessageId: STATUS_PNP_BAD_MPS_TABLE +// +// MessageText: +// +// A device is missing in the system BIOS MPS table. This device will not be used. +// Please contact your system vendor for system BIOS update. +// +#define STATUS_PNP_BAD_MPS_TABLE ((NTSTATUS)0xC0040035L) + +// +// MessageId: STATUS_PNP_TRANSLATION_FAILED +// +// MessageText: +// +// A translator failed to translate resources. +// +#define STATUS_PNP_TRANSLATION_FAILED ((NTSTATUS)0xC0040036L) + +// +// MessageId: STATUS_PNP_IRQ_TRANSLATION_FAILED +// +// MessageText: +// +// A IRQ translator failed to translate resources. +// +#define STATUS_PNP_IRQ_TRANSLATION_FAILED ((NTSTATUS)0xC0040037L) + +// +// MessageId: STATUS_PNP_INVALID_ID +// +// MessageText: +// +// Driver %2 returned invalid ID for a child device (%3). +// +#define STATUS_PNP_INVALID_ID ((NTSTATUS)0xC0040038L) + +// +// MessageId: STATUS_IO_REISSUE_AS_CACHED +// +// MessageText: +// +// Reissue the given operation as a cached IO operation +// +#define STATUS_IO_REISSUE_AS_CACHED ((NTSTATUS)0xC0040039L) + + +// +// MUI error values +// + +// +// MessageId: STATUS_MUI_FILE_NOT_FOUND +// +// MessageText: +// +// The resource loader failed to find MUI file. +// +#define STATUS_MUI_FILE_NOT_FOUND ((NTSTATUS)0xC00B0001L) + +// +// MessageId: STATUS_MUI_INVALID_FILE +// +// MessageText: +// +// The resource loader failed to load MUI file because the file fail to pass validation. +// +#define STATUS_MUI_INVALID_FILE ((NTSTATUS)0xC00B0002L) + +// +// MessageId: STATUS_MUI_INVALID_RC_CONFIG +// +// MessageText: +// +// The RC Manifest is corrupted with garbage data or unsupported version or missing required item. +// +#define STATUS_MUI_INVALID_RC_CONFIG ((NTSTATUS)0xC00B0003L) + +// +// MessageId: STATUS_MUI_INVALID_LOCALE_NAME +// +// MessageText: +// +// The RC Manifest has invalid culture name. +// +#define STATUS_MUI_INVALID_LOCALE_NAME ((NTSTATUS)0xC00B0004L) + +// +// MessageId: STATUS_MUI_INVALID_ULTIMATEFALLBACK_NAME +// +// MessageText: +// +// The RC Manifest has invalid ultimatefallback name. +// +#define STATUS_MUI_INVALID_ULTIMATEFALLBACK_NAME ((NTSTATUS)0xC00B0005L) + +// +// MessageId: STATUS_MUI_FILE_NOT_LOADED +// +// MessageText: +// +// The resource loader cache doesn't have loaded MUI entry. +// +#define STATUS_MUI_FILE_NOT_LOADED ((NTSTATUS)0xC00B0006L) + +// +// MessageId: STATUS_RESOURCE_ENUM_USER_STOP +// +// MessageText: +// +// User stopped resource enumeration. +// +#define STATUS_RESOURCE_ENUM_USER_STOP ((NTSTATUS)0xC00B0007L) + + +// +// Filter Manager error values +// + +// +// Translation macro for converting: +// HRESULT --> NTSTATUS +// + +#define FILTER_FLT_NTSTATUS_FROM_HRESULT(x) ((NTSTATUS) (((x) & 0xC0007FFF) | (FACILITY_FILTER_MANAGER << 16) | 0x40000000)) + +// +// MessageId: STATUS_FLT_NO_HANDLER_DEFINED +// +// MessageText: +// +// A handler was not defined by the filter for this operation. +// +#define STATUS_FLT_NO_HANDLER_DEFINED ((NTSTATUS)0xC01C0001L) + +// +// MessageId: STATUS_FLT_CONTEXT_ALREADY_DEFINED +// +// MessageText: +// +// A context is already defined for this object. +// +#define STATUS_FLT_CONTEXT_ALREADY_DEFINED ((NTSTATUS)0xC01C0002L) + +// +// MessageId: STATUS_FLT_INVALID_ASYNCHRONOUS_REQUEST +// +// MessageText: +// +// Asynchronous requests are not valid for this operation. +// +#define STATUS_FLT_INVALID_ASYNCHRONOUS_REQUEST ((NTSTATUS)0xC01C0003L) + +// +// MessageId: STATUS_FLT_DISALLOW_FAST_IO +// +// MessageText: +// +// Internal error code used by the filter manager to determine if a fastio operation should be forced down the IRP path. Mini-filters should never return this value. +// +#define STATUS_FLT_DISALLOW_FAST_IO ((NTSTATUS)0xC01C0004L) + +// +// MessageId: STATUS_FLT_INVALID_NAME_REQUEST +// +// MessageText: +// +// An invalid name request was made. The name requested cannot be retrieved at this time. +// +#define STATUS_FLT_INVALID_NAME_REQUEST ((NTSTATUS)0xC01C0005L) + +// +// MessageId: STATUS_FLT_NOT_SAFE_TO_POST_OPERATION +// +// MessageText: +// +// Posting this operation to a worker thread for further processing is not safe at this time because it could lead to a system deadlock. +// +#define STATUS_FLT_NOT_SAFE_TO_POST_OPERATION ((NTSTATUS)0xC01C0006L) + +// +// MessageId: STATUS_FLT_NOT_INITIALIZED +// +// MessageText: +// +// The Filter Manager was not initialized when a filter tried to register. Make sure that the Filter Manager is getting loaded as a driver. +// +#define STATUS_FLT_NOT_INITIALIZED ((NTSTATUS)0xC01C0007L) + +// +// MessageId: STATUS_FLT_FILTER_NOT_READY +// +// MessageText: +// +// The filter is not ready for attachment to volumes because it has not finished initializing (FltStartFiltering has not been called). +// +#define STATUS_FLT_FILTER_NOT_READY ((NTSTATUS)0xC01C0008L) + +// +// MessageId: STATUS_FLT_POST_OPERATION_CLEANUP +// +// MessageText: +// +// The filter must cleanup any operation specific context at this time because it is being removed from the system before the operation is completed by the lower drivers. +// +#define STATUS_FLT_POST_OPERATION_CLEANUP ((NTSTATUS)0xC01C0009L) + +// +// MessageId: STATUS_FLT_INTERNAL_ERROR +// +// MessageText: +// +// The Filter Manager had an internal error from which it cannot recover, therefore the operation has been failed. This is usually the result of a filter returning an invalid value from a pre-operation callback. +// +#define STATUS_FLT_INTERNAL_ERROR ((NTSTATUS)0xC01C000AL) + +// +// MessageId: STATUS_FLT_DELETING_OBJECT +// +// MessageText: +// +// The object specified for this action is in the process of being deleted, therefore the action requested cannot be completed at this time. +// +#define STATUS_FLT_DELETING_OBJECT ((NTSTATUS)0xC01C000BL) + +// +// MessageId: STATUS_FLT_MUST_BE_NONPAGED_POOL +// +// MessageText: +// +// Non-paged pool must be used for this type of context. +// +#define STATUS_FLT_MUST_BE_NONPAGED_POOL ((NTSTATUS)0xC01C000CL) + +// +// MessageId: STATUS_FLT_DUPLICATE_ENTRY +// +// MessageText: +// +// A duplicate handler definition has been provided for an operation. +// +#define STATUS_FLT_DUPLICATE_ENTRY ((NTSTATUS)0xC01C000DL) + +// +// MessageId: STATUS_FLT_CBDQ_DISABLED +// +// MessageText: +// +// The callback data queue has been disabled. +// +#define STATUS_FLT_CBDQ_DISABLED ((NTSTATUS)0xC01C000EL) + +// +// MessageId: STATUS_FLT_DO_NOT_ATTACH +// +// MessageText: +// +// Do not attach the filter to the volume at this time. +// +#define STATUS_FLT_DO_NOT_ATTACH ((NTSTATUS)0xC01C000FL) + +// +// MessageId: STATUS_FLT_DO_NOT_DETACH +// +// MessageText: +// +// Do not detach the filter from the volume at this time. +// +#define STATUS_FLT_DO_NOT_DETACH ((NTSTATUS)0xC01C0010L) + +// +// MessageId: STATUS_FLT_INSTANCE_ALTITUDE_COLLISION +// +// MessageText: +// +// An instance already exists at this altitude on the volume specified. +// +#define STATUS_FLT_INSTANCE_ALTITUDE_COLLISION ((NTSTATUS)0xC01C0011L) + +// +// MessageId: STATUS_FLT_INSTANCE_NAME_COLLISION +// +// MessageText: +// +// An instance already exists with this name on the volume specified. +// +#define STATUS_FLT_INSTANCE_NAME_COLLISION ((NTSTATUS)0xC01C0012L) + +// +// MessageId: STATUS_FLT_FILTER_NOT_FOUND +// +// MessageText: +// +// The system could not find the filter specified. +// +#define STATUS_FLT_FILTER_NOT_FOUND ((NTSTATUS)0xC01C0013L) + +// +// MessageId: STATUS_FLT_VOLUME_NOT_FOUND +// +// MessageText: +// +// The system could not find the volume specified. +// +#define STATUS_FLT_VOLUME_NOT_FOUND ((NTSTATUS)0xC01C0014L) + +// +// MessageId: STATUS_FLT_INSTANCE_NOT_FOUND +// +// MessageText: +// +// The system could not find the instance specified. +// +#define STATUS_FLT_INSTANCE_NOT_FOUND ((NTSTATUS)0xC01C0015L) + +// +// MessageId: STATUS_FLT_CONTEXT_ALLOCATION_NOT_FOUND +// +// MessageText: +// +// No registered context allocation definition was found for the given request. +// +#define STATUS_FLT_CONTEXT_ALLOCATION_NOT_FOUND ((NTSTATUS)0xC01C0016L) + +// +// MessageId: STATUS_FLT_INVALID_CONTEXT_REGISTRATION +// +// MessageText: +// +// An invalid parameter was specified during context registration. +// +#define STATUS_FLT_INVALID_CONTEXT_REGISTRATION ((NTSTATUS)0xC01C0017L) + +// +// MessageId: STATUS_FLT_NAME_CACHE_MISS +// +// MessageText: +// +// The name requested was not found in Filter Manager's name cache and could not be retrieved from the file system. +// +#define STATUS_FLT_NAME_CACHE_MISS ((NTSTATUS)0xC01C0018L) + +// +// MessageId: STATUS_FLT_NO_DEVICE_OBJECT +// +// MessageText: +// +// The requested device object does not exist for the given volume. +// +#define STATUS_FLT_NO_DEVICE_OBJECT ((NTSTATUS)0xC01C0019L) + +// +// MessageId: STATUS_FLT_VOLUME_ALREADY_MOUNTED +// +// MessageText: +// +// The specified volume is already mounted. +// +#define STATUS_FLT_VOLUME_ALREADY_MOUNTED ((NTSTATUS)0xC01C001AL) + +// +// MessageId: STATUS_FLT_ALREADY_ENLISTED +// +// MessageText: +// +// The specified Transaction Context is already enlisted in a transaction +// +#define STATUS_FLT_ALREADY_ENLISTED ((NTSTATUS)0xC01C001BL) + +// +// MessageId: STATUS_FLT_CONTEXT_ALREADY_LINKED +// +// MessageText: +// +// The specifiec context is already attached to another object +// +#define STATUS_FLT_CONTEXT_ALREADY_LINKED ((NTSTATUS)0xC01C001CL) + +// +// MessageId: STATUS_FLT_NO_WAITER_FOR_REPLY +// +// MessageText: +// +// No waiter is present for the filter's reply to this message. +// +#define STATUS_FLT_NO_WAITER_FOR_REPLY ((NTSTATUS)0xC01C0020L) + + +// +// Side-by-side (SXS) error values +// + +// +// MessageId: STATUS_SXS_SECTION_NOT_FOUND +// +// MessageText: +// +// The requested section is not present in the activation context. +// +#define STATUS_SXS_SECTION_NOT_FOUND ((NTSTATUS)0xC0150001L) + +// +// MessageId: STATUS_SXS_CANT_GEN_ACTCTX +// +// MessageText: +// +// Windows was not able to process the application binding information. +// Please refer to your System Event Log for further information. +// +#define STATUS_SXS_CANT_GEN_ACTCTX ((NTSTATUS)0xC0150002L) + +// +// MessageId: STATUS_SXS_INVALID_ACTCTXDATA_FORMAT +// +// MessageText: +// +// The application binding data format is invalid. +// +#define STATUS_SXS_INVALID_ACTCTXDATA_FORMAT ((NTSTATUS)0xC0150003L) + +// +// MessageId: STATUS_SXS_ASSEMBLY_NOT_FOUND +// +// MessageText: +// +// The referenced assembly is not installed on your system. +// +#define STATUS_SXS_ASSEMBLY_NOT_FOUND ((NTSTATUS)0xC0150004L) + +// +// MessageId: STATUS_SXS_MANIFEST_FORMAT_ERROR +// +// MessageText: +// +// The manifest file does not begin with the required tag and format information. +// +#define STATUS_SXS_MANIFEST_FORMAT_ERROR ((NTSTATUS)0xC0150005L) + +// +// MessageId: STATUS_SXS_MANIFEST_PARSE_ERROR +// +// MessageText: +// +// The manifest file contains one or more syntax errors. +// +#define STATUS_SXS_MANIFEST_PARSE_ERROR ((NTSTATUS)0xC0150006L) + +// +// MessageId: STATUS_SXS_ACTIVATION_CONTEXT_DISABLED +// +// MessageText: +// +// The application attempted to activate a disabled activation context. +// +#define STATUS_SXS_ACTIVATION_CONTEXT_DISABLED ((NTSTATUS)0xC0150007L) + +// +// MessageId: STATUS_SXS_KEY_NOT_FOUND +// +// MessageText: +// +// The requested lookup key was not found in any active activation context. +// +#define STATUS_SXS_KEY_NOT_FOUND ((NTSTATUS)0xC0150008L) + +// +// MessageId: STATUS_SXS_VERSION_CONFLICT +// +// MessageText: +// +// A component version required by the application conflicts with another component version already active. +// +#define STATUS_SXS_VERSION_CONFLICT ((NTSTATUS)0xC0150009L) + +// +// MessageId: STATUS_SXS_WRONG_SECTION_TYPE +// +// MessageText: +// +// The type requested activation context section does not match the query API used. +// +#define STATUS_SXS_WRONG_SECTION_TYPE ((NTSTATUS)0xC015000AL) + +// +// MessageId: STATUS_SXS_THREAD_QUERIES_DISABLED +// +// MessageText: +// +// Lack of system resources has required isolated activation to be disabled for the current thread of execution. +// +#define STATUS_SXS_THREAD_QUERIES_DISABLED ((NTSTATUS)0xC015000BL) + +// +// MessageId: STATUS_SXS_ASSEMBLY_MISSING +// +// MessageText: +// +// The referenced assembly could not be found. +// +#define STATUS_SXS_ASSEMBLY_MISSING ((NTSTATUS)0xC015000CL) + +// +// MessageId: STATUS_SXS_RELEASE_ACTIVATION_CONTEXT +// +// MessageText: +// +// A kernel mode component is releasing a reference on an activation context. +// +#define STATUS_SXS_RELEASE_ACTIVATION_CONTEXT ((NTSTATUS)0x4015000DL) + +// +// MessageId: STATUS_SXS_PROCESS_DEFAULT_ALREADY_SET +// +// MessageText: +// +// An attempt to set the process default activation context failed because the process default activation context was already set. +// +#define STATUS_SXS_PROCESS_DEFAULT_ALREADY_SET ((NTSTATUS)0xC015000EL) + +#if defined(STATUS_SUCCESS) || (_WIN32_WINNT > 0x0500) || (_WIN32_FUSION >= 0x0100) // winnt +// +// MessageId: STATUS_SXS_EARLY_DEACTIVATION +// +// MessageText: +// +// The activation context being deactivated is not the most recently activated one. +// +#define STATUS_SXS_EARLY_DEACTIVATION ((NTSTATUS)0xC015000FL) // winnt + +// +// MessageId: STATUS_SXS_INVALID_DEACTIVATION +// +// MessageText: +// +// The activation context being deactivated is not active for the current thread of execution. +// +#define STATUS_SXS_INVALID_DEACTIVATION ((NTSTATUS)0xC0150010L) // winnt + +#endif // winnt +// +// MessageId: STATUS_SXS_MULTIPLE_DEACTIVATION +// +// MessageText: +// +// The activation context being deactivated has already been deactivated. +// +#define STATUS_SXS_MULTIPLE_DEACTIVATION ((NTSTATUS)0xC0150011L) + +// +// MessageId: STATUS_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY +// +// MessageText: +// +// The activation context of system default assembly could not be generated. +// +#define STATUS_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY ((NTSTATUS)0xC0150012L) + +// +// MessageId: STATUS_SXS_PROCESS_TERMINATION_REQUESTED +// +// MessageText: +// +// A component used by the isolation facility has requested to terminate the process. +// +#define STATUS_SXS_PROCESS_TERMINATION_REQUESTED ((NTSTATUS)0xC0150013L) + +// +// MessageId: STATUS_SXS_CORRUPT_ACTIVATION_STACK +// +// MessageText: +// +// The activation context activation stack for the running thread of execution is corrupt. +// +#define STATUS_SXS_CORRUPT_ACTIVATION_STACK ((NTSTATUS)0xC0150014L) + +// +// MessageId: STATUS_SXS_CORRUPTION +// +// MessageText: +// +// The application isolation metadata for this process or thread has become corrupt. +// +#define STATUS_SXS_CORRUPTION ((NTSTATUS)0xC0150015L) + +// +// MessageId: STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE +// +// MessageText: +// +// The value of an attribute in an identity is not within the legal range. +// +#define STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE ((NTSTATUS)0xC0150016L) + +// +// MessageId: STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME +// +// MessageText: +// +// The name of an attribute in an identity is not within the legal range. +// +#define STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME ((NTSTATUS)0xC0150017L) + +// +// MessageId: STATUS_SXS_IDENTITY_DUPLICATE_ATTRIBUTE +// +// MessageText: +// +// An identity contains two definitions for the same attribute. +// +#define STATUS_SXS_IDENTITY_DUPLICATE_ATTRIBUTE ((NTSTATUS)0xC0150018L) + +// +// MessageId: STATUS_SXS_IDENTITY_PARSE_ERROR +// +// MessageText: +// +// The identity string is malformed. This may be due to a trailing comma, more than two unnamed attributes, missing attribute name or missing attribute value. +// +#define STATUS_SXS_IDENTITY_PARSE_ERROR ((NTSTATUS)0xC0150019L) + +// +// MessageId: STATUS_SXS_COMPONENT_STORE_CORRUPT +// +// MessageText: +// +// The component store has been corrupted. +// +#define STATUS_SXS_COMPONENT_STORE_CORRUPT ((NTSTATUS)0xC015001AL) + +// +// MessageId: STATUS_SXS_FILE_HASH_MISMATCH +// +// MessageText: +// +// A component's file does not match the verification information present in the component manifest. +// +#define STATUS_SXS_FILE_HASH_MISMATCH ((NTSTATUS)0xC015001BL) + +// +// MessageId: STATUS_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT +// +// MessageText: +// +// The identities of the manifests are identical but their contents are different. +// +#define STATUS_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT ((NTSTATUS)0xC015001CL) + +// +// MessageId: STATUS_SXS_IDENTITIES_DIFFERENT +// +// MessageText: +// +// The component identities are different. +// +#define STATUS_SXS_IDENTITIES_DIFFERENT ((NTSTATUS)0xC015001DL) + +// +// MessageId: STATUS_SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT +// +// MessageText: +// +// The assembly is not a deployment. +// +#define STATUS_SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT ((NTSTATUS)0xC015001EL) + +// +// MessageId: STATUS_SXS_FILE_NOT_PART_OF_ASSEMBLY +// +// MessageText: +// +// The file is not a part of the assembly. +// +#define STATUS_SXS_FILE_NOT_PART_OF_ASSEMBLY ((NTSTATUS)0xC015001FL) + +// +// MessageId: STATUS_ADVANCED_INSTALLER_FAILED +// +// MessageText: +// +// An advanced installer failed during setup or servicing. +// +#define STATUS_ADVANCED_INSTALLER_FAILED ((NTSTATUS)0xC0150020L) + +// +// MessageId: STATUS_XML_ENCODING_MISMATCH +// +// MessageText: +// +// The character encoding in the XML declaration did not match the encoding used in the document. +// +#define STATUS_XML_ENCODING_MISMATCH ((NTSTATUS)0xC0150021L) + +// +// MessageId: STATUS_SXS_MANIFEST_TOO_BIG +// +// MessageText: +// +// The size of the manifest exceeds the maximum allowed. +// +#define STATUS_SXS_MANIFEST_TOO_BIG ((NTSTATUS)0xC0150022L) + +// +// MessageId: STATUS_SXS_SETTING_NOT_REGISTERED +// +// MessageText: +// +// The setting is not registered. +// +#define STATUS_SXS_SETTING_NOT_REGISTERED ((NTSTATUS)0xC0150023L) + +// +// MessageId: STATUS_SXS_TRANSACTION_CLOSURE_INCOMPLETE +// +// MessageText: +// +// One or more required members of the transaction are not present. +// +#define STATUS_SXS_TRANSACTION_CLOSURE_INCOMPLETE ((NTSTATUS)0xC0150024L) + +// +// MessageId: STATUS_SMI_PRIMITIVE_INSTALLER_FAILED +// +// MessageText: +// +// The SMI primitive installer failed during setup or servicing. +// +#define STATUS_SMI_PRIMITIVE_INSTALLER_FAILED ((NTSTATUS)0xC0150025L) + +// +// MessageId: STATUS_GENERIC_COMMAND_FAILED +// +// MessageText: +// +// A generic command executable returned a result that indicates failure. +// +#define STATUS_GENERIC_COMMAND_FAILED ((NTSTATUS)0xC0150026L) + +// +// MessageId: STATUS_SXS_FILE_HASH_MISSING +// +// MessageText: +// +// A component is missing file verification information in its manifest. +// +#define STATUS_SXS_FILE_HASH_MISSING ((NTSTATUS)0xC0150027L) + + +// +// Cluster error values +// + +// +// MessageId: STATUS_CLUSTER_INVALID_NODE +// +// MessageText: +// +// The cluster node is not valid. +// +#define STATUS_CLUSTER_INVALID_NODE ((NTSTATUS)0xC0130001L) + +// +// MessageId: STATUS_CLUSTER_NODE_EXISTS +// +// MessageText: +// +// The cluster node already exists. +// +#define STATUS_CLUSTER_NODE_EXISTS ((NTSTATUS)0xC0130002L) + +// +// MessageId: STATUS_CLUSTER_JOIN_IN_PROGRESS +// +// MessageText: +// +// A node is in the process of joining the cluster. +// +#define STATUS_CLUSTER_JOIN_IN_PROGRESS ((NTSTATUS)0xC0130003L) + +// +// MessageId: STATUS_CLUSTER_NODE_NOT_FOUND +// +// MessageText: +// +// The cluster node was not found. +// +#define STATUS_CLUSTER_NODE_NOT_FOUND ((NTSTATUS)0xC0130004L) + +// +// MessageId: STATUS_CLUSTER_LOCAL_NODE_NOT_FOUND +// +// MessageText: +// +// The cluster local node information was not found. +// +#define STATUS_CLUSTER_LOCAL_NODE_NOT_FOUND ((NTSTATUS)0xC0130005L) + +// +// MessageId: STATUS_CLUSTER_NETWORK_EXISTS +// +// MessageText: +// +// The cluster network already exists. +// +#define STATUS_CLUSTER_NETWORK_EXISTS ((NTSTATUS)0xC0130006L) + +// +// MessageId: STATUS_CLUSTER_NETWORK_NOT_FOUND +// +// MessageText: +// +// The cluster network was not found. +// +#define STATUS_CLUSTER_NETWORK_NOT_FOUND ((NTSTATUS)0xC0130007L) + +// +// MessageId: STATUS_CLUSTER_NETINTERFACE_EXISTS +// +// MessageText: +// +// The cluster network interface already exists. +// +#define STATUS_CLUSTER_NETINTERFACE_EXISTS ((NTSTATUS)0xC0130008L) + +// +// MessageId: STATUS_CLUSTER_NETINTERFACE_NOT_FOUND +// +// MessageText: +// +// The cluster network interface was not found. +// +#define STATUS_CLUSTER_NETINTERFACE_NOT_FOUND ((NTSTATUS)0xC0130009L) + +// +// MessageId: STATUS_CLUSTER_INVALID_REQUEST +// +// MessageText: +// +// The cluster request is not valid for this object. +// +#define STATUS_CLUSTER_INVALID_REQUEST ((NTSTATUS)0xC013000AL) + +// +// MessageId: STATUS_CLUSTER_INVALID_NETWORK_PROVIDER +// +// MessageText: +// +// The cluster network provider is not valid. +// +#define STATUS_CLUSTER_INVALID_NETWORK_PROVIDER ((NTSTATUS)0xC013000BL) + +// +// MessageId: STATUS_CLUSTER_NODE_DOWN +// +// MessageText: +// +// The cluster node is down. +// +#define STATUS_CLUSTER_NODE_DOWN ((NTSTATUS)0xC013000CL) + +// +// MessageId: STATUS_CLUSTER_NODE_UNREACHABLE +// +// MessageText: +// +// The cluster node is not reachable. +// +#define STATUS_CLUSTER_NODE_UNREACHABLE ((NTSTATUS)0xC013000DL) + +// +// MessageId: STATUS_CLUSTER_NODE_NOT_MEMBER +// +// MessageText: +// +// The cluster node is not a member of the cluster. +// +#define STATUS_CLUSTER_NODE_NOT_MEMBER ((NTSTATUS)0xC013000EL) + +// +// MessageId: STATUS_CLUSTER_JOIN_NOT_IN_PROGRESS +// +// MessageText: +// +// A cluster join operation is not in progress. +// +#define STATUS_CLUSTER_JOIN_NOT_IN_PROGRESS ((NTSTATUS)0xC013000FL) + +// +// MessageId: STATUS_CLUSTER_INVALID_NETWORK +// +// MessageText: +// +// The cluster network is not valid. +// +#define STATUS_CLUSTER_INVALID_NETWORK ((NTSTATUS)0xC0130010L) + +// +// MessageId: STATUS_CLUSTER_NO_NET_ADAPTERS +// +// MessageText: +// +// No network adapters are available. +// +#define STATUS_CLUSTER_NO_NET_ADAPTERS ((NTSTATUS)0xC0130011L) + +// +// MessageId: STATUS_CLUSTER_NODE_UP +// +// MessageText: +// +// The cluster node is up. +// +#define STATUS_CLUSTER_NODE_UP ((NTSTATUS)0xC0130012L) + +// +// MessageId: STATUS_CLUSTER_NODE_PAUSED +// +// MessageText: +// +// The cluster node is paused. +// +#define STATUS_CLUSTER_NODE_PAUSED ((NTSTATUS)0xC0130013L) + +// +// MessageId: STATUS_CLUSTER_NODE_NOT_PAUSED +// +// MessageText: +// +// The cluster node is not paused. +// +#define STATUS_CLUSTER_NODE_NOT_PAUSED ((NTSTATUS)0xC0130014L) + +// +// MessageId: STATUS_CLUSTER_NO_SECURITY_CONTEXT +// +// MessageText: +// +// No cluster security context is available. +// +#define STATUS_CLUSTER_NO_SECURITY_CONTEXT ((NTSTATUS)0xC0130015L) + +// +// MessageId: STATUS_CLUSTER_NETWORK_NOT_INTERNAL +// +// MessageText: +// +// The cluster network is not configured for internal cluster communication. +// +#define STATUS_CLUSTER_NETWORK_NOT_INTERNAL ((NTSTATUS)0xC0130016L) + +// +// MessageId: STATUS_CLUSTER_POISONED +// +// MessageText: +// +// The cluster node has been poisoned. +// +#define STATUS_CLUSTER_POISONED ((NTSTATUS)0xC0130017L) + + +// +// Transaction Manager error values +// + +// +// MessageId: STATUS_TRANSACTIONAL_CONFLICT +// +// MessageText: +// +// The function attempted to use a name that is reserved for use by another transaction. +// +#define STATUS_TRANSACTIONAL_CONFLICT ((NTSTATUS)0xC0190001L) + +// +// MessageId: STATUS_INVALID_TRANSACTION +// +// MessageText: +// +// The transaction handle associated with this operation is not valid. +// +#define STATUS_INVALID_TRANSACTION ((NTSTATUS)0xC0190002L) + +// +// MessageId: STATUS_TRANSACTION_NOT_ACTIVE +// +// MessageText: +// +// The requested operation was made in the context of a transaction that is no longer active. +// +#define STATUS_TRANSACTION_NOT_ACTIVE ((NTSTATUS)0xC0190003L) + +// +// MessageId: STATUS_TM_INITIALIZATION_FAILED +// +// MessageText: +// +// The Transaction Manager was unable to be successfully initialized. Transacted operations are not supported. +// +#define STATUS_TM_INITIALIZATION_FAILED ((NTSTATUS)0xC0190004L) + +// +// MessageId: STATUS_RM_NOT_ACTIVE +// +// MessageText: +// +// Transaction support within the specified resource manager is not started or was shut down due to an error. +// +#define STATUS_RM_NOT_ACTIVE ((NTSTATUS)0xC0190005L) + +// +// MessageId: STATUS_RM_METADATA_CORRUPT +// +// MessageText: +// +// The metadata of the RM has been corrupted. The RM will not function. +// +#define STATUS_RM_METADATA_CORRUPT ((NTSTATUS)0xC0190006L) + +// +// MessageId: STATUS_TRANSACTION_NOT_JOINED +// +// MessageText: +// +// The resource manager has attempted to prepare a transaction that it has not successfully joined. +// +#define STATUS_TRANSACTION_NOT_JOINED ((NTSTATUS)0xC0190007L) + +// +// MessageId: STATUS_DIRECTORY_NOT_RM +// +// MessageText: +// +// The specified directory does not contain a file system resource manager. +// +#define STATUS_DIRECTORY_NOT_RM ((NTSTATUS)0xC0190008L) + +// +// MessageId: STATUS_COULD_NOT_RESIZE_LOG +// +// MessageText: +// +// The log could not be set to the requested size. +// +#define STATUS_COULD_NOT_RESIZE_LOG ((NTSTATUS)0x80190009L) + +// +// MessageId: STATUS_TRANSACTIONS_UNSUPPORTED_REMOTE +// +// MessageText: +// +// The remote server or share does not support transacted file operations. +// +#define STATUS_TRANSACTIONS_UNSUPPORTED_REMOTE ((NTSTATUS)0xC019000AL) + +// +// MessageId: STATUS_LOG_RESIZE_INVALID_SIZE +// +// MessageText: +// +// The requested log size for the file system resource manager is invalid. +// +#define STATUS_LOG_RESIZE_INVALID_SIZE ((NTSTATUS)0xC019000BL) + +// +// MessageId: STATUS_REMOTE_FILE_VERSION_MISMATCH +// +// MessageText: +// +// The remote server sent mismatching version number or Fid for a file opened with transactions. +// +#define STATUS_REMOTE_FILE_VERSION_MISMATCH ((NTSTATUS)0xC019000CL) + +// +// MessageId: STATUS_CRM_PROTOCOL_ALREADY_EXISTS +// +// MessageText: +// +// The RM tried to register a protocol that already exists. +// +#define STATUS_CRM_PROTOCOL_ALREADY_EXISTS ((NTSTATUS)0xC019000FL) + +// +// MessageId: STATUS_TRANSACTION_PROPAGATION_FAILED +// +// MessageText: +// +// The attempt to propagate the Transaction failed. +// +#define STATUS_TRANSACTION_PROPAGATION_FAILED ((NTSTATUS)0xC0190010L) + +// +// MessageId: STATUS_CRM_PROTOCOL_NOT_FOUND +// +// MessageText: +// +// The requested propagation protocol was not registered as a CRM. +// +#define STATUS_CRM_PROTOCOL_NOT_FOUND ((NTSTATUS)0xC0190011L) + +// +// MessageId: STATUS_TRANSACTION_SUPERIOR_EXISTS +// +// MessageText: +// +// The Transaction object already has a superior enlistment, and the caller attempted an operation that would have created a new superior. Only a single superior enlistment is allowed. +// +#define STATUS_TRANSACTION_SUPERIOR_EXISTS ((NTSTATUS)0xC0190012L) + +// +// MessageId: STATUS_TRANSACTION_REQUEST_NOT_VALID +// +// MessageText: +// +// The requested operation is not valid on the Transaction object in its current state. +// +#define STATUS_TRANSACTION_REQUEST_NOT_VALID ((NTSTATUS)0xC0190013L) + +// +// MessageId: STATUS_TRANSACTION_NOT_REQUESTED +// +// MessageText: +// +// The caller has called a response API, but the response is not expected because the TM did not issue the corresponding request to the caller. +// +#define STATUS_TRANSACTION_NOT_REQUESTED ((NTSTATUS)0xC0190014L) + +// +// MessageId: STATUS_TRANSACTION_ALREADY_ABORTED +// +// MessageText: +// +// It is too late to perform the requested operation, since the Transaction has already been aborted. +// +#define STATUS_TRANSACTION_ALREADY_ABORTED ((NTSTATUS)0xC0190015L) + +// +// MessageId: STATUS_TRANSACTION_ALREADY_COMMITTED +// +// MessageText: +// +// It is too late to perform the requested operation, since the Transaction has already been committed. +// +#define STATUS_TRANSACTION_ALREADY_COMMITTED ((NTSTATUS)0xC0190016L) + +// +// MessageId: STATUS_TRANSACTION_INVALID_MARSHALL_BUFFER +// +// MessageText: +// +// The buffer passed in to NtPushTransaction or NtPullTransaction is not in a valid format. +// +#define STATUS_TRANSACTION_INVALID_MARSHALL_BUFFER ((NTSTATUS)0xC0190017L) + +// +// MessageId: STATUS_CURRENT_TRANSACTION_NOT_VALID +// +// MessageText: +// +// The current transaction context associated with the thread is not a valid handle to a transaction object. +// +#define STATUS_CURRENT_TRANSACTION_NOT_VALID ((NTSTATUS)0xC0190018L) + +// +// MessageId: STATUS_LOG_GROWTH_FAILED +// +// MessageText: +// +// An attempt to create space in the transactional resource manager's log failed. The failure status has been recorded in the event log. +// +#define STATUS_LOG_GROWTH_FAILED ((NTSTATUS)0xC0190019L) + +// +// MessageId: STATUS_OBJECT_NO_LONGER_EXISTS +// +// MessageText: +// +// The object (file, stream, link) corresponding to the handle has been deleted by a transaction savepoint rollback. +// +#define STATUS_OBJECT_NO_LONGER_EXISTS ((NTSTATUS)0xC0190021L) + +// +// MessageId: STATUS_STREAM_MINIVERSION_NOT_FOUND +// +// MessageText: +// +// The specified file miniversion was not found for this transacted file open. +// +#define STATUS_STREAM_MINIVERSION_NOT_FOUND ((NTSTATUS)0xC0190022L) + +// +// MessageId: STATUS_STREAM_MINIVERSION_NOT_VALID +// +// MessageText: +// +// The specified file miniversion was found but has been invalidated. Most likely cause is a transaction savepoint rollback. +// +#define STATUS_STREAM_MINIVERSION_NOT_VALID ((NTSTATUS)0xC0190023L) + +// +// MessageId: STATUS_MINIVERSION_INACCESSIBLE_FROM_SPECIFIED_TRANSACTION +// +// MessageText: +// +// A miniversion may only be opened in the context of the transaction that created it. +// +#define STATUS_MINIVERSION_INACCESSIBLE_FROM_SPECIFIED_TRANSACTION ((NTSTATUS)0xC0190024L) + +// +// MessageId: STATUS_CANT_OPEN_MINIVERSION_WITH_MODIFY_INTENT +// +// MessageText: +// +// It is not possible to open a miniversion with modify access. +// +#define STATUS_CANT_OPEN_MINIVERSION_WITH_MODIFY_INTENT ((NTSTATUS)0xC0190025L) + +// +// MessageId: STATUS_CANT_CREATE_MORE_STREAM_MINIVERSIONS +// +// MessageText: +// +// It is not possible to create any more miniversions for this stream. +// +#define STATUS_CANT_CREATE_MORE_STREAM_MINIVERSIONS ((NTSTATUS)0xC0190026L) + +// +// MessageId: STATUS_HANDLE_NO_LONGER_VALID +// +// MessageText: +// +// The handle has been invalidated by a transaction. The most likely cause is the presence of memory mapping on a file or an open handle when the transaction ended or rolled back to savepoint. +// +#define STATUS_HANDLE_NO_LONGER_VALID ((NTSTATUS)0xC0190028L) + +// +// MessageId: STATUS_NO_TXF_METADATA +// +// MessageText: +// +// There is no transaction metadata on the file. +// +#define STATUS_NO_TXF_METADATA ((NTSTATUS)0x80190029L) + +// +// MessageId: STATUS_LOG_CORRUPTION_DETECTED +// +// MessageText: +// +// The log data is corrupt. +// +#define STATUS_LOG_CORRUPTION_DETECTED ((NTSTATUS)0xC0190030L) + +// +// MessageId: STATUS_CANT_RECOVER_WITH_HANDLE_OPEN +// +// MessageText: +// +// The file can't be recovered because there is a handle still open on it. +// +#define STATUS_CANT_RECOVER_WITH_HANDLE_OPEN ((NTSTATUS)0x80190031L) + +// +// MessageId: STATUS_RM_DISCONNECTED +// +// MessageText: +// +// The transaction outcome is unavailable because the resource manager responsible for it has disconnected. +// +#define STATUS_RM_DISCONNECTED ((NTSTATUS)0xC0190032L) + +// +// MessageId: STATUS_ENLISTMENT_NOT_SUPERIOR +// +// MessageText: +// +// The request was rejected because the enlistment in question is not a superior enlistment. +// +#define STATUS_ENLISTMENT_NOT_SUPERIOR ((NTSTATUS)0xC0190033L) + +// +// MessageId: STATUS_RECOVERY_NOT_NEEDED +// +// MessageText: +// +// The transactional resource manager is already consistent. Recovery is not needed. +// +#define STATUS_RECOVERY_NOT_NEEDED ((NTSTATUS)0x40190034L) + +// +// MessageId: STATUS_RM_ALREADY_STARTED +// +// MessageText: +// +// The transactional resource manager has already been started. +// +#define STATUS_RM_ALREADY_STARTED ((NTSTATUS)0x40190035L) + +// +// MessageId: STATUS_FILE_IDENTITY_NOT_PERSISTENT +// +// MessageText: +// +// The file cannot be opened transactionally, because its identity depends on the outcome of an unresolved transaction. +// +#define STATUS_FILE_IDENTITY_NOT_PERSISTENT ((NTSTATUS)0xC0190036L) + +// +// MessageId: STATUS_CANT_BREAK_TRANSACTIONAL_DEPENDENCY +// +// MessageText: +// +// The operation cannot be performed because another transaction is depending on the fact that this property will not change. +// +#define STATUS_CANT_BREAK_TRANSACTIONAL_DEPENDENCY ((NTSTATUS)0xC0190037L) + +// +// MessageId: STATUS_CANT_CROSS_RM_BOUNDARY +// +// MessageText: +// +// The operation would involve a single file with two transactional resource managers and is therefore not allowed. +// +#define STATUS_CANT_CROSS_RM_BOUNDARY ((NTSTATUS)0xC0190038L) + +// +// MessageId: STATUS_TXF_DIR_NOT_EMPTY +// +// MessageText: +// +// The $Txf directory must be empty for this operation to succeed. +// +#define STATUS_TXF_DIR_NOT_EMPTY ((NTSTATUS)0xC0190039L) + +// +// MessageId: STATUS_INDOUBT_TRANSACTIONS_EXIST +// +// MessageText: +// +// The operation would leave a transactional resource manager in an inconsistent state and is therefore not allowed. +// +#define STATUS_INDOUBT_TRANSACTIONS_EXIST ((NTSTATUS)0xC019003AL) + +// +// MessageId: STATUS_TM_VOLATILE +// +// MessageText: +// +// The operation could not be completed because the transaction manager does not have a log. +// +#define STATUS_TM_VOLATILE ((NTSTATUS)0xC019003BL) + +// +// MessageId: STATUS_ROLLBACK_TIMER_EXPIRED +// +// MessageText: +// +// A rollback could not be scheduled because a previously scheduled rollback has already executed or been queued for execution. +// +#define STATUS_ROLLBACK_TIMER_EXPIRED ((NTSTATUS)0xC019003CL) + +// +// MessageId: STATUS_TXF_ATTRIBUTE_CORRUPT +// +// MessageText: +// +// The transactional metadata attribute on the file or directory %hs is corrupt and unreadable. +// +#define STATUS_TXF_ATTRIBUTE_CORRUPT ((NTSTATUS)0xC019003DL) + +// +// MessageId: STATUS_EFS_NOT_ALLOWED_IN_TRANSACTION +// +// MessageText: +// +// The encryption operation could not be completed because a transaction is active. +// +#define STATUS_EFS_NOT_ALLOWED_IN_TRANSACTION ((NTSTATUS)0xC019003EL) + +// +// MessageId: STATUS_TRANSACTIONAL_OPEN_NOT_ALLOWED +// +// MessageText: +// +// This object is not allowed to be opened in a transaction. +// +#define STATUS_TRANSACTIONAL_OPEN_NOT_ALLOWED ((NTSTATUS)0xC019003FL) + +// +// MessageId: STATUS_TRANSACTED_MAPPING_UNSUPPORTED_REMOTE +// +// MessageText: +// +// Memory mapping (creating a mapped section) a remote file under a transaction is not supported. +// +#define STATUS_TRANSACTED_MAPPING_UNSUPPORTED_REMOTE ((NTSTATUS)0xC0190040L) + +// +// MessageId: STATUS_TXF_METADATA_ALREADY_PRESENT +// +// MessageText: +// +// Transaction metadata is already present on this file and cannot be superseded. +// +#define STATUS_TXF_METADATA_ALREADY_PRESENT ((NTSTATUS)0x80190041L) + +// +// MessageId: STATUS_TRANSACTION_SCOPE_CALLBACKS_NOT_SET +// +// MessageText: +// +// A transaction scope could not be entered because the scope handler has not been initialized. +// +#define STATUS_TRANSACTION_SCOPE_CALLBACKS_NOT_SET ((NTSTATUS)0x80190042L) + +// +// MessageId: STATUS_TRANSACTION_REQUIRED_PROMOTION +// +// MessageText: +// +// Promotion was required in order to allow the resource manager to enlist, but the transaction was set to disallow it. +// +#define STATUS_TRANSACTION_REQUIRED_PROMOTION ((NTSTATUS)0xC0190043L) + +// +// MessageId: STATUS_CANNOT_EXECUTE_FILE_IN_TRANSACTION +// +// MessageText: +// +// This file is open for modification in an unresolved transaction and may be opened for execute only by a transacted reader. +// +#define STATUS_CANNOT_EXECUTE_FILE_IN_TRANSACTION ((NTSTATUS)0xC0190044L) + +// +// MessageId: STATUS_TRANSACTIONS_NOT_FROZEN +// +// MessageText: +// +// The request to thaw frozen transactions was ignored because transactions had not previously been frozen. +// +#define STATUS_TRANSACTIONS_NOT_FROZEN ((NTSTATUS)0xC0190045L) + +// +// MessageId: STATUS_TRANSACTION_FREEZE_IN_PROGRESS +// +// MessageText: +// +// Transactions cannot be frozen because a freeze is already in progress. +// +#define STATUS_TRANSACTION_FREEZE_IN_PROGRESS ((NTSTATUS)0xC0190046L) + +// +// MessageId: STATUS_NOT_SNAPSHOT_VOLUME +// +// MessageText: +// +// The target volume is not a snapshot volume. This operation is only valid on a volume mounted as a snapshot. +// +#define STATUS_NOT_SNAPSHOT_VOLUME ((NTSTATUS)0xC0190047L) + +// +// MessageId: STATUS_NO_SAVEPOINT_WITH_OPEN_FILES +// +// MessageText: +// +// The savepoint operation failed because files are open on the transaction. This is not permitted. +// +#define STATUS_NO_SAVEPOINT_WITH_OPEN_FILES ((NTSTATUS)0xC0190048L) + +// +// MessageId: STATUS_SPARSE_NOT_ALLOWED_IN_TRANSACTION +// +// MessageText: +// +// The sparse operation could not be completed because a transaction is active on the file. +// +#define STATUS_SPARSE_NOT_ALLOWED_IN_TRANSACTION ((NTSTATUS)0xC0190049L) + +// +// MessageId: STATUS_TM_IDENTITY_MISMATCH +// +// MessageText: +// +// The call to create a TransactionManager object failed because the Tm Identity stored in the logfile does not match the Tm Identity that was passed in as an argument. +// +#define STATUS_TM_IDENTITY_MISMATCH ((NTSTATUS)0xC019004AL) + +// +// MessageId: STATUS_FLOATED_SECTION +// +// MessageText: +// +// I/O was attempted on a section object that has been floated as a result of a transaction ending. There is no valid data. +// +#define STATUS_FLOATED_SECTION ((NTSTATUS)0xC019004BL) + +// +// MessageId: STATUS_CANNOT_ACCEPT_TRANSACTED_WORK +// +// MessageText: +// +// The transactional resource manager cannot currently accept transacted work due to a transient condition such as low resources. +// +#define STATUS_CANNOT_ACCEPT_TRANSACTED_WORK ((NTSTATUS)0xC019004CL) + +// +// MessageId: STATUS_CANNOT_ABORT_TRANSACTIONS +// +// MessageText: +// +// The transactional resource manager had too many tranactions outstanding that could not be aborted. The transactional resource manger has been shut down. +// +#define STATUS_CANNOT_ABORT_TRANSACTIONS ((NTSTATUS)0xC019004DL) + +// +// MessageId: STATUS_TRANSACTION_NOT_FOUND +// +// MessageText: +// +// The specified Transaction was unable to be opened, because it was not found. +// +#define STATUS_TRANSACTION_NOT_FOUND ((NTSTATUS)0xC019004EL) + +// +// MessageId: STATUS_RESOURCEMANAGER_NOT_FOUND +// +// MessageText: +// +// The specified ResourceManager was unable to be opened, because it was not found. +// +#define STATUS_RESOURCEMANAGER_NOT_FOUND ((NTSTATUS)0xC019004FL) + +// +// MessageId: STATUS_ENLISTMENT_NOT_FOUND +// +// MessageText: +// +// The specified Enlistment was unable to be opened, because it was not found. +// +#define STATUS_ENLISTMENT_NOT_FOUND ((NTSTATUS)0xC0190050L) + +// +// MessageId: STATUS_TRANSACTIONMANAGER_NOT_FOUND +// +// MessageText: +// +// The specified TransactionManager was unable to be opened, because it was not found. +// +#define STATUS_TRANSACTIONMANAGER_NOT_FOUND ((NTSTATUS)0xC0190051L) + +// +// MessageId: STATUS_TRANSACTIONMANAGER_NOT_ONLINE +// +// MessageText: +// +// The object specified could not be created or opened, because its associated TransactionManager is not online. The TransactionManager must be brought fully Online by calling RecoverTransactionManager to recover to the end of its LogFile before objects in its Transaction or ResourceManager namespaces can be opened. In addition, errors in writing records to its LogFile can cause a TransactionManager to go offline. +// +#define STATUS_TRANSACTIONMANAGER_NOT_ONLINE ((NTSTATUS)0xC0190052L) + +// +// MessageId: STATUS_TRANSACTIONMANAGER_RECOVERY_NAME_COLLISION +// +// MessageText: +// +// The specified TransactionManager was unable to create the objects contained in its logfile in the Ob namespace. Therefore, the TransactionManager was unable to recover. +// +#define STATUS_TRANSACTIONMANAGER_RECOVERY_NAME_COLLISION ((NTSTATUS)0xC0190053L) + +// +// MessageId: STATUS_TRANSACTION_NOT_ROOT +// +// MessageText: +// +// The call to create a superior Enlistment on this Transaction object could not be completed, because the Transaction object specified for the enlistment is a subordinate branch of the Transaction. Only the root of the Transaction can be enlisted on as a superior. +// +#define STATUS_TRANSACTION_NOT_ROOT ((NTSTATUS)0xC0190054L) + +// +// MessageId: STATUS_TRANSACTION_OBJECT_EXPIRED +// +// MessageText: +// +// Because the associated transaction manager or resource manager has been closed, the handle is no longer valid. +// +#define STATUS_TRANSACTION_OBJECT_EXPIRED ((NTSTATUS)0xC0190055L) + +// +// MessageId: STATUS_COMPRESSION_NOT_ALLOWED_IN_TRANSACTION +// +// MessageText: +// +// The compression operation could not be completed because a transaction is active on the file. +// +#define STATUS_COMPRESSION_NOT_ALLOWED_IN_TRANSACTION ((NTSTATUS)0xC0190056L) + +// +// MessageId: STATUS_TRANSACTION_RESPONSE_NOT_ENLISTED +// +// MessageText: +// +// The specified operation could not be performed on this Superior enlistment, because the enlistment was not created with the corresponding completion response in the NotificationMask. +// +#define STATUS_TRANSACTION_RESPONSE_NOT_ENLISTED ((NTSTATUS)0xC0190057L) + +// +// MessageId: STATUS_TRANSACTION_RECORD_TOO_LONG +// +// MessageText: +// +// The specified operation could not be performed, because the record that would be logged was too long. This can occur because of two conditions: either there are too many Enlistments on this Transaction, or the combined RecoveryInformation being logged on behalf of those Enlistments is too long. +// +#define STATUS_TRANSACTION_RECORD_TOO_LONG ((NTSTATUS)0xC0190058L) + +// +// MessageId: STATUS_NO_LINK_TRACKING_IN_TRANSACTION +// +// MessageText: +// +// The link tracking operation could not be completed because a transaction is active. +// +#define STATUS_NO_LINK_TRACKING_IN_TRANSACTION ((NTSTATUS)0xC0190059L) + +// +// MessageId: STATUS_OPERATION_NOT_SUPPORTED_IN_TRANSACTION +// +// MessageText: +// +// This operation cannot be performed in a transaction. +// +#define STATUS_OPERATION_NOT_SUPPORTED_IN_TRANSACTION ((NTSTATUS)0xC019005AL) + +// +// MessageId: STATUS_TRANSACTION_INTEGRITY_VIOLATED +// +// MessageText: +// +// The kernel transaction manager had to abort or forget the transaction because it blocked forward progress. +// +#define STATUS_TRANSACTION_INTEGRITY_VIOLATED ((NTSTATUS)0xC019005BL) + +// +// MessageId: STATUS_TRANSACTIONMANAGER_IDENTITY_MISMATCH +// +// MessageText: +// +// The TransactionManager identity that was supplied did not match the one recorded in the TransactionManager's log file. +// +#define STATUS_TRANSACTIONMANAGER_IDENTITY_MISMATCH ((NTSTATUS)0xC019005CL) + +// +// MessageId: STATUS_RM_CANNOT_BE_FROZEN_FOR_SNAPSHOT +// +// MessageText: +// +// This snapshot operation cannot continue because a transactional resource manager cannot be frozen in its current state. Please try again. +// +#define STATUS_RM_CANNOT_BE_FROZEN_FOR_SNAPSHOT ((NTSTATUS)0xC019005DL) + +// +// MessageId: STATUS_TRANSACTION_MUST_WRITETHROUGH +// +// MessageText: +// +// The transaction cannot be enlisted on with the specified EnlistmentMask, because the transaction has already completed the PrePrepare phase. In order to ensure correctness, the ResourceManager must switch to a write-through mode and cease caching data within this transaction. Enlisting for only subsequent transaction phases may still succeed. +// +#define STATUS_TRANSACTION_MUST_WRITETHROUGH ((NTSTATUS)0xC019005EL) + +// +// MessageId: STATUS_TRANSACTION_NO_SUPERIOR +// +// MessageText: +// +// The transaction does not have a superior enlistment. +// +#define STATUS_TRANSACTION_NO_SUPERIOR ((NTSTATUS)0xC019005FL) + +// +// MessageId: STATUS_EXPIRED_HANDLE +// +// MessageText: +// +// The handle is no longer properly associated with its transaction. It may have been opened in a transactional resource manager that was subsequently forced to restart. Please close the handle and open a new one. +// +#define STATUS_EXPIRED_HANDLE ((NTSTATUS)0xC0190060L) + +// +// MessageId: STATUS_TRANSACTION_NOT_ENLISTED +// +// MessageText: +// +// The specified operation could not be performed because the resource manager is not enlisted in the transaction. +// +#define STATUS_TRANSACTION_NOT_ENLISTED ((NTSTATUS)0xC0190061L) + + +// +// CLFS (common log file system) error values +// + +// +// MessageId: STATUS_LOG_SECTOR_INVALID +// +// MessageText: +// +// Log service found an invalid log sector. +// +#define STATUS_LOG_SECTOR_INVALID ((NTSTATUS)0xC01A0001L) + +// +// MessageId: STATUS_LOG_SECTOR_PARITY_INVALID +// +// MessageText: +// +// Log service encountered a log sector with invalid block parity. +// +#define STATUS_LOG_SECTOR_PARITY_INVALID ((NTSTATUS)0xC01A0002L) + +// +// MessageId: STATUS_LOG_SECTOR_REMAPPED +// +// MessageText: +// +// Log service encountered a remapped log sector. +// +#define STATUS_LOG_SECTOR_REMAPPED ((NTSTATUS)0xC01A0003L) + +// +// MessageId: STATUS_LOG_BLOCK_INCOMPLETE +// +// MessageText: +// +// Log service encountered a partial or incomplete log block. +// +#define STATUS_LOG_BLOCK_INCOMPLETE ((NTSTATUS)0xC01A0004L) + +// +// MessageId: STATUS_LOG_INVALID_RANGE +// +// MessageText: +// +// Log service encountered an attempt access data outside the active log range. +// +#define STATUS_LOG_INVALID_RANGE ((NTSTATUS)0xC01A0005L) + +// +// MessageId: STATUS_LOG_BLOCKS_EXHAUSTED +// +// MessageText: +// +// Log service user log marshalling buffers are exhausted. +// +#define STATUS_LOG_BLOCKS_EXHAUSTED ((NTSTATUS)0xC01A0006L) + +// +// MessageId: STATUS_LOG_READ_CONTEXT_INVALID +// +// MessageText: +// +// Log service encountered an attempt read from a marshalling area with an invalid read context. +// +#define STATUS_LOG_READ_CONTEXT_INVALID ((NTSTATUS)0xC01A0007L) + +// +// MessageId: STATUS_LOG_RESTART_INVALID +// +// MessageText: +// +// Log service encountered an invalid log restart area. +// +#define STATUS_LOG_RESTART_INVALID ((NTSTATUS)0xC01A0008L) + +// +// MessageId: STATUS_LOG_BLOCK_VERSION +// +// MessageText: +// +// Log service encountered an invalid log block version. +// +#define STATUS_LOG_BLOCK_VERSION ((NTSTATUS)0xC01A0009L) + +// +// MessageId: STATUS_LOG_BLOCK_INVALID +// +// MessageText: +// +// Log service encountered an invalid log block. +// +#define STATUS_LOG_BLOCK_INVALID ((NTSTATUS)0xC01A000AL) + +// +// MessageId: STATUS_LOG_READ_MODE_INVALID +// +// MessageText: +// +// Log service encountered an attempt to read the log with an invalid read mode. +// +#define STATUS_LOG_READ_MODE_INVALID ((NTSTATUS)0xC01A000BL) + +// +// MessageId: STATUS_LOG_NO_RESTART +// +// MessageText: +// +// Log service encountered a log stream with no restart area. +// +#define STATUS_LOG_NO_RESTART ((NTSTATUS)0x401A000CL) + +// +// MessageId: STATUS_LOG_METADATA_CORRUPT +// +// MessageText: +// +// Log service encountered a corrupted metadata file. +// +#define STATUS_LOG_METADATA_CORRUPT ((NTSTATUS)0xC01A000DL) + +// +// MessageId: STATUS_LOG_METADATA_INVALID +// +// MessageText: +// +// Log service encountered a metadata file that could not be created by the log file system. +// +#define STATUS_LOG_METADATA_INVALID ((NTSTATUS)0xC01A000EL) + +// +// MessageId: STATUS_LOG_METADATA_INCONSISTENT +// +// MessageText: +// +// Log service encountered a metadata file with inconsistent data. +// +#define STATUS_LOG_METADATA_INCONSISTENT ((NTSTATUS)0xC01A000FL) + +// +// MessageId: STATUS_LOG_RESERVATION_INVALID +// +// MessageText: +// +// Log service encountered an attempt to erroneously allocate or dispose reservation space. +// +#define STATUS_LOG_RESERVATION_INVALID ((NTSTATUS)0xC01A0010L) + +// +// MessageId: STATUS_LOG_CANT_DELETE +// +// MessageText: +// +// Log service cannot delete log file or file system container. +// +#define STATUS_LOG_CANT_DELETE ((NTSTATUS)0xC01A0011L) + +// +// MessageId: STATUS_LOG_CONTAINER_LIMIT_EXCEEDED +// +// MessageText: +// +// Log service has reached the maximum allowable containers allocated to a log file. +// +#define STATUS_LOG_CONTAINER_LIMIT_EXCEEDED ((NTSTATUS)0xC01A0012L) + +// +// MessageId: STATUS_LOG_START_OF_LOG +// +// MessageText: +// +// Log service has attempted to read or write backwards past the start of the log. +// +#define STATUS_LOG_START_OF_LOG ((NTSTATUS)0xC01A0013L) + +// +// MessageId: STATUS_LOG_POLICY_ALREADY_INSTALLED +// +// MessageText: +// +// Log policy could not be installed because a policy of the same type is already present. +// +#define STATUS_LOG_POLICY_ALREADY_INSTALLED ((NTSTATUS)0xC01A0014L) + +// +// MessageId: STATUS_LOG_POLICY_NOT_INSTALLED +// +// MessageText: +// +// Log policy in question was not installed at the time of the request. +// +#define STATUS_LOG_POLICY_NOT_INSTALLED ((NTSTATUS)0xC01A0015L) + +// +// MessageId: STATUS_LOG_POLICY_INVALID +// +// MessageText: +// +// The installed set of policies on the log is invalid. +// +#define STATUS_LOG_POLICY_INVALID ((NTSTATUS)0xC01A0016L) + +// +// MessageId: STATUS_LOG_POLICY_CONFLICT +// +// MessageText: +// +// A policy on the log in question prevented the operation from completing. +// +#define STATUS_LOG_POLICY_CONFLICT ((NTSTATUS)0xC01A0017L) + +// +// MessageId: STATUS_LOG_PINNED_ARCHIVE_TAIL +// +// MessageText: +// +// Log space cannot be reclaimed because the log is pinned by the archive tail. +// +#define STATUS_LOG_PINNED_ARCHIVE_TAIL ((NTSTATUS)0xC01A0018L) + +// +// MessageId: STATUS_LOG_RECORD_NONEXISTENT +// +// MessageText: +// +// Log record is not a record in the log file. +// +#define STATUS_LOG_RECORD_NONEXISTENT ((NTSTATUS)0xC01A0019L) + +// +// MessageId: STATUS_LOG_RECORDS_RESERVED_INVALID +// +// MessageText: +// +// Number of reserved log records or the adjustment of the number of reserved log records is invalid. +// +#define STATUS_LOG_RECORDS_RESERVED_INVALID ((NTSTATUS)0xC01A001AL) + +// +// MessageId: STATUS_LOG_SPACE_RESERVED_INVALID +// +// MessageText: +// +// Reserved log space or the adjustment of the log space is invalid. +// +#define STATUS_LOG_SPACE_RESERVED_INVALID ((NTSTATUS)0xC01A001BL) + +// +// MessageId: STATUS_LOG_TAIL_INVALID +// +// MessageText: +// +// A new or existing archive tail or base of the active log is invalid. +// +#define STATUS_LOG_TAIL_INVALID ((NTSTATUS)0xC01A001CL) + +// +// MessageId: STATUS_LOG_FULL +// +// MessageText: +// +// Log space is exhausted. +// +#define STATUS_LOG_FULL ((NTSTATUS)0xC01A001DL) + +// +// MessageId: STATUS_LOG_MULTIPLEXED +// +// MessageText: +// +// Log is multiplexed, no direct writes to the physical log is allowed. +// +#define STATUS_LOG_MULTIPLEXED ((NTSTATUS)0xC01A001EL) + +// +// MessageId: STATUS_LOG_DEDICATED +// +// MessageText: +// +// The operation failed because the log is a dedicated log. +// +#define STATUS_LOG_DEDICATED ((NTSTATUS)0xC01A001FL) + +// +// MessageId: STATUS_LOG_ARCHIVE_NOT_IN_PROGRESS +// +// MessageText: +// +// The operation requires an archive context. +// +#define STATUS_LOG_ARCHIVE_NOT_IN_PROGRESS ((NTSTATUS)0xC01A0020L) + +// +// MessageId: STATUS_LOG_ARCHIVE_IN_PROGRESS +// +// MessageText: +// +// Log archival is in progress. +// +#define STATUS_LOG_ARCHIVE_IN_PROGRESS ((NTSTATUS)0xC01A0021L) + +// +// MessageId: STATUS_LOG_EPHEMERAL +// +// MessageText: +// +// The operation requires a non-ephemeral log, but the log is ephemeral. +// +#define STATUS_LOG_EPHEMERAL ((NTSTATUS)0xC01A0022L) + +// +// MessageId: STATUS_LOG_NOT_ENOUGH_CONTAINERS +// +// MessageText: +// +// The log must have at least two containers before it can be read from or written to. +// +#define STATUS_LOG_NOT_ENOUGH_CONTAINERS ((NTSTATUS)0xC01A0023L) + +// +// MessageId: STATUS_LOG_CLIENT_ALREADY_REGISTERED +// +// MessageText: +// +// A log client has already registered on the stream. +// +#define STATUS_LOG_CLIENT_ALREADY_REGISTERED ((NTSTATUS)0xC01A0024L) + +// +// MessageId: STATUS_LOG_CLIENT_NOT_REGISTERED +// +// MessageText: +// +// A log client has not been registered on the stream. +// +#define STATUS_LOG_CLIENT_NOT_REGISTERED ((NTSTATUS)0xC01A0025L) + +// +// MessageId: STATUS_LOG_FULL_HANDLER_IN_PROGRESS +// +// MessageText: +// +// A request has already been made to handle the log full condition. +// +#define STATUS_LOG_FULL_HANDLER_IN_PROGRESS ((NTSTATUS)0xC01A0026L) + +// +// MessageId: STATUS_LOG_CONTAINER_READ_FAILED +// +// MessageText: +// +// Log service encountered an error when attempting to read from a log container. +// +#define STATUS_LOG_CONTAINER_READ_FAILED ((NTSTATUS)0xC01A0027L) + +// +// MessageId: STATUS_LOG_CONTAINER_WRITE_FAILED +// +// MessageText: +// +// Log service encountered an error when attempting to write to a log container. +// +#define STATUS_LOG_CONTAINER_WRITE_FAILED ((NTSTATUS)0xC01A0028L) + +// +// MessageId: STATUS_LOG_CONTAINER_OPEN_FAILED +// +// MessageText: +// +// Log service encountered an error when attempting open a log container. +// +#define STATUS_LOG_CONTAINER_OPEN_FAILED ((NTSTATUS)0xC01A0029L) + +// +// MessageId: STATUS_LOG_CONTAINER_STATE_INVALID +// +// MessageText: +// +// Log service encountered an invalid container state when attempting a requested action. +// +#define STATUS_LOG_CONTAINER_STATE_INVALID ((NTSTATUS)0xC01A002AL) + +// +// MessageId: STATUS_LOG_STATE_INVALID +// +// MessageText: +// +// Log service is not in the correct state to perform a requested action. +// +#define STATUS_LOG_STATE_INVALID ((NTSTATUS)0xC01A002BL) + +// +// MessageId: STATUS_LOG_PINNED +// +// MessageText: +// +// Log space cannot be reclaimed because the log is pinned. +// +#define STATUS_LOG_PINNED ((NTSTATUS)0xC01A002CL) + +// +// MessageId: STATUS_LOG_METADATA_FLUSH_FAILED +// +// MessageText: +// +// Log metadata flush failed. +// +#define STATUS_LOG_METADATA_FLUSH_FAILED ((NTSTATUS)0xC01A002DL) + +// +// MessageId: STATUS_LOG_INCONSISTENT_SECURITY +// +// MessageText: +// +// Security on the log and its containers is inconsistent. +// +#define STATUS_LOG_INCONSISTENT_SECURITY ((NTSTATUS)0xC01A002EL) + +// +// MessageId: STATUS_LOG_APPENDED_FLUSH_FAILED +// +// MessageText: +// +// Records were appended to the log or reservation changes were made, but the log could not be flushed. +// +#define STATUS_LOG_APPENDED_FLUSH_FAILED ((NTSTATUS)0xC01A002FL) + +// +// MessageId: STATUS_LOG_PINNED_RESERVATION +// +// MessageText: +// +// The log is pinned due to reservation consuming most of the log space. Free some reserved records to make space available. +// +#define STATUS_LOG_PINNED_RESERVATION ((NTSTATUS)0xC01A0030L) + + +// +// XDDM Video Facility Error codes (videoprt.sys) +// + +// +// MessageId: STATUS_VIDEO_HUNG_DISPLAY_DRIVER_THREAD +// +// MessageText: +// +// {Display Driver Stopped Responding} +// The %hs display driver has stopped working normally. Save your work and reboot the system to restore full display functionality. The next time you reboot the machine a dialog will be displayed giving you a chance to upload data about this failure to Microsoft. +// +#define STATUS_VIDEO_HUNG_DISPLAY_DRIVER_THREAD ((NTSTATUS)0xC01B00EAL) + +// +// MessageId: STATUS_VIDEO_HUNG_DISPLAY_DRIVER_THREAD_RECOVERED +// +// MessageText: +// +// {Display Driver Stopped Responding and recovered} +// The %hs display driver has stopped working normally. The recovery had been performed. +// +#define STATUS_VIDEO_HUNG_DISPLAY_DRIVER_THREAD_RECOVERED ((NTSTATUS)0x801B00EBL) + +// +// MessageId: STATUS_VIDEO_DRIVER_DEBUG_REPORT_REQUEST +// +// MessageText: +// +// {Display Driver Recovered From Failure} +// The %hs display driver has detected and recovered from a failure. Some graphical operations may have failed. The next time you reboot the machine a dialog will be displayed giving you a chance to upload data about this failure to Microsoft. +// +#define STATUS_VIDEO_DRIVER_DEBUG_REPORT_REQUEST ((NTSTATUS)0x401B00ECL) + + +// +// Monitor Facility Error codes (monitor.sys) +// + +// +// MessageId: STATUS_MONITOR_NO_DESCRIPTOR +// +// MessageText: +// +// Monitor descriptor could not be obtained. +// +#define STATUS_MONITOR_NO_DESCRIPTOR ((NTSTATUS)0xC01D0001L) + +// +// MessageId: STATUS_MONITOR_UNKNOWN_DESCRIPTOR_FORMAT +// +// MessageText: +// +// Format of the obtained monitor descriptor is not supported by this release. +// +#define STATUS_MONITOR_UNKNOWN_DESCRIPTOR_FORMAT ((NTSTATUS)0xC01D0002L) + +// +// MessageId: STATUS_MONITOR_INVALID_DESCRIPTOR_CHECKSUM +// +// MessageText: +// +// Checksum of the obtained monitor descriptor is invalid. +// +#define STATUS_MONITOR_INVALID_DESCRIPTOR_CHECKSUM ((NTSTATUS)0xC01D0003L) + +// +// MessageId: STATUS_MONITOR_INVALID_STANDARD_TIMING_BLOCK +// +// MessageText: +// +// Monitor descriptor contains an invalid standard timing block. +// +#define STATUS_MONITOR_INVALID_STANDARD_TIMING_BLOCK ((NTSTATUS)0xC01D0004L) + +// +// MessageId: STATUS_MONITOR_WMI_DATABLOCK_REGISTRATION_FAILED +// +// MessageText: +// +// WMI data block registration failed for one of the MSMonitorClass WMI subclasses. +// +#define STATUS_MONITOR_WMI_DATABLOCK_REGISTRATION_FAILED ((NTSTATUS)0xC01D0005L) + +// +// MessageId: STATUS_MONITOR_INVALID_SERIAL_NUMBER_MONDSC_BLOCK +// +// MessageText: +// +// Provided monitor descriptor block is either corrupted or does not contain monitor's detailed serial number. +// +#define STATUS_MONITOR_INVALID_SERIAL_NUMBER_MONDSC_BLOCK ((NTSTATUS)0xC01D0006L) + +// +// MessageId: STATUS_MONITOR_INVALID_USER_FRIENDLY_MONDSC_BLOCK +// +// MessageText: +// +// Provided monitor descriptor block is either corrupted or does not contain monitor's user friendly name. +// +#define STATUS_MONITOR_INVALID_USER_FRIENDLY_MONDSC_BLOCK ((NTSTATUS)0xC01D0007L) + +// +// MessageId: STATUS_MONITOR_NO_MORE_DESCRIPTOR_DATA +// +// MessageText: +// +// There is no monitor descriptor data at the specified (offset, size) region. +// +#define STATUS_MONITOR_NO_MORE_DESCRIPTOR_DATA ((NTSTATUS)0xC01D0008L) + +// +// MessageId: STATUS_MONITOR_INVALID_DETAILED_TIMING_BLOCK +// +// MessageText: +// +// Monitor descriptor contains an invalid detailed timing block. +// +#define STATUS_MONITOR_INVALID_DETAILED_TIMING_BLOCK ((NTSTATUS)0xC01D0009L) + +// +// MessageId: STATUS_MONITOR_INVALID_MANUFACTURE_DATE +// +// MessageText: +// +// Monitor descriptor contains invalid manufacture date. +// +#define STATUS_MONITOR_INVALID_MANUFACTURE_DATE ((NTSTATUS)0xC01D000AL) + + +// +// Graphics Facility Error codes (dxg.sys, dxgkrnl.sys) +// + +// +// Common Windows Graphics Kernel Subsystem status codes {0x0000..0x00ff} +// +// +// MessageId: STATUS_GRAPHICS_NOT_EXCLUSIVE_MODE_OWNER +// +// MessageText: +// +// Exclusive mode ownership is needed to create unmanaged primary allocation. +// +#define STATUS_GRAPHICS_NOT_EXCLUSIVE_MODE_OWNER ((NTSTATUS)0xC01E0000L) + +// +// MessageId: STATUS_GRAPHICS_INSUFFICIENT_DMA_BUFFER +// +// MessageText: +// +// The driver needs more DMA buffer space in order to complete the requested operation. +// +#define STATUS_GRAPHICS_INSUFFICIENT_DMA_BUFFER ((NTSTATUS)0xC01E0001L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_DISPLAY_ADAPTER +// +// MessageText: +// +// Specified display adapter handle is invalid. +// +#define STATUS_GRAPHICS_INVALID_DISPLAY_ADAPTER ((NTSTATUS)0xC01E0002L) + +// +// MessageId: STATUS_GRAPHICS_ADAPTER_WAS_RESET +// +// MessageText: +// +// Specified display adapter and all of its state has been reset. +// +#define STATUS_GRAPHICS_ADAPTER_WAS_RESET ((NTSTATUS)0xC01E0003L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_DRIVER_MODEL +// +// MessageText: +// +// The driver stack doesn't match the expected driver model. +// +#define STATUS_GRAPHICS_INVALID_DRIVER_MODEL ((NTSTATUS)0xC01E0004L) + +// +// MessageId: STATUS_GRAPHICS_PRESENT_MODE_CHANGED +// +// MessageText: +// +// Present happened but ended up into the changed desktop mode +// +#define STATUS_GRAPHICS_PRESENT_MODE_CHANGED ((NTSTATUS)0xC01E0005L) + +// +// MessageId: STATUS_GRAPHICS_PRESENT_OCCLUDED +// +// MessageText: +// +// Nothing to present due to desktop occlusion +// +#define STATUS_GRAPHICS_PRESENT_OCCLUDED ((NTSTATUS)0xC01E0006L) + +// +// MessageId: STATUS_GRAPHICS_PRESENT_DENIED +// +// MessageText: +// +// Not able to present due to denial of desktop access +// +#define STATUS_GRAPHICS_PRESENT_DENIED ((NTSTATUS)0xC01E0007L) + +// +// MessageId: STATUS_GRAPHICS_CANNOTCOLORCONVERT +// +// MessageText: +// +// Not able to present with color convertion +// +#define STATUS_GRAPHICS_CANNOTCOLORCONVERT ((NTSTATUS)0xC01E0008L) + +// +// MessageId: STATUS_GRAPHICS_DRIVER_MISMATCH +// +// MessageText: +// +// The kernel driver detected a version mismatch between it and the user mode driver. +// +#define STATUS_GRAPHICS_DRIVER_MISMATCH ((NTSTATUS)0xC01E0009L) + +// +// MessageId: STATUS_GRAPHICS_PARTIAL_DATA_POPULATED +// +// MessageText: +// +// Specified buffer is not big enough to contain entire requested dataset. Partial data populated upto the size of the buffer. Caller needs to provide buffer of size as specified in the partially populated buffer's content (interface specific). +// +#define STATUS_GRAPHICS_PARTIAL_DATA_POPULATED ((NTSTATUS)0x401E000AL) + +// +// MessageId: STATUS_GRAPHICS_PRESENT_REDIRECTION_DISABLED +// +// MessageText: +// +// Present redirection is disabled (desktop windowing management subsystem is off). +// +#define STATUS_GRAPHICS_PRESENT_REDIRECTION_DISABLED ((NTSTATUS)0xC01E000BL) + +// +// MessageId: STATUS_GRAPHICS_PRESENT_UNOCCLUDED +// +// MessageText: +// +// Previous exclusive VidPn source owner has released its ownership +// +#define STATUS_GRAPHICS_PRESENT_UNOCCLUDED ((NTSTATUS)0xC01E000CL) + +// +// Video Memory Manager (VidMM) specific status codes {0x0100..0x01ff} +// +// +// MessageId: STATUS_GRAPHICS_NO_VIDEO_MEMORY +// +// MessageText: +// +// Not enough video memory available to complete the operation. +// +#define STATUS_GRAPHICS_NO_VIDEO_MEMORY ((NTSTATUS)0xC01E0100L) + +// +// MessageId: STATUS_GRAPHICS_CANT_LOCK_MEMORY +// +// MessageText: +// +// Couldn't probe and lock the underlying memory of an allocation. +// +#define STATUS_GRAPHICS_CANT_LOCK_MEMORY ((NTSTATUS)0xC01E0101L) + +// +// MessageId: STATUS_GRAPHICS_ALLOCATION_BUSY +// +// MessageText: +// +// The allocation is currently busy. +// +#define STATUS_GRAPHICS_ALLOCATION_BUSY ((NTSTATUS)0xC01E0102L) + +// +// MessageId: STATUS_GRAPHICS_TOO_MANY_REFERENCES +// +// MessageText: +// +// An object being referenced has already reached the maximum reference count and can't be referenced any further. +// +#define STATUS_GRAPHICS_TOO_MANY_REFERENCES ((NTSTATUS)0xC01E0103L) + +// +// MessageId: STATUS_GRAPHICS_TRY_AGAIN_LATER +// +// MessageText: +// +// A problem couldn't be solved due to some currently existing condition. The problem should be tried again later. +// +#define STATUS_GRAPHICS_TRY_AGAIN_LATER ((NTSTATUS)0xC01E0104L) + +// +// MessageId: STATUS_GRAPHICS_TRY_AGAIN_NOW +// +// MessageText: +// +// A problem couldn't be solved due to some currently existing condition. The problem should be tried again immediately. +// +#define STATUS_GRAPHICS_TRY_AGAIN_NOW ((NTSTATUS)0xC01E0105L) + +// +// MessageId: STATUS_GRAPHICS_ALLOCATION_INVALID +// +// MessageText: +// +// The allocation is invalid. +// +#define STATUS_GRAPHICS_ALLOCATION_INVALID ((NTSTATUS)0xC01E0106L) + +// +// MessageId: STATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNAVAILABLE +// +// MessageText: +// +// No more unswizzling aperture are currently available. +// +#define STATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNAVAILABLE ((NTSTATUS)0xC01E0107L) + +// +// MessageId: STATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNSUPPORTED +// +// MessageText: +// +// The current allocation can't be unswizzled by an aperture. +// +#define STATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNSUPPORTED ((NTSTATUS)0xC01E0108L) + +// +// MessageId: STATUS_GRAPHICS_CANT_EVICT_PINNED_ALLOCATION +// +// MessageText: +// +// The request failed because a pinned allocation can't be evicted. +// +#define STATUS_GRAPHICS_CANT_EVICT_PINNED_ALLOCATION ((NTSTATUS)0xC01E0109L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_ALLOCATION_USAGE +// +// MessageText: +// +// The allocation can't be used from it's current segment location for the specified operation. +// +#define STATUS_GRAPHICS_INVALID_ALLOCATION_USAGE ((NTSTATUS)0xC01E0110L) + +// +// MessageId: STATUS_GRAPHICS_CANT_RENDER_LOCKED_ALLOCATION +// +// MessageText: +// +// A locked allocation can't be used in the current command buffer. +// +#define STATUS_GRAPHICS_CANT_RENDER_LOCKED_ALLOCATION ((NTSTATUS)0xC01E0111L) + +// +// MessageId: STATUS_GRAPHICS_ALLOCATION_CLOSED +// +// MessageText: +// +// The allocation being referenced has been closed permanently. +// +#define STATUS_GRAPHICS_ALLOCATION_CLOSED ((NTSTATUS)0xC01E0112L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_ALLOCATION_INSTANCE +// +// MessageText: +// +// An invalid allocation instance is being referenced. +// +#define STATUS_GRAPHICS_INVALID_ALLOCATION_INSTANCE ((NTSTATUS)0xC01E0113L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_ALLOCATION_HANDLE +// +// MessageText: +// +// An invalid allocation handle is being referenced. +// +#define STATUS_GRAPHICS_INVALID_ALLOCATION_HANDLE ((NTSTATUS)0xC01E0114L) + +// +// MessageId: STATUS_GRAPHICS_WRONG_ALLOCATION_DEVICE +// +// MessageText: +// +// The allocation being referenced doesn't belong to the current device. +// +#define STATUS_GRAPHICS_WRONG_ALLOCATION_DEVICE ((NTSTATUS)0xC01E0115L) + +// +// MessageId: STATUS_GRAPHICS_ALLOCATION_CONTENT_LOST +// +// MessageText: +// +// The specified allocation lost its content. +// +#define STATUS_GRAPHICS_ALLOCATION_CONTENT_LOST ((NTSTATUS)0xC01E0116L) + +// +// Video GPU Scheduler (VidSch) specific status codes {0x0200..0x02ff} +// +// +// MessageId: STATUS_GRAPHICS_GPU_EXCEPTION_ON_DEVICE +// +// MessageText: +// +// GPU exception is detected on the given device. The device is not able to be scheduled. +// +#define STATUS_GRAPHICS_GPU_EXCEPTION_ON_DEVICE ((NTSTATUS)0xC01E0200L) + +// +// Video Present Network Management (VidPNMgr) specific status codes {0x0300..0x03ff} +// +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY +// +// MessageText: +// +// Specified VidPN topology is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY ((NTSTATUS)0xC01E0300L) + +// +// MessageId: STATUS_GRAPHICS_VIDPN_TOPOLOGY_NOT_SUPPORTED +// +// MessageText: +// +// Specified VidPN topology is valid but is not supported by this model of the display adapter. +// +#define STATUS_GRAPHICS_VIDPN_TOPOLOGY_NOT_SUPPORTED ((NTSTATUS)0xC01E0301L) + +// +// MessageId: STATUS_GRAPHICS_VIDPN_TOPOLOGY_CURRENTLY_NOT_SUPPORTED +// +// MessageText: +// +// Specified VidPN topology is valid but is not supported by the display adapter at this time, due to current allocation of its resources. +// +#define STATUS_GRAPHICS_VIDPN_TOPOLOGY_CURRENTLY_NOT_SUPPORTED ((NTSTATUS)0xC01E0302L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDPN +// +// MessageText: +// +// Specified VidPN handle is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDPN ((NTSTATUS)0xC01E0303L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE +// +// MessageText: +// +// Specified video present source is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE ((NTSTATUS)0xC01E0304L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET +// +// MessageText: +// +// Specified video present target is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET ((NTSTATUS)0xC01E0305L) + +// +// MessageId: STATUS_GRAPHICS_VIDPN_MODALITY_NOT_SUPPORTED +// +// MessageText: +// +// Specified VidPN modality is not supported (e.g. at least two of the pinned modes are not cofunctional). +// +#define STATUS_GRAPHICS_VIDPN_MODALITY_NOT_SUPPORTED ((NTSTATUS)0xC01E0306L) + +// +// MessageId: STATUS_GRAPHICS_MODE_NOT_PINNED +// +// MessageText: +// +// No mode is pinned on the specified VidPN source/target. +// +#define STATUS_GRAPHICS_MODE_NOT_PINNED ((NTSTATUS)0x401E0307L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDPN_SOURCEMODESET +// +// MessageText: +// +// Specified VidPN source mode set is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDPN_SOURCEMODESET ((NTSTATUS)0xC01E0308L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDPN_TARGETMODESET +// +// MessageText: +// +// Specified VidPN target mode set is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDPN_TARGETMODESET ((NTSTATUS)0xC01E0309L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_FREQUENCY +// +// MessageText: +// +// Specified video signal frequency is invalid. +// +#define STATUS_GRAPHICS_INVALID_FREQUENCY ((NTSTATUS)0xC01E030AL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_ACTIVE_REGION +// +// MessageText: +// +// Specified video signal active region is invalid. +// +#define STATUS_GRAPHICS_INVALID_ACTIVE_REGION ((NTSTATUS)0xC01E030BL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_TOTAL_REGION +// +// MessageText: +// +// Specified video signal total region is invalid. +// +#define STATUS_GRAPHICS_INVALID_TOTAL_REGION ((NTSTATUS)0xC01E030CL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE_MODE +// +// MessageText: +// +// Specified video present source mode is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE_MODE ((NTSTATUS)0xC01E0310L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET_MODE +// +// MessageText: +// +// Specified video present target mode is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET_MODE ((NTSTATUS)0xC01E0311L) + +// +// MessageId: STATUS_GRAPHICS_PINNED_MODE_MUST_REMAIN_IN_SET +// +// MessageText: +// +// Pinned mode must remain in the set on VidPN's cofunctional modality enumeration. +// +#define STATUS_GRAPHICS_PINNED_MODE_MUST_REMAIN_IN_SET ((NTSTATUS)0xC01E0312L) + +// +// MessageId: STATUS_GRAPHICS_PATH_ALREADY_IN_TOPOLOGY +// +// MessageText: +// +// Specified video present path is already in VidPN's topology. +// +#define STATUS_GRAPHICS_PATH_ALREADY_IN_TOPOLOGY ((NTSTATUS)0xC01E0313L) + +// +// MessageId: STATUS_GRAPHICS_MODE_ALREADY_IN_MODESET +// +// MessageText: +// +// Specified mode is already in the mode set. +// +#define STATUS_GRAPHICS_MODE_ALREADY_IN_MODESET ((NTSTATUS)0xC01E0314L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDEOPRESENTSOURCESET +// +// MessageText: +// +// Specified video present source set is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDEOPRESENTSOURCESET ((NTSTATUS)0xC01E0315L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDEOPRESENTTARGETSET +// +// MessageText: +// +// Specified video present target set is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDEOPRESENTTARGETSET ((NTSTATUS)0xC01E0316L) + +// +// MessageId: STATUS_GRAPHICS_SOURCE_ALREADY_IN_SET +// +// MessageText: +// +// Specified video present source is already in the video present source set. +// +#define STATUS_GRAPHICS_SOURCE_ALREADY_IN_SET ((NTSTATUS)0xC01E0317L) + +// +// MessageId: STATUS_GRAPHICS_TARGET_ALREADY_IN_SET +// +// MessageText: +// +// Specified video present target is already in the video present target set. +// +#define STATUS_GRAPHICS_TARGET_ALREADY_IN_SET ((NTSTATUS)0xC01E0318L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDPN_PRESENT_PATH +// +// MessageText: +// +// Specified VidPN present path is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDPN_PRESENT_PATH ((NTSTATUS)0xC01E0319L) + +// +// MessageId: STATUS_GRAPHICS_NO_RECOMMENDED_VIDPN_TOPOLOGY +// +// MessageText: +// +// Miniport has no recommendation for augmentation of the specified VidPN's topology. +// +#define STATUS_GRAPHICS_NO_RECOMMENDED_VIDPN_TOPOLOGY ((NTSTATUS)0xC01E031AL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGESET +// +// MessageText: +// +// Specified monitor frequency range set is invalid. +// +#define STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGESET ((NTSTATUS)0xC01E031BL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE +// +// MessageText: +// +// Specified monitor frequency range is invalid. +// +#define STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE ((NTSTATUS)0xC01E031CL) + +// +// MessageId: STATUS_GRAPHICS_FREQUENCYRANGE_NOT_IN_SET +// +// MessageText: +// +// Specified frequency range is not in the specified monitor frequency range set. +// +#define STATUS_GRAPHICS_FREQUENCYRANGE_NOT_IN_SET ((NTSTATUS)0xC01E031DL) + +// +// MessageId: STATUS_GRAPHICS_NO_PREFERRED_MODE +// +// MessageText: +// +// Specified mode set does not specify preference for one of its modes. +// +#define STATUS_GRAPHICS_NO_PREFERRED_MODE ((NTSTATUS)0x401E031EL) + +// +// MessageId: STATUS_GRAPHICS_FREQUENCYRANGE_ALREADY_IN_SET +// +// MessageText: +// +// Specified frequency range is already in the specified monitor frequency range set. +// +#define STATUS_GRAPHICS_FREQUENCYRANGE_ALREADY_IN_SET ((NTSTATUS)0xC01E031FL) + +// +// MessageId: STATUS_GRAPHICS_STALE_MODESET +// +// MessageText: +// +// Specified mode set is stale. Please reacquire the new mode set. +// +#define STATUS_GRAPHICS_STALE_MODESET ((NTSTATUS)0xC01E0320L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_MONITOR_SOURCEMODESET +// +// MessageText: +// +// Specified monitor source mode set is invalid. +// +#define STATUS_GRAPHICS_INVALID_MONITOR_SOURCEMODESET ((NTSTATUS)0xC01E0321L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_MONITOR_SOURCE_MODE +// +// MessageText: +// +// Specified monitor source mode is invalid. +// +#define STATUS_GRAPHICS_INVALID_MONITOR_SOURCE_MODE ((NTSTATUS)0xC01E0322L) + +// +// MessageId: STATUS_GRAPHICS_NO_RECOMMENDED_FUNCTIONAL_VIDPN +// +// MessageText: +// +// Miniport does not have any recommendation regarding the request to provide a functional VidPN given the current display adapter configuration. +// +#define STATUS_GRAPHICS_NO_RECOMMENDED_FUNCTIONAL_VIDPN ((NTSTATUS)0xC01E0323L) + +// +// MessageId: STATUS_GRAPHICS_MODE_ID_MUST_BE_UNIQUE +// +// MessageText: +// +// ID of the specified mode is already used by another mode in the set. +// +#define STATUS_GRAPHICS_MODE_ID_MUST_BE_UNIQUE ((NTSTATUS)0xC01E0324L) + +// +// MessageId: STATUS_GRAPHICS_EMPTY_ADAPTER_MONITOR_MODE_SUPPORT_INTERSECTION +// +// MessageText: +// +// System failed to determine a mode that is supported by both the display adapter and the monitor connected to it. +// +#define STATUS_GRAPHICS_EMPTY_ADAPTER_MONITOR_MODE_SUPPORT_INTERSECTION ((NTSTATUS)0xC01E0325L) + +// +// MessageId: STATUS_GRAPHICS_VIDEO_PRESENT_TARGETS_LESS_THAN_SOURCES +// +// MessageText: +// +// Number of video present targets must be greater than or equal to the number of video present sources. +// +#define STATUS_GRAPHICS_VIDEO_PRESENT_TARGETS_LESS_THAN_SOURCES ((NTSTATUS)0xC01E0326L) + +// +// MessageId: STATUS_GRAPHICS_PATH_NOT_IN_TOPOLOGY +// +// MessageText: +// +// Specified present path is not in VidPN's topology. +// +#define STATUS_GRAPHICS_PATH_NOT_IN_TOPOLOGY ((NTSTATUS)0xC01E0327L) + +// +// MessageId: STATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_SOURCE +// +// MessageText: +// +// Display adapter must have at least one video present source. +// +#define STATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_SOURCE ((NTSTATUS)0xC01E0328L) + +// +// MessageId: STATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_TARGET +// +// MessageText: +// +// Display adapter must have at least one video present target. +// +#define STATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_TARGET ((NTSTATUS)0xC01E0329L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_MONITORDESCRIPTORSET +// +// MessageText: +// +// Specified monitor descriptor set is invalid. +// +#define STATUS_GRAPHICS_INVALID_MONITORDESCRIPTORSET ((NTSTATUS)0xC01E032AL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_MONITORDESCRIPTOR +// +// MessageText: +// +// Specified monitor descriptor is invalid. +// +#define STATUS_GRAPHICS_INVALID_MONITORDESCRIPTOR ((NTSTATUS)0xC01E032BL) + +// +// MessageId: STATUS_GRAPHICS_MONITORDESCRIPTOR_NOT_IN_SET +// +// MessageText: +// +// Specified descriptor is not in the specified monitor descriptor set. +// +#define STATUS_GRAPHICS_MONITORDESCRIPTOR_NOT_IN_SET ((NTSTATUS)0xC01E032CL) + +// +// MessageId: STATUS_GRAPHICS_MONITORDESCRIPTOR_ALREADY_IN_SET +// +// MessageText: +// +// Specified descriptor is already in the specified monitor descriptor set. +// +#define STATUS_GRAPHICS_MONITORDESCRIPTOR_ALREADY_IN_SET ((NTSTATUS)0xC01E032DL) + +// +// MessageId: STATUS_GRAPHICS_MONITORDESCRIPTOR_ID_MUST_BE_UNIQUE +// +// MessageText: +// +// ID of the specified monitor descriptor is already used by another descriptor in the set. +// +#define STATUS_GRAPHICS_MONITORDESCRIPTOR_ID_MUST_BE_UNIQUE ((NTSTATUS)0xC01E032EL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDPN_TARGET_SUBSET_TYPE +// +// MessageText: +// +// Specified video present target subset type is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDPN_TARGET_SUBSET_TYPE ((NTSTATUS)0xC01E032FL) + +// +// MessageId: STATUS_GRAPHICS_RESOURCES_NOT_RELATED +// +// MessageText: +// +// Two or more of the specified resources are not related to each other, as defined by the interface semantics. +// +#define STATUS_GRAPHICS_RESOURCES_NOT_RELATED ((NTSTATUS)0xC01E0330L) + +// +// MessageId: STATUS_GRAPHICS_SOURCE_ID_MUST_BE_UNIQUE +// +// MessageText: +// +// ID of the specified video present source is already used by another source in the set. +// +#define STATUS_GRAPHICS_SOURCE_ID_MUST_BE_UNIQUE ((NTSTATUS)0xC01E0331L) + +// +// MessageId: STATUS_GRAPHICS_TARGET_ID_MUST_BE_UNIQUE +// +// MessageText: +// +// ID of the specified video present target is already used by another target in the set. +// +#define STATUS_GRAPHICS_TARGET_ID_MUST_BE_UNIQUE ((NTSTATUS)0xC01E0332L) + +// +// MessageId: STATUS_GRAPHICS_NO_AVAILABLE_VIDPN_TARGET +// +// MessageText: +// +// Specified VidPN source cannot be used because there is no available VidPN target to connect it to. +// +#define STATUS_GRAPHICS_NO_AVAILABLE_VIDPN_TARGET ((NTSTATUS)0xC01E0333L) + +// +// MessageId: STATUS_GRAPHICS_MONITOR_COULD_NOT_BE_ASSOCIATED_WITH_ADAPTER +// +// MessageText: +// +// Newly arrived monitor could not be associated with a display adapter. +// +#define STATUS_GRAPHICS_MONITOR_COULD_NOT_BE_ASSOCIATED_WITH_ADAPTER ((NTSTATUS)0xC01E0334L) + +// +// MessageId: STATUS_GRAPHICS_NO_VIDPNMGR +// +// MessageText: +// +// Display adapter in question does not have an associated VidPN manager. +// +#define STATUS_GRAPHICS_NO_VIDPNMGR ((NTSTATUS)0xC01E0335L) + +// +// MessageId: STATUS_GRAPHICS_NO_ACTIVE_VIDPN +// +// MessageText: +// +// VidPN manager of the display adapter in question does not have an active VidPN. +// +#define STATUS_GRAPHICS_NO_ACTIVE_VIDPN ((NTSTATUS)0xC01E0336L) + +// +// MessageId: STATUS_GRAPHICS_STALE_VIDPN_TOPOLOGY +// +// MessageText: +// +// Specified VidPN topology is stale. Please reacquire the new topology. +// +#define STATUS_GRAPHICS_STALE_VIDPN_TOPOLOGY ((NTSTATUS)0xC01E0337L) + +// +// MessageId: STATUS_GRAPHICS_MONITOR_NOT_CONNECTED +// +// MessageText: +// +// There is no monitor connected on the specified video present target. +// +#define STATUS_GRAPHICS_MONITOR_NOT_CONNECTED ((NTSTATUS)0xC01E0338L) + +// +// MessageId: STATUS_GRAPHICS_SOURCE_NOT_IN_TOPOLOGY +// +// MessageText: +// +// Specified source is not part of the specified VidPN's topology. +// +#define STATUS_GRAPHICS_SOURCE_NOT_IN_TOPOLOGY ((NTSTATUS)0xC01E0339L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_PRIMARYSURFACE_SIZE +// +// MessageText: +// +// Specified primary surface size is invalid. +// +#define STATUS_GRAPHICS_INVALID_PRIMARYSURFACE_SIZE ((NTSTATUS)0xC01E033AL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VISIBLEREGION_SIZE +// +// MessageText: +// +// Specified visible region size is invalid. +// +#define STATUS_GRAPHICS_INVALID_VISIBLEREGION_SIZE ((NTSTATUS)0xC01E033BL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_STRIDE +// +// MessageText: +// +// Specified stride is invalid. +// +#define STATUS_GRAPHICS_INVALID_STRIDE ((NTSTATUS)0xC01E033CL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_PIXELFORMAT +// +// MessageText: +// +// Specified pixel format is invalid. +// +#define STATUS_GRAPHICS_INVALID_PIXELFORMAT ((NTSTATUS)0xC01E033DL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_COLORBASIS +// +// MessageText: +// +// Specified color basis is invalid. +// +#define STATUS_GRAPHICS_INVALID_COLORBASIS ((NTSTATUS)0xC01E033EL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_PIXELVALUEACCESSMODE +// +// MessageText: +// +// Specified pixel value access mode is invalid. +// +#define STATUS_GRAPHICS_INVALID_PIXELVALUEACCESSMODE ((NTSTATUS)0xC01E033FL) + +// +// MessageId: STATUS_GRAPHICS_TARGET_NOT_IN_TOPOLOGY +// +// MessageText: +// +// Specified target is not part of the specified VidPN's topology. +// +#define STATUS_GRAPHICS_TARGET_NOT_IN_TOPOLOGY ((NTSTATUS)0xC01E0340L) + +// +// MessageId: STATUS_GRAPHICS_NO_DISPLAY_MODE_MANAGEMENT_SUPPORT +// +// MessageText: +// +// Failed to acquire display mode management interface. +// +#define STATUS_GRAPHICS_NO_DISPLAY_MODE_MANAGEMENT_SUPPORT ((NTSTATUS)0xC01E0341L) + +// +// MessageId: STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE +// +// MessageText: +// +// Specified VidPN source is already owned by a DMM client and cannot be used until that client releases it. +// +#define STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE ((NTSTATUS)0xC01E0342L) + +// +// MessageId: STATUS_GRAPHICS_CANT_ACCESS_ACTIVE_VIDPN +// +// MessageText: +// +// Specified VidPN is active and cannot be accessed. +// +#define STATUS_GRAPHICS_CANT_ACCESS_ACTIVE_VIDPN ((NTSTATUS)0xC01E0343L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_PATH_IMPORTANCE_ORDINAL +// +// MessageText: +// +// Specified VidPN present path importance ordinal is invalid. +// +#define STATUS_GRAPHICS_INVALID_PATH_IMPORTANCE_ORDINAL ((NTSTATUS)0xC01E0344L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_PATH_CONTENT_GEOMETRY_TRANSFORMATION +// +// MessageText: +// +// Specified VidPN present path content geometry transformation is invalid. +// +#define STATUS_GRAPHICS_INVALID_PATH_CONTENT_GEOMETRY_TRANSFORMATION ((NTSTATUS)0xC01E0345L) + +// +// MessageId: STATUS_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_SUPPORTED +// +// MessageText: +// +// Specified content geometry transformation is not supported on the respective VidPN present path. +// +#define STATUS_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_SUPPORTED ((NTSTATUS)0xC01E0346L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_GAMMA_RAMP +// +// MessageText: +// +// Specified gamma ramp is invalid. +// +#define STATUS_GRAPHICS_INVALID_GAMMA_RAMP ((NTSTATUS)0xC01E0347L) + +// +// MessageId: STATUS_GRAPHICS_GAMMA_RAMP_NOT_SUPPORTED +// +// MessageText: +// +// Specified gamma ramp is not supported on the respective VidPN present path. +// +#define STATUS_GRAPHICS_GAMMA_RAMP_NOT_SUPPORTED ((NTSTATUS)0xC01E0348L) + +// +// MessageId: STATUS_GRAPHICS_MULTISAMPLING_NOT_SUPPORTED +// +// MessageText: +// +// Multi-sampling is not supported on the respective VidPN present path. +// +#define STATUS_GRAPHICS_MULTISAMPLING_NOT_SUPPORTED ((NTSTATUS)0xC01E0349L) + +// +// MessageId: STATUS_GRAPHICS_MODE_NOT_IN_MODESET +// +// MessageText: +// +// Specified mode is not in the specified mode set. +// +#define STATUS_GRAPHICS_MODE_NOT_IN_MODESET ((NTSTATUS)0xC01E034AL) + +// +// MessageId: STATUS_GRAPHICS_DATASET_IS_EMPTY +// +// MessageText: +// +// Specified data set (e.g. mode set, frequency range set, descriptor set, topology, etc.) is empty. +// +#define STATUS_GRAPHICS_DATASET_IS_EMPTY ((NTSTATUS)0x401E034BL) + +// +// MessageId: STATUS_GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET +// +// MessageText: +// +// Specified data set (e.g. mode set, frequency range set, descriptor set, topology, etc.) does not contain any more elements. +// +#define STATUS_GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET ((NTSTATUS)0x401E034CL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY_RECOMMENDATION_REASON +// +// MessageText: +// +// Specified VidPN topology recommendation reason is invalid. +// +#define STATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY_RECOMMENDATION_REASON ((NTSTATUS)0xC01E034DL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_PATH_CONTENT_TYPE +// +// MessageText: +// +// Specified VidPN present path content type is invalid. +// +#define STATUS_GRAPHICS_INVALID_PATH_CONTENT_TYPE ((NTSTATUS)0xC01E034EL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_COPYPROTECTION_TYPE +// +// MessageText: +// +// Specified VidPN present path copy protection type is invalid. +// +#define STATUS_GRAPHICS_INVALID_COPYPROTECTION_TYPE ((NTSTATUS)0xC01E034FL) + +// +// MessageId: STATUS_GRAPHICS_UNASSIGNED_MODESET_ALREADY_EXISTS +// +// MessageText: +// +// No more than one unassigned mode set can exist at any given time for a given VidPN source/target. +// +#define STATUS_GRAPHICS_UNASSIGNED_MODESET_ALREADY_EXISTS ((NTSTATUS)0xC01E0350L) + +// +// MessageId: STATUS_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_PINNED +// +// MessageText: +// +// Specified content transformation is not pinned on the specified VidPN present path. +// +#define STATUS_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_PINNED ((NTSTATUS)0x401E0351L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_SCANLINE_ORDERING +// +// MessageText: +// +// Specified scanline ordering type is invalid. +// +#define STATUS_GRAPHICS_INVALID_SCANLINE_ORDERING ((NTSTATUS)0xC01E0352L) + +// +// MessageId: STATUS_GRAPHICS_TOPOLOGY_CHANGES_NOT_ALLOWED +// +// MessageText: +// +// Topology changes are not allowed for the specified VidPN. +// +#define STATUS_GRAPHICS_TOPOLOGY_CHANGES_NOT_ALLOWED ((NTSTATUS)0xC01E0353L) + +// +// MessageId: STATUS_GRAPHICS_NO_AVAILABLE_IMPORTANCE_ORDINALS +// +// MessageText: +// +// All available importance ordinals are already used in specified topology. +// +#define STATUS_GRAPHICS_NO_AVAILABLE_IMPORTANCE_ORDINALS ((NTSTATUS)0xC01E0354L) + +// +// MessageId: STATUS_GRAPHICS_INCOMPATIBLE_PRIVATE_FORMAT +// +// MessageText: +// +// Specified primary surface has a different private format attribute than the current primary surface +// +#define STATUS_GRAPHICS_INCOMPATIBLE_PRIVATE_FORMAT ((NTSTATUS)0xC01E0355L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_MODE_PRUNING_ALGORITHM +// +// MessageText: +// +// Specified mode pruning algorithm is invalid +// +#define STATUS_GRAPHICS_INVALID_MODE_PRUNING_ALGORITHM ((NTSTATUS)0xC01E0356L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_MONITOR_CAPABILITY_ORIGIN +// +// MessageText: +// +// Specified monitor capability origin is invalid. +// +#define STATUS_GRAPHICS_INVALID_MONITOR_CAPABILITY_ORIGIN ((NTSTATUS)0xC01E0357L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE_CONSTRAINT +// +// MessageText: +// +// Specified monitor frequency range constraint is invalid. +// +#define STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE_CONSTRAINT ((NTSTATUS)0xC01E0358L) + +// +// MessageId: STATUS_GRAPHICS_MAX_NUM_PATHS_REACHED +// +// MessageText: +// +// Maximum supported number of present paths has been reached. +// +#define STATUS_GRAPHICS_MAX_NUM_PATHS_REACHED ((NTSTATUS)0xC01E0359L) + +// +// MessageId: STATUS_GRAPHICS_CANCEL_VIDPN_TOPOLOGY_AUGMENTATION +// +// MessageText: +// +// Miniport requested that augmentation be cancelled for the specified source of the specified VidPN's topology. +// +#define STATUS_GRAPHICS_CANCEL_VIDPN_TOPOLOGY_AUGMENTATION ((NTSTATUS)0xC01E035AL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_CLIENT_TYPE +// +// MessageText: +// +// Specified client type was not recognized. +// +#define STATUS_GRAPHICS_INVALID_CLIENT_TYPE ((NTSTATUS)0xC01E035BL) + +// +// MessageId: STATUS_GRAPHICS_CLIENTVIDPN_NOT_SET +// +// MessageText: +// +// Client VidPN is not set on this adapter (e.g. no user mode initiated mode changes took place on this adapter yet). +// +#define STATUS_GRAPHICS_CLIENTVIDPN_NOT_SET ((NTSTATUS)0xC01E035CL) + +// +// Port specific status codes {0x0400..0x04ff} +// +// +// MessageId: STATUS_GRAPHICS_SPECIFIED_CHILD_ALREADY_CONNECTED +// +// MessageText: +// +// Specified display adapter child device already has an external device connected to it. +// +#define STATUS_GRAPHICS_SPECIFIED_CHILD_ALREADY_CONNECTED ((NTSTATUS)0xC01E0400L) + +// +// MessageId: STATUS_GRAPHICS_CHILD_DESCRIPTOR_NOT_SUPPORTED +// +// MessageText: +// +// Specified display adapter child device does not support descriptor exposure. +// +#define STATUS_GRAPHICS_CHILD_DESCRIPTOR_NOT_SUPPORTED ((NTSTATUS)0xC01E0401L) + +// +// MessageId: STATUS_GRAPHICS_UNKNOWN_CHILD_STATUS +// +// MessageText: +// +// Child device presence was not reliably detected. +// +#define STATUS_GRAPHICS_UNKNOWN_CHILD_STATUS ((NTSTATUS)0x401E042FL) + +// +// MessageId: STATUS_GRAPHICS_NOT_A_LINKED_ADAPTER +// +// MessageText: +// +// The display adapter is not linked to any other adapters. +// +#define STATUS_GRAPHICS_NOT_A_LINKED_ADAPTER ((NTSTATUS)0xC01E0430L) + +// +// MessageId: STATUS_GRAPHICS_LEADLINK_NOT_ENUMERATED +// +// MessageText: +// +// Lead adapter in a linked configuration was not enumerated yet. +// +#define STATUS_GRAPHICS_LEADLINK_NOT_ENUMERATED ((NTSTATUS)0xC01E0431L) + +// +// MessageId: STATUS_GRAPHICS_CHAINLINKS_NOT_ENUMERATED +// +// MessageText: +// +// Some chain adapters in a linked configuration were not enumerated yet. +// +#define STATUS_GRAPHICS_CHAINLINKS_NOT_ENUMERATED ((NTSTATUS)0xC01E0432L) + +// +// MessageId: STATUS_GRAPHICS_ADAPTER_CHAIN_NOT_READY +// +// MessageText: +// +// The chain of linked adapters is not ready to start because of an unknown failure. +// +#define STATUS_GRAPHICS_ADAPTER_CHAIN_NOT_READY ((NTSTATUS)0xC01E0433L) + +// +// MessageId: STATUS_GRAPHICS_CHAINLINKS_NOT_STARTED +// +// MessageText: +// +// An attempt was made to start a lead link display adapter when the chain links were not started yet. +// +#define STATUS_GRAPHICS_CHAINLINKS_NOT_STARTED ((NTSTATUS)0xC01E0434L) + +// +// MessageId: STATUS_GRAPHICS_CHAINLINKS_NOT_POWERED_ON +// +// MessageText: +// +// An attempt was made to power up a lead link display adapter when the chain links were powered down. +// +#define STATUS_GRAPHICS_CHAINLINKS_NOT_POWERED_ON ((NTSTATUS)0xC01E0435L) + +// +// MessageId: STATUS_GRAPHICS_INCONSISTENT_DEVICE_LINK_STATE +// +// MessageText: +// +// The adapter link was found to be in an inconsistent state. Not all adapters are in an expected PNP/Power state. +// +#define STATUS_GRAPHICS_INCONSISTENT_DEVICE_LINK_STATE ((NTSTATUS)0xC01E0436L) + +// +// MessageId: STATUS_GRAPHICS_LEADLINK_START_DEFERRED +// +// MessageText: +// +// Starting the leadlink adapter has been deferred temporarily. +// +#define STATUS_GRAPHICS_LEADLINK_START_DEFERRED ((NTSTATUS)0x401E0437L) + +// +// MessageId: STATUS_GRAPHICS_NOT_POST_DEVICE_DRIVER +// +// MessageText: +// +// The driver trying to start is not the same as the driver for the POSTed display adapter. +// +#define STATUS_GRAPHICS_NOT_POST_DEVICE_DRIVER ((NTSTATUS)0xC01E0438L) + +// +// MessageId: STATUS_GRAPHICS_POLLING_TOO_FREQUENTLY +// +// MessageText: +// +// The display adapter is being polled for children too frequently at the same polling level. +// +#define STATUS_GRAPHICS_POLLING_TOO_FREQUENTLY ((NTSTATUS)0x401E0439L) + +// +// MessageId: STATUS_GRAPHICS_START_DEFERRED +// +// MessageText: +// +// Starting the adapter has been deferred temporarily. +// +#define STATUS_GRAPHICS_START_DEFERRED ((NTSTATUS)0x401E043AL) + +// +// MessageId: STATUS_GRAPHICS_ADAPTER_ACCESS_NOT_EXCLUDED +// +// MessageText: +// +// An operation is being attempted that requires the display adapter to be in a quiescent state. +// +#define STATUS_GRAPHICS_ADAPTER_ACCESS_NOT_EXCLUDED ((NTSTATUS)0xC01E043BL) + +// +// OPM, PVP and UAB status codes {0x0500..0x057F} +// +// +// MessageId: STATUS_GRAPHICS_OPM_NOT_SUPPORTED +// +// MessageText: +// +// The driver does not support OPM. +// +#define STATUS_GRAPHICS_OPM_NOT_SUPPORTED ((NTSTATUS)0xC01E0500L) + +// +// MessageId: STATUS_GRAPHICS_COPP_NOT_SUPPORTED +// +// MessageText: +// +// The driver does not support COPP. +// +#define STATUS_GRAPHICS_COPP_NOT_SUPPORTED ((NTSTATUS)0xC01E0501L) + +// +// MessageId: STATUS_GRAPHICS_UAB_NOT_SUPPORTED +// +// MessageText: +// +// The driver does not support UAB. +// +#define STATUS_GRAPHICS_UAB_NOT_SUPPORTED ((NTSTATUS)0xC01E0502L) + +// +// MessageId: STATUS_GRAPHICS_OPM_INVALID_ENCRYPTED_PARAMETERS +// +// MessageText: +// +// The specified encrypted parameters are invalid. +// +#define STATUS_GRAPHICS_OPM_INVALID_ENCRYPTED_PARAMETERS ((NTSTATUS)0xC01E0503L) + +// +// MessageId: STATUS_GRAPHICS_OPM_NO_PROTECTED_OUTPUTS_EXIST +// +// MessageText: +// +// The GDI display device passed to this function does not have any active protected outputs. +// +#define STATUS_GRAPHICS_OPM_NO_PROTECTED_OUTPUTS_EXIST ((NTSTATUS)0xC01E0505L) + +// +// MessageId: STATUS_GRAPHICS_OPM_INTERNAL_ERROR +// +// MessageText: +// +// An internal error caused an operation to fail. +// +#define STATUS_GRAPHICS_OPM_INTERNAL_ERROR ((NTSTATUS)0xC01E050BL) + +// +// MessageId: STATUS_GRAPHICS_OPM_INVALID_HANDLE +// +// MessageText: +// +// The function failed because the caller passed in an invalid OPM user mode handle. +// +#define STATUS_GRAPHICS_OPM_INVALID_HANDLE ((NTSTATUS)0xC01E050CL) + +// +// MessageId: STATUS_GRAPHICS_PVP_INVALID_CERTIFICATE_LENGTH +// +// MessageText: +// +// A certificate could not be returned because the certificate buffer passed to the function was too small. +// +#define STATUS_GRAPHICS_PVP_INVALID_CERTIFICATE_LENGTH ((NTSTATUS)0xC01E050EL) + +// +// MessageId: STATUS_GRAPHICS_OPM_SPANNING_MODE_ENABLED +// +// MessageText: +// +// The DxgkDdiOpmCreateProtectedOutput function could not create a protected output because the Video Present Target is in spanning mode. +// +#define STATUS_GRAPHICS_OPM_SPANNING_MODE_ENABLED ((NTSTATUS)0xC01E050FL) + +// +// MessageId: STATUS_GRAPHICS_OPM_THEATER_MODE_ENABLED +// +// MessageText: +// +// The DxgkDdiOpmCreateProtectedOutput function could not create a protected output because the Video Present Target is in theater mode. +// +#define STATUS_GRAPHICS_OPM_THEATER_MODE_ENABLED ((NTSTATUS)0xC01E0510L) + +// +// MessageId: STATUS_GRAPHICS_PVP_HFS_FAILED +// +// MessageText: +// +// The function failed because the display adapter's Hardware Functionality Scan failed to validate the graphics hardware. +// +#define STATUS_GRAPHICS_PVP_HFS_FAILED ((NTSTATUS)0xC01E0511L) + +// +// MessageId: STATUS_GRAPHICS_OPM_INVALID_SRM +// +// MessageText: +// +// The HDCP System Renewability Message passed to this function did not comply with section 5 of the HDCP 1.1 specification. +// +#define STATUS_GRAPHICS_OPM_INVALID_SRM ((NTSTATUS)0xC01E0512L) + +// +// MessageId: STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_HDCP +// +// MessageText: +// +// The protected output cannot enable the High-bandwidth Digital Content Protection (HDCP) System because it does not support HDCP. +// +#define STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_HDCP ((NTSTATUS)0xC01E0513L) + +// +// MessageId: STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_ACP +// +// MessageText: +// +// The protected output cannot enable Analogue Copy Protection (ACP) because it does not support ACP. +// +#define STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_ACP ((NTSTATUS)0xC01E0514L) + +// +// MessageId: STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_CGMSA +// +// MessageText: +// +// The protected output cannot enable the Content Generation Management System Analogue (CGMS-A) protection technology because it does not support CGMS-A. +// +#define STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_CGMSA ((NTSTATUS)0xC01E0515L) + +// +// MessageId: STATUS_GRAPHICS_OPM_HDCP_SRM_NEVER_SET +// +// MessageText: +// +// The DxgkDdiOPMGetInformation function cannot return the version of the SRM being used because the application never successfully passed an SRM to the protected output. +// +#define STATUS_GRAPHICS_OPM_HDCP_SRM_NEVER_SET ((NTSTATUS)0xC01E0516L) + +// +// MessageId: STATUS_GRAPHICS_OPM_RESOLUTION_TOO_HIGH +// +// MessageText: +// +// The DxgkDdiOPMConfigureProtectedOutput function cannot enable the specified output protection technology because the output's screen resolution is too high. +// +#define STATUS_GRAPHICS_OPM_RESOLUTION_TOO_HIGH ((NTSTATUS)0xC01E0517L) + +// +// MessageId: STATUS_GRAPHICS_OPM_ALL_HDCP_HARDWARE_ALREADY_IN_USE +// +// MessageText: +// +// The DxgkDdiOPMConfigureProtectedOutput function cannot enable HDCP because the display adapter's HDCP hardware is already being used by other physical outputs. +// +#define STATUS_GRAPHICS_OPM_ALL_HDCP_HARDWARE_ALREADY_IN_USE ((NTSTATUS)0xC01E0518L) + +// +// MessageId: STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_NO_LONGER_EXISTS +// +// MessageText: +// +// The operating system asynchronously destroyed this OPM protected output because the operating system's state changed. This error typically occurs because the monitor PDO associated with this protected output was removed, the monitor PDO associated with this protected output was stopped, or the protected output's session became a non-console session. +// +#define STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_NO_LONGER_EXISTS ((NTSTATUS)0xC01E051AL) + +// +// MessageId: STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_COPP_SEMANTICS +// +// MessageText: +// +// Either the DxgkDdiOPMGetCOPPCompatibleInformation, DxgkDdiOPMGetInformation, or DxgkDdiOPMConfigureProtectedOutput function failed. This error is returned when the caller tries to use a COPP specific command while the protected output has OPM semantics only. +// +#define STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_COPP_SEMANTICS ((NTSTATUS)0xC01E051CL) + +// +// MessageId: STATUS_GRAPHICS_OPM_INVALID_INFORMATION_REQUEST +// +// MessageText: +// +// The DxgkDdiOPMGetInformation and DxgkDdiOPMGetCOPPCompatibleInformation functions return this error code if the passed in sequence number is not the expected sequence number or the passed in OMAC value is invalid. +// +#define STATUS_GRAPHICS_OPM_INVALID_INFORMATION_REQUEST ((NTSTATUS)0xC01E051DL) + +// +// MessageId: STATUS_GRAPHICS_OPM_DRIVER_INTERNAL_ERROR +// +// MessageText: +// +// The function failed because an unexpected error occurred inside of a display driver. +// +#define STATUS_GRAPHICS_OPM_DRIVER_INTERNAL_ERROR ((NTSTATUS)0xC01E051EL) + +// +// MessageId: STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_OPM_SEMANTICS +// +// MessageText: +// +// Either the DxgkDdiOPMGetCOPPCompatibleInformation, DxgkDdiOPMGetInformation, or DxgkDdiOPMConfigureProtectedOutput function failed. This error is returned when the caller tries to use an OPM specific command while the protected output has COPP semantics only. +// +#define STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_OPM_SEMANTICS ((NTSTATUS)0xC01E051FL) + +// +// MessageId: STATUS_GRAPHICS_OPM_SIGNALING_NOT_SUPPORTED +// +// MessageText: +// +// The DxgkDdiOPMGetCOPPCompatibleInformation and DxgkDdiOPMConfigureProtectedOutput functions return this error if the display driver does not support the DXGKMDT_OPM_GET_ACP_AND_CGMSA_SIGNALING and DXGKMDT_OPM_SET_ACP_AND_CGMSA_SIGNALING GUIDs. +// +#define STATUS_GRAPHICS_OPM_SIGNALING_NOT_SUPPORTED ((NTSTATUS)0xC01E0520L) + +// +// MessageId: STATUS_GRAPHICS_OPM_INVALID_CONFIGURATION_REQUEST +// +// MessageText: +// +// The DxgkDdiOPMConfigureProtectedOutput function returns this error code if the passed in sequence number is not the expected sequence number or the passed in OMAC value is invalid. +// +#define STATUS_GRAPHICS_OPM_INVALID_CONFIGURATION_REQUEST ((NTSTATUS)0xC01E0521L) + +// +// Monitor Configuration API status codes {0x0580..0x05DF} +// +// +// MessageId: STATUS_GRAPHICS_I2C_NOT_SUPPORTED +// +// MessageText: +// +// The monitor connected to the specified video output does not have an I2C bus. +// +#define STATUS_GRAPHICS_I2C_NOT_SUPPORTED ((NTSTATUS)0xC01E0580L) + +// +// MessageId: STATUS_GRAPHICS_I2C_DEVICE_DOES_NOT_EXIST +// +// MessageText: +// +// No device on the I2C bus has the specified address. +// +#define STATUS_GRAPHICS_I2C_DEVICE_DOES_NOT_EXIST ((NTSTATUS)0xC01E0581L) + +// +// MessageId: STATUS_GRAPHICS_I2C_ERROR_TRANSMITTING_DATA +// +// MessageText: +// +// An error occurred while transmitting data to the device on the I2C bus. +// +#define STATUS_GRAPHICS_I2C_ERROR_TRANSMITTING_DATA ((NTSTATUS)0xC01E0582L) + +// +// MessageId: STATUS_GRAPHICS_I2C_ERROR_RECEIVING_DATA +// +// MessageText: +// +// An error occurred while receiving data from the device on the I2C bus. +// +#define STATUS_GRAPHICS_I2C_ERROR_RECEIVING_DATA ((NTSTATUS)0xC01E0583L) + +// +// MessageId: STATUS_GRAPHICS_DDCCI_VCP_NOT_SUPPORTED +// +// MessageText: +// +// The monitor does not support the specified VCP code. +// +#define STATUS_GRAPHICS_DDCCI_VCP_NOT_SUPPORTED ((NTSTATUS)0xC01E0584L) + +// +// MessageId: STATUS_GRAPHICS_DDCCI_INVALID_DATA +// +// MessageText: +// +// The data received from the monitor is invalid. +// +#define STATUS_GRAPHICS_DDCCI_INVALID_DATA ((NTSTATUS)0xC01E0585L) + +// +// MessageId: STATUS_GRAPHICS_DDCCI_MONITOR_RETURNED_INVALID_TIMING_STATUS_BYTE +// +// MessageText: +// +// The function failed because a monitor returned an invalid Timing Status byte when the operating system used the DDC/CI Get Timing Report & Timing Message command to get a timing report from a monitor. +// +#define STATUS_GRAPHICS_DDCCI_MONITOR_RETURNED_INVALID_TIMING_STATUS_BYTE ((NTSTATUS)0xC01E0586L) + +// +// MessageId: STATUS_GRAPHICS_DDCCI_INVALID_CAPABILITIES_STRING +// +// MessageText: +// +// A monitor returned a DDC/CI capabilities string which did not comply with the ACCESS.bus 3.0, DDC/CI 1.1, or MCCS 2 Revision 1 specification. +// +#define STATUS_GRAPHICS_DDCCI_INVALID_CAPABILITIES_STRING ((NTSTATUS)0xC01E0587L) + +// +// MessageId: STATUS_GRAPHICS_MCA_INTERNAL_ERROR +// +// MessageText: +// +// An internal error caused an operation to fail. +// +#define STATUS_GRAPHICS_MCA_INTERNAL_ERROR ((NTSTATUS)0xC01E0588L) + +// +// MessageId: STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_COMMAND +// +// MessageText: +// +// An operation failed because a DDC/CI message had an invalid value in its command field. +// +#define STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_COMMAND ((NTSTATUS)0xC01E0589L) + +// +// MessageId: STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_LENGTH +// +// MessageText: +// +// An error occurred because the field length of a DDC/CI message contained an invalid value. +// +#define STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_LENGTH ((NTSTATUS)0xC01E058AL) + +// +// MessageId: STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_CHECKSUM +// +// MessageText: +// +// An error occurred because the checksum field in a DDC/CI message did not match the message's computed checksum value. This error implies that the data was corrupted while it was being transmitted from a monitor to a computer. +// +#define STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_CHECKSUM ((NTSTATUS)0xC01E058BL) + +// +// MessageId: STATUS_GRAPHICS_INVALID_PHYSICAL_MONITOR_HANDLE +// +// MessageText: +// +// This function failed because an invalid monitor handle was passed to it. +// +#define STATUS_GRAPHICS_INVALID_PHYSICAL_MONITOR_HANDLE ((NTSTATUS)0xC01E058CL) + +// +// MessageId: STATUS_GRAPHICS_MONITOR_NO_LONGER_EXISTS +// +// MessageText: +// +// The operating system asynchronously destroyed the monitor which corresponds to this handle because the operating system's state changed. This error typically occurs because the monitor PDO associated with this handle was removed, the monitor PDO associated with this handle was stopped, or a display mode change occurred. A display mode change occurs when windows sends a WM_DISPLAYCHANGE windows message to applications. +// +#define STATUS_GRAPHICS_MONITOR_NO_LONGER_EXISTS ((NTSTATUS)0xC01E058DL) + +// +// OPM, UAB, PVP and DDC/CI shared status codes {0x25E0..0x25FF} +// +// +// MessageId: STATUS_GRAPHICS_ONLY_CONSOLE_SESSION_SUPPORTED +// +// MessageText: +// +// This function can only be used if a program is running in the local console session. It cannot be used if a program is running on a remote desktop session or on a terminal server session. +// +#define STATUS_GRAPHICS_ONLY_CONSOLE_SESSION_SUPPORTED ((NTSTATUS)0xC01E05E0L) + +// +// MessageId: STATUS_GRAPHICS_NO_DISPLAY_DEVICE_CORRESPONDS_TO_NAME +// +// MessageText: +// +// This function cannot find an actual GDI display device which corresponds to the specified GDI display device name. +// +#define STATUS_GRAPHICS_NO_DISPLAY_DEVICE_CORRESPONDS_TO_NAME ((NTSTATUS)0xC01E05E1L) + +// +// MessageId: STATUS_GRAPHICS_DISPLAY_DEVICE_NOT_ATTACHED_TO_DESKTOP +// +// MessageText: +// +// The function failed because the specified GDI display device was not attached to the Windows desktop. +// +#define STATUS_GRAPHICS_DISPLAY_DEVICE_NOT_ATTACHED_TO_DESKTOP ((NTSTATUS)0xC01E05E2L) + +// +// MessageId: STATUS_GRAPHICS_MIRRORING_DEVICES_NOT_SUPPORTED +// +// MessageText: +// +// This function does not support GDI mirroring display devices because GDI mirroring display devices do not have any physical monitors associated with them. +// +#define STATUS_GRAPHICS_MIRRORING_DEVICES_NOT_SUPPORTED ((NTSTATUS)0xC01E05E3L) + +// +// MessageId: STATUS_GRAPHICS_INVALID_POINTER +// +// MessageText: +// +// The function failed because an invalid pointer parameter was passed to it. A pointer parameter is invalid if it is NULL, it points to an invalid address, it points to a kernel mode address or it is not correctly aligned. +// +#define STATUS_GRAPHICS_INVALID_POINTER ((NTSTATUS)0xC01E05E4L) + +// +// MessageId: STATUS_GRAPHICS_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE +// +// MessageText: +// +// This function failed because the GDI device passed to it did not have any monitors associated with it. +// +#define STATUS_GRAPHICS_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE ((NTSTATUS)0xC01E05E5L) + +// +// MessageId: STATUS_GRAPHICS_PARAMETER_ARRAY_TOO_SMALL +// +// MessageText: +// +// An array passed to the function cannot hold all of the data that the function must copy into the array. +// +#define STATUS_GRAPHICS_PARAMETER_ARRAY_TOO_SMALL ((NTSTATUS)0xC01E05E6L) + +// +// MessageId: STATUS_GRAPHICS_INTERNAL_ERROR +// +// MessageText: +// +// An internal error caused an operation to fail. +// +#define STATUS_GRAPHICS_INTERNAL_ERROR ((NTSTATUS)0xC01E05E7L) + +// +// MessageId: STATUS_GRAPHICS_SESSION_TYPE_CHANGE_IN_PROGRESS +// +// MessageText: +// +// The function failed because the current session is changing its type. This function cannot be called when the current session is changing its type. There are currently three types of sessions: console, disconnected and remote. +// +#define STATUS_GRAPHICS_SESSION_TYPE_CHANGE_IN_PROGRESS ((NTSTATUS)0xC01E05E8L) + + +// +// Full Volume Encryption Error codes (fvevol.sys) +// + +// +// MessageId: STATUS_FVE_LOCKED_VOLUME +// +// MessageText: +// +// This volume is locked by BitLocker Drive Encryption. +// +#define STATUS_FVE_LOCKED_VOLUME ((NTSTATUS)0xC0210000L) + +// +// MessageId: STATUS_FVE_NOT_ENCRYPTED +// +// MessageText: +// +// The volume is not encrypted, no key is available. +// +#define STATUS_FVE_NOT_ENCRYPTED ((NTSTATUS)0xC0210001L) + +// +// MessageId: STATUS_FVE_BAD_INFORMATION +// +// MessageText: +// +// The control block for the encrypted volume is not valid. +// +#define STATUS_FVE_BAD_INFORMATION ((NTSTATUS)0xC0210002L) + +// +// MessageId: STATUS_FVE_TOO_SMALL +// +// MessageText: +// +// The volume cannot be encrypted because it does not have enough free space. +// +#define STATUS_FVE_TOO_SMALL ((NTSTATUS)0xC0210003L) + +// +// MessageId: STATUS_FVE_FAILED_WRONG_FS +// +// MessageText: +// +// The volume cannot be encrypted because the file system is not supported. +// +#define STATUS_FVE_FAILED_WRONG_FS ((NTSTATUS)0xC0210004L) + +// +// MessageId: STATUS_FVE_BAD_PARTITION_SIZE +// +// MessageText: +// +// The file system size is larger than the partition size in the partition table. +// +#define STATUS_FVE_BAD_PARTITION_SIZE ((NTSTATUS)0xC0210005L) + +// +// MessageId: STATUS_FVE_FS_NOT_EXTENDED +// +// MessageText: +// +// The file system does not extend to the end of the volume. +// +#define STATUS_FVE_FS_NOT_EXTENDED ((NTSTATUS)0xC0210006L) + +// +// MessageId: STATUS_FVE_FS_MOUNTED +// +// MessageText: +// +// This operation cannot be performed while a file system is mounted on the volume. +// +#define STATUS_FVE_FS_MOUNTED ((NTSTATUS)0xC0210007L) + +// +// MessageId: STATUS_FVE_NO_LICENSE +// +// MessageText: +// +// BitLocker Drive Encryption is not included with this version of Windows. +// +#define STATUS_FVE_NO_LICENSE ((NTSTATUS)0xC0210008L) + +// +// MessageId: STATUS_FVE_ACTION_NOT_ALLOWED +// +// MessageText: +// +// Requested action not allowed in the current volume state. +// +#define STATUS_FVE_ACTION_NOT_ALLOWED ((NTSTATUS)0xC0210009L) + +// +// MessageId: STATUS_FVE_BAD_DATA +// +// MessageText: +// +// Data supplied is malformed. +// +#define STATUS_FVE_BAD_DATA ((NTSTATUS)0xC021000AL) + +// +// MessageId: STATUS_FVE_VOLUME_NOT_BOUND +// +// MessageText: +// +// The volume is not bound to the system. +// +#define STATUS_FVE_VOLUME_NOT_BOUND ((NTSTATUS)0xC021000BL) + +// +// MessageId: STATUS_FVE_NOT_DATA_VOLUME +// +// MessageText: +// +// That volume is not a data volume. +// +#define STATUS_FVE_NOT_DATA_VOLUME ((NTSTATUS)0xC021000CL) + +// +// MessageId: STATUS_FVE_CONV_READ_ERROR +// +// MessageText: +// +// A read operation failed while converting the volume. +// +#define STATUS_FVE_CONV_READ_ERROR ((NTSTATUS)0xC021000DL) + +// +// MessageId: STATUS_FVE_CONV_WRITE_ERROR +// +// MessageText: +// +// A write operation failed while converting the volume. +// +#define STATUS_FVE_CONV_WRITE_ERROR ((NTSTATUS)0xC021000EL) + +// +// MessageId: STATUS_FVE_OVERLAPPED_UPDATE +// +// MessageText: +// +// The control block for the encrypted volume was updated by another thread. Try again. +// +#define STATUS_FVE_OVERLAPPED_UPDATE ((NTSTATUS)0xC021000FL) + +// +// MessageId: STATUS_FVE_FAILED_SECTOR_SIZE +// +// MessageText: +// +// The encryption algorithm does not support the sector size of that volume. +// +#define STATUS_FVE_FAILED_SECTOR_SIZE ((NTSTATUS)0xC0210010L) + +// +// MessageId: STATUS_FVE_FAILED_AUTHENTICATION +// +// MessageText: +// +// BitLocker recovery authentication failed. +// +#define STATUS_FVE_FAILED_AUTHENTICATION ((NTSTATUS)0xC0210011L) + +// +// MessageId: STATUS_FVE_NOT_OS_VOLUME +// +// MessageText: +// +// That volume is not the OS volume. +// +#define STATUS_FVE_NOT_OS_VOLUME ((NTSTATUS)0xC0210012L) + +// +// MessageId: STATUS_FVE_KEYFILE_NOT_FOUND +// +// MessageText: +// +// The BitLocker startup key or recovery password could not be read from external media. +// +#define STATUS_FVE_KEYFILE_NOT_FOUND ((NTSTATUS)0xC0210013L) + +// +// MessageId: STATUS_FVE_KEYFILE_INVALID +// +// MessageText: +// +// The BitLocker startup key or recovery password file is corrupt or invalid. +// +#define STATUS_FVE_KEYFILE_INVALID ((NTSTATUS)0xC0210014L) + +// +// MessageId: STATUS_FVE_KEYFILE_NO_VMK +// +// MessageText: +// +// The BitLocker encryption key could not be obtained from the startup key or recovery password. +// +#define STATUS_FVE_KEYFILE_NO_VMK ((NTSTATUS)0xC0210015L) + +// +// MessageId: STATUS_FVE_TPM_DISABLED +// +// MessageText: +// +// The Trusted Platform Module (TPM) is disabled. +// +#define STATUS_FVE_TPM_DISABLED ((NTSTATUS)0xC0210016L) + +// +// MessageId: STATUS_FVE_TPM_SRK_AUTH_NOT_ZERO +// +// MessageText: +// +// The authorization data for the Storage Root Key (SRK) of the Trusted Platform Module (TPM) is not zero. +// +#define STATUS_FVE_TPM_SRK_AUTH_NOT_ZERO ((NTSTATUS)0xC0210017L) + +// +// MessageId: STATUS_FVE_TPM_INVALID_PCR +// +// MessageText: +// +// The system boot information changed or the Trusted Platform Module (TPM) locked out access to BitLocker encryption keys until the computer is restarted. +// +#define STATUS_FVE_TPM_INVALID_PCR ((NTSTATUS)0xC0210018L) + +// +// MessageId: STATUS_FVE_TPM_NO_VMK +// +// MessageText: +// +// The BitLocker encryption key could not be obtained from the Trusted Platform Module (TPM). +// +#define STATUS_FVE_TPM_NO_VMK ((NTSTATUS)0xC0210019L) + +// +// MessageId: STATUS_FVE_PIN_INVALID +// +// MessageText: +// +// The BitLocker encryption key could not be obtained from the Trusted Platform Module (TPM) and PIN. +// +#define STATUS_FVE_PIN_INVALID ((NTSTATUS)0xC021001AL) + +// +// MessageId: STATUS_FVE_AUTH_INVALID_APPLICATION +// +// MessageText: +// +// A boot application hash does not match the hash computed when BitLocker was turned on. +// +#define STATUS_FVE_AUTH_INVALID_APPLICATION ((NTSTATUS)0xC021001BL) + +// +// MessageId: STATUS_FVE_AUTH_INVALID_CONFIG +// +// MessageText: +// +// The Boot Configuration Data (BCD) settings are not supported or have changed since BitLocker was enabled. +// +#define STATUS_FVE_AUTH_INVALID_CONFIG ((NTSTATUS)0xC021001CL) + +// +// MessageId: STATUS_FVE_DEBUGGER_ENABLED +// +// MessageText: +// +// Boot debugging is enabled. Run bcdedit to turn it off. +// +#define STATUS_FVE_DEBUGGER_ENABLED ((NTSTATUS)0xC021001DL) + +// +// MessageId: STATUS_FVE_DRY_RUN_FAILED +// +// MessageText: +// +// The BitLocker encryption key could not be obtained. +// +#define STATUS_FVE_DRY_RUN_FAILED ((NTSTATUS)0xC021001EL) + +// +// MessageId: STATUS_FVE_BAD_METADATA_POINTER +// +// MessageText: +// +// The metadata disk region pointer is incorrect. +// +#define STATUS_FVE_BAD_METADATA_POINTER ((NTSTATUS)0xC021001FL) + +// +// MessageId: STATUS_FVE_OLD_METADATA_COPY +// +// MessageText: +// +// The backup copy of the metadata is out of date. +// +#define STATUS_FVE_OLD_METADATA_COPY ((NTSTATUS)0xC0210020L) + +// +// MessageId: STATUS_FVE_REBOOT_REQUIRED +// +// MessageText: +// +// No action was taken as a system reboot is required. +// +#define STATUS_FVE_REBOOT_REQUIRED ((NTSTATUS)0xC0210021L) + +// +// MessageId: STATUS_FVE_RAW_ACCESS +// +// MessageText: +// +// No action was taken as BitLocker Drive Encryption is in RAW access mode. +// +#define STATUS_FVE_RAW_ACCESS ((NTSTATUS)0xC0210022L) + +// +// MessageId: STATUS_FVE_RAW_BLOCKED +// +// MessageText: +// +// BitLocker Drive Encryption cannot enter raw access mode for this volume. +// +#define STATUS_FVE_RAW_BLOCKED ((NTSTATUS)0xC0210023L) + +// +// MessageId: STATUS_FVE_NO_AUTOUNLOCK_MASTER_KEY +// +// MessageText: +// +// The auto-unlock master key was not available from the operating system volume. Retry the operation using the BitLocker WMI interface. +// +#define STATUS_FVE_NO_AUTOUNLOCK_MASTER_KEY ((NTSTATUS)0xC0210024L) + +// +// MessageId: STATUS_FVE_MOR_FAILED +// +// MessageText: +// +// The system firmware failed to enable clearing of system memory on reboot. +// +#define STATUS_FVE_MOR_FAILED ((NTSTATUS)0xC0210025L) + +// +// MessageId: STATUS_FVE_NO_FEATURE_LICENSE +// +// MessageText: +// +// This feature of BitLocker Drive Encryption is not included with this version of Windows. +// +#define STATUS_FVE_NO_FEATURE_LICENSE ((NTSTATUS)0xC0210026L) + +// +// MessageId: STATUS_FVE_POLICY_USER_DISABLE_RDV_NOT_ALLOWED +// +// MessageText: +// +// Group policy does not permit turning off BitLocker Drive Encryption on roaming data volumes. +// +#define STATUS_FVE_POLICY_USER_DISABLE_RDV_NOT_ALLOWED ((NTSTATUS)0xC0210027L) + +// +// MessageId: STATUS_FVE_CONV_RECOVERY_FAILED +// +// MessageText: +// +// Bitlocker Drive Encryption failed to recover from aborted conversion. This could be due to either all conversion logs being corrupted or the media being write-protected. +// +#define STATUS_FVE_CONV_RECOVERY_FAILED ((NTSTATUS)0xC0210028L) + +// +// MessageId: STATUS_FVE_VIRTUALIZED_SPACE_TOO_BIG +// +// MessageText: +// +// The requested virtualization size is too big. +// +#define STATUS_FVE_VIRTUALIZED_SPACE_TOO_BIG ((NTSTATUS)0xC0210029L) + +// +// MessageId: STATUS_FVE_VOLUME_TOO_SMALL +// +// MessageText: +// +// The drive is too small to be protected using BitLocker Drive Encryption. +// +#define STATUS_FVE_VOLUME_TOO_SMALL ((NTSTATUS)0xC0210030L) + + +// +// FWP error codes (fwpkclnt.sys) +// + +// +// MessageId: STATUS_FWP_CALLOUT_NOT_FOUND +// +// MessageText: +// +// The callout does not exist. +// +#define STATUS_FWP_CALLOUT_NOT_FOUND ((NTSTATUS)0xC0220001L) + +// +// MessageId: STATUS_FWP_CONDITION_NOT_FOUND +// +// MessageText: +// +// The filter condition does not exist. +// +#define STATUS_FWP_CONDITION_NOT_FOUND ((NTSTATUS)0xC0220002L) + +// +// MessageId: STATUS_FWP_FILTER_NOT_FOUND +// +// MessageText: +// +// The filter does not exist. +// +#define STATUS_FWP_FILTER_NOT_FOUND ((NTSTATUS)0xC0220003L) + +// +// MessageId: STATUS_FWP_LAYER_NOT_FOUND +// +// MessageText: +// +// The layer does not exist. +// +#define STATUS_FWP_LAYER_NOT_FOUND ((NTSTATUS)0xC0220004L) + +// +// MessageId: STATUS_FWP_PROVIDER_NOT_FOUND +// +// MessageText: +// +// The provider does not exist. +// +#define STATUS_FWP_PROVIDER_NOT_FOUND ((NTSTATUS)0xC0220005L) + +// +// MessageId: STATUS_FWP_PROVIDER_CONTEXT_NOT_FOUND +// +// MessageText: +// +// The provider context does not exist. +// +#define STATUS_FWP_PROVIDER_CONTEXT_NOT_FOUND ((NTSTATUS)0xC0220006L) + +// +// MessageId: STATUS_FWP_SUBLAYER_NOT_FOUND +// +// MessageText: +// +// The sublayer does not exist. +// +#define STATUS_FWP_SUBLAYER_NOT_FOUND ((NTSTATUS)0xC0220007L) + +// +// MessageId: STATUS_FWP_NOT_FOUND +// +// MessageText: +// +// The object does not exist. +// +#define STATUS_FWP_NOT_FOUND ((NTSTATUS)0xC0220008L) + +// +// MessageId: STATUS_FWP_ALREADY_EXISTS +// +// MessageText: +// +// An object with that GUID or LUID already exists. +// +#define STATUS_FWP_ALREADY_EXISTS ((NTSTATUS)0xC0220009L) + +// +// MessageId: STATUS_FWP_IN_USE +// +// MessageText: +// +// The object is referenced by other objects so cannot be deleted. +// +#define STATUS_FWP_IN_USE ((NTSTATUS)0xC022000AL) + +// +// MessageId: STATUS_FWP_DYNAMIC_SESSION_IN_PROGRESS +// +// MessageText: +// +// The call is not allowed from within a dynamic session. +// +#define STATUS_FWP_DYNAMIC_SESSION_IN_PROGRESS ((NTSTATUS)0xC022000BL) + +// +// MessageId: STATUS_FWP_WRONG_SESSION +// +// MessageText: +// +// The call was made from the wrong session so cannot be completed. +// +#define STATUS_FWP_WRONG_SESSION ((NTSTATUS)0xC022000CL) + +// +// MessageId: STATUS_FWP_NO_TXN_IN_PROGRESS +// +// MessageText: +// +// The call must be made from within an explicit transaction. +// +#define STATUS_FWP_NO_TXN_IN_PROGRESS ((NTSTATUS)0xC022000DL) + +// +// MessageId: STATUS_FWP_TXN_IN_PROGRESS +// +// MessageText: +// +// The call is not allowed from within an explicit transaction. +// +#define STATUS_FWP_TXN_IN_PROGRESS ((NTSTATUS)0xC022000EL) + +// +// MessageId: STATUS_FWP_TXN_ABORTED +// +// MessageText: +// +// The explicit transaction has been forcibly cancelled. +// +#define STATUS_FWP_TXN_ABORTED ((NTSTATUS)0xC022000FL) + +// +// MessageId: STATUS_FWP_SESSION_ABORTED +// +// MessageText: +// +// The session has been cancelled. +// +#define STATUS_FWP_SESSION_ABORTED ((NTSTATUS)0xC0220010L) + +// +// MessageId: STATUS_FWP_INCOMPATIBLE_TXN +// +// MessageText: +// +// The call is not allowed from within a read-only transaction. +// +#define STATUS_FWP_INCOMPATIBLE_TXN ((NTSTATUS)0xC0220011L) + +// +// MessageId: STATUS_FWP_TIMEOUT +// +// MessageText: +// +// The call timed out while waiting to acquire the transaction lock. +// +#define STATUS_FWP_TIMEOUT ((NTSTATUS)0xC0220012L) + +// +// MessageId: STATUS_FWP_NET_EVENTS_DISABLED +// +// MessageText: +// +// Collection of network diagnostic events is disabled. +// +#define STATUS_FWP_NET_EVENTS_DISABLED ((NTSTATUS)0xC0220013L) + +// +// MessageId: STATUS_FWP_INCOMPATIBLE_LAYER +// +// MessageText: +// +// The operation is not supported by the specified layer. +// +#define STATUS_FWP_INCOMPATIBLE_LAYER ((NTSTATUS)0xC0220014L) + +// +// MessageId: STATUS_FWP_KM_CLIENTS_ONLY +// +// MessageText: +// +// The call is allowed for kernel-mode callers only. +// +#define STATUS_FWP_KM_CLIENTS_ONLY ((NTSTATUS)0xC0220015L) + +// +// MessageId: STATUS_FWP_LIFETIME_MISMATCH +// +// MessageText: +// +// The call tried to associate two objects with incompatible lifetimes. +// +#define STATUS_FWP_LIFETIME_MISMATCH ((NTSTATUS)0xC0220016L) + +// +// MessageId: STATUS_FWP_BUILTIN_OBJECT +// +// MessageText: +// +// The object is built in so cannot be deleted. +// +#define STATUS_FWP_BUILTIN_OBJECT ((NTSTATUS)0xC0220017L) + +// +// MessageId: STATUS_FWP_TOO_MANY_CALLOUTS +// +// MessageText: +// +// The maximum number of callouts has been reached. +// +#define STATUS_FWP_TOO_MANY_CALLOUTS ((NTSTATUS)0xC0220018L) + +// +// MessageId: STATUS_FWP_NOTIFICATION_DROPPED +// +// MessageText: +// +// A notification could not be delivered because a message queue is at its maximum capacity. +// +#define STATUS_FWP_NOTIFICATION_DROPPED ((NTSTATUS)0xC0220019L) + +// +// MessageId: STATUS_FWP_TRAFFIC_MISMATCH +// +// MessageText: +// +// The traffic parameters do not match those for the security association context. +// +#define STATUS_FWP_TRAFFIC_MISMATCH ((NTSTATUS)0xC022001AL) + +// +// MessageId: STATUS_FWP_INCOMPATIBLE_SA_STATE +// +// MessageText: +// +// The call is not allowed for the current security association state. +// +#define STATUS_FWP_INCOMPATIBLE_SA_STATE ((NTSTATUS)0xC022001BL) + +// +// MessageId: STATUS_FWP_NULL_POINTER +// +// MessageText: +// +// A required pointer is null. +// +#define STATUS_FWP_NULL_POINTER ((NTSTATUS)0xC022001CL) + +// +// MessageId: STATUS_FWP_INVALID_ENUMERATOR +// +// MessageText: +// +// An enumerator is not valid. +// +#define STATUS_FWP_INVALID_ENUMERATOR ((NTSTATUS)0xC022001DL) + +// +// MessageId: STATUS_FWP_INVALID_FLAGS +// +// MessageText: +// +// The flags field contains an invalid value. +// +#define STATUS_FWP_INVALID_FLAGS ((NTSTATUS)0xC022001EL) + +// +// MessageId: STATUS_FWP_INVALID_NET_MASK +// +// MessageText: +// +// A network mask is not valid. +// +#define STATUS_FWP_INVALID_NET_MASK ((NTSTATUS)0xC022001FL) + +// +// MessageId: STATUS_FWP_INVALID_RANGE +// +// MessageText: +// +// An FWP_RANGE is not valid. +// +#define STATUS_FWP_INVALID_RANGE ((NTSTATUS)0xC0220020L) + +// +// MessageId: STATUS_FWP_INVALID_INTERVAL +// +// MessageText: +// +// The time interval is not valid. +// +#define STATUS_FWP_INVALID_INTERVAL ((NTSTATUS)0xC0220021L) + +// +// MessageId: STATUS_FWP_ZERO_LENGTH_ARRAY +// +// MessageText: +// +// An array that must contain at least one element is zero length. +// +#define STATUS_FWP_ZERO_LENGTH_ARRAY ((NTSTATUS)0xC0220022L) + +// +// MessageId: STATUS_FWP_NULL_DISPLAY_NAME +// +// MessageText: +// +// The displayData.name field cannot be null. +// +#define STATUS_FWP_NULL_DISPLAY_NAME ((NTSTATUS)0xC0220023L) + +// +// MessageId: STATUS_FWP_INVALID_ACTION_TYPE +// +// MessageText: +// +// The action type is not one of the allowed action types for a filter. +// +#define STATUS_FWP_INVALID_ACTION_TYPE ((NTSTATUS)0xC0220024L) + +// +// MessageId: STATUS_FWP_INVALID_WEIGHT +// +// MessageText: +// +// The filter weight is not valid. +// +#define STATUS_FWP_INVALID_WEIGHT ((NTSTATUS)0xC0220025L) + +// +// MessageId: STATUS_FWP_MATCH_TYPE_MISMATCH +// +// MessageText: +// +// A filter condition contains a match type that is not compatible with the operands. +// +#define STATUS_FWP_MATCH_TYPE_MISMATCH ((NTSTATUS)0xC0220026L) + +// +// MessageId: STATUS_FWP_TYPE_MISMATCH +// +// MessageText: +// +// An FWP_VALUE or FWPM_CONDITION_VALUE is of the wrong type. +// +#define STATUS_FWP_TYPE_MISMATCH ((NTSTATUS)0xC0220027L) + +// +// MessageId: STATUS_FWP_OUT_OF_BOUNDS +// +// MessageText: +// +// An integer value is outside the allowed range. +// +#define STATUS_FWP_OUT_OF_BOUNDS ((NTSTATUS)0xC0220028L) + +// +// MessageId: STATUS_FWP_RESERVED +// +// MessageText: +// +// A reserved field is non-zero. +// +#define STATUS_FWP_RESERVED ((NTSTATUS)0xC0220029L) + +// +// MessageId: STATUS_FWP_DUPLICATE_CONDITION +// +// MessageText: +// +// A filter cannot contain multiple conditions operating on a single field. +// +#define STATUS_FWP_DUPLICATE_CONDITION ((NTSTATUS)0xC022002AL) + +// +// MessageId: STATUS_FWP_DUPLICATE_KEYMOD +// +// MessageText: +// +// A policy cannot contain the same keying module more than once. +// +#define STATUS_FWP_DUPLICATE_KEYMOD ((NTSTATUS)0xC022002BL) + +// +// MessageId: STATUS_FWP_ACTION_INCOMPATIBLE_WITH_LAYER +// +// MessageText: +// +// The action type is not compatible with the layer. +// +#define STATUS_FWP_ACTION_INCOMPATIBLE_WITH_LAYER ((NTSTATUS)0xC022002CL) + +// +// MessageId: STATUS_FWP_ACTION_INCOMPATIBLE_WITH_SUBLAYER +// +// MessageText: +// +// The action type is not compatible with the sublayer. +// +#define STATUS_FWP_ACTION_INCOMPATIBLE_WITH_SUBLAYER ((NTSTATUS)0xC022002DL) + +// +// MessageId: STATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_LAYER +// +// MessageText: +// +// The raw context or the provider context is not compatible with the layer. +// +#define STATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_LAYER ((NTSTATUS)0xC022002EL) + +// +// MessageId: STATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_CALLOUT +// +// MessageText: +// +// The raw context or the provider context is not compatible with the callout. +// +#define STATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_CALLOUT ((NTSTATUS)0xC022002FL) + +// +// MessageId: STATUS_FWP_INCOMPATIBLE_AUTH_METHOD +// +// MessageText: +// +// The authentication method is not compatible with the policy type. +// +#define STATUS_FWP_INCOMPATIBLE_AUTH_METHOD ((NTSTATUS)0xC0220030L) + +// +// MessageId: STATUS_FWP_INCOMPATIBLE_DH_GROUP +// +// MessageText: +// +// The Diffie-Hellman group is not compatible with the policy type. +// +#define STATUS_FWP_INCOMPATIBLE_DH_GROUP ((NTSTATUS)0xC0220031L) + +// +// MessageId: STATUS_FWP_EM_NOT_SUPPORTED +// +// MessageText: +// +// An IKE policy cannot contain an Extended Mode policy. +// +#define STATUS_FWP_EM_NOT_SUPPORTED ((NTSTATUS)0xC0220032L) + +// +// MessageId: STATUS_FWP_NEVER_MATCH +// +// MessageText: +// +// The enumeration template or subscription will never match any objects. +// +#define STATUS_FWP_NEVER_MATCH ((NTSTATUS)0xC0220033L) + +// +// MessageId: STATUS_FWP_PROVIDER_CONTEXT_MISMATCH +// +// MessageText: +// +// The provider context is of the wrong type. +// +#define STATUS_FWP_PROVIDER_CONTEXT_MISMATCH ((NTSTATUS)0xC0220034L) + +// +// MessageId: STATUS_FWP_INVALID_PARAMETER +// +// MessageText: +// +// The parameter is incorrect. +// +#define STATUS_FWP_INVALID_PARAMETER ((NTSTATUS)0xC0220035L) + +// +// MessageId: STATUS_FWP_TOO_MANY_SUBLAYERS +// +// MessageText: +// +// The maximum number of sublayers has been reached. +// +#define STATUS_FWP_TOO_MANY_SUBLAYERS ((NTSTATUS)0xC0220036L) + +// +// MessageId: STATUS_FWP_CALLOUT_NOTIFICATION_FAILED +// +// MessageText: +// +// The notification function for a callout returned an error. +// +#define STATUS_FWP_CALLOUT_NOTIFICATION_FAILED ((NTSTATUS)0xC0220037L) + +// +// MessageId: STATUS_FWP_INVALID_AUTH_TRANSFORM +// +// MessageText: +// +// The IPsec authentication transform is not valid. +// +#define STATUS_FWP_INVALID_AUTH_TRANSFORM ((NTSTATUS)0xC0220038L) + +// +// MessageId: STATUS_FWP_INVALID_CIPHER_TRANSFORM +// +// MessageText: +// +// The IPsec cipher transform is not valid. +// +#define STATUS_FWP_INVALID_CIPHER_TRANSFORM ((NTSTATUS)0xC0220039L) + +// +// MessageId: STATUS_FWP_INCOMPATIBLE_CIPHER_TRANSFORM +// +// MessageText: +// +// The IPsec cipher transform is not compatible with the policy. +// +#define STATUS_FWP_INCOMPATIBLE_CIPHER_TRANSFORM ((NTSTATUS)0xC022003AL) + +// +// MessageId: STATUS_FWP_INVALID_TRANSFORM_COMBINATION +// +// MessageText: +// +// The combination of IPsec transform types is not valid. +// +#define STATUS_FWP_INVALID_TRANSFORM_COMBINATION ((NTSTATUS)0xC022003BL) + +// +// MessageId: STATUS_FWP_DUPLICATE_AUTH_METHOD +// +// MessageText: +// +// A policy cannot contain the same auth method more than once. +// +#define STATUS_FWP_DUPLICATE_AUTH_METHOD ((NTSTATUS)0xC022003CL) + +// +// MessageId: STATUS_FWP_TCPIP_NOT_READY +// +// MessageText: +// +// The TCP/IP stack is not ready. +// +#define STATUS_FWP_TCPIP_NOT_READY ((NTSTATUS)0xC0220100L) + +// +// MessageId: STATUS_FWP_INJECT_HANDLE_CLOSING +// +// MessageText: +// +// The injection handle is being closed by another thread. +// +#define STATUS_FWP_INJECT_HANDLE_CLOSING ((NTSTATUS)0xC0220101L) + +// +// MessageId: STATUS_FWP_INJECT_HANDLE_STALE +// +// MessageText: +// +// The injection handle is stale. +// +#define STATUS_FWP_INJECT_HANDLE_STALE ((NTSTATUS)0xC0220102L) + +// +// MessageId: STATUS_FWP_CANNOT_PEND +// +// MessageText: +// +// The classify cannot be pended. +// +#define STATUS_FWP_CANNOT_PEND ((NTSTATUS)0xC0220103L) + +// +// MessageId: STATUS_FWP_DROP_NOICMP +// +// MessageText: +// +// The packet should be dropped, no ICMP should be sent. +// +#define STATUS_FWP_DROP_NOICMP ((NTSTATUS)0xC0220104L) + + +// +// NDIS error codes (ndis.sys) +// + +// +// MessageId: STATUS_NDIS_CLOSING +// +// MessageText: +// +// The binding to the network interface is being closed. +// +#define STATUS_NDIS_CLOSING ((NTSTATUS)0xC0230002L) + +// +// MessageId: STATUS_NDIS_BAD_VERSION +// +// MessageText: +// +// An invalid version was specified. +// +#define STATUS_NDIS_BAD_VERSION ((NTSTATUS)0xC0230004L) + +// +// MessageId: STATUS_NDIS_BAD_CHARACTERISTICS +// +// MessageText: +// +// An invalid characteristics table was used. +// +#define STATUS_NDIS_BAD_CHARACTERISTICS ((NTSTATUS)0xC0230005L) + +// +// MessageId: STATUS_NDIS_ADAPTER_NOT_FOUND +// +// MessageText: +// +// Failed to find the network interface or network interface is not ready. +// +#define STATUS_NDIS_ADAPTER_NOT_FOUND ((NTSTATUS)0xC0230006L) + +// +// MessageId: STATUS_NDIS_OPEN_FAILED +// +// MessageText: +// +// Failed to open the network interface. +// +#define STATUS_NDIS_OPEN_FAILED ((NTSTATUS)0xC0230007L) + +// +// MessageId: STATUS_NDIS_DEVICE_FAILED +// +// MessageText: +// +// Network interface has encountered an internal unrecoverable failure. +// +#define STATUS_NDIS_DEVICE_FAILED ((NTSTATUS)0xC0230008L) + +// +// MessageId: STATUS_NDIS_MULTICAST_FULL +// +// MessageText: +// +// The multicast list on the network interface is full. +// +#define STATUS_NDIS_MULTICAST_FULL ((NTSTATUS)0xC0230009L) + +// +// MessageId: STATUS_NDIS_MULTICAST_EXISTS +// +// MessageText: +// +// An attempt was made to add a duplicate multicast address to the list. +// +#define STATUS_NDIS_MULTICAST_EXISTS ((NTSTATUS)0xC023000AL) + +// +// MessageId: STATUS_NDIS_MULTICAST_NOT_FOUND +// +// MessageText: +// +// At attempt was made to remove a multicast address that was never added. +// +#define STATUS_NDIS_MULTICAST_NOT_FOUND ((NTSTATUS)0xC023000BL) + +// +// MessageId: STATUS_NDIS_REQUEST_ABORTED +// +// MessageText: +// +// Netowork interface aborted the request. +// +#define STATUS_NDIS_REQUEST_ABORTED ((NTSTATUS)0xC023000CL) + +// +// MessageId: STATUS_NDIS_RESET_IN_PROGRESS +// +// MessageText: +// +// Network interface can not process the request because it is being reset. +// +#define STATUS_NDIS_RESET_IN_PROGRESS ((NTSTATUS)0xC023000DL) + +// +// MessageId: STATUS_NDIS_NOT_SUPPORTED +// +// MessageText: +// +// Netword interface does not support this request. +// +#define STATUS_NDIS_NOT_SUPPORTED ((NTSTATUS)0xC02300BBL) + +// +// MessageId: STATUS_NDIS_INVALID_PACKET +// +// MessageText: +// +// An attempt was made to send an invalid packet on a network interface. +// +#define STATUS_NDIS_INVALID_PACKET ((NTSTATUS)0xC023000FL) + +// +// MessageId: STATUS_NDIS_ADAPTER_NOT_READY +// +// MessageText: +// +// Network interface is not ready to complete this operation. +// +#define STATUS_NDIS_ADAPTER_NOT_READY ((NTSTATUS)0xC0230011L) + +// +// MessageId: STATUS_NDIS_INVALID_LENGTH +// +// MessageText: +// +// The length of the buffer submitted for this operation is not valid. +// +#define STATUS_NDIS_INVALID_LENGTH ((NTSTATUS)0xC0230014L) + +// +// MessageId: STATUS_NDIS_INVALID_DATA +// +// MessageText: +// +// The data used for this operation is not valid. +// +#define STATUS_NDIS_INVALID_DATA ((NTSTATUS)0xC0230015L) + +// +// MessageId: STATUS_NDIS_BUFFER_TOO_SHORT +// +// MessageText: +// +// The length of buffer submitted for this operation is too small. +// +#define STATUS_NDIS_BUFFER_TOO_SHORT ((NTSTATUS)0xC0230016L) + +// +// MessageId: STATUS_NDIS_INVALID_OID +// +// MessageText: +// +// Network interface does not support this OID (Object Identifier) +// +#define STATUS_NDIS_INVALID_OID ((NTSTATUS)0xC0230017L) + +// +// MessageId: STATUS_NDIS_ADAPTER_REMOVED +// +// MessageText: +// +// The network interface has been removed. +// +#define STATUS_NDIS_ADAPTER_REMOVED ((NTSTATUS)0xC0230018L) + +// +// MessageId: STATUS_NDIS_UNSUPPORTED_MEDIA +// +// MessageText: +// +// Network interface does not support this media type. +// +#define STATUS_NDIS_UNSUPPORTED_MEDIA ((NTSTATUS)0xC0230019L) + +// +// MessageId: STATUS_NDIS_GROUP_ADDRESS_IN_USE +// +// MessageText: +// +// An attempt was made to remove a token ring group address that is in use by other components. +// +#define STATUS_NDIS_GROUP_ADDRESS_IN_USE ((NTSTATUS)0xC023001AL) + +// +// MessageId: STATUS_NDIS_FILE_NOT_FOUND +// +// MessageText: +// +// An attempt was made to map a file that can not be found. +// +#define STATUS_NDIS_FILE_NOT_FOUND ((NTSTATUS)0xC023001BL) + +// +// MessageId: STATUS_NDIS_ERROR_READING_FILE +// +// MessageText: +// +// An error occured while NDIS tried to map the file. +// +#define STATUS_NDIS_ERROR_READING_FILE ((NTSTATUS)0xC023001CL) + +// +// MessageId: STATUS_NDIS_ALREADY_MAPPED +// +// MessageText: +// +// An attempt was made to map a file that is alreay mapped. +// +#define STATUS_NDIS_ALREADY_MAPPED ((NTSTATUS)0xC023001DL) + +// +// MessageId: STATUS_NDIS_RESOURCE_CONFLICT +// +// MessageText: +// +// An attempt to allocate a hardware resource failed because the resource is used by another component. +// +#define STATUS_NDIS_RESOURCE_CONFLICT ((NTSTATUS)0xC023001EL) + +// +// MessageId: STATUS_NDIS_MEDIA_DISCONNECTED +// +// MessageText: +// +// The I/O operation failed because network media is disconnected or wireless access point is out of range. +// +#define STATUS_NDIS_MEDIA_DISCONNECTED ((NTSTATUS)0xC023001FL) + +// +// MessageId: STATUS_NDIS_INVALID_ADDRESS +// +// MessageText: +// +// The network address used in the request is invalid. +// +#define STATUS_NDIS_INVALID_ADDRESS ((NTSTATUS)0xC0230022L) + +// +// MessageId: STATUS_NDIS_INVALID_DEVICE_REQUEST +// +// MessageText: +// +// The specified request is not a valid operation for the target device. +// +#define STATUS_NDIS_INVALID_DEVICE_REQUEST ((NTSTATUS)0xC0230010L) + +// +// MessageId: STATUS_NDIS_PAUSED +// +// MessageText: +// +// The offload operation on the network interface has been paused. +// +#define STATUS_NDIS_PAUSED ((NTSTATUS)0xC023002AL) + +// +// MessageId: STATUS_NDIS_INTERFACE_NOT_FOUND +// +// MessageText: +// +// Network interface was not found. +// +#define STATUS_NDIS_INTERFACE_NOT_FOUND ((NTSTATUS)0xC023002BL) + +// +// MessageId: STATUS_NDIS_UNSUPPORTED_REVISION +// +// MessageText: +// +// The revision number specified in the structure is not supported. +// +#define STATUS_NDIS_UNSUPPORTED_REVISION ((NTSTATUS)0xC023002CL) + +// +// MessageId: STATUS_NDIS_INVALID_PORT +// +// MessageText: +// +// The specified port does not exist on this network interface. +// +#define STATUS_NDIS_INVALID_PORT ((NTSTATUS)0xC023002DL) + +// +// MessageId: STATUS_NDIS_INVALID_PORT_STATE +// +// MessageText: +// +// The current state of the specified port on this network interface does not support the requested operation. +// +#define STATUS_NDIS_INVALID_PORT_STATE ((NTSTATUS)0xC023002EL) + +// +// MessageId: STATUS_NDIS_LOW_POWER_STATE +// +// MessageText: +// +// The miniport adapter is in lower power state. +// +#define STATUS_NDIS_LOW_POWER_STATE ((NTSTATUS)0xC023002FL) + + +// +// NDIS error codes (802.11 wireless LAN) +// + +// +// MessageId: STATUS_NDIS_DOT11_AUTO_CONFIG_ENABLED +// +// MessageText: +// +// The wireless local area network interface is in auto configuration mode and doesn't support the requested parameter change operation. +// +#define STATUS_NDIS_DOT11_AUTO_CONFIG_ENABLED ((NTSTATUS)0xC0232000L) + +// +// MessageId: STATUS_NDIS_DOT11_MEDIA_IN_USE +// +// MessageText: +// +// The wireless local area network interface is busy and can not perform the requested operation. +// +#define STATUS_NDIS_DOT11_MEDIA_IN_USE ((NTSTATUS)0xC0232001L) + +// +// MessageId: STATUS_NDIS_DOT11_POWER_STATE_INVALID +// +// MessageText: +// +// The wireless local area network interface is power down and doesn't support the requested operation. +// +#define STATUS_NDIS_DOT11_POWER_STATE_INVALID ((NTSTATUS)0xC0232002L) + +// +// MessageId: STATUS_NDIS_PM_WOL_PATTERN_LIST_FULL +// +// MessageText: +// +// The list of wake on LAN patterns is full. +// +#define STATUS_NDIS_PM_WOL_PATTERN_LIST_FULL ((NTSTATUS)0xC0232003L) + +// +// MessageId: STATUS_NDIS_PM_PROTOCOL_OFFLOAD_LIST_FULL +// +// MessageText: +// +// The list of low power protocol offloads is full. +// +#define STATUS_NDIS_PM_PROTOCOL_OFFLOAD_LIST_FULL ((NTSTATUS)0xC0232004L) + +// +// NDIS informational codes(ndis.sys) +// + +// +// MessageId: STATUS_NDIS_INDICATION_REQUIRED +// +// MessageText: +// +// The request will be completed later by NDIS status indication. +// +#define STATUS_NDIS_INDICATION_REQUIRED ((NTSTATUS)0x40230001L) + +// +// NDIS Chimney Offload codes (ndis.sys) +// + +// +// MessageId: STATUS_NDIS_OFFLOAD_POLICY +// +// MessageText: +// +// The TCP connection is not offloadable because of a local policy setting. +// +#define STATUS_NDIS_OFFLOAD_POLICY ((NTSTATUS)0xC023100FL) + +// +// MessageId: STATUS_NDIS_OFFLOAD_CONNECTION_REJECTED +// +// MessageText: +// +// The TCP connection is not offloadable by the Chimney offload target. +// +#define STATUS_NDIS_OFFLOAD_CONNECTION_REJECTED ((NTSTATUS)0xC0231012L) + +// +// MessageId: STATUS_NDIS_OFFLOAD_PATH_REJECTED +// +// MessageText: +// +// The IP Path object is not in an offloadable state. +// +#define STATUS_NDIS_OFFLOAD_PATH_REJECTED ((NTSTATUS)0xC0231013L) + +// +// Hypervisor error codes - changes to these codes must be reflected in HvStatus.h +// + +// +// MessageId: STATUS_HV_INVALID_HYPERCALL_CODE +// +// MessageText: +// +// The hypervisor does not support the operation because the specified hypercall code is not supported. +// +#define STATUS_HV_INVALID_HYPERCALL_CODE ((NTSTATUS)0xC0350002L) + +// +// MessageId: STATUS_HV_INVALID_HYPERCALL_INPUT +// +// MessageText: +// +// The hypervisor does not support the operation because the encoding for the hypercall input register is not supported. +// +#define STATUS_HV_INVALID_HYPERCALL_INPUT ((NTSTATUS)0xC0350003L) + +// +// MessageId: STATUS_HV_INVALID_ALIGNMENT +// +// MessageText: +// +// The hypervisor could not perform the operation beacuse a parameter has an invalid alignment. +// +#define STATUS_HV_INVALID_ALIGNMENT ((NTSTATUS)0xC0350004L) + +// +// MessageId: STATUS_HV_INVALID_PARAMETER +// +// MessageText: +// +// The hypervisor could not perform the operation beacuse an invalid parameter was specified. +// +#define STATUS_HV_INVALID_PARAMETER ((NTSTATUS)0xC0350005L) + +// +// MessageId: STATUS_HV_ACCESS_DENIED +// +// MessageText: +// +// Access to the specified object was denied. +// +#define STATUS_HV_ACCESS_DENIED ((NTSTATUS)0xC0350006L) + +// +// MessageId: STATUS_HV_INVALID_PARTITION_STATE +// +// MessageText: +// +// The hypervisor could not perform the operation because the partition is entering or in an invalid state. +// +#define STATUS_HV_INVALID_PARTITION_STATE ((NTSTATUS)0xC0350007L) + +// +// MessageId: STATUS_HV_OPERATION_DENIED +// +// MessageText: +// +// The operation is not allowed in the current state. +// +#define STATUS_HV_OPERATION_DENIED ((NTSTATUS)0xC0350008L) + +// +// MessageId: STATUS_HV_UNKNOWN_PROPERTY +// +// MessageText: +// +// The hypervisor does not recognize the specified partition property. +// +#define STATUS_HV_UNKNOWN_PROPERTY ((NTSTATUS)0xC0350009L) + +// +// MessageId: STATUS_HV_PROPERTY_VALUE_OUT_OF_RANGE +// +// MessageText: +// +// The specified value of a partition property is out of range or violates an invariant. +// +#define STATUS_HV_PROPERTY_VALUE_OUT_OF_RANGE ((NTSTATUS)0xC035000AL) + +// +// MessageId: STATUS_HV_INSUFFICIENT_MEMORY +// +// MessageText: +// +// There is not enough memory in the hypervisor pool to complete the operation. +// +#define STATUS_HV_INSUFFICIENT_MEMORY ((NTSTATUS)0xC035000BL) + +// +// MessageId: STATUS_HV_PARTITION_TOO_DEEP +// +// MessageText: +// +// The maximum partition depth has been exceeded for the partition hierarchy. +// +#define STATUS_HV_PARTITION_TOO_DEEP ((NTSTATUS)0xC035000CL) + +// +// MessageId: STATUS_HV_INVALID_PARTITION_ID +// +// MessageText: +// +// A partition with the specified partition Id does not exist. +// +#define STATUS_HV_INVALID_PARTITION_ID ((NTSTATUS)0xC035000DL) + +// +// MessageId: STATUS_HV_INVALID_VP_INDEX +// +// MessageText: +// +// The hypervisor could not perform the operation because the specified VP index is invalid. +// +#define STATUS_HV_INVALID_VP_INDEX ((NTSTATUS)0xC035000EL) + +// +// MessageId: STATUS_HV_INVALID_PORT_ID +// +// MessageText: +// +// The hypervisor could not perform the operation because the specified port identifier is invalid. +// +#define STATUS_HV_INVALID_PORT_ID ((NTSTATUS)0xC0350011L) + +// +// MessageId: STATUS_HV_INVALID_CONNECTION_ID +// +// MessageText: +// +// The hypervisor could not perform the operation because the specified connection identifier is invalid. +// +#define STATUS_HV_INVALID_CONNECTION_ID ((NTSTATUS)0xC0350012L) + +// +// MessageId: STATUS_HV_INSUFFICIENT_BUFFERS +// +// MessageText: +// +// Not enough buffers were supplied to send a message. +// +#define STATUS_HV_INSUFFICIENT_BUFFERS ((NTSTATUS)0xC0350013L) + +// +// MessageId: STATUS_HV_NOT_ACKNOWLEDGED +// +// MessageText: +// +// The previous virtual interrupt has not been acknowledged. +// +#define STATUS_HV_NOT_ACKNOWLEDGED ((NTSTATUS)0xC0350014L) + +// +// MessageId: STATUS_HV_ACKNOWLEDGED +// +// MessageText: +// +// The previous virtual interrupt has already been acknowledged. +// +#define STATUS_HV_ACKNOWLEDGED ((NTSTATUS)0xC0350016L) + +// +// MessageId: STATUS_HV_INVALID_SAVE_RESTORE_STATE +// +// MessageText: +// +// The indicated partition is not in a valid state for saving or restoring. +// +#define STATUS_HV_INVALID_SAVE_RESTORE_STATE ((NTSTATUS)0xC0350017L) + +// +// MessageId: STATUS_HV_INVALID_SYNIC_STATE +// +// MessageText: +// +// The hypervisor could not complete the operation because a required feature of the synthetic interrupt controller (SynIC) was disabled. +// +#define STATUS_HV_INVALID_SYNIC_STATE ((NTSTATUS)0xC0350018L) + +// +// MessageId: STATUS_HV_OBJECT_IN_USE +// +// MessageText: +// +// The hypervisor could not perform the operation because the object or value was either already in use or being used for a purpose that would not permit completing the operation. +// +#define STATUS_HV_OBJECT_IN_USE ((NTSTATUS)0xC0350019L) + +// +// MessageId: STATUS_HV_INVALID_PROXIMITY_DOMAIN_INFO +// +// MessageText: +// +// The proximity domain information is invalid. +// +#define STATUS_HV_INVALID_PROXIMITY_DOMAIN_INFO ((NTSTATUS)0xC035001AL) + +// +// MessageId: STATUS_HV_NO_DATA +// +// MessageText: +// +// An attempt to retrieve debugging data failed because none was available. +// +#define STATUS_HV_NO_DATA ((NTSTATUS)0xC035001BL) + +// +// MessageId: STATUS_HV_INACTIVE +// +// MessageText: +// +// The physical connection being used for debuggging has not recorded any receive activity since the last operation. +// +#define STATUS_HV_INACTIVE ((NTSTATUS)0xC035001CL) + +// +// MessageId: STATUS_HV_NO_RESOURCES +// +// MessageText: +// +// There are not enough resources to complete the operation. +// +#define STATUS_HV_NO_RESOURCES ((NTSTATUS)0xC035001DL) + +// +// MessageId: STATUS_HV_FEATURE_UNAVAILABLE +// +// MessageText: +// +// A hypervisor feature is not available to the user. +// +#define STATUS_HV_FEATURE_UNAVAILABLE ((NTSTATUS)0xC035001EL) + +// +// MessageId: STATUS_HV_NOT_PRESENT +// +// MessageText: +// +// No hypervisor is present on this system. +// +#define STATUS_HV_NOT_PRESENT ((NTSTATUS)0xC0351000L) + +// +// Virtualization status codes - these codes are used by the Virtualization Infrustructure Driver (VID) and other components +// of the virtualization stack. +// +// +// Errors: +// + +// +// MessageId: STATUS_VID_DUPLICATE_HANDLER +// +// MessageText: +// +// The handler for the virtualization infrastructure driver is already registered. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_DUPLICATE_HANDLER ((NTSTATUS)0xC0370001L) + +// +// MessageId: STATUS_VID_TOO_MANY_HANDLERS +// +// MessageText: +// +// The number of registered handlers for the virtualization infrastructure driver exceeded the maximum. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_TOO_MANY_HANDLERS ((NTSTATUS)0xC0370002L) + +// +// MessageId: STATUS_VID_QUEUE_FULL +// +// MessageText: +// +// The message queue for the virtualization infrastructure driver is full and cannot accept new messages. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_QUEUE_FULL ((NTSTATUS)0xC0370003L) + +// +// MessageId: STATUS_VID_HANDLER_NOT_PRESENT +// +// MessageText: +// +// No handler exists to handle the message for the virtualization infrastructure driver. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_HANDLER_NOT_PRESENT ((NTSTATUS)0xC0370004L) + +// +// MessageId: STATUS_VID_INVALID_OBJECT_NAME +// +// MessageText: +// +// The name of the partition or message queue for the virtualization infrastructure driver is invalid. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_INVALID_OBJECT_NAME ((NTSTATUS)0xC0370005L) + +// +// MessageId: STATUS_VID_PARTITION_NAME_TOO_LONG +// +// MessageText: +// +// The partition name of the virtualization infrastructure driver exceeds the maximum. +// +#define STATUS_VID_PARTITION_NAME_TOO_LONG ((NTSTATUS)0xC0370006L) + +// +// MessageId: STATUS_VID_MESSAGE_QUEUE_NAME_TOO_LONG +// +// MessageText: +// +// The message queue name of the virtualization infrastructure driver exceeds the maximum. +// +#define STATUS_VID_MESSAGE_QUEUE_NAME_TOO_LONG ((NTSTATUS)0xC0370007L) + +// +// MessageId: STATUS_VID_PARTITION_ALREADY_EXISTS +// +// MessageText: +// +// Cannot create the partition for the virtualization infrastructure driver because another partition with the same name already exists. +// +#define STATUS_VID_PARTITION_ALREADY_EXISTS ((NTSTATUS)0xC0370008L) + +// +// MessageId: STATUS_VID_PARTITION_DOES_NOT_EXIST +// +// MessageText: +// +// The virtualization infrastructure driver has encountered an error. The requested partition does not exist. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_PARTITION_DOES_NOT_EXIST ((NTSTATUS)0xC0370009L) + +// +// MessageId: STATUS_VID_PARTITION_NAME_NOT_FOUND +// +// MessageText: +// +// The virtualization infrastructure driver has encountered an error. Could not find the requested partition. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_PARTITION_NAME_NOT_FOUND ((NTSTATUS)0xC037000AL) + +// +// MessageId: STATUS_VID_MESSAGE_QUEUE_ALREADY_EXISTS +// +// MessageText: +// +// A message queue with the same name already exists for the virtualization infrastructure driver. +// +#define STATUS_VID_MESSAGE_QUEUE_ALREADY_EXISTS ((NTSTATUS)0xC037000BL) + +// +// MessageId: STATUS_VID_EXCEEDED_MBP_ENTRY_MAP_LIMIT +// +// MessageText: +// +// The memory block page for the virtualization infrastructure driver cannot be mapped because the page map limit has been reached. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_EXCEEDED_MBP_ENTRY_MAP_LIMIT ((NTSTATUS)0xC037000CL) + +// +// MessageId: STATUS_VID_MB_STILL_REFERENCED +// +// MessageText: +// +// The memory block for the virtualization infrastructure driver is still being used and cannot be destroyed. +// +#define STATUS_VID_MB_STILL_REFERENCED ((NTSTATUS)0xC037000DL) + +// +// MessageId: STATUS_VID_CHILD_GPA_PAGE_SET_CORRUPTED +// +// MessageText: +// +// Cannot unlock the page array for the guest operating system memory address because it does not match a previous lock request. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_CHILD_GPA_PAGE_SET_CORRUPTED ((NTSTATUS)0xC037000EL) + +// +// MessageId: STATUS_VID_INVALID_NUMA_SETTINGS +// +// MessageText: +// +// The non-uniform memory access (NUMA) node settings do not match the system NUMA topology. In order to start the virtual machine, you will need to modify the NUMA configuration. For detailed information, see http://go.microsoft.com/fwlink/?LinkId=92362. +// +#define STATUS_VID_INVALID_NUMA_SETTINGS ((NTSTATUS)0xC037000FL) + +// +// MessageId: STATUS_VID_INVALID_NUMA_NODE_INDEX +// +// MessageText: +// +// The non-uniform memory access (NUMA) node index does not match a valid index in the system NUMA topology. +// +#define STATUS_VID_INVALID_NUMA_NODE_INDEX ((NTSTATUS)0xC0370010L) + +// +// MessageId: STATUS_VID_NOTIFICATION_QUEUE_ALREADY_ASSOCIATED +// +// MessageText: +// +// The memory block for the virtualization infrastructure driver is already associated with a message queue. +// +#define STATUS_VID_NOTIFICATION_QUEUE_ALREADY_ASSOCIATED ((NTSTATUS)0xC0370011L) + +// +// MessageId: STATUS_VID_INVALID_MEMORY_BLOCK_HANDLE +// +// MessageText: +// +// The handle is not a valid memory block handle for the virtualization infrastructure driver. +// +#define STATUS_VID_INVALID_MEMORY_BLOCK_HANDLE ((NTSTATUS)0xC0370012L) + +// +// MessageId: STATUS_VID_PAGE_RANGE_OVERFLOW +// +// MessageText: +// +// The request exceeded the memory block page limit for the virtualization infrastructure driver. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_PAGE_RANGE_OVERFLOW ((NTSTATUS)0xC0370013L) + +// +// MessageId: STATUS_VID_INVALID_MESSAGE_QUEUE_HANDLE +// +// MessageText: +// +// The handle is not a valid message queue handle for the virtualization infrastructure driver. +// +#define STATUS_VID_INVALID_MESSAGE_QUEUE_HANDLE ((NTSTATUS)0xC0370014L) + +// +// MessageId: STATUS_VID_INVALID_GPA_RANGE_HANDLE +// +// MessageText: +// +// The handle is not a valid page range handle for the virtualization infrastructure driver. +// +#define STATUS_VID_INVALID_GPA_RANGE_HANDLE ((NTSTATUS)0xC0370015L) + +// +// MessageId: STATUS_VID_NO_MEMORY_BLOCK_NOTIFICATION_QUEUE +// +// MessageText: +// +// Cannot install client notifications because no message queue for the virtualization infrastructure driver is associated with the memory block. +// +#define STATUS_VID_NO_MEMORY_BLOCK_NOTIFICATION_QUEUE ((NTSTATUS)0xC0370016L) + +// +// MessageId: STATUS_VID_MEMORY_BLOCK_LOCK_COUNT_EXCEEDED +// +// MessageText: +// +// The request to lock or map a memory block page failed because the virtualization infrastructure driver memory block limit has been reached. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_MEMORY_BLOCK_LOCK_COUNT_EXCEEDED ((NTSTATUS)0xC0370017L) + +// +// MessageId: STATUS_VID_INVALID_PPM_HANDLE +// +// MessageText: +// +// The handle is not a valid parent partition mapping handle for the virtualization infrastructure driver. +// +#define STATUS_VID_INVALID_PPM_HANDLE ((NTSTATUS)0xC0370018L) + +// +// MessageId: STATUS_VID_MBPS_ARE_LOCKED +// +// MessageText: +// +// Notifications cannot be created on the memory block because it is use. +// +#define STATUS_VID_MBPS_ARE_LOCKED ((NTSTATUS)0xC0370019L) + +// +// MessageId: STATUS_VID_MESSAGE_QUEUE_CLOSED +// +// MessageText: +// +// The message queue for the virtualization infrastructure driver has been closed. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_MESSAGE_QUEUE_CLOSED ((NTSTATUS)0xC037001AL) + +// +// MessageId: STATUS_VID_VIRTUAL_PROCESSOR_LIMIT_EXCEEDED +// +// MessageText: +// +// Cannot add a virtual processor to the partition because the maximum has been reached. +// +#define STATUS_VID_VIRTUAL_PROCESSOR_LIMIT_EXCEEDED ((NTSTATUS)0xC037001BL) + +// +// MessageId: STATUS_VID_STOP_PENDING +// +// MessageText: +// +// Cannot stop the virtual processor immediately because of a pending intercept. +// +#define STATUS_VID_STOP_PENDING ((NTSTATUS)0xC037001CL) + +// +// MessageId: STATUS_VID_INVALID_PROCESSOR_STATE +// +// MessageText: +// +// Invalid state for the virtual processor. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_INVALID_PROCESSOR_STATE ((NTSTATUS)0xC037001DL) + +// +// MessageId: STATUS_VID_EXCEEDED_KM_CONTEXT_COUNT_LIMIT +// +// MessageText: +// +// The maximum number of kernel mode clients for the virtualization infrastructure driver has been reached. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_EXCEEDED_KM_CONTEXT_COUNT_LIMIT ((NTSTATUS)0xC037001EL) + +// +// MessageId: STATUS_VID_KM_INTERFACE_ALREADY_INITIALIZED +// +// MessageText: +// +// This kernel mode interface for the virtualization infrastructure driver has already been initialized. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_KM_INTERFACE_ALREADY_INITIALIZED ((NTSTATUS)0xC037001FL) + +// +// MessageId: STATUS_VID_MB_PROPERTY_ALREADY_SET_RESET +// +// MessageText: +// +// Cannot set or reset the memory block property more than once for the virtualization infrastructure driver. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_MB_PROPERTY_ALREADY_SET_RESET ((NTSTATUS)0xC0370020L) + +// +// MessageId: STATUS_VID_MMIO_RANGE_DESTROYED +// +// MessageText: +// +// The memory mapped I/O for this page range no longer exists. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_MMIO_RANGE_DESTROYED ((NTSTATUS)0xC0370021L) + +// +// MessageId: STATUS_VID_INVALID_CHILD_GPA_PAGE_SET +// +// MessageText: +// +// The lock or unlock request uses an invalid guest operating system memory address. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_INVALID_CHILD_GPA_PAGE_SET ((NTSTATUS)0xC0370022L) + +// +// MessageId: STATUS_VID_RESERVE_PAGE_SET_IS_BEING_USED +// +// MessageText: +// +// Cannot destroy or reuse the reserve page set for the virtualization infrastructure driver because it is in use. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_RESERVE_PAGE_SET_IS_BEING_USED ((NTSTATUS)0xC0370023L) + +// +// MessageId: STATUS_VID_RESERVE_PAGE_SET_TOO_SMALL +// +// MessageText: +// +// The reserve page set for the virtualization infrastructure driver is too small to use in the lock request. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_RESERVE_PAGE_SET_TOO_SMALL ((NTSTATUS)0xC0370024L) + +// +// MessageId: STATUS_VID_MBP_ALREADY_LOCKED_USING_RESERVED_PAGE +// +// MessageText: +// +// Cannot lock or map the memory block page for the virtualization infrastructure driver because it has already been locked using a reserve page set page. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_MBP_ALREADY_LOCKED_USING_RESERVED_PAGE ((NTSTATUS)0xC0370025L) + +// +// MessageId: STATUS_VID_MBP_COUNT_EXCEEDED_LIMIT +// +// MessageText: +// +// Cannot create the memory block for the virtualization infrastructure driver because the requested number of pages exceeded the limit. Restarting the virtual machine may fix the problem. If the problem persists, try restarting the physical computer. +// +#define STATUS_VID_MBP_COUNT_EXCEEDED_LIMIT ((NTSTATUS)0xC0370026L) + +// +// MessageId: STATUS_VID_SAVED_STATE_CORRUPT +// +// MessageText: +// +// Cannot restore this virtual machine because the saved state data cannot be read. Delete the saved state data and then try to start the virtual machine. +// +#define STATUS_VID_SAVED_STATE_CORRUPT ((NTSTATUS)0xC0370027L) + +// +// MessageId: STATUS_VID_SAVED_STATE_UNRECOGNIZED_ITEM +// +// MessageText: +// +// Cannot restore this virtual machine because an item read from the saved state data is not recognized. Delete the saved state data and then try to start the virtual machine. +// +#define STATUS_VID_SAVED_STATE_UNRECOGNIZED_ITEM ((NTSTATUS)0xC0370028L) + +// +// MessageId: STATUS_VID_SAVED_STATE_INCOMPATIBLE +// +// MessageText: +// +// Cannot restore this virtual machine to the saved state because of hypervisor incompatibility. Delete the saved state data and then try to start the virtual machine. +// +#define STATUS_VID_SAVED_STATE_INCOMPATIBLE ((NTSTATUS)0xC0370029L) + +// +// Warnings: +// +// +// MessageId: STATUS_VID_REMOTE_NODE_PARENT_GPA_PAGES_USED +// +// MessageText: +// +// A virtual machine is running with its memory allocated across multiple NUMA nodes. This does not indicate a problem unless the performance of your virtual machine is unusually slow. If you are experiencing performance problems, you may need to modify the NUMA configuration. For detailed information, see http://go.microsoft.com/fwlink/?LinkId=92362. +// +#define STATUS_VID_REMOTE_NODE_PARENT_GPA_PAGES_USED ((NTSTATUS)0x80370001L) + + +// +// IPSEC error codes (tcpip.sys) +// + +// +// MessageId: STATUS_IPSEC_BAD_SPI +// +// MessageText: +// +// The SPI in the packet does not match a valid IPsec SA. +// +#define STATUS_IPSEC_BAD_SPI ((NTSTATUS)0xC0360001L) + +// +// MessageId: STATUS_IPSEC_SA_LIFETIME_EXPIRED +// +// MessageText: +// +// Packet was received on an IPsec SA whose lifetime has expired. +// +#define STATUS_IPSEC_SA_LIFETIME_EXPIRED ((NTSTATUS)0xC0360002L) + +// +// MessageId: STATUS_IPSEC_WRONG_SA +// +// MessageText: +// +// Packet was received on an IPsec SA that doesn't match the packet characteristics. +// +#define STATUS_IPSEC_WRONG_SA ((NTSTATUS)0xC0360003L) + +// +// MessageId: STATUS_IPSEC_REPLAY_CHECK_FAILED +// +// MessageText: +// +// Packet sequence number replay check failed. +// +#define STATUS_IPSEC_REPLAY_CHECK_FAILED ((NTSTATUS)0xC0360004L) + +// +// MessageId: STATUS_IPSEC_INVALID_PACKET +// +// MessageText: +// +// IPsec header and/or trailer in the packet is invalid. +// +#define STATUS_IPSEC_INVALID_PACKET ((NTSTATUS)0xC0360005L) + +// +// MessageId: STATUS_IPSEC_INTEGRITY_CHECK_FAILED +// +// MessageText: +// +// IPsec integrity check failed. +// +#define STATUS_IPSEC_INTEGRITY_CHECK_FAILED ((NTSTATUS)0xC0360006L) + +// +// MessageId: STATUS_IPSEC_CLEAR_TEXT_DROP +// +// MessageText: +// +// IPsec dropped a clear text packet. +// +#define STATUS_IPSEC_CLEAR_TEXT_DROP ((NTSTATUS)0xC0360007L) + +// +// MessageId: STATUS_IPSEC_AUTH_FIREWALL_DROP +// +// MessageText: +// +// IPsec dropped an incoming ESP packet in authenticated firewall mode. This drop is benign. +// +#define STATUS_IPSEC_AUTH_FIREWALL_DROP ((NTSTATUS)0xC0360008L) + +// +// MessageId: STATUS_IPSEC_THROTTLE_DROP +// +// MessageText: +// +// IPsec dropped a packet due to DOS throttle. +// +#define STATUS_IPSEC_THROTTLE_DROP ((NTSTATUS)0xC0360009L) + +// +// MessageId: STATUS_IPSEC_DOSP_BLOCK +// +// MessageText: +// +// IPsec Dos Protection matched an explicit block rule. +// +#define STATUS_IPSEC_DOSP_BLOCK ((NTSTATUS)0xC0368000L) + +// +// MessageId: STATUS_IPSEC_DOSP_RECEIVED_MULTICAST +// +// MessageText: +// +// IPsec Dos Protection received an IPsec specific multicast packet which is not allowed. +// +#define STATUS_IPSEC_DOSP_RECEIVED_MULTICAST ((NTSTATUS)0xC0368001L) + +// +// MessageId: STATUS_IPSEC_DOSP_INVALID_PACKET +// +// MessageText: +// +// IPsec Dos Protection received an incorrectly formatted packet. +// +#define STATUS_IPSEC_DOSP_INVALID_PACKET ((NTSTATUS)0xC0368002L) + +// +// MessageId: STATUS_IPSEC_DOSP_STATE_LOOKUP_FAILED +// +// MessageText: +// +// IPsec Dos Protection failed to lookup state. +// +#define STATUS_IPSEC_DOSP_STATE_LOOKUP_FAILED ((NTSTATUS)0xC0368003L) + +// +// MessageId: STATUS_IPSEC_DOSP_MAX_ENTRIES +// +// MessageText: +// +// IPsec Dos Protection failed to create state because there are already maximum number of entries allowed by policy. +// +#define STATUS_IPSEC_DOSP_MAX_ENTRIES ((NTSTATUS)0xC0368004L) + +// +// MessageId: STATUS_IPSEC_DOSP_KEYMOD_NOT_ALLOWED +// +// MessageText: +// +// IPsec Dos Protection received an IPsec negotiation packet for a keying module which is not allowed by policy. +// +#define STATUS_IPSEC_DOSP_KEYMOD_NOT_ALLOWED ((NTSTATUS)0xC0368005L) + +// +// MessageId: STATUS_IPSEC_DOSP_MAX_PER_IP_RATELIMIT_QUEUES +// +// MessageText: +// +// IPsec Dos Protection failed to create per internal IP ratelimit queue because there is already maximum number of queues allowed by policy. +// +#define STATUS_IPSEC_DOSP_MAX_PER_IP_RATELIMIT_QUEUES ((NTSTATUS)0xC0368006L) + + +// +// Volume manager status codes (volmgr.sys and volmgrx.sys) +// + +// +// WARNINGS +// +// +// MessageId: STATUS_VOLMGR_INCOMPLETE_REGENERATION +// +// MessageText: +// +// The regeneration operation was not able to copy all data from the active plexes due to bad sectors. +// +#define STATUS_VOLMGR_INCOMPLETE_REGENERATION ((NTSTATUS)0x80380001L) + +// +// MessageId: STATUS_VOLMGR_INCOMPLETE_DISK_MIGRATION +// +// MessageText: +// +// One or more disks were not fully migrated to the target pack. They may or may not require reimport after fixing the hardware problems. +// +#define STATUS_VOLMGR_INCOMPLETE_DISK_MIGRATION ((NTSTATUS)0x80380002L) + +// +// ERRORS +// +// +// MessageId: STATUS_VOLMGR_DATABASE_FULL +// +// MessageText: +// +// The configuration database is full. +// +#define STATUS_VOLMGR_DATABASE_FULL ((NTSTATUS)0xC0380001L) + +// +// MessageId: STATUS_VOLMGR_DISK_CONFIGURATION_CORRUPTED +// +// MessageText: +// +// The configuration data on the disk is corrupted. +// +#define STATUS_VOLMGR_DISK_CONFIGURATION_CORRUPTED ((NTSTATUS)0xC0380002L) + +// +// MessageId: STATUS_VOLMGR_DISK_CONFIGURATION_NOT_IN_SYNC +// +// MessageText: +// +// The configuration on the disk is not insync with the in-memory configuration. +// +#define STATUS_VOLMGR_DISK_CONFIGURATION_NOT_IN_SYNC ((NTSTATUS)0xC0380003L) + +// +// MessageId: STATUS_VOLMGR_PACK_CONFIG_UPDATE_FAILED +// +// MessageText: +// +// A majority of disks failed to be updated with the new configuration. +// +#define STATUS_VOLMGR_PACK_CONFIG_UPDATE_FAILED ((NTSTATUS)0xC0380004L) + +// +// MessageId: STATUS_VOLMGR_DISK_CONTAINS_NON_SIMPLE_VOLUME +// +// MessageText: +// +// The disk contains non-simple volumes. +// +#define STATUS_VOLMGR_DISK_CONTAINS_NON_SIMPLE_VOLUME ((NTSTATUS)0xC0380005L) + +// +// MessageId: STATUS_VOLMGR_DISK_DUPLICATE +// +// MessageText: +// +// The same disk was specified more than once in the migration list. +// +#define STATUS_VOLMGR_DISK_DUPLICATE ((NTSTATUS)0xC0380006L) + +// +// MessageId: STATUS_VOLMGR_DISK_DYNAMIC +// +// MessageText: +// +// The disk is already dynamic. +// +#define STATUS_VOLMGR_DISK_DYNAMIC ((NTSTATUS)0xC0380007L) + +// +// MessageId: STATUS_VOLMGR_DISK_ID_INVALID +// +// MessageText: +// +// The specified disk id is invalid. There are no disks with the specified disk id. +// +#define STATUS_VOLMGR_DISK_ID_INVALID ((NTSTATUS)0xC0380008L) + +// +// MessageId: STATUS_VOLMGR_DISK_INVALID +// +// MessageText: +// +// The specified disk is an invalid disk. Operation cannot complete on an invalid disk. +// +#define STATUS_VOLMGR_DISK_INVALID ((NTSTATUS)0xC0380009L) + +// +// MessageId: STATUS_VOLMGR_DISK_LAST_VOTER +// +// MessageText: +// +// The specified disk(s) cannot be removed since it is the last remaining voter. +// +#define STATUS_VOLMGR_DISK_LAST_VOTER ((NTSTATUS)0xC038000AL) + +// +// MessageId: STATUS_VOLMGR_DISK_LAYOUT_INVALID +// +// MessageText: +// +// The specified disk has an invalid disk layout. +// +#define STATUS_VOLMGR_DISK_LAYOUT_INVALID ((NTSTATUS)0xC038000BL) + +// +// MessageId: STATUS_VOLMGR_DISK_LAYOUT_NON_BASIC_BETWEEN_BASIC_PARTITIONS +// +// MessageText: +// +// The disk layout contains non-basic partitions which appear after basic paritions. This is an invalid disk layout. +// +#define STATUS_VOLMGR_DISK_LAYOUT_NON_BASIC_BETWEEN_BASIC_PARTITIONS ((NTSTATUS)0xC038000CL) + +// +// MessageId: STATUS_VOLMGR_DISK_LAYOUT_NOT_CYLINDER_ALIGNED +// +// MessageText: +// +// The disk layout contains partitions which are not cylinder aligned. +// +#define STATUS_VOLMGR_DISK_LAYOUT_NOT_CYLINDER_ALIGNED ((NTSTATUS)0xC038000DL) + +// +// MessageId: STATUS_VOLMGR_DISK_LAYOUT_PARTITIONS_TOO_SMALL +// +// MessageText: +// +// The disk layout contains partitions which are samller than the minimum size. +// +#define STATUS_VOLMGR_DISK_LAYOUT_PARTITIONS_TOO_SMALL ((NTSTATUS)0xC038000EL) + +// +// MessageId: STATUS_VOLMGR_DISK_LAYOUT_PRIMARY_BETWEEN_LOGICAL_PARTITIONS +// +// MessageText: +// +// The disk layout contains primary partitions in between logical drives. This is an invalid disk layout. +// +#define STATUS_VOLMGR_DISK_LAYOUT_PRIMARY_BETWEEN_LOGICAL_PARTITIONS ((NTSTATUS)0xC038000FL) + +// +// MessageId: STATUS_VOLMGR_DISK_LAYOUT_TOO_MANY_PARTITIONS +// +// MessageText: +// +// The disk layout contains more than the maximum number of supported partitions. +// +#define STATUS_VOLMGR_DISK_LAYOUT_TOO_MANY_PARTITIONS ((NTSTATUS)0xC0380010L) + +// +// MessageId: STATUS_VOLMGR_DISK_MISSING +// +// MessageText: +// +// The specified disk is missing. The operation cannot complete on a missing disk. +// +#define STATUS_VOLMGR_DISK_MISSING ((NTSTATUS)0xC0380011L) + +// +// MessageId: STATUS_VOLMGR_DISK_NOT_EMPTY +// +// MessageText: +// +// The specified disk is not empty. +// +#define STATUS_VOLMGR_DISK_NOT_EMPTY ((NTSTATUS)0xC0380012L) + +// +// MessageId: STATUS_VOLMGR_DISK_NOT_ENOUGH_SPACE +// +// MessageText: +// +// There is not enough usable space for this operation. +// +#define STATUS_VOLMGR_DISK_NOT_ENOUGH_SPACE ((NTSTATUS)0xC0380013L) + +// +// MessageId: STATUS_VOLMGR_DISK_REVECTORING_FAILED +// +// MessageText: +// +// The force revectoring of bad sectors failed. +// +#define STATUS_VOLMGR_DISK_REVECTORING_FAILED ((NTSTATUS)0xC0380014L) + +// +// MessageId: STATUS_VOLMGR_DISK_SECTOR_SIZE_INVALID +// +// MessageText: +// +// The specified disk has an invalid sector size. +// +#define STATUS_VOLMGR_DISK_SECTOR_SIZE_INVALID ((NTSTATUS)0xC0380015L) + +// +// MessageId: STATUS_VOLMGR_DISK_SET_NOT_CONTAINED +// +// MessageText: +// +// The specified disk set contains volumes which exist on disks outside of the set. +// +#define STATUS_VOLMGR_DISK_SET_NOT_CONTAINED ((NTSTATUS)0xC0380016L) + +// +// MessageId: STATUS_VOLMGR_DISK_USED_BY_MULTIPLE_MEMBERS +// +// MessageText: +// +// A disk in the volume layout provides extents to more than one member of a plex. +// +#define STATUS_VOLMGR_DISK_USED_BY_MULTIPLE_MEMBERS ((NTSTATUS)0xC0380017L) + +// +// MessageId: STATUS_VOLMGR_DISK_USED_BY_MULTIPLE_PLEXES +// +// MessageText: +// +// A disk in the volume layout provides extents to more than one plex. +// +#define STATUS_VOLMGR_DISK_USED_BY_MULTIPLE_PLEXES ((NTSTATUS)0xC0380018L) + +// +// MessageId: STATUS_VOLMGR_DYNAMIC_DISK_NOT_SUPPORTED +// +// MessageText: +// +// Dynamic disks are not supported on this system. +// +#define STATUS_VOLMGR_DYNAMIC_DISK_NOT_SUPPORTED ((NTSTATUS)0xC0380019L) + +// +// MessageId: STATUS_VOLMGR_EXTENT_ALREADY_USED +// +// MessageText: +// +// The specified extent is already used by other volumes. +// +#define STATUS_VOLMGR_EXTENT_ALREADY_USED ((NTSTATUS)0xC038001AL) + +// +// MessageId: STATUS_VOLMGR_EXTENT_NOT_CONTIGUOUS +// +// MessageText: +// +// The specified volume is retained and can only be extended into a contiguous extent. The specified extent to grow the volume is not contiguous with the specified volume. +// +#define STATUS_VOLMGR_EXTENT_NOT_CONTIGUOUS ((NTSTATUS)0xC038001BL) + +// +// MessageId: STATUS_VOLMGR_EXTENT_NOT_IN_PUBLIC_REGION +// +// MessageText: +// +// The specified volume extent is not within the public region of the disk. +// +#define STATUS_VOLMGR_EXTENT_NOT_IN_PUBLIC_REGION ((NTSTATUS)0xC038001CL) + +// +// MessageId: STATUS_VOLMGR_EXTENT_NOT_SECTOR_ALIGNED +// +// MessageText: +// +// The specifed volume extent is not sector aligned. +// +#define STATUS_VOLMGR_EXTENT_NOT_SECTOR_ALIGNED ((NTSTATUS)0xC038001DL) + +// +// MessageId: STATUS_VOLMGR_EXTENT_OVERLAPS_EBR_PARTITION +// +// MessageText: +// +// The specified parition overlaps an EBR (the first track of an extended partition on a MBR disks). +// +#define STATUS_VOLMGR_EXTENT_OVERLAPS_EBR_PARTITION ((NTSTATUS)0xC038001EL) + +// +// MessageId: STATUS_VOLMGR_EXTENT_VOLUME_LENGTHS_DO_NOT_MATCH +// +// MessageText: +// +// The specified extent lengths cannot be used to construct a volume with specified length. +// +#define STATUS_VOLMGR_EXTENT_VOLUME_LENGTHS_DO_NOT_MATCH ((NTSTATUS)0xC038001FL) + +// +// MessageId: STATUS_VOLMGR_FAULT_TOLERANT_NOT_SUPPORTED +// +// MessageText: +// +// The system does not support fault tolerant volumes. +// +#define STATUS_VOLMGR_FAULT_TOLERANT_NOT_SUPPORTED ((NTSTATUS)0xC0380020L) + +// +// MessageId: STATUS_VOLMGR_INTERLEAVE_LENGTH_INVALID +// +// MessageText: +// +// The specified interleave length is invalid. +// +#define STATUS_VOLMGR_INTERLEAVE_LENGTH_INVALID ((NTSTATUS)0xC0380021L) + +// +// MessageId: STATUS_VOLMGR_MAXIMUM_REGISTERED_USERS +// +// MessageText: +// +// There is already a maximum number of registered users. +// +#define STATUS_VOLMGR_MAXIMUM_REGISTERED_USERS ((NTSTATUS)0xC0380022L) + +// +// MessageId: STATUS_VOLMGR_MEMBER_IN_SYNC +// +// MessageText: +// +// The specified member is already in-sync with the other active members. It does not need to be regenerated. +// +#define STATUS_VOLMGR_MEMBER_IN_SYNC ((NTSTATUS)0xC0380023L) + +// +// MessageId: STATUS_VOLMGR_MEMBER_INDEX_DUPLICATE +// +// MessageText: +// +// The same member index was specified more than once. +// +#define STATUS_VOLMGR_MEMBER_INDEX_DUPLICATE ((NTSTATUS)0xC0380024L) + +// +// MessageId: STATUS_VOLMGR_MEMBER_INDEX_INVALID +// +// MessageText: +// +// The specified member index is greater or equal than the number of members in the volume plex. +// +#define STATUS_VOLMGR_MEMBER_INDEX_INVALID ((NTSTATUS)0xC0380025L) + +// +// MessageId: STATUS_VOLMGR_MEMBER_MISSING +// +// MessageText: +// +// The specified member is missing. It cannot be regenerated. +// +#define STATUS_VOLMGR_MEMBER_MISSING ((NTSTATUS)0xC0380026L) + +// +// MessageId: STATUS_VOLMGR_MEMBER_NOT_DETACHED +// +// MessageText: +// +// The specified member is not detached. Cannot replace a member which is not detached. +// +#define STATUS_VOLMGR_MEMBER_NOT_DETACHED ((NTSTATUS)0xC0380027L) + +// +// MessageId: STATUS_VOLMGR_MEMBER_REGENERATING +// +// MessageText: +// +// The specified member is already regenerating. +// +#define STATUS_VOLMGR_MEMBER_REGENERATING ((NTSTATUS)0xC0380028L) + +// +// MessageId: STATUS_VOLMGR_ALL_DISKS_FAILED +// +// MessageText: +// +// All disks belonging to the pack failed. +// +#define STATUS_VOLMGR_ALL_DISKS_FAILED ((NTSTATUS)0xC0380029L) + +// +// MessageId: STATUS_VOLMGR_NO_REGISTERED_USERS +// +// MessageText: +// +// There are currently no registered users for notifications. The task number is irrelevant unless there are registered users. +// +#define STATUS_VOLMGR_NO_REGISTERED_USERS ((NTSTATUS)0xC038002AL) + +// +// MessageId: STATUS_VOLMGR_NO_SUCH_USER +// +// MessageText: +// +// The specified notification user does not exist. Failed to unregister user for notifications. +// +#define STATUS_VOLMGR_NO_SUCH_USER ((NTSTATUS)0xC038002BL) + +// +// MessageId: STATUS_VOLMGR_NOTIFICATION_RESET +// +// MessageText: +// +// The notifications have been reset. Notifications for the current user are invalid. Unregister and re-register for notifications. +// +#define STATUS_VOLMGR_NOTIFICATION_RESET ((NTSTATUS)0xC038002CL) + +// +// MessageId: STATUS_VOLMGR_NUMBER_OF_MEMBERS_INVALID +// +// MessageText: +// +// The specified number of members is invalid. +// +#define STATUS_VOLMGR_NUMBER_OF_MEMBERS_INVALID ((NTSTATUS)0xC038002DL) + +// +// MessageId: STATUS_VOLMGR_NUMBER_OF_PLEXES_INVALID +// +// MessageText: +// +// The specified number of plexes is invalid. +// +#define STATUS_VOLMGR_NUMBER_OF_PLEXES_INVALID ((NTSTATUS)0xC038002EL) + +// +// MessageId: STATUS_VOLMGR_PACK_DUPLICATE +// +// MessageText: +// +// The specified source and target packs are identical. +// +#define STATUS_VOLMGR_PACK_DUPLICATE ((NTSTATUS)0xC038002FL) + +// +// MessageId: STATUS_VOLMGR_PACK_ID_INVALID +// +// MessageText: +// +// The specified pack id is invalid. There are no packs with the specified pack id. +// +#define STATUS_VOLMGR_PACK_ID_INVALID ((NTSTATUS)0xC0380030L) + +// +// MessageId: STATUS_VOLMGR_PACK_INVALID +// +// MessageText: +// +// The specified pack is the invalid pack. The operation cannot complete with the invalid pack. +// +#define STATUS_VOLMGR_PACK_INVALID ((NTSTATUS)0xC0380031L) + +// +// MessageId: STATUS_VOLMGR_PACK_NAME_INVALID +// +// MessageText: +// +// The specified pack name is invalid. +// +#define STATUS_VOLMGR_PACK_NAME_INVALID ((NTSTATUS)0xC0380032L) + +// +// MessageId: STATUS_VOLMGR_PACK_OFFLINE +// +// MessageText: +// +// The specified pack is offline. +// +#define STATUS_VOLMGR_PACK_OFFLINE ((NTSTATUS)0xC0380033L) + +// +// MessageId: STATUS_VOLMGR_PACK_HAS_QUORUM +// +// MessageText: +// +// The specified pack already has a quorum of healthy disks. +// +#define STATUS_VOLMGR_PACK_HAS_QUORUM ((NTSTATUS)0xC0380034L) + +// +// MessageId: STATUS_VOLMGR_PACK_WITHOUT_QUORUM +// +// MessageText: +// +// The pack does not have a quorum of healthy disks. +// +#define STATUS_VOLMGR_PACK_WITHOUT_QUORUM ((NTSTATUS)0xC0380035L) + +// +// MessageId: STATUS_VOLMGR_PARTITION_STYLE_INVALID +// +// MessageText: +// +// The specified disk has an unsupported partition style. Only MBR and GPT partition styles are supported. +// +#define STATUS_VOLMGR_PARTITION_STYLE_INVALID ((NTSTATUS)0xC0380036L) + +// +// MessageId: STATUS_VOLMGR_PARTITION_UPDATE_FAILED +// +// MessageText: +// +// Failed to update the disk's partition layout. +// +#define STATUS_VOLMGR_PARTITION_UPDATE_FAILED ((NTSTATUS)0xC0380037L) + +// +// MessageId: STATUS_VOLMGR_PLEX_IN_SYNC +// +// MessageText: +// +// The specified plex is already in-sync with the other active plexes. It does not need to be regenerated. +// +#define STATUS_VOLMGR_PLEX_IN_SYNC ((NTSTATUS)0xC0380038L) + +// +// MessageId: STATUS_VOLMGR_PLEX_INDEX_DUPLICATE +// +// MessageText: +// +// The same plex index was specified more than once. +// +#define STATUS_VOLMGR_PLEX_INDEX_DUPLICATE ((NTSTATUS)0xC0380039L) + +// +// MessageId: STATUS_VOLMGR_PLEX_INDEX_INVALID +// +// MessageText: +// +// The specified plex index is greater or equal than the number of plexes in the volume. +// +#define STATUS_VOLMGR_PLEX_INDEX_INVALID ((NTSTATUS)0xC038003AL) + +// +// MessageId: STATUS_VOLMGR_PLEX_LAST_ACTIVE +// +// MessageText: +// +// The specified plex is the last active plex in the volume. The plex cannot be removed or else the volume will go offline. +// +#define STATUS_VOLMGR_PLEX_LAST_ACTIVE ((NTSTATUS)0xC038003BL) + +// +// MessageId: STATUS_VOLMGR_PLEX_MISSING +// +// MessageText: +// +// The specified plex is missing. +// +#define STATUS_VOLMGR_PLEX_MISSING ((NTSTATUS)0xC038003CL) + +// +// MessageId: STATUS_VOLMGR_PLEX_REGENERATING +// +// MessageText: +// +// The specified plex is currently regenerating. +// +#define STATUS_VOLMGR_PLEX_REGENERATING ((NTSTATUS)0xC038003DL) + +// +// MessageId: STATUS_VOLMGR_PLEX_TYPE_INVALID +// +// MessageText: +// +// The specified plex type is invalid. +// +#define STATUS_VOLMGR_PLEX_TYPE_INVALID ((NTSTATUS)0xC038003EL) + +// +// MessageId: STATUS_VOLMGR_PLEX_NOT_RAID5 +// +// MessageText: +// +// The operation is only supported on RAID-5 plexes. +// +#define STATUS_VOLMGR_PLEX_NOT_RAID5 ((NTSTATUS)0xC038003FL) + +// +// MessageId: STATUS_VOLMGR_PLEX_NOT_SIMPLE +// +// MessageText: +// +// The operation is only supported on simple plexes. +// +#define STATUS_VOLMGR_PLEX_NOT_SIMPLE ((NTSTATUS)0xC0380040L) + +// +// MessageId: STATUS_VOLMGR_STRUCTURE_SIZE_INVALID +// +// MessageText: +// +// The Size fields in the VM_VOLUME_LAYOUT input structure are incorrectly set. +// +#define STATUS_VOLMGR_STRUCTURE_SIZE_INVALID ((NTSTATUS)0xC0380041L) + +// +// MessageId: STATUS_VOLMGR_TOO_MANY_NOTIFICATION_REQUESTS +// +// MessageText: +// +// There is already a pending request for notifications. Wait for the existing request to return before requesting for more notifications. +// +#define STATUS_VOLMGR_TOO_MANY_NOTIFICATION_REQUESTS ((NTSTATUS)0xC0380042L) + +// +// MessageId: STATUS_VOLMGR_TRANSACTION_IN_PROGRESS +// +// MessageText: +// +// There is currently a transaction in process. +// +#define STATUS_VOLMGR_TRANSACTION_IN_PROGRESS ((NTSTATUS)0xC0380043L) + +// +// MessageId: STATUS_VOLMGR_UNEXPECTED_DISK_LAYOUT_CHANGE +// +// MessageText: +// +// An unexpected layout change occurred outside of the volume manager. +// +#define STATUS_VOLMGR_UNEXPECTED_DISK_LAYOUT_CHANGE ((NTSTATUS)0xC0380044L) + +// +// MessageId: STATUS_VOLMGR_VOLUME_CONTAINS_MISSING_DISK +// +// MessageText: +// +// The specified volume contains a missing disk. +// +#define STATUS_VOLMGR_VOLUME_CONTAINS_MISSING_DISK ((NTSTATUS)0xC0380045L) + +// +// MessageId: STATUS_VOLMGR_VOLUME_ID_INVALID +// +// MessageText: +// +// The specified volume id is invalid. There are no volumes with the specified volume id. +// +#define STATUS_VOLMGR_VOLUME_ID_INVALID ((NTSTATUS)0xC0380046L) + +// +// MessageId: STATUS_VOLMGR_VOLUME_LENGTH_INVALID +// +// MessageText: +// +// The specified volume length is invalid. +// +#define STATUS_VOLMGR_VOLUME_LENGTH_INVALID ((NTSTATUS)0xC0380047L) + +// +// MessageId: STATUS_VOLMGR_VOLUME_LENGTH_NOT_SECTOR_SIZE_MULTIPLE +// +// MessageText: +// +// The specified size for the volume is not a multiple of the sector size. +// +#define STATUS_VOLMGR_VOLUME_LENGTH_NOT_SECTOR_SIZE_MULTIPLE ((NTSTATUS)0xC0380048L) + +// +// MessageId: STATUS_VOLMGR_VOLUME_NOT_MIRRORED +// +// MessageText: +// +// The operation is only supported on mirrored volumes. +// +#define STATUS_VOLMGR_VOLUME_NOT_MIRRORED ((NTSTATUS)0xC0380049L) + +// +// MessageId: STATUS_VOLMGR_VOLUME_NOT_RETAINED +// +// MessageText: +// +// The specified volume does not have a retain partition. +// +#define STATUS_VOLMGR_VOLUME_NOT_RETAINED ((NTSTATUS)0xC038004AL) + +// +// MessageId: STATUS_VOLMGR_VOLUME_OFFLINE +// +// MessageText: +// +// The specified volume is offline. +// +#define STATUS_VOLMGR_VOLUME_OFFLINE ((NTSTATUS)0xC038004BL) + +// +// MessageId: STATUS_VOLMGR_VOLUME_RETAINED +// +// MessageText: +// +// The specified volume already has a retain partition. +// +#define STATUS_VOLMGR_VOLUME_RETAINED ((NTSTATUS)0xC038004CL) + +// +// MessageId: STATUS_VOLMGR_NUMBER_OF_EXTENTS_INVALID +// +// MessageText: +// +// The specified number of extents is invalid. +// +#define STATUS_VOLMGR_NUMBER_OF_EXTENTS_INVALID ((NTSTATUS)0xC038004DL) + +// +// MessageId: STATUS_VOLMGR_DIFFERENT_SECTOR_SIZE +// +// MessageText: +// +// All disks participating to the volume must have the same sector size. +// +#define STATUS_VOLMGR_DIFFERENT_SECTOR_SIZE ((NTSTATUS)0xC038004EL) + +// +// MessageId: STATUS_VOLMGR_BAD_BOOT_DISK +// +// MessageText: +// +// The boot disk experienced failures. +// +#define STATUS_VOLMGR_BAD_BOOT_DISK ((NTSTATUS)0xC038004FL) + +// +// MessageId: STATUS_VOLMGR_PACK_CONFIG_OFFLINE +// +// MessageText: +// +// The configuration of the pack is offline. +// +#define STATUS_VOLMGR_PACK_CONFIG_OFFLINE ((NTSTATUS)0xC0380050L) + +// +// MessageId: STATUS_VOLMGR_PACK_CONFIG_ONLINE +// +// MessageText: +// +// The configuration of the pack is online. +// +#define STATUS_VOLMGR_PACK_CONFIG_ONLINE ((NTSTATUS)0xC0380051L) + +// +// MessageId: STATUS_VOLMGR_NOT_PRIMARY_PACK +// +// MessageText: +// +// The specified pack is not the primary pack. +// +#define STATUS_VOLMGR_NOT_PRIMARY_PACK ((NTSTATUS)0xC0380052L) + +// +// MessageId: STATUS_VOLMGR_PACK_LOG_UPDATE_FAILED +// +// MessageText: +// +// All disks failed to be updated with the new content of the log. +// +#define STATUS_VOLMGR_PACK_LOG_UPDATE_FAILED ((NTSTATUS)0xC0380053L) + +// +// MessageId: STATUS_VOLMGR_NUMBER_OF_DISKS_IN_PLEX_INVALID +// +// MessageText: +// +// The specified number of disks in a plex is invalid. +// +#define STATUS_VOLMGR_NUMBER_OF_DISKS_IN_PLEX_INVALID ((NTSTATUS)0xC0380054L) + +// +// MessageId: STATUS_VOLMGR_NUMBER_OF_DISKS_IN_MEMBER_INVALID +// +// MessageText: +// +// The specified number of disks in a plex member is invalid. +// +#define STATUS_VOLMGR_NUMBER_OF_DISKS_IN_MEMBER_INVALID ((NTSTATUS)0xC0380055L) + +// +// MessageId: STATUS_VOLMGR_VOLUME_MIRRORED +// +// MessageText: +// +// The operation is not supported on mirrored volumes. +// +#define STATUS_VOLMGR_VOLUME_MIRRORED ((NTSTATUS)0xC0380056L) + +// +// MessageId: STATUS_VOLMGR_PLEX_NOT_SIMPLE_SPANNED +// +// MessageText: +// +// The operation is only supported on simple and spanned plexes. +// +#define STATUS_VOLMGR_PLEX_NOT_SIMPLE_SPANNED ((NTSTATUS)0xC0380057L) + +// +// MessageId: STATUS_VOLMGR_NO_VALID_LOG_COPIES +// +// MessageText: +// +// The pack has no valid log copies. +// +#define STATUS_VOLMGR_NO_VALID_LOG_COPIES ((NTSTATUS)0xC0380058L) + +// +// MessageId: STATUS_VOLMGR_PRIMARY_PACK_PRESENT +// +// MessageText: +// +// A primary pack is already present. +// +#define STATUS_VOLMGR_PRIMARY_PACK_PRESENT ((NTSTATUS)0xC0380059L) + +// +// MessageId: STATUS_VOLMGR_NUMBER_OF_DISKS_INVALID +// +// MessageText: +// +// The specified number of disks is invalid. +// +#define STATUS_VOLMGR_NUMBER_OF_DISKS_INVALID ((NTSTATUS)0xC038005AL) + +// +// MessageId: STATUS_VOLMGR_MIRROR_NOT_SUPPORTED +// +// MessageText: +// +// The system does not support mirrored volumes. +// +#define STATUS_VOLMGR_MIRROR_NOT_SUPPORTED ((NTSTATUS)0xC038005BL) + +// +// MessageId: STATUS_VOLMGR_RAID5_NOT_SUPPORTED +// +// MessageText: +// +// The system does not support RAID-5 volumes. +// +#define STATUS_VOLMGR_RAID5_NOT_SUPPORTED ((NTSTATUS)0xC038005CL) + +// +// Boot Code Data (BCD) status codes +// + +// +// MessageId: STATUS_BCD_NOT_ALL_ENTRIES_IMPORTED +// +// MessageText: +// +// Some BCD entries were not imported correctly from the BCD store. +// +#define STATUS_BCD_NOT_ALL_ENTRIES_IMPORTED ((NTSTATUS)0x80390001L) + +// +// MessageId: STATUS_BCD_TOO_MANY_ELEMENTS +// +// MessageText: +// +// Entries enumerated have exceeded the allowed threshold. +// +#define STATUS_BCD_TOO_MANY_ELEMENTS ((NTSTATUS)0xC0390002L) + +// +// MessageId: STATUS_BCD_NOT_ALL_ENTRIES_SYNCHRONIZED +// +// MessageText: +// +// Some BCD entries were not synchronized correctly with the firmware. +// +#define STATUS_BCD_NOT_ALL_ENTRIES_SYNCHRONIZED ((NTSTATUS)0x80390003L) + + +// +// vhdparser error codes (vhdparser.sys) +// + +// +// MessageId: STATUS_VHD_DRIVE_FOOTER_MISSING +// +// MessageText: +// +// The virtual hard disk is corrupted. The virtual hard disk drive footer is missing. +// +#define STATUS_VHD_DRIVE_FOOTER_MISSING ((NTSTATUS)0xC03A0001L) + +// +// MessageId: STATUS_VHD_DRIVE_FOOTER_CHECKSUM_MISMATCH +// +// MessageText: +// +// The virtual hard disk is corrupted. The virtual hard disk drive footer checksum does not match the on-disk checksum. +// +#define STATUS_VHD_DRIVE_FOOTER_CHECKSUM_MISMATCH ((NTSTATUS)0xC03A0002L) + +// +// MessageId: STATUS_VHD_DRIVE_FOOTER_CORRUPT +// +// MessageText: +// +// The virtual hard disk is corrupted. The virtual hard disk drive footer in the virtual hard disk is corrupted. +// +#define STATUS_VHD_DRIVE_FOOTER_CORRUPT ((NTSTATUS)0xC03A0003L) + +// +// MessageId: STATUS_VHD_FORMAT_UNKNOWN +// +// MessageText: +// +// The system does not recognize the file format of this virtual hard disk. +// +#define STATUS_VHD_FORMAT_UNKNOWN ((NTSTATUS)0xC03A0004L) + +// +// MessageId: STATUS_VHD_FORMAT_UNSUPPORTED_VERSION +// +// MessageText: +// +// The version does not support this version of the file format. +// +#define STATUS_VHD_FORMAT_UNSUPPORTED_VERSION ((NTSTATUS)0xC03A0005L) + +// +// MessageId: STATUS_VHD_SPARSE_HEADER_CHECKSUM_MISMATCH +// +// MessageText: +// +// The virtual hard disk is corrupted. The sparse header checksum does not match the on-disk checksum. +// +#define STATUS_VHD_SPARSE_HEADER_CHECKSUM_MISMATCH ((NTSTATUS)0xC03A0006L) + +// +// MessageId: STATUS_VHD_SPARSE_HEADER_UNSUPPORTED_VERSION +// +// MessageText: +// +// The system does not support this version of the virtual hard disk.This version of the sparse header is not supported. +// +#define STATUS_VHD_SPARSE_HEADER_UNSUPPORTED_VERSION ((NTSTATUS)0xC03A0007L) + +// +// MessageId: STATUS_VHD_SPARSE_HEADER_CORRUPT +// +// MessageText: +// +// The virtual hard disk is corrupted. The sparse header in the virtual hard disk is corrupt. +// +#define STATUS_VHD_SPARSE_HEADER_CORRUPT ((NTSTATUS)0xC03A0008L) + +// +// MessageId: STATUS_VHD_BLOCK_ALLOCATION_FAILURE +// +// MessageText: +// +// Failed to write to the virtual hard disk failed because the system failed to allocate a new block in the virtual hard disk. +// +#define STATUS_VHD_BLOCK_ALLOCATION_FAILURE ((NTSTATUS)0xC03A0009L) + +// +// MessageId: STATUS_VHD_BLOCK_ALLOCATION_TABLE_CORRUPT +// +// MessageText: +// +// The virtual hard disk is corrupted. The block allocation table in the virtual hard disk is corrupt. +// +#define STATUS_VHD_BLOCK_ALLOCATION_TABLE_CORRUPT ((NTSTATUS)0xC03A000AL) + +// +// MessageId: STATUS_VHD_INVALID_BLOCK_SIZE +// +// MessageText: +// +// The system does not support this version of the virtual hard disk. The block size is invalid. +// +#define STATUS_VHD_INVALID_BLOCK_SIZE ((NTSTATUS)0xC03A000BL) + +// +// MessageId: STATUS_VHD_BITMAP_MISMATCH +// +// MessageText: +// +// The virtual hard disk is corrupted. The block bitmap does not match with the block data present in the virtual hard disk. +// +#define STATUS_VHD_BITMAP_MISMATCH ((NTSTATUS)0xC03A000CL) + +// +// MessageId: STATUS_VHD_PARENT_VHD_NOT_FOUND +// +// MessageText: +// +// The chain of virtual hard disks is broken. The system cannot locate the parent virtual hard disk for the differencing disk. +// +#define STATUS_VHD_PARENT_VHD_NOT_FOUND ((NTSTATUS)0xC03A000DL) + +// +// MessageId: STATUS_VHD_CHILD_PARENT_ID_MISMATCH +// +// MessageText: +// +// The chain of virtual hard disks is corrupted. There is a mismatch in the identifiers of the parent virtual hard disk and differencing disk. +// +#define STATUS_VHD_CHILD_PARENT_ID_MISMATCH ((NTSTATUS)0xC03A000EL) + +// +// MessageId: STATUS_VHD_CHILD_PARENT_TIMESTAMP_MISMATCH +// +// MessageText: +// +// The chain of virtual hard disks is corrupted. The time stamp of the parent virtual hard disk does not match the time stamp of the differencing disk. +// +#define STATUS_VHD_CHILD_PARENT_TIMESTAMP_MISMATCH ((NTSTATUS)0xC03A000FL) + +// +// MessageId: STATUS_VHD_METADATA_READ_FAILURE +// +// MessageText: +// +// Failed to read the metadata of the virtual hard disk. +// +#define STATUS_VHD_METADATA_READ_FAILURE ((NTSTATUS)0xC03A0010L) + +// +// MessageId: STATUS_VHD_METADATA_WRITE_FAILURE +// +// MessageText: +// +// Failed to write to the metadata of the virtual hard disk. +// +#define STATUS_VHD_METADATA_WRITE_FAILURE ((NTSTATUS)0xC03A0011L) + +// +// MessageId: STATUS_VHD_INVALID_SIZE +// +// MessageText: +// +// The size of the virtual hard disk is not valid. +// +#define STATUS_VHD_INVALID_SIZE ((NTSTATUS)0xC03A0012L) + +// +// MessageId: STATUS_VHD_INVALID_FILE_SIZE +// +// MessageText: +// +// The file size of this virtual hard disk is not valid. +// +#define STATUS_VHD_INVALID_FILE_SIZE ((NTSTATUS)0xC03A0013L) + +// +// MessageId: STATUS_VIRTDISK_PROVIDER_NOT_FOUND +// +// MessageText: +// +// A virtual disk support provider for the specified file was not found. +// +#define STATUS_VIRTDISK_PROVIDER_NOT_FOUND ((NTSTATUS)0xC03A0014L) + +// +// MessageId: STATUS_VIRTDISK_NOT_VIRTUAL_DISK +// +// MessageText: +// +// The specified disk is not a virtual disk. +// +#define STATUS_VIRTDISK_NOT_VIRTUAL_DISK ((NTSTATUS)0xC03A0015L) + +// +// MessageId: STATUS_VHD_PARENT_VHD_ACCESS_DENIED +// +// MessageText: +// +// The chain of virtual hard disks is inaccessible. The process has not been granted access rights to the parent virtual hard disk for the differencing disk. +// +#define STATUS_VHD_PARENT_VHD_ACCESS_DENIED ((NTSTATUS)0xC03A0016L) + +// +// MessageId: STATUS_VHD_CHILD_PARENT_SIZE_MISMATCH +// +// MessageText: +// +// The chain of virtual hard disks is corrupted. There is a mismatch in the virtual sizes of the parent virtual hard disk and differencing disk. +// +#define STATUS_VHD_CHILD_PARENT_SIZE_MISMATCH ((NTSTATUS)0xC03A0017L) + +// +// MessageId: STATUS_VHD_DIFFERENCING_CHAIN_CYCLE_DETECTED +// +// MessageText: +// +// The chain of virtual hard disks is corrupted. A differencing disk is indicated in its own parent chain. +// +#define STATUS_VHD_DIFFERENCING_CHAIN_CYCLE_DETECTED ((NTSTATUS)0xC03A0018L) + +// +// MessageId: STATUS_VHD_DIFFERENCING_CHAIN_ERROR_IN_PARENT +// +// MessageText: +// +// The chain of virtual hard disks is inaccessible. There was an error opening a virtual hard disk further up the chain. +// +#define STATUS_VHD_DIFFERENCING_CHAIN_ERROR_IN_PARENT ((NTSTATUS)0xC03A0019L) + + +// +// Vhd warnings. +// + +// +// MessageId: STATUS_QUERY_STORAGE_ERROR +// +// MessageText: +// +// The virtualization storage subsystem has generated an error. +// +#define STATUS_QUERY_STORAGE_ERROR ((NTSTATUS)0x803A0001L) + + +// +// Derived Indexed Store (DIS) error messages. +// +// +// MessageId: STATUS_DIS_NOT_PRESENT +// +// MessageText: +// +// The Derived Indexed Store is not present (or currently loaded) on this system. +// +#define STATUS_DIS_NOT_PRESENT ((NTSTATUS)0xC03C0001L) + +// +// MessageId: STATUS_DIS_ATTRIBUTE_NOT_FOUND +// +// MessageText: +// +// The Attribute was not found in the store for a given object. +// +#define STATUS_DIS_ATTRIBUTE_NOT_FOUND ((NTSTATUS)0xC03C0002L) + +// +// MessageId: STATUS_DIS_UNRECOGNIZED_ATTRIBUTE +// +// MessageText: +// +// This is not a recognized built-in attribute. +// +#define STATUS_DIS_UNRECOGNIZED_ATTRIBUTE ((NTSTATUS)0xC03C0003L) + +// +// MessageId: STATUS_DIS_PARTIAL_DATA +// +// MessageText: +// +// Partial data was successfully returned, some attributes need to be calculated from elsewhere. +// +#define STATUS_DIS_PARTIAL_DATA ((NTSTATUS)0xC03C0004L) + +// +// Map a WIN32 error value into an NTSTATUS +// Note: This assumes that WIN32 errors fall in the range -32k to 32k. +// + +#define __NTSTATUS_FROM_WIN32(x) ((NTSTATUS)(x) <= 0 ? ((NTSTATUS)(x)) : ((NTSTATUS) (((x) & 0x0000FFFF) | (FACILITY_NTWIN32 << 16) | ERROR_SEVERITY_ERROR))) + +#ifdef INLINE_NTSTATUS_FROM_WIN32 +#ifndef __midl +__inline NTSTATUS_FROM_WIN32(long x) { return x <= 0 ? (NTSTATUS)x : (NTSTATUS) (((x) & 0x0000FFFF) | (FACILITY_NTWIN32 << 16) | ERROR_SEVERITY_ERROR);} +#else +#define NTSTATUS_FROM_WIN32(x) __NTSTATUS_FROM_WIN32(x) +#endif +#else +#define NTSTATUS_FROM_WIN32(x) __NTSTATUS_FROM_WIN32(x) +#endif + + +/*lint -restore */ // Resume checking for different macro definitions // winnt +// end_ntsecapi + +#endif // WIN32_NO_STATUS // winnt +#endif // _NTSTATUS_ diff --git a/xbdm/xbdm.vcxproj b/xbdm/xbdm.vcxproj new file mode 100644 index 0000000..c779b27 --- /dev/null +++ b/xbdm/xbdm.vcxproj @@ -0,0 +1,378 @@ + + + + + CodeAnalysis + Xbox 360 + + + Debug + Xbox 360 + + + Profile + Xbox 360 + + + Profile_FastCap + Xbox 360 + + + Release + Xbox 360 + + + Release_LTCG + Xbox 360 + + + + {037F11DD-1508-4D28-860F-009AAEEA26F7} + Xbox360Proj + + + + DynamicLibrary + MultiByte + + + DynamicLibrary + MultiByte + + + DynamicLibrary + MultiByte + + + DynamicLibrary + MultiByte + + + DynamicLibrary + MultiByte + + + DynamicLibrary + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + false + $(OutDir)$(TargetName).dll + imp/;$(IncludePath) + + + true + imp/;$(IncludePath) + $(OutDir)$(TargetName).dll + + + false + imp/;$(IncludePath) + $(OutDir)$(TargetName).dll + + + false + imp/;$(IncludePath) + $(OutDir)$(TargetName).dll + + + false + imp/;$(IncludePath) + $(OutDir)$(TargetName).dll + + + false + imp/;$(IncludePath) + $(OutDir)$(TargetName).dll + + + + NotUsing + Level3 + ProgramDatabase + Full + false + true + false + MultiThreadedDebug + _DEBUG;_XBOX + Disabled + false + CompileAsC + true + true + Size + true + OnlyExplicitInline + + + true + $(OutDir)$(ProjectName).pdb + xapilibd.lib;xboxkrnl.lib;xnetd.lib + 2.0.20871.2 + _DllMainCRTStartup + 0x98000000 + false + /dll /align:128,4096 %(AdditionalOptions) + dm.def + dm.pdb + true + true + UseLinkTimeCodeGeneration + true + + + xexd.xml + + + + + + + + + NotUsing + Level4 + ProgramDatabase + Disabled + false + true + AnalyzeOnly + false + MultiThreadedDebug + _DEBUG;_XBOX + Callcap + CompileAsC + true + + + true + $(OutDir)$(ProjectName).pdb + xapilibd.lib;d3d9d.lib;d3dx9d.lib;xgraphicsd.lib;xboxkrnl.lib;xnetd.lib;xaudiod2.lib;xactd3.lib;x3daudiod.lib;xmcored.lib;xbdm.lib;vcompd.lib + dm.def + 2.0.20871.2 + _DllMainCRTStartup + 0x91F00000 + true + /dll /align:128,4096 %(AdditionalOptions) + + + xex.xml + + + + + Level3 + NotUsing + Full + true + false + true + ProgramDatabase + Size + false + MultiThreaded + NDEBUG;_XBOX;PROFILE + Callcap + CompileAsC + true + + + true + false + xapilib.lib + true + $(OutDir)$(ProjectName).pdb + true + xapilibi.lib;d3d9i.lib;d3dx9.lib;xgraphics.lib;xboxkrnl.lib;xnet.lib;xaudio2.lib;xact3i.lib;x3daudioi.lib;xmcorei.lib;xbdm.lib;vcomp.lib + dm.def + 2.0.20871.2 + _DllMainCRTStartup + 0x91F00000 + true + /dll /align:128,4096 %(AdditionalOptions) + + + xex.xml + + + + + Level3 + NotUsing + Full + true + false + true + ProgramDatabase + Fastcap + Size + false + MultiThreaded + NDEBUG;_XBOX;PROFILE;FASTCAP + CompileAsC + true + + + true + false + true + $(OutDir)$(ProjectName).pdb + true + xapilib.lib;d3d9.lib;d3dx9.lib;xgraphics.lib;xboxkrnl.lib;xnet.lib;xaudio2.lib;xact3.lib;x3daudio.lib;xmcore.lib;vcomp.lib;xbdm.lib + dm.def + 2.0.20871.2 + _DllMainCRTStartup + 0x91F00000 + true + /dll /align:128,4096 %(AdditionalOptions) + + + xex.xml + + + + + Level3 + NotUsing + Full + true + true + ProgramDatabase + Size + false + false + MultiThreaded + NDEBUG;_XBOX + CompileAsC + true + + + true + true + true + $(OutDir)$(ProjectName).pdb + true + xapilib.lib;xboxkrnl.lib;xnet.lib + dm.def + 2.0.20871.2 + _DllMainCRTStartup + 0x91000000 + true + /dll /align:128,4096 %(AdditionalOptions) + + + xex.xml + + + + + Level3 + NotUsing + Full + true + true + ProgramDatabase + Size + false + false + MultiThreaded + NDEBUG;_XBOX;LTCG + CompileAsC + true + true + + + true + true + true + $(OutDir)$(ProjectName).pdb + true + xapilib.lib;xboxkrnl.lib;xnet.lib + dm.def + 2.0.20871.2 + _DllMainCRTStartup + 0x91000000 + true + /dll /align:128,4096 %(AdditionalOptions) + + + xex.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xbdm/xex.xml b/xbdm/xex.xml new file mode 100644 index 0000000..53df92a --- /dev/null +++ b/xbdm/xex.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xbdm/xexd.xml b/xbdm/xexd.xml new file mode 100644 index 0000000..8347864 --- /dev/null +++ b/xbdm/xexd.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file