FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
Herramientas | Buscar en Tema | Desplegado |
#1
|
|||
|
|||
ERROR:ShLink.GetPath(Buffer, Sizeof(Buffer), Data, SLGP_UNCPRIORITY)
Código:
function estrai_path_da_lnk(filen:widestring):widestring; var AnObj: IUnknown; ShLink: IShellLinkW; PFile: IPersistFile; Data: TWin32FindData; Buffer: array [0..255] of widechar; begin result:=''; try AnObj := CreateComObject(CLSID_ShellLink); ShLink := AnObj as IShellLinkW; PFile := AnObj as IPersistFile; PFile.Load(PWChar(FileN), STGM_READ); ShLink.GetPath(Buffer, Sizeof(Buffer), Data, SLGP_UNCPRIORITY); result := Buffer; except end; end; ShLink.GetPath(Buffer, Sizeof(Buffer), Data, SLGP_UNCPRIORITY); [DCC Error] helper_urls.pas(153): E2033 Types of actual and formal var parameters must be identical En ShlObj.pas: Código:
IShellLinkW = interface(IUnknown) { sl } [SID_IShellLinkW] function GetPath(pszFile: PWideChar; cchMaxPath: Integer; var pfd: TWin32FindDataW; fFlags: DWORD): HResult; stdcall; (E2033)Types of actual and formal var parameters must be identical: For a variable parameter, the actual argument must be of the exact type of the formal parameter. He cambiado declaraciones de variables, modificado parámetros ,en fin le he dado a esto muchas vueltas...No le encuentro la solución. ¿Podria alguien ayudarme? ¡ Gracias! Saludos a todos. |
#2
|
||||
|
||||
Hola, prueba cambiando
por
El error ya te esta dando una pista de cual es el problema, que los tipos deben ser identicos, y si te fijas el tipo del parametro pfd es TWin32FindDataW y no TWin32FindData. Cita:
|
#3
|
|||
|
|||
Si,si! ¡Correcto, muchas gracias!
Como no lo ví, si lo tenía delante... Saludos |
|
|
Temas Similares | ||||
Tema | Autor | Foro | Respuestas | Último mensaje |
solucion a Error Invalid blob handle in record buffer | memehua | Conexión con bases de datos | 2 | 26-09-2011 22:03:14 |
Editar un buffer | JoseFco | OOP | 42 | 13-10-2008 16:17:00 |
Bitmap buffer | fitolanga | Gráficos | 4 | 21-04-2007 15:58:29 |
Error Invalid blob handle in record buffer??? sin usar "Blobs to cache" | varuhs | Conexión con bases de datos | 4 | 22-01-2007 21:19:53 |
Problema con Double Buffer | guillonet | C++ Builder | 0 | 29-08-2006 19:26:22 |
|