Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > OOP
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #6  
Antiguo 25-02-2008
Mav Mav is offline
Miembro
 
Registrado: jun 2007
Posts: 39
Poder: 0
Mav Va por buen camino
Sigo tratando de resolver los múltiples errores de compilación que me da el Ares,
estoy parado aquí ahora....no lo encuentro..????

Código Delphi [-]
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;
En esta linea es donde dá el siguiente error:
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 Delphi [-]
IShellLinkW = interface(IUnknown) { sl }
    [SID_IShellLinkW]
    function GetPath(pszFile: PWideChar; cchMaxPath: Integer;
      var pfd: TWin32FindDataW; fFlags: DWORD): HResult; stdcall;

De la "Guia de Referencia de Delphi":

(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.
Código Delphi [-]
program Produce;
procedure SwapBytes(var B1, B2: Byte);
var
Temp: Byte;
begin
Temp := B1; B1 := B2; B2 := Temp;
end;
var
C1, C2: 0..255; (*Similar to a byte, but NOT identical*)
begin
SwapBytes(C1,C2); (*<-- Error message here*)
end.
Arguments C1 and C2 are not acceptable to SwapBytes, although they have the exact memory representation and range that a
Byte has.
Código Delphi [-]
program Solve;
procedure SwapBytes(var B1, B2: Byte);
var
Temp: Byte;
begin
Temp := B1; B1 := B2; B2 := Temp;
end;
var
C1, C2: Byte;
begin
SwapBytes(C1,C2); (*<-- No error message here*)
end.
So you actually have to declare C1 and C2 as Bytes to make this example compile.
He realizado varias pruebas, pero, no lo pillo....
¿Alguna idea? Por supuesto gracias de antemano...
Saludos
Miguel
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Problemas Compilando Ares suko Varios 7 07-01-2008 11:33:25
Error compilando proyecto D7 en D2006 hibero Varios 2 20-04-2006 21:50:32
P2P con Delphi, Ares Galaxy Delfino Noticias 4 09-12-2005 02:27:07


La franja horaria es GMT +2. Ahora son las 18:59:09.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi