Re: Invalid procedure call or argument - Dir function
- From: Bob O`Bob <filterbob@xxxxxxxxxxxxxxx>
- Date: Thu, 18 Jan 2007 09:47:37 -0800
Bob O`Bob wrote:
Karl E. Peterson wrote:Bob Butler <tiredofit@xxxxxxxxxxx> wrote:"Karl E. Peterson" <karl@xxxxxxxx> wrote in message
news:ODDWOJpOHHA.5104@xxxxxxxxxxxxxxxxxxxx
guy_jara@xxxxxxxxx wrote:I can't duplicate it and I think it's pretty unlikely. The odds are muchTakeaway: It would appear that long periods of time between calls toThat's an incredibly interesting observation! One that could be
the Dir function causes it to loose "reference," if you will, to the
previously initialized search pattern, and moreover, to the function
itself.
tested, empirically, were one wanting to. It infers that VB is
calling FindClose after some set period of elapsed time. Hmmmmm....
better that the code the OP is using calls Dir soemwhere in the file copy
routine to test for a file's existence and the time delay is a red herring.
That does sound like a more probably explanation, yep...
I think so, too.
But it shouldn't be hard to test.
I've just started a demo app that's going to wait longer and longer periods
between calls, starting at five minutes and adding 30 seconds each call.
I've got two instances running, with different start times by >10 minutes,
looking at the same directory, just in case somehow they interact.
I should be able to let them run for hours. We'll see.
The calls are now being logged just short of half an hour apart, and
both instances are still running fine.
After about another hour I'm going to call the elapsed time theory "busted!"
Bob
>
> By the way, that /is/ the error one gets if one makes another parameterless
> call after getting the empty string back. So a minor coding error is yet
> another higher probability, IMO.
--
.
- Follow-Ups:
- Re: Invalid procedure call or argument - Dir function
- From: Bob O`Bob
- Re: Invalid procedure call or argument - Dir function
- References:
- Invalid procedure call or argument - Dir function
- From: guy_jara
- Re: Invalid procedure call or argument - Dir function
- From: Karl E. Peterson
- Re: Invalid procedure call or argument - Dir function
- From: Bob Butler
- Re: Invalid procedure call or argument - Dir function
- From: Karl E. Peterson
- Re: Invalid procedure call or argument - Dir function
- From: Bob O`Bob
- Invalid procedure call or argument - Dir function
- Prev by Date: Game Install
- Next by Date: Re: Can I re-compile a VB file using MS VB Express 2005?
- Previous by thread: Re: Invalid procedure call or argument - Dir function
- Next by thread: Re: Invalid procedure call or argument - Dir function
- Index(es):