int size = OS.GlobalSize(stgmedium.unionField);
int hMem = stgmedium.unionField; int size = OS.GlobalSize(hMem);
protected Object nativeToJava(TransferData transferData){		if (!isSupportedType(transferData) || transferData.pIDataObject == 0) {		transferData.result = COM.E_FAIL;		return null;	}		IDataObject data = new IDataObject(transferData.pIDataObject);	data.AddRef();		FORMATETC formatetc = transferData.formatetc;	STGMEDIUM stgmedium = new STGMEDIUM();	stgmedium.tymed = COM.TYMED_HGLOBAL;		transferData.result = data.GetData(formatetc, stgmedium);	data.Release();			if (transferData.result != COM.S_OK) {		return null;	}		int size = OS.GlobalSize(stgmedium.unionField);	byte[] buffer = new byte[size];	int ptr = OS.GlobalLock(stgmedium.unionField);	OS.MoveMemory(buffer, ptr, size);	OS.GlobalUnlock(ptr);		OS.GlobalFree(stgmedium.unionField);			return buffer;}