Re: Windows CE driver GetFileSize()
- From: "Sergei R" <rusakov@xxxxxxxxxxxxxx>
- Date: Mon, 29 Sep 2008 10:56:27 -0700
Do you want to create a fake file system ? Or the virtual one ?
So if you want to cheat some application, which only takes local files (e.g.
/Windows/<path>... but not \\server\mpath\... nor file:///url ...), then
your fake file system has to have certain functions to be fake enough to
cheat your application.
However these functions don't ALL have to be real. GetFileSize() may be one
of them - just return some number so that your application will be happy
enough to work. Say 4kbytes (regardless of actual file size) size or so - to
test your concept (of cheating some application). If that works, later on
you can work on improving the degree of your cheating by letting
getfilesize() function to know the size of the file downloaded so far etc.
In general, not considering legal sides of your work, perhaps there were
some good reasons for that application not to take remote files...
Hope this helps
Sergei R
"Dorin Lazar" <dorin.lazar@xxxxxxxxx> wrote in message
news:1b942281-9e93-48ea-bf67-3cb191d0f4f0@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I don't get it. How do I do that?
Best regards,
Dorin
On Sep 27, 1:29 am, "Sergei R" <rusa...@xxxxxxxxxxxxxx> wrote:
Sure,
Try just to return a dumb number from GetFileSize() for a test.
SergeiR
"Dorin Lazar" <dorin.la...@xxxxxxxxx> wrote in message
news:3375df25-5364-404d-a498-eb3e332dd3cf@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi Bruce,
What I am actually trying to do is create a pipe that would mirror a
file. I want to provide Internet files that I read with wininet and
deliver them to an interface that accepts only local files. In this
manner, I would be able to make the binary part think that it's
working with a legitimate file, and not over an http connection.
I am not sure I want to create a filesystem for that. It would be an
option, but that would be too big. I already have all the pieces of
the puzzle in place. Seeking, reading, everything is ok, except for
the GetFileSize. I hoped that there's a way to avoid the GetFileSize
thing, but there isn't.
Is there any other option than creating a full filesystem?
Thanks a lot,
Dorin
On Sep 24, 7:55 pm, "Bruce Eitman [eMVP]"
<bruce.eitman.nos...@xxxxxxxxxxxxxxxxxxx> wrote:
What are you really trying to do? It sounds like you have writen a
simple
stream interface driver and hope to use it to replace a filesystem.
GetFileSize would call into a filesystem, that would then call into a
disk
driver to read from the disk The filesystem then takes the information
that
it read from the disk and interpretes it to determine the file size.
So you are missing a filesystem.
--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com
My BLOGhttp://geekswithblogs.net/bruceeitman
EuroTech Inc.www.EuroTech.com
"Dorin Lazar" <dorin.la...@xxxxxxxxx> wrote in message
news:e1b12720-ce7f-4736-96b5-e239f4293f58@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi there,
The idea of a wrapper function crossed my mind, unfortunately I have
a huge stack of binary code that I cannot update with my new wrappers.
And I want that binary code to see my driver as a legitimate file, and
to be able to obtain the filesize out of it.
For the time being, I'll try this wrapper thing. I don't see,
however, how this will help me on the long run.
Thanks a lot,
Dorin
On Sep 23, 5:58 pm, "RyeCatcher" <daniel.chi...@xxxxxxxxx> wrote:
I am not sure that the WIN32 GetFileSize will call the XXX_IoControl.
In fact, from your description, I notice that you want to return the
specified length or value from the XXX_IoControl. So why not try
wrapper
your own function to retrieve the file size? For example, you can call
the
XXX_IoControl in your own wrapper function with the specified IOCTL.
--
RyeCatcher
Shanghai, China
"Dorin Lazar" <dorin.la...@xxxxxxxxx>
??????:41f0e017-89a6-400f-9d52-c55c53147...@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello,
I am writing a device driver for windows CE 5.0 based on the stream
driver interface and I would love to be able to 'declare' a
filesize,
making GetFileSize return a certain value. I want to do that because
I
want to be able to treat the device like an ordinary file, and
GetFileSize is the only piece of the puzzle missing.
I saw that XXX_IoControl is not called during the GetFileSize call.
Can someone suggest another way to do it? What should I do to make
'GetFileSize' return the correct size I am interested in?
Many thanks,
Dorin
.
- Follow-Ups:
- Re: Windows CE driver GetFileSize()
- From: Dorin Lazăr
- Re: Windows CE driver GetFileSize()
- References:
- Windows CE driver GetFileSize
- From: Dorin Lazăr
- Re: Windows CE driver GetFileSize
- From: RyeCatcher
- Re: Windows CE driver GetFileSize
- From: Dorin Lazăr
- Re: Windows CE driver GetFileSize
- From: Bruce Eitman [eMVP]
- Re: Windows CE driver GetFileSize
- From: Dorin Lazăr
- Re: Windows CE driver GetFileSize
- From: Sergei R
- Re: Windows CE driver GetFileSize
- From: Dorin Lazăr
- Windows CE driver GetFileSize
- Prev by Date: Re: Can My application read \\windows\\release\\xxx.dll ?
- Next by Date: RE: Device driver load/unload notifications
- Previous by thread: Re: Windows CE driver GetFileSize
- Next by thread: Re: Windows CE driver GetFileSize()
- Index(es):
Relevant Pages
|