[fpc-pascal]Run Time Error codes

Eduardo Morras nec556 at ave128.retena.es
Wed Jan 29 17:51:53 CET 2003


At 19:56 28/01/2003 +0100, you wrote:

>On zaterdag, jan 25, 2003, at 02:34 Europe/Brussels, Eduardo Morras wrote:
>
>>         Does anyone knows what means the next error codes: 998, 313. And 
>> where find information about the applications exit code?
>
>Such strange error codes are error codes that come straight from the 
>operating system and which are for some reason not properly translated by 
>the RTL. If you say which routines cause such errors, we an have a look at 
>them.
>
>
>Jonas

Well, i rewrote some parts of the app, and have no backup copies, but the 
998 error dissapear when i rewrote the second BlockRead call in:

{OLD}

procedure LeerFrame(leidos : longint);

Type
    Tdummy = array[1..8] of byte;
var
    dummy : ^Tdummy;
begin
      GetMem(dummy,sizeof(Tdummy));
      leidos := 0;
      BlockRead(FileIN,FrameRGB,CIFW*CIFH*3,leidos);
      LeerFrameOK := TRUE;
      BlockRead(FileIN,dummy,8); {THIS ONE}
      FreeMem(dummy,sizeof(Tdummy));
end;

{NEW}

procedure LeerFrame(leidos : longint);

var
    a,b   : longint;
begin
      leidos := 0;
      BlockRead(FileIN,FrameRGB,CIFW*CIFH*3,leidos);
      if leidos=(CIFW*CIFH*3) then begin
         BlockRead(FileIN,a,4);
         BlockRead(FileIN,b,4);
         LeerFrameOK := TRUE;
      end;
end;

The BlockRead doesn´t need a 4th var because it's for padding. But it gets 
an error on the first read, when i have near 7000.

So, i can find the error codes in win32API help?

ATIA

P.S. The file is an RGB AVI uncompressed, between frames are 8 bytes.


------------------------------------------------------------------------------------------------------------------------------------------------------------
#The Unix Guru's View of Sex unzip ; strip ; touch ; grep ; finger ; mount 
; fsck ; more ; yes ; umount ; sleep





More information about the fpc-pascal mailing list