Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2007-11-27
5
Medium Priority
?
455 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…

719 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