Error 52: Bad File Name or Number

From: Bill Baker (BillBaker_at_discussions.microsoft.com)
Date: 10/08/04


Date: Fri, 8 Oct 2004 14:33:03 -0700

I've got a simple VB6 app that works fine on all but one system. On that
system, it gives an "Error 52: Bad File Name or Number" error.

The exact line in the code where the error is occurring is below:

' Need to compensate for blank lines:
If strCurrLine <> "" Then
' THIS IS THE LINE: ERROR 52, BAD FILE NAME OR NUMBER:
    If Mid(strCurrLine, Len(strCurrLine) - 3, 1) <> "." Then
    ...
    End If
...
End If

The code is to determine whether or not an extension is present in a
path/filename line from a text file. Some of the filenames are executables
(exe, com, bat, cmd) and do not have extensions listed in the text file.

The offending machine has Windows XP. The app works fine on other XP and 2K
systems.

Why would this only be happening on one system? Why is it returning a "Bad
File Name or Number" message, when the offending line doesn't reference a
file name or number?

Thanks,

-- 
Bill Baker


Relevant Pages

  • Re: Compatibility Question: changing a compiling PC from Win 98SE to Win XP Pro
    ... > I've been maintaining a VB6 app that was fielded around 2000 and was ... > originaly compiled with VB SP4 on a Windows 98SE machine. ... > periodicaly distribute updated .EXEs and .DLLs that have been compiled on ...
    (microsoft.public.vb.com)
  • Re: ActiveX EXE as a service...
    ... Try "xynt service" its free and works well for me running a VB6 app as ... a service in windows 2000. ... It even lets you run multiple programs in sequencial order such that ...
    (comp.lang.basic.visual.misc)
  • Re: ActiveX EXE as a service...
    ... > Try "xynt service" its free and works well for me running a VB6 app as ... > a service in windows 2000. ... Prev by Date: ...
    (comp.lang.basic.visual.misc)
  • New or corrupt Jet driver?
    ... I have a client in Greece running a VB6 app that uses ADO/JET with an Access database. ... They have one Windows 2000 SP4 machine where the app fails. ...
    (microsoft.public.data.ado)