Вниз
Скачать: CL | DM;

В чем проблема?   Найти похожие ветки 

← →
_незнайка_   (2003-11-05 12:12) [0]

Привет..

Читаю сектора диска в буффер и т.д... все работает как полагается, НО как только я меняю размер любого окна или перетаскиваю его (explorer и т.п.) вылетает ошибка:"Not enought storage is available to process this command" Ошибка появляется в этом блоке:

pos64 := sectornum * BLOCKSIZE;
n := Windows.SetFilePointer( hDevice, rPos64.Lo, @rPos64.Hi, FILE_BEGIN );
rc := GetLastError;
if rc<>NO_ERROR then
begin
AddToLog(SysErrorMessage(rc));
Exit;
end;

В ЧЕМ БРОБЛЕМА?!


← →
_незнайка_   (2003-11-05 12:54) [1]

На всякий случай приведу всю функцию, хотя она достаточно стандартная:

function TMainForm.ReadSector( const hDevice : THandle; const sectornum : int64) : Boolean;
var
rc : DWORD ;
n : DWORD ;
pos64 : int64 ;
rPos64 : int64Rec absolute pos64 ;
begin

Result := False;

pos64 := sectornum * BLOCKSIZE;
n := SetFilePointer(hDevice , rPos64.Lo, @rPos64.Hi, FILE_BEGIN );
rc := GetLastError;
if rc<>NO_ERROR then
begin
AddToLog(SysErrorMessage(rc));
Exit;
end;
if n <> rPos64.Lo then rPos64.Lo := n;
if not Windows.ReadFile( hDevice, HDDBuffer[0], BLOCKSIZE, n, nil ) then
begin
AddToLog(SysErrorMessage(GetLastError));
Exit;
end;
Result := true;
end;



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.014 c
1-56749
MMA
2003-11-06 15:50
2003.11.17
Проблема с процессами


14-56875
Vlad Oshin
2003-10-26 15:57
2003.11.17
Антология -


1-56744
Intense
2003-11-07 22:15
2003.11.17
создание MDI-окна в run-time


6-56789
Novenkij
2003-09-21 14:40
2003.11.17
Как узнать размер Stream


1-56731
able
2003-11-06 20:13
2003.11.17
Хинт




   Наверх