procedure TForm1.Button1Click(Sender: TObject);
var
P : PWideChar;
NewPIDL, RenPIDL, PathPIDL: PItemIDList;
Flags,NumChars : LongWord;
//Index: Integer;
NewShellFolder : IShellFolder;
Value, PathValue : string;
begin
SHGetDesktopFolder(FIDesktopFolder);
Value := 'hubdog.txt';
PathValue := 'C:\';
NumChars := Length(PathValue);
Flags := 0;
P := StringToOleStr(PathValue);
OLECheck(FIDesktopFolder.ParseDisplayName(Application.Handle,nil,P,NumChars,PathPIDL,Flags));
OLECheck(FIDesktopFolder.BindToObject(PathPIDL,nil,IID_IShellFolder,Pointer(NewShellFolder)));
NumChars := Length(Value);
Flags := 0;
P := StringToOleStr(Value);
OLECheck(NewShellFolder.ParseDisplayName( Application.Handle,nil,P,NumChars,NewPIDL,Flags));
if NewShellFolder.SetNameOf(Application.Handle,NewPIDL,StringToOleStr('newhubdog.txt'),128, RenPIDL) = noerror then
showmessage('ok');
//SHChangeNotify(SHCNE_RENAMEITEM,SHCNF_FLUSH,NewPIDL,nil);
end;