public unsafe XIEventMask(int id, XIEventMasks m) { this.deviceid = id; this.mask_len = 4; this.mask = (XIEventMasks*) (void*) Marshal.AllocHGlobal(this.mask_len); *this.mask = m; }
public unsafe XIEventMask(int id, XIEventMasks m) { this.deviceid = id; this.mask_len = 4; this.mask = (XIEventMasks *)(void *)Marshal.AllocHGlobal(this.mask_len); *this.mask = m; }
public XIEventMask(int id, XIEventMasks m) { deviceid = id; mask_len = sizeof(XIEventMasks); unsafe { mask = (XIEventMasks*)Marshal.AllocHGlobal(mask_len); *mask = m; } }
public XIEventMask(int id, XIEventMasks m) { deviceid = id; mask_len = sizeof(XIEventMasks); unsafe { mask = (byte*)Marshal.AllocHGlobal(mask_len); for (int i = 0; i < mask_len; i++) mask[i] = (byte)((uint)m >> i*8); } }