[fpc-devel]Bugs in DosCalls.pas

KO Myung-Hun komh at chollian.net
Tue Oct 24 15:11:00 CEST 2000


Hi/2 all.

I found bugs in doscalls.pas.

First, prototype of DosDevIOCtl function is incorrect. DataLen argument
need not 'var'. So prototype of DosDevIOCtl must be not

function DosDevIOCtl(Handle,Category,Func:longint;var Params;
                     ParamLen:longint;var ParamSize:longint;
                     var Data;var DataLen:longint;var DataSize:
                     longint):longint; cdecl;

but

function DosDevIOCtl(Handle,Category,Func:longint;var Params;
                     ParamLen:longint;var ParamSize:longint;
                     var Data;DataLen:longint;var DataSize:
                     longint):longint; cdecl;

Second is DosSetFilePtr function. Original functions from DOSCALL.DLL

must be declared 'cdecl' model. But helper(?) function is not. In

addtion, in case of DosSetFilePtr, If DosSetFilePtr helper function is

declared 'cdecl', then programs calling DosSetFilePtr encounter SYS3171

error.

So, 'cdecl' of helper of DosSetFilePtr is removed.

By the way, why programs calling DosSetFilePtr encounter SYS3171 ?

In reamrk of doscalls.pas, Daniel said that helper is regardless to

'cdecl'.

What's the problem ?

For better FPC !!!

    from KO Myung-Hun...







More information about the fpc-devel mailing list