本文整理汇总了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;
}
示例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
}
示例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;
}
}
示例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;
}
示例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;
}
}
示例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;
}