1

Topic: Process cannot receive file access

... raised exception class EOLEException with message ' Process cannot receive file access,
As this file is occupied by other process'
Processes any still in the program
Does not form - only this exe. Anything unusual in the program.
Swears at information saving in a XML document.
xml_out: TXMLDocument;
...
xml_out. SaveToFile (file_out);
...
(In TMSDOMDocument.save)
In Thread Status normal 4 threads - process one - exe
Failure in something that
Undertakes from urlmon.dll (Windows XP Prof SP2).

2

Re: Process cannot receive file access

The file normally forms
Earlier the such was normally fulfilled
What context another can be?

3

Re: Process cannot receive file access

AlexandrPlus wrote:

... raised exception class EOLEException with message ' Process cannot receive file access,
As this file is occupied by other process'

The file is open by other program, if on the simple. Therefore also access is not present.

4

Re: Process cannot receive file access

Not absolutely truly, can be opened and this program, one is exact - it is opened.

5

Re: Process cannot receive file access

It is created and open by the same program - same exe, the same process.

6

Re: Process cannot receive file access

Here "" - only it
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms;
Dialogs, StdCtrls, Buttons;
XMLDoc, XMLIntf;
type
TForm1 = class (TForm)
BitBtn1: TBitBtn;
procedure BitBtn1Click (Sender: TObject);
private
{Private declarations}
public
{Public declarations}
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.BitBtn1Click (Sender: TObject);
var
Node_zapis_out: IXMLNode;
xml_out: TXMLDocument;
file_out: string;
begin
file_out: ='send.xml ';
FileCreate (file_out);
FileSetAttr (file_out, faArchive);
xml_out: = TXMLDocument. Create (Self);
xml_out. Active: = true;
xml_out. Version: = ' 1.0 ';
xml_out. Encoding: = ' UTF-8 ';
xml_out. StandAlone: = ' no ';
xml_out. AddChild (' PATIENTS');
Node_zapis_out:=xml_out.DocumentElement.AddChild (' PATIENT ');
Node_zapis_out. AddChild (' ID ').Text: =
' 8a87a88115f0b0d70115f0e86c1b0004 ';
Node_zapis_out. AddChild (' FAMILY ').Text: =
' Abramovich ';
xml_out. SaveToFile (file_out);
end;
end.
And by what else other process can be occupied?
Otherwise to try with files?

7

Re: Process cannot receive file access

Semaphores or  should help.
 

8

Re: Process cannot receive file access

It if some flows)

9

Re: Process cannot receive file access

Marauder wrote:

It if some flows)

Terminological dregs are - stream or thread or process - at all before
Here weigh the code - if is slightly time - in uses XMLDoc, XMLIntf - the button and in the button handler this code and....
Process one - exe - creates a file and tries to save in a file and "that in soup does not suffice"

10

Re: Process cannot receive file access

var
Node_zapis_out: IXMLNode;
xml_out: TXMLDocument;
file_out: string;
begin
file_out: ='send.xml ';
xml_out: = TXMLDocument. Create (Self);
xml_out. Active: = true;
xml_out. Version: = ' 1.0 ';
xml_out. Encoding: = ' UTF-8 ';
xml_out. StandAlone: = ' no ';
xml_out. AddChild (' PATIENTS');
Node_zapis_out:=xml_out.DocumentElement.AddChild (' PATIENT ');
Node_zapis_out. AddChild (' ID ').Text: =
' 8a87a88115f0b0d70115f0e86c1b0004 ';
Node_zapis_out. AddChild (' FAMILY ').Text: =
' Abramovich ';
xml_out. SaveToFile (file_out);//procedure itself creates a file
FileSetAttr (file_out, faArchive);
xml_out.free;
end;

11

Re: Process cannot receive file access

Thanks
And even somehow on source codes XMLDoc-> xmldom->... An output through COM-interfaces on itself DOM

12

Re: Process cannot receive file access

Try to add a small slice of the code.

 xml_out.async: = false; 

To me !