473,385 Members | 1,548 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,385 software developers and data experts.

Relationship between FILE * and channel number

I have following question:

Once I open a file with fopen(), is there any way in which I can get its channel identifier? (i.e. the number I'd get if I was openning the same file with syscall open()).

Thanks.-
Jun 2 '08 #1
3 1264
gpraghuram
1,275 Expert 1GB
I have following question:

Once I open a file with fopen(), is there any way in which I can get its channel identifier? (i.e. the number I'd get if I was openning the same file with syscall open()).

Thanks.-
Did u check the structure details of the FILE?
I think there will be a way to that.

Raghu
Jun 2 '08 #2
JosAH
11,448 Expert 8TB
Search for a function fileno(FILE* file). It should be declared in <fildes.h>
This is all non-standard stuff of course ...

kind regards,

Jos
Jun 2 '08 #3
Is it possible that fildes.h does not exist in UNIX? (I couldn't find it in http://www.opengroup.org/onlinepubs/007908799/xshix.html).

On the other hand, I found fdopen() standard UNIX function that will do.

Thanks all,
Jun 2 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Stefanie | last post by:
Hi, I have a question about declaring variables for writing data to a file for random access. I have two string variables declared in a module (user-defined types). The point is that for one of...
2
by: Joe | last post by:
I'm quite new to object oriented programming, so this is probably a really basic problem that there is an obvious solution to, but anyway... I am looking for a little advice on a good way of...
4
by: Melissa | last post by:
I have a frontend file named CustomerApp and backend file named CustomerData. CustomerApp is at C:\Customer Database and CustomerData is at S:\Customer Database. Could someone help me with the code...
1
by: shumaker | last post by:
....please. I've found other posts that explain the Cascade options, but the Enforce relationships option still is foggy to me. As to "enforcing relationship for ... UPDATEs"(with cascade NOT...
11
by: Ignacio X. Domínguez | last post by:
Hi. I'm developing a desktop application that needs to store some data in a local file. Let's say for example that I want to have an address book with names and phone numbers in a file. I would...
4
by: Shapper | last post by:
Hello, How to load a XML file in a XML DOM Document? Thanks, Miguel
1
by: vj | last post by:
How i can populate all fileds dynamically in jsp page based on contents found in xml file? I have written jsp servlets and java class file. i transferred automatic data from jsp to servlet then to...
4
by: Joel Barsotti | last post by:
I'm working on shipping rate calculator going back and forth via XML. The thing I'm confused about is that the code works, but after a few hours and I don't know how many requests, I start getting...
6
by: homevista | last post by:
PART III: Putting things together In part I we examined the modem to verify that it supported voice. If so, we took a note about the voice data format that we would use. In the second part, we...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.