Click here to Skip to main content
15,898,718 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: memorystream Pin
Dave Kreskowiak21-Aug-07 8:54
mveDave Kreskowiak21-Aug-07 8:54 
GeneralRe: memorystream Pin
Guffa21-Aug-07 11:13
Guffa21-Aug-07 11:13 
GeneralRe: memorystream Pin
WhiteGirl2321-Aug-07 19:28
WhiteGirl2321-Aug-07 19:28 
AnswerRe: memorystream Pin
Guffa22-Aug-07 4:57
Guffa22-Aug-07 4:57 
GeneralRe: memorystream Pin
WhiteGirl2322-Aug-07 9:01
WhiteGirl2322-Aug-07 9:01 
QuestionFile Association Pin
Kschuler21-Aug-07 7:34
Kschuler21-Aug-07 7:34 
Questionhandshaking through a subdirectory Pin
MartyK200721-Aug-07 6:55
MartyK200721-Aug-07 6:55 
AnswerRe: handshaking through a subdirectory Pin
Dave Kreskowiak21-Aug-07 7:34
mveDave Kreskowiak21-Aug-07 7:34 
This will only work if each of the files are written all at once... Your app could look for a complete set of files, and if there isn't one, reset and wait for a bit to check again. If there IS a complete set of files, wait an appropriate amount of time for the files to be completely written.

There are problems with trying to open files to check if another process is writing to them. If the other process opens the files, allowing shared access to it, your attempt at opening the file will always succeed, so that's useless in trying to find out if the other process is finished.

Also, if the other process opens the file, writes some data, closes it, then reopens the file, writes some more data, closes it, ... Rinse and Repeat ad nauseum ... then this method will also fail again because you might successfully open the file between writes by the other app.

You've already pointed out the flaw of using lock files, but it's not as bad as you think. When the unix app restarts, it should NOT look for and kill it's lock file if there is one. It should maintain the lock so the data can be backed out or rewritten, THEN kill the lock file.


MartyK2007 wrote:
is there a way of telling if a file has finished being copied to a subdir


There's no "100% safe" way of doing this using files...


A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


GeneralRe: handshaking through a subdirectory Pin
MartyK200721-Aug-07 8:00
MartyK200721-Aug-07 8:00 
GeneralRe: handshaking through a subdirectory Pin
Dave Kreskowiak21-Aug-07 8:53
mveDave Kreskowiak21-Aug-07 8:53 
AnswerRe: handshaking through a subdirectory Pin
andyharman21-Aug-07 8:45
professionalandyharman21-Aug-07 8:45 
GeneralRe: handshaking through a subdirectory Pin
MartyK200721-Aug-07 21:05
MartyK200721-Aug-07 21:05 
AnswerRe: handshaking through a subdirectory Pin
Luc Pattyn21-Aug-07 12:30
sitebuilderLuc Pattyn21-Aug-07 12:30 
GeneralRe: handshaking through a subdirectory Pin
MartyK200721-Aug-07 21:07
MartyK200721-Aug-07 21:07 
QuestionCrystal Reports and Queries Pin
Dreamer200721-Aug-07 5:35
Dreamer200721-Aug-07 5:35 
AnswerRe: Crystal Reports and Queries Pin
TomGarth21-Aug-07 12:40
TomGarth21-Aug-07 12:40 
QuestionInstalling a font from setup Pin
dptalt21-Aug-07 5:30
dptalt21-Aug-07 5:30 
Questionregistering a library through regasm Pin
sheth.mital21-Aug-07 4:32
sheth.mital21-Aug-07 4:32 
AnswerRe: registering a library through regasm Pin
Dave Kreskowiak21-Aug-07 5:08
mveDave Kreskowiak21-Aug-07 5:08 
QuestionForm's Title Pin
ejaz_pk21-Aug-07 4:18
ejaz_pk21-Aug-07 4:18 
AnswerRe: Form's Title Pin
Dave Kreskowiak21-Aug-07 5:11
mveDave Kreskowiak21-Aug-07 5:11 
AnswerRe: Form's Title Pin
nlarson1121-Aug-07 5:41
nlarson1121-Aug-07 5:41 
QuestionImport Pics on project and reDel it .. problem ? Pin
kindman_nb21-Aug-07 3:36
kindman_nb21-Aug-07 3:36 
AnswerRe: Import Pics on project and reDel it .. problem ? Pin
leckey21-Aug-07 3:58
leckey21-Aug-07 3:58 
GeneralRe: Import Pics on project and reDel it .. problem ? Pin
kindman_nb21-Aug-07 9:39
kindman_nb21-Aug-07 9:39 

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.