[EMAIL PROTECTED] wrote:
> 
>         Recall that each dynamic dispatch routine looks something
>         like this:
> 
>                 offsetNNN:      word    0
>                 dispNNN:        load    r1,dispatchTableBase
>                                 add     r1,offsetNNN
>                                 jump    (r1)
> 
>         We don't know what the correct value for the offset will be
>         until we make a call to a driver that implements the extension
>         function.

This isn't necessarily true. The DI dispatch management code can simply
assign an unused offset at the time that GetProcAddress is called, patch
the above code to add the correct offset, and initialize any currently
existing dispatch table entries at that offset to point to a function that
does the appropriate thing (nothing, or set an error).  (this solves the
problem of what to do when the pointer is called in an unsupported context
as well).

I realize that this makes for non-static offsets when the driver updates
the dispatch table, but I don't see that as a big issue.  Are there drivers
that change the dispatch table so often that using a variable offset to do
so (or even a function call for that matter) would affect their performance?

Cheers!
-- 
Brett Johnson <[EMAIL PROTECTED]>
Workstation Systems Lab
Hewlett-Packard Company

"Politicians, like diapers, should be changed regularly,
 and for the same reason."

Reply via email to