473,396 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 2744
> \\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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rich Strang | last post by:
Hi group I have just got the FindFirstFile function working in my small tutorial app, the problem is that I can only seem to get it working when I hard code the search string. I have defined a...
2
by: tom | last post by:
Hello, I want to know if FindFirstFile() can do more as I expect. FindFirstFile() can take the arguement of "*" or "?", for example, FindFirstFile("result.*.txt", &FileData); I want to...
1
by: Paulo Eduardo | last post by:
Hi, all! We are devleping one app that will use disk access with FindFirstFile and FindNextFile for it. Can someone expose me how works FindFirstFile and FindNextFile in disk access? Does the...
3
by: vighnesh | last post by:
Hello Everyone I am developing a project in VB.NET in which I need to use Win32 API function FindFirstFile()/FindNextFile()/FindClose() The same code is wroking fine in VB 6.0 , but when I used...
1
by: Rups | last post by:
API FindFirstFile searches for files based on long and short names(8+3). If i need to search files based on long names only . How can i do ?Is there any other API which does search based on long...
9
by: Comcast Newsgroups | last post by:
Hello everyone, I am programming in Visual Studio 2002, VB.net. I typically stick to version 1.0 of the framework for compatibility reasons. Recently, I ran into an issue that I couldn't...
1
by: gudiya | last post by:
hello everybody I am having a very wierd problem.i am developing a win ce applicationin which I am marshalling win ap function findfirstfile and findnextfile in c# .My problem is it reads the file...
3
by: gudiya | last post by:
hi, My code works but i am missing the first 2 characters of file name. Any idea why???? using System; using System.Collections.Generic; using System.ComponentModel; using System.Data;...
6
by: haneeshkb | last post by:
I am using the function FindFirstFile to pick files from a folder to process. But the files selecting is based on name ,I need to get the files selected based on datetime( means frst come firstout )....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.