Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
Delphi - (Delphi XE) Gestione File
Forum - Delphi - (Delphi XE) Gestione File

Avatar
camaleonteplus (Normal User)
Pro


Messaggi: 95
Iscritto: 05/03/2009

Segnala al moderatore
Postato alle 21:17
Martedì, 21/05/2013
Codice sorgente - presumibilmente Delphi

  1. function GetDisplayName(ShellFolder: IShellFolder; PIDL: PItemIDList;
  2.                         ForParsing: Boolean): string;
  3. var
  4.   StrRet: TStrRet;
  5.   P: PChar;
  6.   Flags: Integer;
  7. begin
  8.   Result := '';
  9.   if ForParsing then
  10.     Flags := SHGDN_FORPARSING
  11.   else
  12.     Flags := SHGDN_NORMAL;
  13.  
  14.   ShellFolder.GetDisplayNameOf(PIDL, Flags, StrRet);
  15.   case StrRet.uType of
  16.     STRRET_CSTR:
  17.       SetString(Result, StrRet.cStr, lStrLen(StrRet.cStr));
  18.     STRRET_OFFSET:
  19.       begin
  20.         P := @PIDL.mkid.abID[StrRet.uOffset - SizeOf(PIDL.mkid.cb)];
  21.         SetString(Result, P, PIDL.mkid.cb - StrRet.uOffset);
  22.       end;
  23.     STRRET_WSTR:
  24.       Result := StrRet.pOleStr;
  25.   end;
  26. end;


su questa riga:
Codice sorgente - presumibilmente Plain Text

  1. SetString(Result, StrRet.cStr, lStrLen(StrRet.cStr));


mi da questo errore:
[DCC Error] VListView.pas(204): E2010 Incompatible types: 'PWideChar' and 'array[0..259] of AnsiChar'
come posso risolvere il problema sotto delphi 7 funzionava. Ho allegato anche il sorgente.


camaleonteplus ha allegato un file: Virtual Listview.zip (21466 bytes)
Clicca qui per scaricare il file
PM Quote
Avatar
camaleonteplus (Normal User)
Pro


Messaggi: 95
Iscritto: 05/03/2009

Segnala al moderatore
Postato alle 9:19
Venerdì, 24/05/2013
Finche qualcuno non mi da una mano ho tamponato in questo modo:
Codice sorgente - presumibilmente Delphi

  1. procedure TForm1.BitBtn1Click(Sender: TObject);
  2. begin
  3. Vis.TabVisible := True;
  4. ShellExecute(handle, 'Explore', 'C:\Users\Public\Documents', nil, nil, SW_SHOWNORMAL);
  5. end;


PM Quote
Avatar
kriptos (Normal User)
Newbie


Messaggi: 9
Iscritto: 16/03/2009

Segnala al moderatore
Postato alle 5:28
Lunedì, 17/06/2013
potresti specificare quello che devi fare???

PM Quote