On Jan 26, 2007, at 2:52 PM, Aliacta wrote:
I'm a bit clueless about what the data type should be. I've
already tried a declare that returns a CString or a PString without
luck. I'd be happy if I got as far as putting it in a binary RB
string. Here's the function itself I need to interpret the result
from:
MDQueryGetAttributeValueOfResultAtIndex
Returns the value of the named attribute for the result at the given index.
void *MDQueryGetAttributeValueOfResultAtIndex (
MDQueryRef query,
CFStringRef name,
CFIndex idx
);
Parameter Descriptions
query
The query.
name
The attribute name to return the values of. If the attribute is not
one of those requested in the valueListAttrs or sortingAttrs
parameters to one of the query creation functions, the result will
be NULL.
idx
The index into the query's result list. If the index is negative or
is equal to or larger than the current number of results in the
query, the behavior is undefined.
function result
The value of the attribute, or NULL if the attribute doesn't exist
for the specidied result.
Gotta love void pointers
It looks like you can get back a pointer to any one of several types
depending on what attributes you asked for (and by extension what
type it is)
A browse through the Spoltlight Query Programming Ref regarding
MDItemRef is what leads me to this conclusion and I could easily be
wrong
That's been my conclusion too so far and at this stage I'm not very
concerned about the data type. I'd already be happy if I were able to
just get to the data and put it in an RB string or variant. I'd
worry later about interpreting that.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>