Hi all. I am trying and getting very frustrated trying to check and see if a
scanner is connected or turned on in my program inteface. There doesnt seem
to be anything in Twain that serves the purpose. Here is what I have done
below 'which should' work, but doesnt. Any ideas?

MciOpen: TMCI_Open_Parms;
MCIResult: LongInt;
DeviceID,Flags:word;
begin
  MciOpen.lpstrDeviceType := pchar(MCI_DEVTYPE_SCANNER);
  MciOpen.lpstrElementName := '';
  Flags := MCI_OPEN_TYPE or MCI_OPEN_TYPE_ID;
  rxlabel1.Caption:='';
  if (MCIResult = MciSendCommand(0,MCI_OPEN, Flags, LongInt(@MciOpen)))
  then Rxlabel1.Caption:='Bugger' else
  Rxlabel1.caption:='Online';

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to