int[] buffer = new int[1]; int ptr1 = OS.NewPtr(4); buffer[0] = value; OS.memcpy(ptr1, buffer, 4);
int ptr1 = OS.NewPtr(size); if (size == 1) { byte[] buffer = new byte[1]; buffer[0] = (byte) value; OS.memcpy(ptr1, buffer, size); } else { int[] buffer = new int[1]; buffer[0] = value; OS.memcpy(ptr1, buffer, size); }
void setLayoutControl(int tag, int value, int size) {	int[] buffer = new int[1];	int ptr1 = OS.NewPtr(4);	buffer[0] = value;	OS.memcpy(ptr1, buffer, 4);	int[] tags = new int[]{tag};	int[] sizes = new int[]{size};	int[] values = new int[]{ptr1};	OS.ATSUSetLayoutControls(layout, tags.length, tags, sizes, values);	OS.DisposePtr(ptr1);}