Hresult Values Win32 Error Codes
Contents |
Studio 2015 products Visual Studio Team Services Visual Studio Code Visual Studio Dev Essentials Office Office hresult list Word/Excel/PowerPoint Microsoft Graph Outlook OneDrive/Sharepoint Skype Services Store Cortana hresult c# Bing Application Insights Languages & platforms Xamarin ASP.NET C++ TypeScript .NET - VB, C#, F#
Hresult C++
Server Windows Server SQL Server BizTalk Server SharePoint Dynamics Programs & communities Students Startups Forums MSDN Subscriber downloads Sign in Search Microsoft Search Windows
Decode Hresult
Dev Center Windows Dev Center Explore What’s new for Windows 10 Intro to Universal Windows Platform Coding challenges Develop for accessibility Build for enterprise Windows Store opportunities Docs Windows apps Get started Design and UI Develop API reference Publish Monetize Promote Games Get started UI design Develop Publish Desktop hresult error Get started Design Develop API reference Test and deploy Compatibility Windows IoT Microsoft Edge Windows Holographic Downloads Samples Support Why Windows Dashboard Explore What’s new for Windows 10 Intro to Universal Windows Platform Coding challenges Develop for accessibility Build for enterprise Windows Store opportunities Docs Windows apps Get started Design and UI Develop API reference Publish Monetize Promote Games Get started UI design Develop Publish Desktop Get started Design Develop API reference Test and deploy Compatibility Windows IoT Microsoft Edge Windows Holographic Downloads Samples Support Why Windows Dashboard Cryptography Cryptography Reference Cryptography Interfaces Cryptography Interfaces Common HRESULT Values Common HRESULT Values Common HRESULT Values ICEnroll ICEnroll2 ICEnroll3 ICEnroll4 ICertAdmin ICertAdmin2 ICertConfig ICertConfig2 ICertContext ICertEncodeAltName ICertEncodeBitString ICertEncodeCRLDistInfo ICertEncodeDateArray ICertEncodeLongArray ICertEncodeStringArray ICertExit ICertExit2 ICertGetConfig ICertificateEnrollmentPolicyServerSetup ICertificateEnrollmentServerSetup ICertManageModule ICertPolicy ICertPolicy2 ICertRequest ICertRequest2 ICertRequest3 ICertServerExit ICertServerPolicy ICertSrvSetup ICertSrvSetupKeyInformation ICertSrvSetupKeyInformationCollection ICertStore ICertView ICertView2 IChainContext IEnroll IEnroll2 IEnroll4 IEnumCERTVIEWATTRIBUTE IEnumCERTVIEWCOLUMN IEnumCERTVI
resources Windows Server 2012 resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards Events Community Magazine Forums Blogs Channel 9 Documentation APIs and reference Dev centers Samples Retired
Hresult 80004005
content We’re sorry. The content you requested has been removed. You’ll be auto hresult to string redirected in 1 second. Export (0) Print Expand All MSDN Library Open Specifications Protocols Windows Protocols References [MS-ERREF]: Windows Error what is hresult Codes 1 Introduction 2 Structures 3 Structure Example 4 Security Considerations 5 Appendix A: Product Behavior 6 Change Tracking 7 Index Collapse the table of content Expand the table of content This documentation https://msdn.microsoft.com/en-us/library/windows/desktop/aa378137(v=vs.85).aspx is archived and is not being maintained. [MS-ERREF]: Windows Error Codes Describes the HRESULT values, Win32 error codes, and NTSTATUS values that are referenced in the protocol specifications throughout the Windows protocols documentation set. This page and associated content may be updated frequently. We recommend you subscribe to the RSS feed to receive update notifications. Published Version Date Protocol Revision Revision Class Downloads 7/14/2016 16.0 Major https://msdn.microsoft.com/en-us/library/cc231196.aspx PDF | DOCX | Diff Click here to download a zip file of all PDF files for Windows Protocols. Previous Versions Date Protocol Revision Revision Class Downloads 10/16/2015 15.0 None PDF | DOCX 6/30/2015 15.0 Major PDF | DOCX 5/15/2014 14.2 None PDF | DOCX 2/13/2014 14.2 Minor PDF | DOCX 11/14/2013 14.1 Minor PDF | DOCX 8/8/2013 14.0 Major PDF | DOCX 1/31/2013 13.1 None 10/25/2012 13.1 None 7/12/2012 13.1 None 3/30/2012 13.1 Minor 12/16/2011 13.0 Major 9/23/2011 12.2 Minor 6/17/2011 12.1 Minor 5/6/2011 12.0 None 3/25/2011 12.0 Major 2/11/2011 11.0 None 1/7/2011 11.0 Major 11/19/2010 10.0 Major 10/8/2010 9.0.4 None 8/27/2010 9.0.4 None 7/16/2010 9.0.4 None 6/4/2010 9.0.4 Editorial 4/23/2010 9.0.3 Editorial 3/12/2010 9.0.2 Editorial 1/29/2010 9.0.1 Editorial 12/18/2009 9.0 Major 11/6/2009 8.2 Minor 9/25/2009 8.1 Minor 8/14/2009 8.0 Major 7/2/2009 7.1 Minor 5/22/2009 7.0 Major 4/10/2009 6.0 Major 2/27/2009 5.3.2 Editorial 1/16/2009 5.3.1 Editorial 12/5/2008 5.3 Minor 10/24/2008 5.2.3 Editorial 8/29/2008 5.2.2 Editorial 7/25/2008 5.2.1 Editorial 6/20/2008 5.2 Minor 5/16/2008 5.1.1 Editorial 3/14/2008 5.1 Minor 2/14/2008 5.0.3 Editorial Preview Versions From time to time, Microsoft may publish a preview, or pre-release, version of an Open Specifications technical document for community review and
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings http://stackoverflow.com/questions/9743749/whats-the-rule-on-hijacking-windows-error-codes-for-return-from-my-own-code and policies of this site About Us Learn more about Stack Overflow http://stackoverflow.com/questions/7008047/is-there-a-way-to-get-the-string-representation-of-hresult-value-using-win-api the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it hresult values only takes a minute: Sign up What's the rule on hijacking Windows error codes for return from my own code? up vote 4 down vote favorite 2 Are the error codes defined in WinError.h free to be hijacked and returned my by own code? There are some generic Win32 error codes defined: ERROR_FILE_NOT_FOUND: "The system cannot find the file specified." hresult values win32 that of course i could use for my own purpose when a file is not found. Then there are still some generic errors: ERROR_ACCESS_DENIED: "Access is denied." but it's generally understood that this error comes when trying to access a file. i might have an HttpGet() function that returns ERROR_ACCESS_DENIED if the server returns a 401. But then there are codes that are defined as being for a particular purpose. Imagine my HttpGet() function throws an error if the https certificate is not a type we support: ERROR_IPSEC_IKE_INVALID_CERT_TYPE: "Invalid certificate type" except that code is defined quite clearly in WinError.h as belonging to IPSec: /////////////////////////////////////////////////// // // // Start of IPSec Error codes // // // // 13000 to 13999 // /////////////////////////////////////////////////// ... // // MessageId: ERROR_IPSEC_IKE_INVALID_CERT_TYPE // // MessageText: // // Invalid certificate type // #define ERROR_IPSEC_IKE_INVALID_CERT_TYPE 13819L But the error text is exactly what i want! We have a financial system that requires a 2nd user to approve a transaction; this means that the entered credentials must be a different user than the first person: MK_
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Is there a way to get the string representation of HRESULT value using win API? up vote 26 down vote favorite 8 Is there a function in win API which can be used to extract the string representation of HRESULT value? The problem is that not all return values are documented in MSDN, for example ExecuteInDefaultAppDomain() function is not documented to return "0x80070002 - The system cannot find the file specified.", however, it does! Therefore, I was wondering whether there is a function to be used in common case. c++ windows winapi clr hresult share|improve this question asked Aug 10 '11 at 8:44 khkarens 4411414 2 Title is different, but essentially the answer will be the same as for this one. –Christian.K Aug 10 '11 at 8:49 add a comment| 3 Answers 3 active oldest votes up vote 43 down vote accepted You can use _com_error: _com_error err(hr); LPCTSTR errMsg = err.ErrorMessage(); If you don't want to use _com_error for whatever reason, you can still take a look at its source, and see how it's done. share|improve this answer edited Jul 24 at 19:43 Cory Nelson 17.1k23061 answered Aug 10 '11 at 8:50 eran 14.8k3371 thank you eran! –khkarens Aug 10 '11 at 8:58 2 A more complete sample for convenience: inline CString GetMessageForHresult(HRESULT hr) { _com_error error(hr); CString cs; cs.Format(_T("Error 0x%08x: %s"), hr, error.ErrorMessage()); return cs; } –nietras Feb 9 '12 at 15:55 add a comment| up vote 11 down vote The Windows API for this is FormatMessage. Here is a link that explains how to do it: How to obtain error messag