![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
#1
|
|||
|
|||
|
IOResult 64 bit
Hola y Feliz año nuevo a tod@s!!
Tengo un sistema de 6 pc-s que se conectan a un "servidor" y escriben y leen en el mismo una seríe de ficheros. Uso el siguiente código: Código:
function ComprobarUnidad(AUnidad: String): Boolean;
var
f: Text;
begin
ComprobarUnidad := False;
…
Assign(f, AUnidad + '\flag.txt');
{$I-}
Rewrite(f);
{$I+}
if IOResult = 0 then begin
{$I-}
Writeln(f, 'OK');
{$I+}
ComprobarUnidad := IOResult = 0;
Close(f);
end;
end;
Tanto el servidor como los pc-s que se conectan tiene XP. Uso (aún) Delphi7. El asunto es que quiero (más bien mi jefe) ponerle al servidor un windows7 a 64 bits. Y es aquí donde empiezan mis problemas. Si el fichero flag.txt no existe no hay ningún problema, pero si existe este mismo código no funciona, ya que IOResult <> 0. Pero si hago un Código:
showmessage(inttostr(IOResult)) Código:
function ComprobarUnidad(AUnidad: String): Boolean;
var
f: Text;
resultado64Bits :Int64;
begin
ComprobarUnidad := False;
…
Assign(f, AUnidad + '\flag.txt');
{$I-}
Rewrite(f);
{$I+}
resultado64Bits := IOResult;
if IOResult = 0 then begin
{$I-}
Writeln(f, 'OK');
{$I+}
ComprobarUnidad := IOResult = 0;
Close(f);
end;
end;
Código:
showmessage(inttostr(resultado64Bits)) = 0 Código:
showmessage(inttostr(resultado64Bits)) = 5 http://www.freepascal.org/docs-html/.../ioresult.html me dice que es un acceso denegado. Pero el usuario que lo crea tiene control total en el "servidor". ¿Alguien tiene un sistema mixto 32 / 64 bits?¿Alguien ha tenido problemas parecidos al pasar a 64bits? Muchas gracias! |
| Herramientas | Buscar en Tema |
| Desplegado | |
|
|
|