Hi Guys,
I am very new to the driver community and have run into a
vague problem. The problem description is as under
- I used the MS plotter driver sample code to write a
new print driver. - I customize the printer graphics dll ( plotter.dll ),
to output my own set of instructions instead of HP-GL. - I install the driver, and all works fine. I can debug
through the callbacks etc.
Now I make some more changes into the dll, build it again(
a checked build ), and I physically replace the dll at the position
where it was installed.
Still things work fine. The application can get the device
context for this driver.
But after a while doing the same thing, from the
application CreateDC returns NULL. Checking GetLastError, tells me
"The operation completed successfully":-). So that does not help me. I
check the devmode, and devname... they appear to be fine. So what
could be the problem?
I have some thinking lines
- I should not be physically replacing the dll?
- There are some registry entries which might be invalid?
- I am linking to a C++ file with extern "C" linkage, does
that create a problem? There is a related query here, I cannot use new
and delete, what compiler flag is missing in the source file? - The checked build just bloats up the driver, and GDI
can't load it into memory?
Can someone help me with this? If anyone has any pointers, it
will be of immense help.
Thanks,
Kartik
============================================================
"A slow sort of country!" said the Queen. "Now, HERE, you see, it
takes all the running YOU can do, to keep in the same place.
If you want to get somewhere else, you must run at least twice as
fast as that."
-Lewis Carroll