【发布时间】:2014-09-14 14:33:06
【问题描述】:
首先,这与古代技术有关。我正在开发的程序端口在 Metrowerks Codewarrior 9 中维护,目标是 PPC。
用于 MSL C 的 FSRefParentAndFilename_fopen 函数
FILE * FSRefParentAndFilename_fopen(
const FSRefPtr theParentRef,
ConstHFSUniStr255Param theName,
const char *open_mode);
我需要一个 ConstHFSUniStr255Param,它是一个指向 HFSUniStr255 的指针。 我有一个包含我的文件名的 CFString,我的问题是如何转换为 HFSUniStr255?
struct HFSUniStr255 {
UInt16 length;
UniChar unicode[255];
};
到目前为止我有:
HFSUniStr255 HFSString;
FSGetDataForkName(&HFSString);
HFSString.length=(uint16)CFStringGetLength(fileName);
HFSString.unicode=?
【问题讨论】:
标签: c++ c macos macos-carbon codewarrior