EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Having big problems.

Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.
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...

sStr : string;

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

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

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

nTagSize := SolFS.GetFileTagInfo(FName, 34500, TagExists);
if(TagExists = TRUE) then
  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



Topic viewed 5646 times

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


Back to top

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

Got it!