Winword problem w/ a DeleteFile call after a Navigate call 
Author Message
 Winword problem w/ a DeleteFile call after a Navigate call

I use IE in an ATL project to see local file on HD.

I load an Office document (rtf file) through ShellExplorer with
Navigate.
This file is a temporary file that I want to delete after the next
Navigate call.
When I call DeleteFile for the temporary file, GetLastError return me
that an ERROR_SHARING_VIOLATION error was happened, even if the new
file to load is another rtf file format.

Thanks for any help.

------------
Olivier



Sun, 11 Jul 2004 01:00:59 GMT  
 Winword problem w/ a DeleteFile call after a Navigate call
Try waiting for the next Navigate call to complete, or at least reach
NavigateComplete event.
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


Quote:
> I use IE in an ATL project to see local file on HD.

> I load an Office document (rtf file) through ShellExplorer with
> Navigate.
> This file is a temporary file that I want to delete after the next
> Navigate call.
> When I call DeleteFile for the temporary file, GetLastError return me
> that an ERROR_SHARING_VIOLATION error was happened, even if the new
> file to load is another rtf file format.

> Thanks for any help.

> ------------
> Olivier



Sun, 11 Jul 2004 03:27:42 GMT  
 Winword problem w/ a DeleteFile call after a Navigate call
Hello Olivier,

Just few assumptions: (a) sometime IE holds ActiveX controls / ActiveX
documents in the cache. (b) Word out-of-proc server requires in some delay
to be unloaded. You can try to close office document manually before
navigating to new page, e.g. retrieve office object model and close current
rtf document via automation.

Cheers,

--
Best regards,
Vadim Melnik,
_____________________
http://www.docsultant.com/


Quote:
> I use IE in an ATL project to see local file on HD.

> I load an Office document (rtf file) through ShellExplorer with
> Navigate.
> This file is a temporary file that I want to delete after the next
> Navigate call.
> When I call DeleteFile for the temporary file, GetLastError return me
> that an ERROR_SHARING_VIOLATION error was happened, even if the new
> file to load is another rtf file format.

> Thanks for any help.

> ------------
> Olivier



Sun, 11 Jul 2004 06:26:20 GMT  
 Winword problem w/ a DeleteFile call after a Navigate call
Have a look at [1], [2]

[1] Q177269, "PRB: Internet Explorer 4.0 Keeps Active Document Servers
Running".
[2] Q167230, "HOWTO: Detect When Internet Explorer Holds Controls and Pages
in Memory".

All the best,
Vadim.


Quote:
> Hello Olivier,

> Just few assumptions: (a) sometime IE holds ActiveX controls / ActiveX
> documents in the cache. (b) Word out-of-proc server requires in some delay
> to be unloaded. You can try to close office document manually before
> navigating to new page, e.g. retrieve office object model and close
current
> rtf document via automation.

> Cheers,

> --
> Best regards,
> Vadim Melnik,
> _____________________
> http://www.docsultant.com/



> > I use IE in an ATL project to see local file on HD.

> > I load an Office document (rtf file) through ShellExplorer with
> > Navigate.
> > This file is a temporary file that I want to delete after the next
> > Navigate call.
> > When I call DeleteFile for the temporary file, GetLastError return me
> > that an ERROR_SHARING_VIOLATION error was happened, even if the new
> > file to load is another rtf file format.

> > Thanks for any help.

> > ------------
> > Olivier



Sun, 11 Jul 2004 19:51:05 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Help with WinExec function to call Winword...

2. Call and navigate browser

3. calling navigate on mshtml

4. Problem calling into managed DLL that calls unmanaged DLL

5. NEWBIE calling ATL gods: Problem in calling DOM object

6. CMap call within function call problem

7. Asynchronous calls some times doesn't call

8. Calling __unhook when no __hook has been called

9. C# client crashs when calling into Managed C++ which calls unmanaged c++ function

10. destructor is called before copy-constructor on temporary class (allocated on stack during function call)

11. HELP:perform system call or call an external program

12. call-by value vs. call by reference

 

 
Powered by phpBB® Forum Software