o que há de errado neste código...

22/12/2005

0

Esta unit faz parte da biblioteca ImageLib 6.

Quando compilo minha aplicação ela dá erro.

procedure TSaveImages.Execute;
var
lpHandles : Array[0..1] of THandle;
PP, P : PSaveImageRec;
begin
lpHandles[0]:=EventDestroy;
lpHandles[1]:=EventDo;
While not Terminated do begin
case WaitForMultipleObjects(2, @lpHandles, False, INFINITE) of

WAIT_OBJECT_0+1: begin
if TaskList.Count > 0 then begin
WaitForSingleObject(HTaskMutex, INFINITE);
try
//Get a pointer to the tasklist
P := TaskList.Items[0];
//Set item in the tasklist to nil
TaskList.Items[0]:=Nil;
//Delete item in the tasklist
TaskList.Delete(0);
ReleaseMutex(HTaskMutex);
//Now its ok to add items again
Dll96v1.SaveImageToFile(P^.FileName,
P^.HDib,
P^.SaveResolution,
P^.SaveToType,
P^.TifCompression,
P^.TifSaveOpt,
P^.TifInsertAt,
P^.JpgQuality,
P^.JpgSmooth,
P^.PNGInterlaced,
P^.v_object,
P^.FCallBack);
UnlockAndFreeDib(P^.HDib);
Dispose(P);
except
on E : Exception do begin
ReleaseMutex(HTaskMutex);
end;
end;
end else begin //END if TaskList.Count > 0
ResetEvent(EventDo);
end;
//****************************************************************
end;//END WAIT_OBJECT_0+1

WAIT_OBJECT_0: begin
PP := Nil;
Exit;
end;

end; //end case
end; //End While
end;




o erro está na linha

case WaitForMultipleObjects(2, @lpHandles, False, INFINITE) of


o delphi diz:

Incompatible types : ´Array´ and ´TWOHandleArray´


Como posso resolver este problema?????


Thiagopedro

Thiagopedro

Responder

Assista grátis a nossa aula inaugural

Assitir aula

Saiba por que programar é uma questão de
sobrevivência e como aprender sem riscos

Assistir agora

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar