int lpMultiByteStr = COM.GlobalLock(stgmedium.unionField);
int hMem = stgmedium.unionField; int lpMultiByteStr = COM.GlobalLock(hMem);
public 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();	STGMEDIUM stgmedium = new STGMEDIUM();	FORMATETC formatetc = transferData.formatetc;	stgmedium.tymed = COM.TYMED_HGLOBAL;		transferData.result = data.GetData(formatetc, stgmedium);	data.Release();		if (transferData.result != COM.S_OK) return null;	int lpMultiByteStr = COM.GlobalLock(stgmedium.unionField);	if (lpMultiByteStr != 0) {		try {			int cchWideChar  = OS.MultiByteToWideChar (CodePage, OS.MB_PRECOMPOSED, lpMultiByteStr, -1, null, 0);			if (cchWideChar != 0) {				char[] lpWideCharStr = new char [cchWideChar - 1];				OS.MultiByteToWideChar (CodePage, OS.MB_PRECOMPOSED, lpMultiByteStr, -1, lpWideCharStr, lpWideCharStr.length);				return new String(lpWideCharStr);			}		} finally {			COM.GlobalUnlock(lpMultiByteStr);		}	}	return null;}