Passing an object into a ManagementTask -
05-14-2009
, 04:35 PM
I'm trying a relatively simple task between two separate WMI-registered
classes - MyOwner and MyItem. On MyOwner, I want to declare a task called
"ProcessItem" that takes in an instance of MyItem, so I add
ManagementTaskAttribute onto ProcessItem. However, even though both classes
are marked with ManagementEntityAttribute, I get an error during installation
: "Type is unsupported". Now, I can't find any indication in the rather
sparse WMI documentation saying why this is unsupported, and the closest
answer I have gotten is from a post I can't reply to (URL at end), coming
from Gabriel GHIZILA:
"Embedded objects of any kind are not supported. The only available option
for
such behavior would be to return a reference (in WMI sense) to an object."
The problem is, I don't know what the author means by "embedded objects" and
"return a reference (in WMI sense) to an object". Does anyone with a good
knowledge of this stuff know if "embedded object" is a WMI-specific term or
just a generic phrase meaning "reference type", and additionally what it
means (and how to do it) to return a reference in WMI (or to pass a reference
in)?
(BTW: I am having to cross process boundaries, so I don't believe that I can
get away with just passing in a memory address; does WMI even allow a caller
to exchange information that is more complex than strings/ints?
http://groups.google.com/group/microsoft.public.dotnet.framework.wmi/browse_thread/thread/d600040d719d6d60/b89ef2a79e7d3e04?#b89ef2a79e7d3e04 |