Mailing Lists: Apple Mailing Lists

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

C++ interface definitions



 
> Message: 1
> Date: Tue, 9 Aug 2005 09:54:11 -0400
> From: Anthony Malizia <email@hidden>
> Subject: C++ interface definitions
> To: email@hidden
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
> 
> Hello:
> The IOUSB... and IOHID... interfaces are COM interfaces.  But I only
> see the C declarations for these.  Do you know where I can find the C+
> + declarations so that I can use the interfaces without the extra
> indirection or that extra first parameter?
> 
There aren't any C++ declarations.

The fact that they are COM interfaces would be useful if you are an
implementer, rather than a client, although *declaring* such interfaces
directly in C++ requires that the compiler can lay out vtables in a
COM-compatible way, and AFAIK gcc cannot.

On the client side, you can write your own C++ wrapper around e.g.
IOUSBInterfaceInterface, but it is a lot of typing for little return. The
Firewire SDK contains C++ wrappers around Firewire interfaces (see
FWLib_Device.h), which you could use as an example.

hth, Stuart



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

This email sent to 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.