Estoy tratando de utilizar SetupDiCreateDeviceInfoList pero me da error en tiempo de compilación mi codigo es el sgte:
Código Delphi
[-]procedure TForm1.FormShow(Sender: TObject);
function CrearLista : HDEVINFO;
begin
Result:=SetupDiCreateDeviceInfoList(nil,HWND_DESKTOP);
end;
begin
if (CrearLista = INVALID_HANDLE_VALUE) then
begin
ShowMessage('La creación de la lista falló en: '+inttostr(GetLastError()));
end;
end;
pero me da error de compilación en la sgte línea:
if (CrearLista = INVALID_HANDLE_VALUE) then
me dice:
[Error] Unit1.pas(34): Operator not applicable to this operand type