HID & QueryInterface(), COM & Carbon
HID & QueryInterface(), COM & Carbon
- Subject: HID & QueryInterface(), COM & Carbon
- From: Zack Morris <email@hidden>
- Date: Fri, 05 Apr 2002 19:39:46 -0700
Hi, I am trying to use some code in my Carbon app that was originally
inside of HID Utilities and compiled using Project Builder. This is the
line, inside of HIDCreateOpenDeviceInterface(), which is in
HID_Queue_Utilities.c:
------------------------------
// Call a method of the intermediate plug-in to create the device interface
plugInResult = (*ppPlugInInterface)->QueryInterface (ppPlugInInterface,
CFUUIDGetUUIDBytes(kIOHIDDeviceInterfaceID),
(void **) &(pDevice->interface));
------------------------------
Sorry, the tabbing is messed up, so it won't look quite like that.
Also, I had to typecase to (void**) to get it to compile (perhaps that
killed it?). The routine is a "special" COM routine called
QueryInterface(). It is from a macro called IUNKNOWN_C_GUTS which is at the
beginning of the IOCFPlugInInterface struct which is used by the HID
Utilities, and located in <IOKit/IOCFPlugIn.h>.
I have tried everything and it always seems to bomb, does anyone know a
way to pass the parameters in the correct form, or even avoid using
QueryInterface() altogether? Well, I sure hope someone has used COM in
Carbon before :) Thank you for your help,
Zack Morris
Z Sculpt Entertainment
email@hidden
http://www.zsculpt.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.