*push*
Any thoughts on improving this part:
Delphi-Quellcode:
{***********************************************************}
{ PasswordHashToBlobData: Converts a RDP password Hash to }
{ a DATA_BLOB structure }
{ sPasswordHash : RDP Password Hash (HEX String }
{***********************************************************}
function PasswordHashToBlobData(sPasswordHash: string): DATA_BLOB;
var Buf: array of Byte;
dwBufSize: Cardinal;
i: Cardinal;
j: Cardinal;
dwHashSize: Cardinal;
begin
dwBufSize := Length(sPassWordHash) DIV 2;
dwHashSize := Length(sPasswordHash);
SetLength(Buf, dwBufSize);
i := 1;
j := 0;
while i < dwHashSize do begin
Buf[j] := HexToByte(sPassWordHash[i] + sPassWordHash[i+1]);
Inc(i, 2);
Inc(j);
end;
GetMem(Result.pbData, dwBufSize);
Result.cbData := dwBufSize;
Result.pbData := PByte(Buf);
end;
BTW Functionally everything is working now, the hashed password also works after logout/login.