Tím "příkazem" jsem myslel toto:delka = FileSize(fname); // 64 bitů //* Zkusíme otevřít soubor pro čtení *//
HANDLE handle = CreateFile(fname, GENERIC_READ, 0, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
//if (handle == INVALID_HANDLE_VALUE)
// report_error("Unable to open input file!\n");
//* Alokujeme pamět pro celý soubor *//
static const SIZE_T giga = 1024 * 1024 * 1024;
static const SIZE_T size = 5 * giga;
ptr = static_cast<BYTE*>(VirtualAlloc(NULL, size, MEM_COMMIT, PAGE_READWRITE));
bsrc = ptr; //* Načteme soubor *//
DWORD bytes_read;
cti_znaku = cti_blok;
do {
BOOL e = ReadFile(handle, ptr, cti_znaku, &bytes_read, nullptr);
nacteno += bytes_read;
ptr += bytes_read;
if (delka - nacteno < cti_blok) {
cti_znaku = delka - nacteno;
}
} while (nacteno < delka);
CloseHandle(handle);