Вниз
Скачать: 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
14-56894
y-soft
2003-10-17 08:19
2003.11.17
Екатеринбург!


14-56892
Nelud
2003-10-25 17:31
2003.11.17
Интересно, а где


14-56884
MPS
2003-10-25 04:59
2003.11.17
Visual C++ vs Borland C++


1-56738
uu
2003-11-06 15:47
2003.11.17
GIF


7-56935
alexm
2003-09-06 11:09
2003.11.17
Как работать с USB портом




   Наверх