// Path: src/main/java/com/sun/jna/platform/win32/WinNT.java
// class HRESULT extends NativeLong {
// 	public HRESULT() {
//     		
// 	}
//     	
// 	public HRESULT(int value) {
// 		super(value);
// 	}
// }


import com.sun.jna.platform.win32.WinNT.HRESULT;
	//

	public static short HRESULT_SEVERITY(int hr) {
		return (short) ((hr >>= 31) & 0x1);
	}

	public static short SCODE_SEVERITY(short sc) {
		return (short) ((sc >>= 31) & 0x1);
	}

	//
	// Create an HRESULT value from component pieces
	//

	public static int MAKE_HRESULT(short sev, short fac, short code) {
		return ((sev << 31) | (fac << 16) | code);
	}

	public static final int MAKE_SCODE(short sev, short fac, short code) {
		return ((sev << 31) | (fac << 16) | code);
	}

	//
	// Map a WIN32 error value into a HRESULT
	// Note: This assumes that WIN32 errors fall in the range -32k to=32k.
	//
	// Define bits here so macros are guaranteed to work

	public static final int FACILITY_NT_BIT = 0x10000000;

// Path: src/main/java/com/sun/jna/platform/win32/WinNT.java
// class HRESULT extends NativeLong {
// 	public HRESULT() {
//     		
// 	}
//     	
// 	public HRESULT(int value) {
// 		super(value);
// 	}
// }


// Path: src/main/java/com/sun/jna/platform/win32/W32Errors.java
import com.sun.jna.platform.win32.WinNT.HRESULT;

	//

	public static short HRESULT_SEVERITY(int hr) {
		return (short) ((hr >>= 31) & 0x1);
	}

	public static short SCODE_SEVERITY(short sc) {
		return (short) ((sc >>= 31) & 0x1);
	}

	//
	// Create an HRESULT value from component pieces
	//

	public static int MAKE_HRESULT(short sev, short fac, short code) {
		return ((sev << 31) | (fac << 16) | code);
	}

	public static final int MAKE_SCODE(short sev, short fac, short code) {
		return ((sev << 31) | (fac << 16) | code);
	}

	//
	// Map a WIN32 error value into a HRESULT
	// Note: This assumes that WIN32 errors fall in the range -32k to=32k.
	//
	// Define bits here so macros are guaranteed to work

	public static final int FACILITY_NT_BIT = 0x10000000;

	public static final HRESULT HRESULT_FROM_WIN32(int x) {