Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IOExternalMethodArguments.structure{In,Out}putDescriptor




On Nov 6, 2009, at 11:00 AM, Daniel Mack wrote:

I'm trying to get my head around how the structureOutputDescriptor and
structureInputDescriptor parameters in struct IOExternalMethodArguments
are supposed to work. In my IOUserClient::externalMethod() method
callback, they're always NULL, and calling the superclass doesn't help
either. I also tried the indirection via IOExternalMethodAction, but
the MemoryDescriptors won't get initialized.

From userspace, I'm using the new age IOConnect* functions. Is there
anything more I need to pay attention to?

How are you calling the userspace methods?

If your structure is "large" where "large" is not clearly defined, the kernel may decide that you probably don't want the whole thing copied, so it will give you an IOMemoryDescriptor that wraps your structure instead.  If you need arbitrary access you can map it, or if you want to cherry-pick fields out of it, use readBytes/WriteBytes.

HTH.

 = Mike

--
True terror is to wake up one morning and discover that your high school class is running the country. -- Kurt Vonnegut







 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-drivers mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-drivers/email@hidden

This email sent to email@hidden

References: 
 >IOExternalMethodArguments.structure{In,Out}putDescriptor (From: Daniel Mack <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.