I have the following code:
Every time this section is executed, a EMF file is created in %LOCALAPPDATA%.
There is a first chance exception on the closing brace (i.e. the Dispose call) "The process cannot access the file 'C:\Users\kg\AppData\Local\9333da9f-ef9d-4fd1-ab8a-66d8b0647bc0.emf' because it is being used by another process." Here is the call stack:
Using Sysinternals ProcessExplorer I found that there is no other process having an open handle to the file (only my program itself).
Klaus
Edit: Maybe this is the same problem as in the post "Problem with ReaderWmf Class in Web Service (WCF)". The metaFile variable in my code snippet is indeed a Stream.
Code:
using (ReaderWmf reader = new ReaderWmf())
{
Image image = reader.ReadGeometry(metaFile, geometrySettings);
// ...
}
Every time this section is executed, a EMF file is created in %LOCALAPPDATA%.
There is a first chance exception on the closing brace (i.e. the Dispose call) "The process cannot access the file 'C:\Users\kg\AppData\Local\9333da9f-ef9d-4fd1-ab8a-66d8b0647bc0.emf' because it is being used by another process." Here is the call stack:
Code:
mscorlib.dll!System.IO.__Error.WinIOError(int errorCode = 0x80070020, string maybeFullPath = "C:\\Users\\kg\\AppData\\Local\\9333da9f-ef9d-4fd1-ab8a-66d8b0647bc0.emf") + 0x321 Bytes
mscorlib.dll!System.IO.File.Delete(string path) + 0x99 Bytes
Ab2d.ReaderWmf.dll!Ab2d.ReaderWmf.ر() + 0x6c Bytes
Ab2d.ReaderWmf.dll!Ab2d.ReaderWmf.Dispose(bool disposing = true) + 0x2b Bytes
Ab2d.ReaderWmf.dll!Ab2d.ReaderWmf.Dispose() + 0x22 Bytes
Using Sysinternals ProcessExplorer I found that there is no other process having an open handle to the file (only my program itself).
Klaus
Edit: Maybe this is the same problem as in the post "Problem with ReaderWmf Class in Web Service (WCF)". The metaFile variable in my code snippet is indeed a Stream.