FindFirstFile / UNC names using TCP/IP

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My application uses FindFirstFile for searching for specific file types
entered by a user.
Entries like c:\myfiles\*.txt and \\myserver\shareddrive\myfiles\*.txt work
okay, but when I use a UNC name with an IP address like:
\\192.168.1.10\shareddrive\myfiles\*.txt FindFirstFile returns an error(when
it's valid). I can use CreateFile with the IP address as a server name
succesfully and do a "dir", but it's the FindFirstFile that fails. Is this a
known issue?
 
\\192.168.1.10\shareddrive\myfiles\*.txt FindFirstFile returns an error(when

You should have supply the error code.
it's valid). I can use CreateFile with the IP address as a server name
succesfully and do a "dir", but it's the FindFirstFile that fails. Is this a
known issue?

Accordind to the documentation when UNC
is envolved FindFirstFileW should be used.

Didn't try it myself.
 
Hi Jean,

I figured it out --> the app I have is running as a service, and I needed to
make sure the log in for the service was authenticated. Off hand, not sure
why \\servername\shareddrive worked without authentication, and the ip
address in place of servername did not, but it is not an issue anymore.

-thanks
-lew
 
Back
Top