[ros-dev] Kernel-mode COM required for Kernel Streaming (ks.sys)

Andrew "Silver Blade" Greenwood lists at silverblade.co.uk
Mon Sep 12 12:03:11 CEST 2005


KJKHyperion wrote:

> [A long and useful tutorial on the usage of COM]
>
Thanks for that! I'll have a read of that later when I'm a bit more awake ;)

My main concern right now is support of COM in the kernel. It seems to 
me like a pretty evil idea (the concept of what it aims to achieve is 
good, but it's still darn ugly!)

I don't know how much of this ReactOS is capable of already. It seems 
the MS DDK has files such as "punknown.h" which define IUnknown, yet we 
don't have that. When I included the MS file, I got compiler errors 
about duplicate definitions of IUnknown.

It seems that I may need to create some additional framework for 
kernel-mode COM.

And I'm wondering, of course, how you work with these classes in 
kernel-mode, where there's no CoCreateInstance (seems to be a 
KoCreateInstance but it's part of ks.sys and not documented?)

I got stuck with this when stubbing portcls.sys and got errors regarding 
parameters with types that weren't declared. I looked them up and found 
them to be COM objects with a seemingly endless structure!

But it seems a little more logical: PcCreatePort is a factory for IPort 
(and, presumably, "sub-classes"?)

Finally, the MS DDK has most of it's WDM samples in C++, with no 
indication of how the calls get translated into the Kernel Streaming 
functions. What's the deal here? Do I use C++ or is it not necessary?

-Andrew


More information about the Ros-dev mailing list