Createfile API 
Author Message
 Createfile API

Hi,

I am trying to open up the file using Createfile so I can use
GetFileSizeEx on it. However, I don't know how to get a
valid file handle using this method to a swapfile to get it's
size. This means either win386.swp or pagefile.sys. What
constant do I have to use to return a valid handle for such
a file?

I know I can use FileLen in VB but I would rather I use
API all the wat where only possible.

Thanks.

Sincerely,
Adam Honek



Fri, 27 Jun 2003 23:28:29 GMT  
 Createfile API
Adam.

Quote:
>This means either win386.swp or pagefile.sys. What
>constant do I have to use to return a valid handle for such
>a file?

I'm not sure you can open the pagefile, since it's used exclusively by
the system.

FindFirstFile can give you the correct size though, without having to
open the file.

Matt

============================================

CodeHound - The Software Developer's Search Engine
http://www.codehound.com



Sat, 28 Jun 2003 01:51:32 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. CreateFile - API, Am I a Pudding?

2. CreateFile API

3. CreateFile API call with VB4(32) on Win95 OS

4. Createfile API problem with COM ports

5. CreateFile API or MSComm

6. CreateFile API or MSComm

7. CreateFile API

8. CreateFile API Return INVALID_HANDLE_VALUE

9. createfile api call

10. CreateFile API Return INVALID_HANDLE_VALUE

11. CreateFile API Help

12. CreateFile API Help

 

 
Powered by phpBB® Forum Software