allow REG_EXPAND_SZ keys in Windows registry (from
Gurusamy Sarathy [Fri, 28 Apr 2000 20:11:20 +0000 (20:11 +0000)]
John Clayton <John.Clayton@barclayscapital.com>)

p4raw-id: //depot/perl@6003

win32/win32.c

index 840274b..e10b115 100644 (file)
@@ -177,7 +177,9 @@ get_regstr_from(HKEY hkey, const char *valuename, SV **svp)
     if (retval == ERROR_SUCCESS) {
        DWORD datalen;
        retval = RegQueryValueEx(handle, valuename, 0, &type, NULL, &datalen);
-       if (retval == ERROR_SUCCESS && type == REG_SZ) {
+       if (retval == ERROR_SUCCESS
+           && (type == REG_SZ || type == REG_EXPAND_SZ))
+       {
            dTHXo;
            if (!*svp)
                *svp = sv_2mortal(newSVpvn("",0));