[cffi-devel] Passing address of pointer
Luís Oliveira
luismbo at gmail.com
Thu Aug 25 23:20:44 UTC 2011
Hello Frank,
On Thu, Aug 25, 2011 at 6:19 PM, Frank Goenninger <frgo at me.com> wrote:
> In the sample code from Apple the C function is called like this:
>
> typedef struct MyPrivateData {
> io_object_t notification;
> IOUSBDeviceInterface **deviceInterface;
> CFStringRef deviceName;
> UInt32 locationID;
> } MyPrivateData;
Why is deviceInterface a pointer to a pointer?
> IOCFPlugInInterface **plugInInterface = NULL;
> SInt32 score;
> HRESULT res;
>
> res = (*plugInInterface)->QueryInterface( plugInInterface,
> CFUUIDGetUUIDBytes( kIOUSBDeviceInterfaceID ),
> (LPVOID*) &privateDataRef->deviceInterface );
--
Luís Oliveira
http://r42.eu/~luis/
More information about the cffi-devel
mailing list