Typedef structs can include attributes identifying invalid handle values:
[RAIIFree("SetupDiDestroyDeviceInfoList")]
[InvalidHandleValue(-1L)]
[InvalidHandleValue(0L)]
[NativeTypedef]
public struct HDEVINFO
{
public IntPtr Value;
}
We should leverage these when creating the SafeHandle types.