Hi all,
I¹ve got my Win32 QuickTime-using plugin compiling now, pretty much. But,
one thing is causing me problems. I need to convert a REALstring into a
CFString on Windows. And I can¹t find a way to do so.
³But surely there isn¹t such a thing as CFString on Windows?², you cry.
Well, if you have the QuickTime Windows SDK installed, it contains a whole
bunch of Win32 wrappers for common mac types such as all the CFObjects, and
also lots of CoreAudio types. It uses these wrappers to provide a common
API on Mac and Windows. So, it expects the (wrapper) CFStrings, CFURLs and
so on on Win32 too.
I tried this (where inParameters->Location is a REALstring):
const char *LocationCString = REALCString(inParameters->Location);
if (LocationCString == NULL)
{
return -1;
}
CFStringRef LocationCFString = CFStringCreateWithCString(NULL,
LocationCString, REALGetStringEncoding(inParameters->Location));
if (LocationCFString == NULL)
{
return -1;
}
This second call always returns NULL.
I tried passing the output from REALCString to the Windows debugging
function OutputDebugString:
OutputDebugString(LocationCString);
....and I got a whole bunch of high-ASCII mixed characters, not what I was
expecting at all. On a MachO compile, the string is returned as expected
and the CFString is created okay.
Any ideas? Are CStrings different on Windows somehow? Help much
appreciated, as I¹m at a loose end without a way to get a CFString.
Dave.
_______________________________________________
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>
|