🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.borland-delphi
Article #261

Delphi und 'C' DLL ('Gleitkomma�berlauf')

#261
From: BrainBug
Date: Sat, 03 Mar 2001 09:13
74 lines
3853 bytes
Hallo, da drau�en !

Ich habe ein Problem (Delphi 4), das sich auf eine C - DLL bezieht Namens
h8h6dll.dll.
Wenn ich die DLL, die zur ansteuerung eines mini Computers dient, auf meinem
Win98 System teste, klappt alles. Wenn ich dann aber mein Programm auf den
mini Computer mit Win95 kopiere und dort ausf�hre, bekomme ich den Fehler
'Gleitkomma�berlauf' als Feedback. Woran kann das liegen ? 16 Bit und 32 Bit
Integerwerte habe ich schon in betracht gezogen !

Hier die Ansteuerung f�r C:

exten "C" _declspec(dllexport) unsigned int GetMFTCradleState(void)

Beschreibung:
Diese Funktion liefert den Wert 0, wenn sich der mini Computer NICHT in
seiner
Ladestation (Cradle) befindet, den Wert 1, wenn er sich in der Ladestation
befindet
und 255 bei einem Fehler.

Hier mein Source:
----------------------------------------------------------------------------
-----------------------------------

{...}

var
  Form1: TForm1;

var
  online : Integer;
  error : Boolean;

implementation

{$R *.DFM}

function GetMFTCradleState : Char; stdcall; external 'h8h6dll';
{Externe Funktion}

{...}

procedure TForm1.Timer1Timer(Sender: TObject);
begin
 if (Ord(GetMFTCradleState)  = 0) and (online <> 0) and (error = false) then
  begin
   online := 0;
   ListBox.Items.Add(TimeToStr(Now) + ' --> Das MFT befindet sich nicht im
Cradle.');
  end;
 if (Ord(GetMFTCradleState) = 1) and (online <> 1) and (error = false) then
  begin
   ListBox.Items.Add(TimeToStr(Now) + ' --> Das MFT befindet sich im
Cradle.');
   online := 1;
  end;
 if (Ord(GetMFTCradleState) = 255)  and (error = false) then
  begin
   ListBox.Items.Add(TimeToStr(Now) + ' --> Fehler: Kann Cradle nicht pr�fen
!');
   ListBox.Items.Add(TimeToStr(Now) + ' --> Bitte das Programm neu starten
!');
   error := true;
  end;
end;

{...}
----------------------------------------------------------------------------
-----------------------------------
Ich freue mich �ber jeden Tipp, der mir igendwie weiterhilft !

MfG
BrainBug
Technical Details
Message-ID: <97qcfq$n6t$05$1@news.t-online.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!hermes.visi.com!news-out.visi.com!feeder.qis.net!ptdnetP!newsgate.ptd.net!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: GERMAN,ASCII
X-Google-Thread: fd817,3cd561c8a750d400,start
X-Google-Attributes: gidfd817,public
X-Google-Thread: f5cad,3cd561c8a750d400,start
X-Google-Attributes: gidf5cad,public
X-Google-Thread: f8f68,3cd561c8a750d400,start
X-Google-Attributes: gidf8f68,public
X-Google-Thread: f6386,3cd561c8a750d400,start
X-Google-Attributes: gidf6386,public
X-Google-Thread: ff75c,3cd561c8a750d400,start
X-Google-Attributes: gidff75c,public
X-Google-Thread: 105ac8,3cd561c8a750d400,start
X-Google-Attributes: gid105ac8,public
X-Google-Thread: 10b980,3cd561c8a750d400,start
X-Google-Attributes: gid10b980,public
X-Google-ArrivalTime: 2001-03-03 15:28:04 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!hermes.visi.com!news-out.visi.com!feeder.qis.net!ptdnetP!newsgate.ptd.net!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail
From: "BrainBug" <BrainBug@haxen.de>
Newsgroups: alt.comp.borland-delphi,alt.comp.lang.borland-delphi,borland.public.delphi.basm,borland.public.delphi.database.ado,borland.public.delphi.database.desktop,borland.public.delphi.database.interbaseexpress,borland.public.delphi.database.multi-tier,borl
Subject: Delphi und 'C' DLL ('Gleitkomma�berlauf')
Date: Sat, 3 Mar 2001 10:13:36 +0100
Organization: T-Online
Lines: 76
Message-ID: <97qcfq$n6t$05$1@news.t-online.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: news.t-online.com 983610682 05 23773 uo2NdzVSFYshN 010303 09:11:22
X-Complaints-To: abuse@t-online.com
X-Sender: 0526113630-0001@t-dialin.net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200