All pastes #336202 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-02-01 21:38 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;
        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;