470,819 Members | 1,640 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,819 developers. It's quick & easy.

FindFirstFile / UNC names using TCP/IP

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?
Jun 8 '06 #1
2 2610
> \\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.
Jun 8 '06 #2
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
"Jean" wrote:
\\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.

Jun 8 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Rich Strang | last post: by
2 posts views Thread by tom | last post: by
1 post views Thread by Paulo Eduardo | last post: by
3 posts views Thread by vighnesh | last post: by
9 posts views Thread by Comcast Newsgroups | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.