All pastes #332178 Raw Edit

Miscellany

public text v1 · immutable
#332178 ·published 2007-01-29 20:03 UTC
rendered paste body
    If ValType = REG_MULTI_SZ Then
    Begin
      GetMem(Buff, ValLen);
      Try
        RegQueryValueEx(PKey, Value, NIL, NIL, pByte(Buff), @ValLen);
        G := Buff;
        SetLength(Strings, ValLen);
        While G^ <> #0 Do
        Begin
          sResult := sResult + G;
          Inc(G, lstrlen(G) + 1);
        End;
      Finally
        FreeMem(Buff);
        Result := sResult;
      End;