Discussion:
question about files creation and access
(too old to reply)
Agent Sylar - First Class Hero
2010-01-06 15:09:01 UTC
Permalink
creHello and happy new year to everyone!

I have fiew questions about file access

1. What is difference if I specify GENERIC_READ | GENERIC_WRITE or just one
of them when I call createfile function. I mean is there some benefit in
performance if I use just one of them versus when I use both

2. Is there a way to write all cashed content to disk from my application?

3. How to disable windows to use disk while my application is copying files?
--
mind has no limit
Agent Sylar - First Class Hero
2010-01-08 19:05:01 UTC
Permalink
I also want to know how to get relal files size on disk
--
mind has no limit
Post by Agent Sylar - First Class Hero
creHello and happy new year to everyone!
I have fiew questions about file access
1. What is difference if I specify GENERIC_READ | GENERIC_WRITE or just one
of them when I call createfile function. I mean is there some benefit in
performance if I use just one of them versus when I use both
2. Is there a way to write all cashed content to disk from my application?
3. How to disable windows to use disk while my application is copying files?
--
mind has no limit
Jonathan de Boyne Pollard
2010-01-12 18:36:42 UTC
Permalink
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<blockquote
cite="mid:5E947CC2-F5CE-4868-B4BA-***@microsoft.com"
type="cite">
<p wrap="">I also want to know how to get relal files size on disk<br>
</p>
</blockquote>
<p><code>GetFileInformationByHandleEx()</code> is your friend.<br>
</p>
</body>
</html>
Jonathan de Boyne Pollard
2010-01-12 17:38:31 UTC
Permalink
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<blockquote
cite="mid:4D45AC75-1DEB-46BA-8F92-***@microsoft.com"
type="cite">
<p wrap="">3. How to disable windows to use disk while my application
is copying files?<br>
</p>
</blockquote>
<p>That's a nonsense question.  Copying files <em>involves</em> using
the disc (on local volumes, at any rate).<br>
</p>
</body>
</html>
Hector Santos
2010-01-14 13:25:03 UTC
Permalink
Post by Agent Sylar - First Class Hero
creHello and happy new year to everyone!
I have fiew questions about file access
1. What is difference if I specify GENERIC_READ | GENERIC_WRITE or just one
of them when I call createfile function. I mean is there some benefit in
performance if I use just one of them versus when I use both
Reading is faster than writing if that is what you are asking. If you
just need to read, don't open for write access. If you don't want
anyone else to bother with your file, open for reading only and don't
share it, share mode = 0.
Post by Agent Sylar - First Class Hero
2. Is there a way to write all cashed content to disk from my application?
I think you are asking about FlushFileHandle()
Post by Agent Sylar - First Class Hero
3. How to disable windows to use disk while my application is copying files?
Huh?

You mean you want 100% dedication by your program to write to disk and
no one else?

The only think CLOSE to the idea, if that, is to raise the thread
priority or work in real time. That won't do it but its CLOSE to
giving your application MORE attention.
--
HLS
Loading...