Re: checking and Copying a file when system is Loading
- From: "Voidcoder" <voidcoder@xxxxxxxxx>
- Date: Wed, 22 Feb 2006 09:18:55 -0800
Well, I see only two questions here. One is missing? :)
1. Yes, you can definitely do it from the driver. Drivers and apps
on CE are not very different things though. They are just
user mode DLLs and in the most cases can use any API
functions like an ordinary app. Do not mix up with a
big brother's (desktop Windows) driver model.
!BUT! one possible issue here is that you MUST
be sure that API library is ready (loaded, initialized and ready
to use) before to call some API functions, otherwise you will
end with an exception or other issues. This however make
sence only when doing API calls during the boot phase.
In your case you have also to wait until the SD and FLASH
volumes are mounted, ie. root directories appear in the
filesystem tree. There is a number of ways to do it,
the easiest one is to poll with some interval using
the GetFileAttributes API.
2. You fon't need *.DAT files to place something
to your \windows directory. Use *.BIB files
instead, eg. project.bib. You can place your file
either to MODULES or FILES section:
xyz.exe PathToXyzOnDevelopmentPC\xyz.exe NK
This will place your application to \windows\xyz.exe
automatically.
"Manish" <Manish@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:47746A6E-52EA-4961-8146-BC9BC932903C@xxxxxxxxxxxxxxxx
Thanks for the reply.( I am working on WinCe4.2)
Still i have to ask you 3 questions,i hope u answer them
1. Can we use simple copyFile API (which we use at application level) in
the driver. i am thingking to copy file whenever my SDcard is connected .(
driver is loaded when SD is connected)
Please give ur comments on this.
2. I read in the documentation about project.dAt file ..i was trying to use
this but failed ..
I written following line in project.dat
root:-File("xyz.exe","\Windows\xyz.exe")
when i chekc after booting No file is copied.
Please answer possible reason
Regards
Manish
"Voidcoder" wrote:
The easiest way is to have a small 5-lines application
in your OS image, running at startup and copying
xyz.exe if not exists.
The app should wait until the SD and Flash filesystem
is mounted, then perform a check and copy the file.
You will need to list it under
[HKLM\init]
"LaunchXX"="YourAppName.exe"
"DependXX"=hex:YY,00
See "Configuring a Registry File to Run an Application at Startup"
in documentation for details.
"Manish" <Manish@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B9330208-8123-45D6-849E-13733DA89680@xxxxxxxxxxxxxxxx
Hi !
I have come across one requirement that is :
While sytem is booting and drivers are loaded after that my o/s should
automatically check one file (let us say xyz.exe).
If this file does not exists at NANDFLASH\\ folder then copy it
automatically from SDMMC\\ to NANDFLASH\\.
Where and how can i make this job a part of O/S image .So that i can do this
job on every reset or system loading.
This is pretty urgent .
Please suggest ..i have been waiting for ur reply
Regards
Manish
.
- Follow-Ups:
- References:
- Re: checking and Copying a file when system is Loading
- From: Voidcoder
- Re: checking and Copying a file when system is Loading
- Prev by Date: Re: CS8900A Driver help
- Next by Date: Re: usb client suspend resume on pxa270
- Previous by thread: Re: checking and Copying a file when system is Loading
- Next by thread: Re: checking and Copying a file when system is Loading
- Index(es):
Relevant Pages
|