macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

CFDataCreate

データを作成して返します
CFDataRef  CFDataCreate ( 
            CFAllocatorRef   allocator , 
            const UInt8 *   bytes , 
            CFIndex   length );

解説

CFDataを作成して返します。

返り値

引数

( CFAllocatorRef )allocator
( const UInt8 * )bytes
( CFIndex )length

クラス

CFData

Function

使用可能

10.0

参照

例文

#include <CoreFoundation/CoreFoundation.h>

int main (int argc, const char * argv[]) {
	const UInt8 bytes[] = {0,0xff,0,0,0,0,0,0xff};
	CFDataRef dataRef = CFDataCreate(kCFAllocatorDefault, bytes, 8);

	CFShow(dataRef);
	
    return 0;
}