I’m using a modified version of the DDK Mirror sample component and I’m trying to call ExAllocatePoolWithTag() from the display driver portion of this component to allocate a buffer that has isn’t related to video memory. (I just want something equilivent to a malloc…) When I compiled the driver, it didn’t link. I googled it, and one posting indicated that WIN32K will simply refuse to load your driver DLL if it imports anything else that is not exported by Win32K.sys.
I did try creating a static lib that exported a function that wrapped the ExAllocatePoolWithTag() call, but when I ran it, I got a nasty message from the OS saying that my vga driver was out of date and it was reverting to a default one and now I never get to DrvEscape handler in the mirror display driver’s handler even though I’ve reverted back to an old version of the mirror driver that didn’t link against the lib I created. (Time to re-image my PC I guess…)
Could somebody please confirm that I cannot statically link to a export library that I create? Also, if this is the case, would the work-around be dynamically calling my wrapper function (inside a DLL)? Would this work given that I’m trying trying to call an Ex* function?
If not, any other suggestions?
thanks
You don’t and you can’t. period.
See my answer in the other post.
— “S. Drasnin” wrote:
> I’m using a modified version of the DDK Mirror
> sample component and I’m trying to call
> ExAllocatePoolWithTag() from the display driver
> portion of this component to allocate a buffer that
> has isn’t related to video memory. (I just want
> something equilivent to a malloc…) When I compiled
> the driver, it didn’t link. I googled it, and one
> posting indicated that WIN32K will simply refuse to
> load your driver DLL if it imports anything else
> that is not exported by Win32K.sys.
>
> I did try creating a static lib that exported a
> function that wrapped the ExAllocatePoolWithTag()
> call, but when I ran it, I got a nasty message from
> the OS saying that my vga driver was out of date and
> it was reverting to a default one and now I never
> get to DrvEscape handler in the mirror display
> driver’s handler even though I’ve reverted back to
> an old version of the mirror driver that didn’t link
> against the lib I created. (Time to re-image my PC I
> guess…)
>
> Could somebody please confirm that I cannot
> statically link to a export library that I create?
> Also, if this is the case, would the work-around be
> dynamically calling my wrapper function (inside a
> DLL)? Would this work given that I’m trying trying
> to call an Ex* function?
>
> If not, any other suggestions?
>
> thanks
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown
> lmsubst tag argument: ‘’
> To unsubscribe send a blank email to
xxxxx@lists.osr.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com