当前位置: 首页>>代码示例>>C++>>正文


C++ FILEIO::Fwrite方法代码示例

本文整理汇总了C++中FILEIO::Fwrite方法的典型用法代码示例。如果您正苦于以下问题:C++ FILEIO::Fwrite方法的具体用法?C++ FILEIO::Fwrite怎么用?C++ FILEIO::Fwrite使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FILEIO的用法示例。


在下文中一共展示了FILEIO::Fwrite方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: release

void CMOS::release()
{
	FILEIO* fio = new FILEIO();
	if(fio->Fopen(emu->bios_path(_T("CMOS.BIN")), FILEIO_WRITE_BINARY)) {
		fio->Fwrite(cmos, sizeof(cmos), 1);
		fio->Fclose();
	}
	delete fio;
}
开发者ID:meesokim,项目名称:fc-100,代码行数:9,代码来源:cmos.cpp

示例2: FILEIO

void RP5C01::release()
{
#ifndef HAS_RP5C15
	// save ram image
	FILEIO* fio = new FILEIO();
	if(fio->Fopen(emu->bios_path(_T("RP5C01.BIN")), FILEIO_WRITE_BINARY)) {
		fio->Fwrite(ram, sizeof(ram), 1);
		fio->Fclose();
	}
	delete fio;
#endif
}
开发者ID:meesokim,项目名称:fc-100,代码行数:12,代码来源:rp5c01.cpp

示例3: FILEIO

void RAMPAC2::release()
{
	// save modified data
	if(opened && modified) {
		FILEIO* fio = new FILEIO();
		if(fio->Fopen(path, FILEIO_WRITE_BINARY)) {
			fio->Fwrite(ram, sizeof(ram), 1);
			fio->Fclose();
		}
		delete fio;
	}
}
开发者ID:ysei,项目名称:common_source_project-fm7,代码行数:12,代码来源:rampac2.cpp

示例4: release

void RTC::release()
{
	// set power off time
	regs[POFMI] = TO_BCD(cur_time.minute);
	regs[POFH] = TO_BCD(cur_time.hour);
	regs[POFD] = TO_BCD(cur_time.day);
	
	// save rtc regs image
	FILEIO* fio = new FILEIO();
	if(fio->Fopen(create_local_path(_T("RTC.BIN")), FILEIO_WRITE_BINARY)) {
		fio->Fwrite(regs + 8, 32, 1);
		fio->Fclose();
	}
	delete fio;
}
开发者ID:ysei,项目名称:common_source_project-fm7,代码行数:15,代码来源:rtc.cpp

示例5: FILEIO

VM::~VM()
{
	FILEIO* fio = new FILEIO();
	if(fio->Fopen(create_local_path(_T("RAM.BIN")), FILEIO_WRITE_BINARY)) {
		fio->Fwrite(ram, sizeof(ram), 1);
		fio->Fclose();
	}
	delete fio;
	
	// delete all devices
	for(DEVICE* device = first_device; device;) {
		DEVICE *next_device = device->next_device;
		device->release();
		delete device;
		device = next_device;
	}
}
开发者ID:ysei,项目名称:common_source_project-fm7,代码行数:17,代码来源:fp200.cpp

示例6: save_config

void save_config()
{
	// get config path
	_TCHAR app_path[_MAX_PATH], config_path[_MAX_PATH];
	GetModuleFileName(NULL, app_path, _MAX_PATH);
	int pt = _tcslen(app_path);
	while(pt >= 0 && app_path[pt] != _T('\\')) {
		pt--;
	}
	app_path[pt + 1] = _T('\0');
	_stprintf(config_path, _T("%s%s.cfg"), app_path, _T(CONFIG_NAME));
	
	// save config
	FILEIO* fio = new FILEIO();
	if(fio->Fopen(config_path, FILEIO_WRITE_BINARY)) {
		fio->Fwrite((void *)&config, sizeof(config), 1);
		fio->Fclose();
	}
	delete fio;
}
开发者ID:meesokim,项目名称:fc-100,代码行数:20,代码来源:config.cpp


注:本文中的FILEIO::Fwrite方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。