I am writing a DLL in Delphi 5 that needs to open text files and then perform analysis on the contents of the file. This is all fine when i write it in a standard EXE but when i try and run the code in a DLL I get a EInOutError exception.
My code looks like this:
Any help, suggestions, pointers, etc. would be gratefully received.
Matt.
My code looks like this:
Code:
function bIsDestinationAvailable(i_sPath, i_sPcode: String): Boolean; stdcall;
var
F1: TextFile;
sPcodeDat: String;
begin
AssignFile(F1, i_sPath) ;
Reset(F1) ; //This line causing an I/O error
Read(F1, sPcodeDat) ;
CloseFile(F1) ;
....
end;
Any help, suggestions, pointers, etc. would be gratefully received.
Matt.