Solved

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

Posted on 2007-11-27
5
422 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now