JNA API 3.5.1
com.sun.jna.platform.win32

Class W32Errors

  • All Implemented Interfaces:
    WinError


    public abstract class W32Errors
    extends Object
    implements WinError
    Utility class for some common error functions.
    • Constructor Detail

      • W32Errors

        public W32Errors()
    • Method Detail

      • SUCCEEDED

        public static final boolean SUCCEEDED(int hr)
        Generic test for success on any status value (non-negative numbers indicate success).
      • FAILED

        public static final boolean FAILED(int hr)
        and the inverse
      • HRESULT_CODE

        public static final int HRESULT_CODE(int hr)
        Extract error code from HRESULT
      • SCODE_CODE

        public static final int SCODE_CODE(int sc)
        Extract error code from SCODE
      • HRESULT_FACILITY

        public static final int HRESULT_FACILITY(int hr)
        Return the facility
      • SCODE_FACILITY

        public static final int SCODE_FACILITY(short sc)
      • HRESULT_SEVERITY

        public static short HRESULT_SEVERITY(int hr)
        Return the severity
      • SCODE_SEVERITY

        public static short SCODE_SEVERITY(short sc)
      • MAKE_HRESULT

        public static int MAKE_HRESULT(short sev,
                       short fac,
                       short code)
        Create an HRESULT value from component pieces
      • MAKE_SCODE

        public static final int MAKE_SCODE(short sev,
                     short fac,
                     short code)
      • HRESULT_FROM_WIN32

        public static final WinNT.HRESULT HRESULT_FROM_WIN32(int x)
        Map a WIN32 error value into a HRESULT Note: This assumes that WIN32 errors fall in the range -32k to=32k.
        Parameters:
        x - original w32 error code
        Returns:
        the converted value
      • FILTER_HRESULT_FROM_FLT_NTSTATUS

        public static final int FILTER_HRESULT_FROM_FLT_NTSTATUS(int x)
        FACILITY_USERMODE_FILTER_MANAGER Translation macro for converting: NTSTATUS --> HRESULT
JNA API 3.5.1

Copyright © 2007-2012 Timothy Wall. All Rights Reserved.