ich versuchs jetzt erstmal hiermit ...
Code:
function IsFileInUse(FileName: string): boolean;
var HFileRes: HFILE;
begin
HFileRes:=CreateFile(PChar(FileName), GENERIC_READ or GENERIC_WRITE, 0, nil,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
result:=HFileRes=INVALID_HANDLE_VALUE;
if not result then CloseHandle(HFileRes);
end;