Connecting Tech Pros Worldwide Forums | Help | Site Map

pointer to pointer to void (void**) - iTunes VisualSDK

Newbie
 
Join Date: Sep 2008
Posts: 1
#1: Sep 4 '08
Hey guys,

I'm sorry if this question is rather second grade of programming, but my C programming days are long ago :-(
I'm trying to write a visual plugin for iTunes using their VisualSDK, which contains a function to retrieve the AlbumArt (Cover) of the currently played song.
Now the returns the cover as a "Handle", which in the SDK's case is a "void **" pointer. I have no clue, whether this actually points to a byte array bitmap and the API information is more than shallow. Hence, my question:

How can I proceed with the "void **" pointer? Is there a way to gain the size of what it is pointing at so that I can write it as binary data to a file?

Regards,

Sebastian

Moderator
 
Join Date: Mar 2007
Location: North Bend Washington USA
Posts: 5,370
#2: Sep 4 '08

re: pointer to pointer to void (void**) - iTunes VisualSDK


You can tell from a pointer the size if the thing it points at becuse the pointer has a type, like an int* or a double*.

In your case you have a void**. That's just the address of a another void*. And that void* has the address of the thing.

Because of the "void-ness", you don't have the type so you are now blind.

I suspect you will need to have this information kept somewhere when you create the thing pointed at so you can get at that information here when you need it.
Banfa's Avatar
AdministratorVoR
 
Join Date: Feb 2006
Location: South West UK
Posts: 6,171
#3: Sep 5 '08

re: pointer to pointer to void (void**) - iTunes VisualSDK


Alternatively having got the handle look for further API functions to call that take a handle and return useful information.
Reply