again "customer shell" problem

P

Philipp Stampfl

Hi again!

Last time Rick Thering gave me a hint, that my custom application might have
a timing problem when starting up as a default shell.
I tried starting up, using my myapp.exe as custom shell but no application
was shown. I then started the task manager and manually started the task
myapp.exe and it works.
So I then tried to create a small programm with only three lines of code:

Sleep(10000);
ShellExecute(myapp.exe);
exit(0);

This app should be used as new customer shell, should start, wait and then
start the myapp.exe and terminate itself, but again no application was
shown.

Does anybody have another hint how to create a delayed startup for my
customer shell application?

Regards,

Philipp
 
P

Philipp Stampfl

Hi Slobodan!

Can you attach the cfgmgr32.h for me, which I need to compile my application
using the suggested CMP_WaitNoPendingInstallEvents function.

Thanks!

Philipp
 
S

Slobodan Brcin \(eMVP\)

#define CM_WaitNoPendingInstallEvents CMP_WaitNoPendingInstallEvents

DWORD
WINAPI
CM_WaitNoPendingInstallEvents(
IN DWORD dwTimeout
);

Regards,
Slobodan
 
S

Slobodan Brcin \(eMVP\)

Hi Philipp,

Don't use ShellExecute use CreateProcess instead.

Regards,
Slobodan
 
L

Lucvdv


You may be right, but I don't think that's it.


I had the same problem: my shell is based on DirectX (Direct3D), and
immediately after it is started, DirectX reports that there are 0
(zero) displays.
This happens also without EWF, and without EWF I think there would
only be pending install events at the first boot.


Now I changed my shell so it keeps retrying to initialize DirectX at
15 second intervals, until it works (it bails out if it still can't
initialize after 2 minutes or so).

I /think/ it has to do with window stations (see platform sdk / user
interface), that the shell exe is started before the window station
it's going to run in has fully been initialized.
 
S

Slobodan Brcin \(eMVP\)

DirectX is story for itself, and probably there are some related issues as well to other similar applications.

Don't use XP Luna logon interface. Fall back to old win 2000 look. This solved problems for my DirectX applications.

Regards,
Slobodan
 
P

Philipp Stampfl

Hi Slobodan!

My current problem is, that my launcher application does start as customer
shell. But it then can not start my real application using createprocess().

When I tell the launcher application to start notepad.exe, then it works.
The only difference to my application is, that it opens a config file on
startup. Can this be a problem when starting a programm as customer shell?

When I execute my application using the taskmanager and the "new task"
option it works fine! It also works if I start the launcher application
using the taskmanager and letting it open myapp.exe that opens a config file
on startup!

Please help!

Phil
 
S

Slobodan Brcin \(eMVP\)

Hi Philipp,

Could you do the test again with Sleep(60000) or something like that before trying to start your application.

Also if you wrote that application then try adding some debugger outputs or write to file at the beginning of application.
So you will know what piece of application failed. (video subsystem, network, audio, etc).

Notepad is very light and this is probably reason why it starts. You application most likely starts as well but then fails some
request. And you have not included error handling and show so you have no idea if it was even started.

At least you can put some message box at the beginning of your app that will prevent it from initializing before you click ok.

Regards,
Slobodan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top