本文整理汇总了C++中TFileStream::WriteBuffer方法的典型用法代码示例。如果您正苦于以下问题:C++ TFileStream::WriteBuffer方法的具体用法?C++ TFileStream::WriteBuffer怎么用?C++ TFileStream::WriteBuffer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TFileStream
的用法示例。
在下文中一共展示了TFileStream::WriteBuffer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TFileStream
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
AnsiString s;
TFileStream* fs;
int i;
s = "";
if (lbTables->SelCount > 0)
for (i = 0; i < lbTables->Items->Count; i++)
if (lbTables->Selected[i])
{
ACRTable1->TableName = lbTables->Items->Strings[i];
s = s + ACRTable1->ExportTableToSQL(
cbExportStructure->Checked,
cbAddDROPTable->Checked,
cbExportIndexes->Checked,
cbAddDROPIndex->Checked,
cbExportData->Checked,
cbExportBLOBFields->Checked,
cbUseBrackets->Checked);
};
Memo1->Text = s;
fs = new TFileStream("test.sql",fmCreate);
fs->WriteBuffer(&s[1],s.Length());
delete fs;
}
示例2: RecreateSections
void TUserIniFile::RecreateSections()
{
const String CR = "\n";
String* S;
TFileStream* FileStream = new TFileStream(FileName, fmCreate);
try {
for(int i=0; i < SectionCount(); i++) {
FileStream->Seek(0, soFromEnd);
S = new String();
*S = Format((String)"%s[%s]%s", ARRAYOFCONST((CR, SectionNames[i], CR)));
FileStream->WriteBuffer((const void *)S, S->Length());
delete S;
}
}
__finally {
delete FileStream;
}
}
示例3: TFileStream
BOOL TStripInfo::SaveInfo(CONST TCHAR* szFilePath)
{
TFileStream* inStream = new TFileStream(szFilePath, fmCreate);
inStream->WriteBuffer(&_stripVisual->fPRSMarkX, sizeof(INT32));
inStream->WriteBuffer(&_stripVisual->fPRSMarkY, sizeof(INT32));
inStream->WriteBuffer(&_stripVisual->fDeviceSizeX, sizeof(FLOAT));
inStream->WriteBuffer(&_stripVisual->fDeviceSizeY, sizeof(FLOAT));
inStream->WriteBuffer(&_stripVisual->clSelectUnitSheet, sizeof(TColor));
inStream->WriteBuffer(&_stripVisual->clSelectUnitOutline, sizeof(TColor));
inStream->WriteBuffer(&_stripVisual->clDefaultUnitSheet, sizeof(TColor));
inStream->WriteBuffer(&_stripVisual->clDefaultUnitOutline, sizeof(TColor));
inStream->WriteBuffer(&_stripVisual->nAngle, sizeof(INT32));
inStream->WriteBuffer(&_stripVisual->clIndicateLine, sizeof(TColor));
inStream->WriteBuffer(&_stripVisual->nOriginLocation, sizeof(INT32));
inStream->WriteBuffer(&_stripUnits->fUnitXSize, sizeof(FLOAT));
inStream->WriteBuffer(&_stripUnits->fUnitYSize, sizeof(FLOAT));
inStream->WriteBuffer(&_stripUnits->fUnitXPitch, sizeof(FLOAT));
inStream->WriteBuffer(&_stripUnits->fUnitYPitch, sizeof(FLOAT));
inStream->WriteBuffer(&_stripUnits->nUnitXCountPerBlock, sizeof(INT32));
inStream->WriteBuffer(&_stripUnits->nUnitYCountPerBlock, sizeof(INT32));
inStream->WriteBuffer(&_stripUnits->fFirstMarkToUnitCenterX, sizeof(FLOAT));
inStream->WriteBuffer(&_stripUnits->fFirstMarkToUnitCenterY, sizeof(FLOAT));
inStream->WriteBuffer(&_stripBlock->nBlockXCount, sizeof(INT32));
inStream->WriteBuffer(&_stripBlock->nBlockYCount, sizeof(INT32));
inStream->WriteBuffer(&_stripBlock->fBlockXPitch, sizeof(FLOAT));
inStream->WriteBuffer(&_stripBlock->fBlockYPitch, sizeof(FLOAT));
delete inStream;
return true;
}