Convert Ntstatus To Error Code
Contents |
360 games PC games Windows rtlntstatustodoserror games Windows phone games Entertainment All Entertainment nt error codes Movies & TV Music Business & Education Business Students & educators Developers
Win32 Error Codes
Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security Internet
Hresult
Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Band Microsoft Lumia All Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
Practice Problems Quizzes Resources Source Code Source Code Snippets C and C++ Tips Finding a Job References Function Reference Syntax Reference Programming FAQ Getting Help Message Board Email About Us Convert NTSTATUS code to Win32 error source code This snippet submitted by Ian Abbott on 2012-02-24. It has been viewed 12132 times. Rating of 5.0 with 96 votes /* * This is an alternative to the RtlNtStatusToDosError() * function in ntdll.dll. It uses the GetOverlappedResult() * function in kernel32.dll to do the conversion. */ #include
Custom training mixed with consulting and focused directly on your specific areas of interest/concern. Check us out. OSR, the Windows driver experts. Upcoming OSR Seminars: Writing WDF Drivers I: Core Concepts Lab, Nashua (Amherst), NH 3-7 October, 2016 Writing WDF http://www.osronline.com/showthread.cfm?link=35227 Drivers II: Advanced Implementation Techniques Lab, Nashua (Amherst), NH 11-14 October, 2016 Kernel Debugging and Crash Analysis Lab, Nashua (Amherst), NH 17-21 October, 2016 Developing File Systems for Windows, Vancouver, BC 7-10 November, 2016 Windows Internals and Software Driver Development Lab, Nashua (Amherst), NH 14-18 November, 2016 Kernel Debugging and Crash Analysis Lab, Nashua (Amherst), NH 5-9 December, 2016 OSR Online Lists > ntdev converting from NTSTATUS code to Win32 error code error codes Welcome, Guest You must login to post to this list Message 1 of 6 16 Oct 0208:37 ntdev member 9235 xxxxxx@psi.ch Join Date: Posts To This List: 8 converting from NTSTATUS code to Win32 error codes Hi all In my device driver I try to complete an IRP with a certain error code to show the application what the problem is (i.e. STATUS_INVALID_HANDLE or STATUS_ILLEGAL_INSTRUCTION). According to convert ntstatus to the appendix A from Peter G.Viscarolas Driver book I should get the corresponding win32 error code, if I call straight after the DeviceIoControl() function the GetLastError() function. But it's not like that, no matter which STATUS_... code I choose, I always get the error code 2 (ERROR_FILE_NOT_FOUND) after calling the GetLastError(), I checked the return code from the DeviceIoControl() and it is really 0 (for error). Does somebody has a clue what the problem could be? Thanks for taking time Daniel Message 2 of 6 16 Oct 0210:38 ntdev member 9918 xxxxxx@utimaco.de Join Date: Posts To This List: 23 converting from NTSTATUS code to Win32 error codes You could save your driver's error within the driver and instead of calling GetLastError call the driver again to request it's last error. Else "Daniel Luethi"