Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Drvlineto doesn't get called

Reply
Thread Tools Display Modes

Drvlineto doesn't get called

 
 
Metroickha
Guest
Posts: n/a

 
      06-24-2010
Hello,

I have a question regarding the MSPlot sample of the WinDDK. In this sample
the function drvlineto is not implemented. I've implemented the drvlineto to
the hooktable in the enable.c, then I also added the hookflag HOOK_LINETO to
the flags. I implemented the function DrvLineTo(...).

But when I call the lineto function in MFC the function doesn't get triggered.

Somewhere I read I needed to select a solid pen with 0 width, I've tried it
but it doesn't work.

The driver does build successfully. I installed the driver. The driver gets
loaded through the CDC.createDC(...). But when I call CDC.LineTo(...) while
debugging with WinDBG, the function doesn't get hooked. Why? Does anyone
knows?

Kind regards,

Chi Wai

 
Reply With Quote
 
 
 
 
Tim Roberts
Guest
Posts: n/a

 
      06-26-2010
Metroickha <> wrote:
>
>I have a question regarding the MSPlot sample of the WinDDK. In this sample
>the function drvlineto is not implemented. I've implemented the drvlineto to
>the hooktable in the enable.c, then I also added the hookflag HOOK_LINETO to
>the flags. I implemented the function DrvLineTo(...).
>
>But when I call the lineto function in MFC the function doesn't get triggered.
>
>Somewhere I read I needed to select a solid pen with 0 width, I've tried it
>but it doesn't work.


Do you implement DrvStrokePath? If so, GDI will turn all line calls into
calls to DrvStrokePath.
--
Tim Roberts,
Providenza & Boekelheide, Inc.
 
Reply With Quote
 
Metroickha
Guest
Posts: n/a

 
      06-28-2010
Thanks for your replies mr Robers!

DrvStrokePath is already implemented with the sample. I did try to remove
its implementation. But still drvlineto seems not to work.

While debugging I noticed that 'EnableSurface' doesn't get called. Is this
because there is not physical plotter connected to the computer?

When I setup the printer in Print-to-file mode it drvlineto gets called
sometimes.
Besides that it crashes the spooler-service in Windows 7, not in XP. When I
put the printer to LTP-mode it doesn't crash the spooler-service, but it
doesn't call anything as 'EnableSurface' doesn't get called. The last
function it calls is 'CompletePDev'.

So it seems that the hooks do not associate with the createsurface. What can
I do?
Implement the function body of 'EnableSurface' in 'CompletePDEV'?

Kind regards,

Chi Wai

"Tim Roberts" wrote:

> Metroickha <> wrote:
> >
> >I have a question regarding the MSPlot sample of the WinDDK. In this sample
> >the function drvlineto is not implemented. I've implemented the drvlineto to
> >the hooktable in the enable.c, then I also added the hookflag HOOK_LINETO to
> >the flags. I implemented the function DrvLineTo(...).
> >
> >But when I call the lineto function in MFC the function doesn't get triggered.
> >
> >Somewhere I read I needed to select a solid pen with 0 width, I've tried it
> >but it doesn't work.

>
> Do you implement DrvStrokePath? If so, GDI will turn all line calls into
> calls to DrvStrokePath.
> --
> Tim Roberts,
> Providenza & Boekelheide, Inc.
> .
>

 
Reply With Quote
 
Tim Roberts
Guest
Posts: n/a

 
      06-30-2010
Metroickha <> wrote:
>
>DrvStrokePath is already implemented with the sample. I did try to remove
>its implementation. But still drvlineto seems not to work.
>
>While debugging I noticed that 'EnableSurface' doesn't get called. Is this
>because there is not physical plotter connected to the computer?


How are you installing your driver? There must have been SOMETHING to
trigger your installation -- even a virtual plotter. GDI doesn't care
whether there's a real device, as long as there is something to talk to.

How are you testing your printing?

>So it seems that the hooks do not associate with the createsurface. What can
>I do?
>Implement the function body of 'EnableSurface' in 'CompletePDEV'?


No, that's no good. You can't create the surface until GDI asks you to do
so. Tell me about your installation, and we'll go from there.
--
Tim Roberts,
Providenza & Boekelheide, Inc.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not 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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: VPN keeps dropping at the 3 minute mark Cliff Galiher Windows Small Business Server 3 12-07-2009 02:36 PM
Can't send signed messages from Windows Mail A.J. Breimer Windows Vista Mail 22 11-12-2009 02:03 AM
Re: AddDevice is not called. Don Burn Windows Vista Drivers 0 10-22-2009 01:44 PM
So called Vista Upgrade Advisor Lies to Sell OEM Vista (no recovery mechanism when you buy) Chad Harris Windows Vista Installation 1 09-10-2006 11:26 AM
ObjectNotify not called on new record clc ActiveSync 0 04-24-2006 05:10 AM



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