Solved

Is there any way to open a file in Windows using ONLY the FRN (File Reference Number)?

Posted on 2007-11-27
5
432 Views
Last Modified: 2013-12-03
Is there any way to open a file in Windows using ONLY the FRN (File Reference Number)?

This is for a file system  that does NOT support change journal, but it does support FRN.  I need to be able to open the file only using the FRN, and I'm looking for a Windows API that would allow me to do that.
0
Comment
Question by:Axter
  • 2
5 Comments
 
LVL 22

Expert Comment

by:grg99
ID: 20357234
Nope, but you can either call the undocumented FRN to path API, or build your own FRN database:


http://www.microsoft.com/msj/1099/journal2/journal2.aspx

0
 
LVL 30

Author Comment

by:Axter
ID: 20357760
The link you posted requires change journal.
As I stated in my question, this file system does not support change journal.

The database method will not work, since that would defeat the purpose of the application.
The application is building a database using a third party API, which gives file name and FRN.
Since this file system is shared between both Windows and UNIX, the files can have names that are the same, but with different case.  The files can also have characters not allowed by Windows.

When this happens, the file name given by the API is not the name the Windows program can use to access the file.
So I'm trying to figure out a way to determine the Windows mangled name (foofoo~1.txt) for a given file using the FRN, without having to iterate through the directory, which also may have a mangled name.
0
 
LVL 30

Accepted Solution

by:
Axter earned 0 total points
ID: 20359183
I found an answer to my question.
You can open a file using FRN by using FILE_OPEN_BY_FILE_ID option with NtCreateFile API.

I'll be posting a request to convert this question to a PAQ.
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20388283
Closed, 500 points refunded.
Computer101
EE Admin
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question