Re: checking and Copying a file when system is Loading

Tech-Archive recommends: Fix windows errors by optimizing your registry



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





.



Relevant Pages

  • Re: Understanding Basics
    ... developers - everything depends on how they handled things. ... anything about the driver - your app should just make API calls, ... deal with a driver that deals with the actual IO stuff behind the scenes.... ...
    (microsoft.public.development.device.drivers)
  • Re: Digital-tv card drivers and API discussion
    ... Designing completely new api takes some time and I ... > driver development experience, I have a couple of questions for you. ... > 2) As linux kernel is GPL-licensed, I cannot just port the linux driver ... I'm able to watch DVB programs converted from MPEG TS substreams to MPEG ...
    (freebsd-arch)
  • Re: Adding ODBC driver programmatically
    ... the driver may or may not be installed. ... When the app loads, it configures the ODBC entry automatically, ... Your code can still check for the driver, and I am betting there is an API ... call for that too, Install it as needed ...
    (borland.public.delphi.database.ado)
  • Re: TDBC documentation, examples, syntax?
    ... every driver and provides no opportunity for abstraction. ... procedural API, the internal details are opaque, the interface remains ... that database. ... standard API, or provide a quirky API with non-standard features. ...
    (comp.lang.tcl)
  • Re: [2.6 patch] ieee1394_core.c: remove unneeded EXPORT_SYMBOLs
    ... distribution will call us and require intense support. ... profits with Linux sales - and 99.99 % of our income with Windows sales. ... I do not see the licensing issue of a stable kernel API where venders ... Our driver is GPL so there should no be a licensing issue. ...
    (Linux-Kernel)