If ValType = REG_MULTI_SZ Then Begin GetMem(Buff, ValLen); Try RegQueryValueEx(PKey, Value, NIL, NIL, pByte(Buff), @ValLen); G := Buff; While G^ <> #0 Do Begin Strings := Strings + pChar(G); Inc(G, lstrlen(G) + 1); End; Finally FreeMem(Buff); sResult := Copy(Strings, 1, Length(Strings)); Result := sResult; End; End;