if (OS.RegQueryValueEx (phkResult [0], lpValueName, 0, null, null, lpcbData) == 0) {
if (OS.RegQueryValueEx (phkResult [0], (TCHAR) null, 0, null, null, lpcbData) == 0) {
static String getKeyValue (String string, String value, boolean expand) {	/* Use the character encoding for the default locale */	TCHAR key = new TCHAR (0, string, true);	int [] phkResult = new int [1];	if (OS.RegOpenKeyEx (OS.HKEY_CLASSES_ROOT, key, 0, OS.KEY_READ, phkResult) != 0) {		return null;	}	TCHAR lpValueName = value == null ? null : new TCHAR (0, value, true);	String result = null;	int [] lpcbData = new int [1];	if (OS.RegQueryValueEx (phkResult [0], lpValueName, 0, null, null, lpcbData) == 0) {		/* Use the character encoding for the default locale */		TCHAR lpData = new TCHAR (0, lpcbData [0] / TCHAR.sizeof);		if (OS.RegQueryValueEx (phkResult [0], lpValueName, 0, null, lpData, lpcbData) == 0) {			if (!OS.IsWinCE && expand) {				int nSize = OS.ExpandEnvironmentStrings (lpData, null, 0);				TCHAR lpDst = new TCHAR (0, nSize);				OS.ExpandEnvironmentStrings (lpData, lpDst, nSize);				result = lpDst.toString (0, Math.max (0, nSize - 1));			} else {				int length = Math.max (0, lpData.length () - 1);				result = lpData.toString (0, length);			}		}	}	if (phkResult [0] != 0) OS.RegCloseKey (phkResult [0]);	return result;}