我将以下职能称为DVDPlaybackOS X框架:
OSStatus DVDGetMediaVolumeCFName (
CFStringRef *outDiscVolumeCFName
);
最后,我提出了以下工作守则:
framework DVDPlayback
p2 = Pointer.new_with_type( ^{__CFString} )
DVDGetMediaVolumeCFName(p2)
但我在任何文件中都找不到<代码>>> CFString}的比照,并且只发现了后来实际做些什么(我最初将它从错误信息中删除和贴出)。 我先审判点人,然后,两点:直截了当。
因此,我的问题是:
- what s the best way to get this pointer (my way seems ugly)?
- why didn t Pointer.new(:string) work? I thought String, NSString, and CFString were equivalent
- where would I have looked to find this info? (I checked the MacRuby site, "macro Pointer" reported "Nothing known about Pointer", ~12 google hits, and "MacRuby: The Definitive Guide")