Пример #1
0
static void PV_WriteToFile(char *buffer, unsigned long size)
{
	if (fileOut)
	{
		XFileWrite(fileOut, buffer, size);
	}
}
Пример #2
0
void WriteZeroedSectors(
		PXFILE File, 
		DWORD Number, 
		PBYTE TransferBuffer,
		DWORD TransferBufferSize,
		BOOL DisplayProgress)
{
	DWORD	Remaining = Number;

	memset(TransferBuffer, 0, TransferBufferSize);

	while(Remaining)
	{
		XFileWrite(File, TransferBuffer, min(TransferBufferSize / 2048, Remaining) * 2048);
		Remaining -= min(TransferBufferSize / 2048, Remaining);

		if (DisplayProgress)
			DisplayGauge(Number - Remaining, Number);
	}

	if (DisplayProgress)
		ClearGauge();
}