Loading drivers and the shell

Posted: 12-22-2003, 08:14 PM
Hello,
It has fallen in my lap to research a potential problem in our XPE
configuration. This is my first time exploring this realm, so please excuse
any untoward display of ignorance.

The requirement is to boot up into our custom application without giving the
user a chance to monkey with anything in the mean time. An attempt, before
my time, to launch without Explorer caused application failure due to
drivers not being loaded. From what I have read so far, I don't think there
is an particular relationship between the shell and drivers, so my guess is
that launching Explorer just happens to give the drivers time to load before
our app is called.

Does this sound right? Could I just write a shell that was essentially
::Sleep(5000); ::CreateProcess(<our exe>)? Could I then launch Explorer
later if needed?

Am I on the right track, or am I barking up the wrong tree (what's a
sentence without multiple metaphors?).

Thanks for any and all help,
damon


Reply With Quote

Responses to "Loading drivers and the shell"

Slobodan Brcin
Guest
Posts: n/a
 
Re: Loading drivers and the shell
Posted: 12-22-2003, 08:40 PM
I don't know what drivers your application is using, but Sleep(5000) is not
a good solution. Why not 4000 or 6000?

Instead find and read info on function CMP_WaitNoPendingInstallEvents



Regards,

Slobodan



"Damon Gautama" <damon.gautama@medtronic.com> wrote in message
news:Ov5L3gMyDHA.2360@TK2MSFTNGP10.phx.gbl...
> Hello,
> It has fallen in my lap to research a potential problem in our XPE
> configuration. This is my first time exploring this realm, so please
excuse
> any untoward display of ignorance.
>
> The requirement is to boot up into our custom application without giving
the
> user a chance to monkey with anything in the mean time. An attempt, before
> my time, to launch without Explorer caused application failure due to
> drivers not being loaded. From what I have read so far, I don't think
there
> is an particular relationship between the shell and drivers, so my guess
is
> that launching Explorer just happens to give the drivers time to load
before
> our app is called.
>
> Does this sound right? Could I just write a shell that was essentially
> ::Sleep(5000); ::CreateProcess(<our exe>)? Could I then launch Explorer
> later if needed?
>
> Am I on the right track, or am I barking up the wrong tree (what's a
> sentence without multiple metaphors?).
>
> Thanks for any and all help,
> damon
>
>

Reply With Quote
Lucvdv
Guest
Posts: n/a
 
Re: Loading drivers and the shell
Posted: 12-23-2003, 01:26 PM
On Mon, 22 Dec 2003 14:14:32 -0600, Damon Gautama wrote:
> Hello,
> It has fallen in my lap to research a potential problem in our XPE
> configuration. This is my first time exploring this realm, so please excuse
> any untoward display of ignorance.
>
> The requirement is to boot up into our custom application without giving the
> user a chance to monkey with anything in the mean time. An attempt, before
> my time, to launch without Explorer caused application failure due to
> drivers not being loaded. From what I have read so far, I don't think there
> is an particular relationship between the shell and drivers, so my guess is
> that launching Explorer just happens to give the drivers time to load before
> our app is called.
>
> Does this sound right? Could I just write a shell that was essentially
>::Sleep(5000); ::CreateProcess(<our exe>)? Could I then launch Explorer
> later if needed?
>
> Am I on the right track, or am I barking up the wrong tree (what's a
> sentence without multiple metaphors?).
>
> Thanks for any and all help,
> damon
I had the same problem with my application (DirectX): if it is started too
soon, DirectX display initialization fails.

It takes about 15 seconds (in my case) after the shell is started before
the display becomes available.

When another (non-directX) app runs as shell it also only appears on screen
some time after it's been started, but it looks like XPE intercepts the
problem in this case.


To minimize the amount of changes to my application, I modified it so it
just stops with a certain exit code if DirectX init fails; then I wrote a
launcher app that's started as shell instead.
The launcher starts the main app, goes into a WaitForSingleObject until it
exits, and depending on the exit code it stops itself too or it retries
starting the main app. I included a five second Sleep() before each retry.

A retry loop around the initialization in my original app would have been a
more elegant solution, but it didn't work on the first attempt and I didn't
feel like debugging DirectX code on the target platform ;-)
Reply With Quote
Damon Gautama
Guest
Posts: n/a
 
Re: Loading drivers and the shell
Posted: 12-23-2003, 09:19 PM
Thanks for the pointer. I'll suggest that as the first try.

damon

"Slobodan Brcin" <sbrcin@ptt.yu> wrote in message
news:O8$hGxMyDHA.2156@TK2MSFTNGP09.phx.gbl...
> I don't know what drivers your application is using, but Sleep(5000) is
not
> a good solution. Why not 4000 or 6000?
>
> Instead find and read info on function CMP_WaitNoPendingInstallEvents
>
>
>
> Regards,
>
> Slobodan
>
>
>
> "Damon Gautama" <damon.gautama@medtronic.com> wrote in message
> news:Ov5L3gMyDHA.2360@TK2MSFTNGP10.phx.gbl...
> > Hello,
> > It has fallen in my lap to research a potential problem in our XPE
> > configuration. This is my first time exploring this realm, so please
> excuse
> > any untoward display of ignorance.
> >
> > The requirement is to boot up into our custom application without giving
> the
> > user a chance to monkey with anything in the mean time. An attempt,
before
> > my time, to launch without Explorer caused application failure due to
> > drivers not being loaded. From what I have read so far, I don't think
> there
> > is an particular relationship between the shell and drivers, so my guess
> is
> > that launching Explorer just happens to give the drivers time to load
> before
> > our app is called.
> >
> > Does this sound right? Could I just write a shell that was essentially
> > ::Sleep(5000); ::CreateProcess(<our exe>)? Could I then launch Explorer
> > later if needed?
> >
> > Am I on the right track, or am I barking up the wrong tree (what's a
> > sentence without multiple metaphors?).
> >
> > Thanks for any and all help,
> > damon
> >
> >
>
>

Reply With Quote
Damon Gautama
Guest
Posts: n/a
 
Re: Loading drivers and the shell
Posted: 12-23-2003, 09:21 PM
Thanks for the idea. I think we are going to try the
CMP_WaitNoPendingInstallEvents route. If that doesn't work, we'll try to
mimic your workaround.

damon

"Lucvdv" <name@null.net> wrote in message
news:4e8ti4tolni5.19tk25msmkjnt.dlg@40tude.net...
> On Mon, 22 Dec 2003 14:14:32 -0600, Damon Gautama wrote:
>
> > Hello,
> > It has fallen in my lap to research a potential problem in our XPE
> > configuration. This is my first time exploring this realm, so please
excuse
> > any untoward display of ignorance.
> >
> > The requirement is to boot up into our custom application without giving
the
> > user a chance to monkey with anything in the mean time. An attempt,
before
> > my time, to launch without Explorer caused application failure due to
> > drivers not being loaded. From what I have read so far, I don't think
there
> > is an particular relationship between the shell and drivers, so my guess
is
> > that launching Explorer just happens to give the drivers time to load
before
> > our app is called.
> >
> > Does this sound right? Could I just write a shell that was essentially
> >::Sleep(5000); ::CreateProcess(<our exe>)? Could I then launch Explorer
> > later if needed?
> >
> > Am I on the right track, or am I barking up the wrong tree (what's a
> > sentence without multiple metaphors?).
> >
> > Thanks for any and all help,
> > damon
>
> I had the same problem with my application (DirectX): if it is started too
> soon, DirectX display initialization fails.
>
> It takes about 15 seconds (in my case) after the shell is started before
> the display becomes available.
>
> When another (non-directX) app runs as shell it also only appears on
screen
> some time after it's been started, but it looks like XPE intercepts the
> problem in this case.
>
>
> To minimize the amount of changes to my application, I modified it so it
> just stops with a certain exit code if DirectX init fails; then I wrote a
> launcher app that's started as shell instead.
> The launcher starts the main app, goes into a WaitForSingleObject until it
> exits, and depending on the exit code it stops itself too or it retries
> starting the main app. I included a five second Sleep() before each
retry.
>
> A retry loop around the initialization in my original app would have been
a
> more elegant solution, but it didn't work on the first attempt and I
didn't
> feel like debugging DirectX code on the target platform ;-)

Reply With Quote
 
LinkBack Thread Tools Display Modes
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading SATA drivers during install... Ivo Windows Vista Install & Setup 3 06-26-2006 02:51 PM
Loading SATA drivers Ivo Windows Vista Install & Setup 1 06-24-2006 05:12 AM
bootlog shows a lot of drivers not loading sonya Windows XP Device Drivers 0 03-06-2004 07:23 PM
Custom Shell and Drivers Wagner, Martin Windows XP Embedded 1 11-24-2003 07:41 AM
drivers not loading kevin Windows XP Device Drivers 0 07-13-2003 01:47 PM


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90