Created
November 2, 2016 08:52
-
-
Save toptensoftware/9ce3b2f543ac095ea74cdc2cea22aaa9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[MappedType] | |
public struct HDC | |
{ | |
// Win32 handle value | |
public IntPtr value; | |
// The map | |
public static HandleMap Map = new HandleMap(); | |
// Methods required by MappedType's | |
public static HDC To32(ushort hDC) { return new HDC() { value = Map.To32(hDC) }; } | |
public static ushort To16(HDC hDC) { return Map.To16(hDC.value); } | |
// Other helpers | |
public static implicit operator HDC(IntPtr value) { return new HDC() { value = value }; } | |
public static HDC Null = IntPtr.Zero; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment