SP2 Causes CREATEDC API to Fail with Error 119

H

Harry Whitehouse

Hello!

I've been working this problem for days and I must have stumpled upon a
fundamental problem with SP2 and machines with certain video adapters.

I have a large commercial application (several thousand users) which is
written in Borland C++ OWL. It's nearly ten years old and extremely stable.
When I upgraded my development machine, I noted that I would throw an
exception when trying to begin a print cycle -- specifically, the exception
would throw in the process of bringing up the printer selection dialog. In
tracing my code, the problem occurs when the Win32 CreateDC API is called.
It fails with GetLastError of 119 even through the device name for the
default printer and associated DEVMODE structure looks perfect.

Now others have reported some very strange behavior with SP2 and printer
selection dialogs -- the most common symptom being very long delays before
the dialog appears (30 seconds in some cases). I see that in some of my
smaller OWL applications (in lieu of the API failure) as well as other
commerical applications. See the link below for examples of users facing
this problem, as well as the MS Newsgroup for XP Printing and FAX.

http://www.windowsbbs.com/showthread.php?t=35799&page=2&pp=15

I have some PC's in the office which don't exhibit this problem even with
SP2 installed. These are Dells' with Intel integrated video adapters. I
see this problem on Dells with NVidea and ATI adapters. I also tried an S3
adapter in my PC, but had the same problem. The bottom line is that some
SP2 PC's are impacted, others are not, and the differentiating factor is the
video card.

I mention the video adapter because after I throw my first exception
attempting to open a print selection dialog, I will see an error message if
I go into my display adapter settings. The message says something like
"Your video driver was written for an older version of Windows and can't be
used with XP. The standard VGA driver has been substituted". From this
behavior, I assume that the problem is somehow trampling over display
memory.

I have turned the Windows firewall completely off, deleted and reinstalled
my printers, installed only a single local printer, tried different default
printers, and a variety of other things. I'm stumped!

Is there a way I can get this problem definition deep into the MS XP
development group? I don't want to be a bother, but I think there really is
a significant albeit subtle problem here.

TIA

Harry
 
C

cquirke (MVP Win9x)

On Fri, 10 Dec 2004 20:02:30 -0800, "Harry Whitehouse"
I've been working this problem for days and I must have stumpled upon a
fundamental problem with SP2 and machines with certain video adapters.
I have a large commercial application (several thousand users) which is
written in Borland C++ OWL.

Ah - OWL's Borland's Windows library support, while there was
something else that did the same for DOS. The DOS one used to fight
horribly with several mouse drivers, esp if not 80x25 text mode.
I have some PC's in the office which don't exhibit this problem even with
SP2 installed. These are Dells' with Intel integrated video adapters. I
see this problem on Dells with NVidea and ATI adapters. I also tried an S3
adapter in my PC, but had the same problem. The bottom line is that some
SP2 PC's are impacted, others are not, and the differentiating factor is the
video card.
I mention the video adapter because after I throw my first exception
attempting to open a print selection dialog, I will see an error message if
I go into my display adapter settings. The message says something like
"Your video driver was written for an older version of Windows and can't be
used with XP. The standard VGA driver has been substituted". From this
behavior, I assume that the problem is somehow trampling over display
memory.
I have turned the Windows firewall completely off, deleted and reinstalled
my printers, installed only a single local printer, tried different default
printers, and a variety of other things. I'm stumped!

I'd look to ye olde UMB Exclude settings, if there's a way to apply
these to what you app sees as its environment. As a stating point,
try the broad compatibility settings in the shortcut; i.e. "run as if
Win95", "run as if Win98" etc.

Some SVGA use areas in UMB for workspace. Also, printer drivers can
be involved in screen metrics (for as-printed WYSIWYG views), and
mouse drivers/featurware can integrate deeply into SVGA too.

Try notching down video performance (if XP also offers that old Win9x
feature). If one notch reduction works, suspect mouse code issues.


-------------------- ----- ---- --- -- - - - -
Tip Of The Day:
To disable the 'Tip of the Day' feature...
 

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