• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 293
  • Last Modified:

How to convert binary data to string

 Registry.RootKey := HKEY_CURRENT_USER;
  Registry.OpenKey('\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\Folder',False)
   Registry.ReadBinaryData('VALUE7', Buffer , Sizeof(Buffer))
  How to convert binary data to string.

0
rsivam
Asked:
rsivam
1 Solution
 
merry_princeCommented:
Carry out below method, you can use buffer var as string.

var Registry: TRegistry;
   Buffer   : array[1..255] of char;
   isize : Integer;
begin
  Registry := TRegistry.Create;

  Registry.RootKey := HKEY_LOCAL_MACHINE;
  Registry.OpenKey('\SOFTWARE\Prn\DEMO2',False);
  iSize := sizeof(Buffer);
  Registry.ReadBinaryData('PASSWD', Buffer, isize);
  Registry.Free;
  Buffer[isize] := #0;
  ShowMessage(buffer);
end;
0
 
CleanupPingCommented:
rsivam:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
snehanshuCommented:
Hi!
No comment has been added lately and this question is therefore classified abandoned.

If asker wishes to close the question, then refer to
http://www.experts-exchange.com/help/closing.jsp

Otherwise, I will leave a recommendation in the Cleanup topic area that this question is:

Answered by: merry_prince

Please leave any comments here within the next seven days. It is assumed that any participant not responding to this request is no longer interested in its final disposition.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

...Snehanshu
EE Cleanup Volunteer
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now