Click here to Skip to main content
15,914,419 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralThe format of the file 'system' is invalid. Pin
Anonymous2-Mar-05 7:51
Anonymous2-Mar-05 7:51 
GeneralRe: The format of the file 'system' is invalid. Pin
Dave Kreskowiak4-Mar-05 3:21
mveDave Kreskowiak4-Mar-05 3:21 
GeneralStreamReader constructor fails in FileWatcher event handler Pin
2-Mar-05 4:27
suss2-Mar-05 4:27 
GeneralRe: StreamReader constructor fails in FileWatcher event handler [Edit] Pin
Mitch F.2-Mar-05 6:32
Mitch F.2-Mar-05 6:32 
GeneralRe: StreamReader constructor fails in FileWatcher event handler [Edit] Pin
skifanatic2-Mar-05 7:00
skifanatic2-Mar-05 7:00 
GeneralRe: StreamReader constructor fails in FileWatcher event handler [Edit] Pin
Mitch F.2-Mar-05 7:53
Mitch F.2-Mar-05 7:53 
GeneralRe: StreamReader constructor fails in FileWatcher event handler [Edit] Pin
skifanatic2-Mar-05 8:33
skifanatic2-Mar-05 8:33 
GeneralRe: StreamReader constructor fails in FileWatcher event handler [Edit] Pin
Dave Kreskowiak2-Mar-05 9:13
mveDave Kreskowiak2-Mar-05 9:13 
StreamReader? I must be missing something here. The file is being written to disk by another process, your code tries to read the file when the FileSystemWatcher event fires (which will happen when the file is CREATED, not when it's completely written!) Your code attempts to read a file that is still being written and hasn't been flushed to disk and closed, correct?

The StreamReader/StreamWriter classes hold onto underlying Win32 file handles. Even though you called close on the Reader/Writer object, it would appear that the underlying, unmanaged, file handle hasn't been closed and released. This won't happen until the the Reader/Writer object is collect, which will call .Dispose() on the object. You can try calling .Dispose() yourself to free the underlying resources that your application holds.



RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralRe: StreamReader constructor fails in FileWatcher event handler [Edit] Pin
skifanatic2-Mar-05 9:59
skifanatic2-Mar-05 9:59 
GeneralRe: StreamReader constructor fails in FileWatcher event handler [Edit] Pin
Dave Kreskowiak2-Mar-05 11:15
mveDave Kreskowiak2-Mar-05 11:15 
GeneralRe: StreamReader constructor fails in FileWatcher event handler [Edit] Pin
skifanatic2-Mar-05 11:47
skifanatic2-Mar-05 11:47 
GeneralRe: StreamReader constructor fails in FileWatcher event handler Pin
Dallas Matthews2-Mar-05 9:28
Dallas Matthews2-Mar-05 9:28 
GeneralTrigger to send an email Pin
Un-Connected2-Mar-05 4:18
Un-Connected2-Mar-05 4:18 
GeneralRe: Trigger to send an email Pin
Mitch F.2-Mar-05 5:55
Mitch F.2-Mar-05 5:55 
GeneralSystem.NullReferenceException: Object reference not set to an instance of an object. Pin
ug39kxt@cs.bham.ac.uk2-Mar-05 3:58
ug39kxt@cs.bham.ac.uk2-Mar-05 3:58 
GeneralRe: System.NullReferenceException: Object reference not set to an instance of an object. Pin
Colin Angus Mackay2-Mar-05 4:25
Colin Angus Mackay2-Mar-05 4:25 
GeneralRe: System.NullReferenceException: Object reference not set to an instance of an object. Pin
ug39kxt@cs.bham.ac.uk2-Mar-05 4:50
ug39kxt@cs.bham.ac.uk2-Mar-05 4:50 
GeneralRe: System.NullReferenceException: Object reference not set to an instance of an object. Pin
ug39kxt@cs.bham.ac.uk2-Mar-05 4:56
ug39kxt@cs.bham.ac.uk2-Mar-05 4:56 
GeneralRe: System.NullReferenceException: Object reference not set to an instance of an object. Pin
Dave Kreskowiak2-Mar-05 7:06
mveDave Kreskowiak2-Mar-05 7:06 
Generalconverting to VB.NET Pin
Lisana2-Mar-05 3:20
Lisana2-Mar-05 3:20 
GeneralRe: converting to VB.NET Pin
Dave Kreskowiak2-Mar-05 3:36
mveDave Kreskowiak2-Mar-05 3:36 
GeneralLatching a Snap-in to components in a windows service. Pin
CSharpBala2-Mar-05 2:54
CSharpBala2-Mar-05 2:54 
GeneralRecordSet and ResultSet Pin
Sumesh V.K2-Mar-05 0:47
Sumesh V.K2-Mar-05 0:47 
GeneralRe: RecordSet and ResultSet Pin
J4amieC2-Mar-05 3:17
J4amieC2-Mar-05 3:17 
GeneralShell the Recycle Bin Pin
AndrewVos1-Mar-05 22:37
AndrewVos1-Mar-05 22:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.