Click here to Skip to main content
15,891,905 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi ,i want check that a file is exist or not in my driver code , like "PathFileExist()" function in user mode , but i can not find any function for this Purpose , please tell me name of function that can do this work , thanks ,
Posted
Comments
Sandeep Mewara 1-Jul-12 4:23am    
Driver code? Which language - C++ or C# ?
casa cargo 1-Jul-12 6:31am    
Visual C++ ,
Richard MacCutchan 1-Jul-12 8:05am    
Not Visual C++, just C++. PathFileExist() is a Shell function and you cannot use such calls in driver code. What exactly are you trying to get your driver code to do?
casa cargo 1-Jul-12 9:16am    
i create a system thread in driver and want to this thread check if file does not exist create this file and if exist skip from this section of code ,
Richard MacCutchan 1-Jul-12 12:09pm    
Why are you doing this in driver level code? What type of driver is this and why does it need to create a file?

1 solution

If you're working at a driver level, why not do a C-style fopen() and see if the file exists in that manner? If it doesn't, the fopen() will fail and return NULL.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900