Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Slow printing when using alternate shell

17 views
Skip to first unread message

Berni

unread,
Nov 20, 2005, 1:05:28 PM11/20/05
to
Hello,

I am quite desperate because I have to build a "closed system", that is,
nobody may be able to easily delete files or change configuration.
Therefore I wrote my own little shell
("HKLM\...\WindowsNT\Winlogon\shell=xxx") which does nothing but
starting some programs and then waits until they have been closed.

The effect is that if I start notepad.exe and print a text like "TEST",
printing takes 5 sec after I pressed OK button on the printer dialog. In
case I use "explorer.exe" as the windows shell,
it will only take less than 1 sec. There is no difference in case I
print eg. six times consecutively. Each time the print dialog shows up
it will again 5 secs before printing starts.

I already listet up all the .DLLs explorer.exe uses and loaded them
using "LoadLibrary". I opened the printer myself and kept the printer
handle and printer spooler open but even this did not speed up printing.
As far as I can see, Windows XP does not load any further DLL while
notepad is printing but even this did not lead to an acceleration.

When using Windows 2000 everything works 100%, but under Windows XP it
does not work. I do not get rid of the delay.

I even tested some free shells "liteshell" etc, they all have the same
problem. Printing is much slower than using "explorer.exe" as the shell.

It doesn't matter which printer I choose. I tested nearly 10 windows
printer drivers (laser,ink and even needle printers).

Does anybody have an idea on that? How can I print fast without using
explorer.exe as the shell?

Thank you at least for reading.
Berni.

Christian Kaiser

unread,
Nov 20, 2005, 2:01:12 PM11/20/05
to
Create a dummy window of the "PrintTray_Notify_WndClass" class and check
whether it is faster.

I read this once:

// (from the Newsgroup microsoft.public.win32.programmer.gdi)
// running in an environment without Explorer, WINSPOOL will take 2
seconds for each ENDDOC() as it notifies
// this window about a change, and the window does only exist is EXPLORER
is present. According to someone
// in the newsgroup, WINSPOOL tries 20 times with a timeout of 100ms. Thus
let's make sure such a window is present!
_hWndPrinterNtfyTraySimulation = CreateWindow(
TEXT("PrintTray_Notify_WndClass"),
TEXT(""),
WS_POPUP,
0,0,10,10,
NULL,
NULL,
hInstance,
NULL);

Christian

"Berni" <donot...@fakeaddress.com> wrote in message
news:uX6PA0f7...@TK2MSFTNGP14.phx.gbl...

Berni

unread,
Nov 20, 2005, 2:24:15 PM11/20/05
to
Christian Kaiser schrieb:

Thanks Christian,

I will try it immediately and inform you about any progress.

Thanks again!

Berni

unread,
Nov 20, 2005, 2:41:53 PM11/20/05
to
Berni schrieb:

It worked 100% when I tried your suggestion... Thank you very much!!!!!!!!!

for (DWORD i=1;i<1001;i++)
{
printf ("Thanks Christian");
}

0 new messages