![]() |
uses JwaWinCrypt für RDC / wo finde ich das
Ich möchte aus Delphi den Remote Desktop Client (RDC) aufrufen. Zu diesem Aufruf möchte ich das Passwort hinterlegen können. Dazu habe ich bereits folgenden Eintrag gefunden, siehe unten, aber dieses JwaWinCrypt finde ich einfach nicht... :-(. Kann mir jemand helfen wo das zu finden ist (habe bereits über google gesucht). Vielen Dank für Eure Hilfe.
Delphi-Quellcode:
[edit=Matze][delphi]-Tags repariert. MfG, Matze[/edit]
uses JwaWinCrypt;
function CryptRDPPassword(sPassword: string): string; var DataIn: DATA_BLOB; DataOut: DATA_BLOB; pwDescription: PWideChar; P: PByte; I: Integer; PwdHash: string; begin PwdHash := ''; DataOut.cbData := 0; DataOut.pbData := nil; // RDP uses UniCode DataIn.pbData := Pointer(WideString(sPassword)); DataIn.cbData := Length(sPassword) * SizeOf(WChar); // RDP always sets description to psw pwDescription := WideString('psw'); if CryptProtectData(@DataIn, pwDescription, nil, nil, nil, CRYPTPROTECT_UI_FORBIDDEN, // Never show interface @DataOut) then begin // Convert the DataBlob to Hex String P := DataOut.pbData; I := DataOut.cbData; PwdHash := ''; while (I > 0) do begin Dec(I); PwdHash := PwdHash + IntToHex(P^, 2); Inc(P); end; end; Result := PwdHash; // Cleanup pwDescription := nil; LocalFree(Cardinal(DataOut.pbData)); LocalFree(Cardinal(DataIn.pbData)); end; |
Re: uses JwaWinCrypt für RDC / wo finde ich das
|
Re: uses JwaWinCrypt für RDC / wo finde ich das
danke für den Tipp. War auf der Seite, welche Datei muss ich jetzt genau herunterladen, wie wird diese implementiert.
Sorry check das nicht ganz. Danke!! |
Re: uses JwaWinCrypt für RDC / wo finde ich das
habs gefunden!
vielen Dank! |
Re: uses JwaWinCrypt für RDC / wo finde ich das
It always amazes me that the Jedi Apilib project is unknown for many people. Perhaps we can a sticky post of what is and where to find it (Can one of the Mods take care of this)?
Thank you! |
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:04 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz