Hi,
I'm using WinCE 4.2 in my device. I'm booting WinCE using Compact
Flash otherwise Hard Disk sometimes. I want to write a application which will
get the updated Nk.bin from some host system and should replace the Nk.bin in
the target via ethernet.

I've some doubts. Consider the first situation in which some 'X'
application is running in target, now i want to update the nk.bin in the
target. Whether i could be able to make that 'X' application to sleep for
sometime and then updating the Nk.bin in the RAM and Compact flash with my
own application and then start the 'X' application to continue without
restarting the target? Here the thing is that, i'm updating the Nk.bin in the
RAM directly with out booting once again with the Nk.bin updated in Compact
flash. Whether this is possible?

Consider the second situation, WinCE is running in the target. Just
i want to update the Nk.bin in the target's Compact Flash or HDD from the
Nk.bin in the Host and store settings in the hive and just restarting the
system, then normally the target will boot with the updated Nk.bin. This is
possible in my view.

What i've to do, i'm a newbie in application. I think i have to
concentrate more in Ethernet part ( Transferring updated Nk.bin from the host
to target). Platform builder is also transferring nk.bin from the development
system to target's RAM via eboot. Whether this is useful for me...

Any suggestions...

Thanks,
Mekas...

RE: Nk.bin update application by Rob

Rob
Mon Nov 05 02:36:03 PST 2007

Look at Wininet.lib FTP functions for downloading the new image.

Reloading the new image without rebooting seems difficult to me (might be
impossible).

the nk.bin can be replaced while the image is running.
Reboot automatically after you replaced it , and the new image will boot.

Greetings,
Rob.


"Mekas" wrote:

> Hi,
> I'm using WinCE 4.2 in my device. I'm booting WinCE using Compact
> Flash otherwise Hard Disk sometimes. I want to write a application which will
> get the updated Nk.bin from some host system and should replace the Nk.bin in
> the target via ethernet.
>
> I've some doubts. Consider the first situation in which some 'X'
> application is running in target, now i want to update the nk.bin in the
> target. Whether i could be able to make that 'X' application to sleep for
> sometime and then updating the Nk.bin in the RAM and Compact flash with my
> own application and then start the 'X' application to continue without
> restarting the target? Here the thing is that, i'm updating the Nk.bin in the
> RAM directly with out booting once again with the Nk.bin updated in Compact
> flash. Whether this is possible?
>
> Consider the second situation, WinCE is running in the target. Just
> i want to update the Nk.bin in the target's Compact Flash or HDD from the
> Nk.bin in the Host and store settings in the hive and just restarting the
> system, then normally the target will boot with the updated Nk.bin. This is
> possible in my view.
>
> What i've to do, i'm a newbie in application. I think i have to
> concentrate more in Ethernet part ( Transferring updated Nk.bin from the host
> to target). Platform builder is also transferring nk.bin from the development
> system to target's RAM via eboot. Whether this is useful for me...
>
> Any suggestions...
>
> Thanks,
> Mekas...

RE: Nk.bin update application by Mekas

Mekas
Mon Nov 05 03:37:02 PST 2007

Thanks Rob,

I will through those FTP functions and how can i reset the system through
application. Before that i've to save the registry hive. And one more thing,
i want to run my application in background. How to do that.

I'll study those things and come back.

Regards,
Mekas.

RE: Nk.bin update application by Rob

Rob
Mon Nov 05 04:12:01 PST 2007


Look for KernelIoControl(IOCTL_HAL_REBOOT ,......... ) to reboot the system.

If your app is a win32 app, use ShowWindow(SW_HIDE) to hide it. (background)

Greetings,
Rob.




"Mekas" wrote:

> Thanks Rob,
>
> I will through those FTP functions and how can i reset the system through
> application. Before that i've to save the registry hive. And one more thing,
> i want to run my application in background. How to do that.
>
> I'll study those things and come back.
>
> Regards,
> Mekas.