EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Having big problems.

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#108
Posted: 05/01/2006 06:24:35
by Brett Graffin (Standard support level)
Joined: 04/28/2006
Posts: 3

Below is my actual code useage of Get-SetFileTag. I cannot get it to read back correctly after setting it. What am I doing wrong? If anybody can help, please...

var
sStr : string;

SolFS.GetFileTagInfo(FName, 34500, TagExists);
if(TagExists = TRUE) then
begin
SolFS.GetFileTag(FName, 34500, @sStr[1], nTagSize);
RzMemo_1.Text := sStr;
end;

sStr := Trim(RzMemo_1.Text);
SolFS.SetFileTag(FName, 34500, @sStr[1], Length(sStr));
#109
Posted: 05/01/2006 06:43:17
by Eugene Mayevski (EldoS Corp.)

GetFileTagInfo returns the size of the tag data. You need to allocate buffer space before calling GetFileTag. I.e.


Code
nTagSize := SolFS.GetFileTagInfo(FName, 34500, TagExists);
if(TagExists = TRUE) then
begin
  SetLength(sStr, nTagSize);
  SolFS.GetFileTag(FName, 34500, @sStr[1], nTagSize);


Also, remember that tag size should not exceed PageSize-32 bytes.


Sincerely yours
Eugene Mayevski

Reply

Statistics

Topic viewed 4345 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!