Autor Beitrag
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Fr 24.12.04 18:31 
Hallo !!

Ich habe das Problem, dass ich daheim keinen Rechner mit Windows 9x habe.
Ich will in meinem Programm einen Code vom Swissdelphicenter verwenden:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
function LastInput: DWord;
var
  LInput: TLastInputInfo;
begin
  LInput.cbSize := SizeOf(TLastInputInfo);
  GetLastInputInfo(LInput);
  Result := GetTickCount - LInput.dwTime;
end;


//Example:
procedure TForm1.Timer1Timer(Sender: TObject);
begin
  Label1.Caption := Format('System Idle since %d ms', [LastInput]);
end;
-> www.swissdelphicente...showcode.php?id=2018

und ich will wissen, wie sich dieser Code unter Win 95/98/ME verhält.
Kann mit das jemand sagen, oder kann bitte mal jemand den Code complieren und auf einem solchen Windows ausführen ??

Danke

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Sprint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 849



BeitragVerfasst: Fr 24.12.04 18:46 
Für die Funktion benötigt man mindestens Windows 2000. Wenn du die Funktion statisch Linken tust, dann wird deine Anwendung unter Windows 9x/NT (hab nur unter Win95 getestet und in das PSDK geguckt) nicht ausgeführt.

_________________
Ciao, Sprint.
matze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Fr 24.12.04 19:06 
was passiert denn genau wenn du das unter Win 95 ausführst ?

_________________
In the beginning was the word.
And the word was content-type: text/plain.
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Fr 24.12.04 19:49 
Es kommt eine Meldung, die in etwa so aussieht:

bla.exe konnte nicht ausgeführt werden da der Prozedureinsprungpunkt GetLastInputInfo in blub-systemdll.dll nicht gefunden werden konnte.

AXMD
.Chef
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1112



BeitragVerfasst: Fr 24.12.04 19:49 
Unter WIN98SE:

Fehler beim Starten des Programms.
Die Datei PROJECT1.EXE ist verknüpft mit dem fehlenden Export-USER32.DLL:GetLastInputInfo

Vielleicht kann man die Funktion über die DLL einbinden? Probiers einfach mal aus, ich geh jetzt Abendbrot essen. ;-)

_________________
Die Antworten auf die 5 häufigsten Fragen:
1. Copy(), Pos(), Length() --- 2. DoubleBuffered:=True; --- 3. Application.ProcessMessages bzw. TThread --- 4. ShellExecute() --- 5. Keine Vergleiche von Real-Typen mit "="!
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Fr 24.12.04 22:09 
Ein Blick ins PSDK beantwortet viele Fragen:
Zitat:

Minimum operating systems Windows 2000
matze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Fr 24.12.04 22:25 
Luckie hat folgendes geschrieben:
Ein Blick ins PSDK beantwortet viele Fragen:
Zitat:

Minimum operating systems Windows 2000

ja das wusste ich auch schon. ich wollte ja nur wissen, wie sich das dann unter 9x äussert !!!

Wie kann ich denn diese Fehlermedlung umgehen ?
also quasi diesen programmabschnitt für 9x user abkoppeln ?

_________________
In the beginning was the word.
And the word was content-type: text/plain.
galagher
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2556
Erhaltene Danke: 45

Windows 10 Home
Delphi 10.1 Starter, Lazarus 2.0.6
BeitragVerfasst: Fr 24.12.04 22:44 
matze hat folgendes geschrieben:
Wie kann ich denn diese Fehlermedlung umgehen ?
also quasi diesen programmabschnitt für 9x user abkoppeln ?

Hallo, das hier könnte dir helfen:
www.delphi-source.de/tipps/?id=182

_________________
gedunstig war's - und fahle wornen zerschellten karsig im gestrock. oh graus, es gloomt der jabberwock - und die graisligen gulpen nurmen!
matze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Fr 24.12.04 22:48 
ja reicht das denn, wenn ich eine abfrage davor einbaue, oder wird diese fehlermedlung ausgegeben, wenn ich das programm nur starte ?

_________________
In the beginning was the word.
And the word was content-type: text/plain.
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Fr 24.12.04 23:37 
Du darfst auf jeden Fall die Funktion nicht mit "function Get???Idle???Info (Params:Irgendwas): Ergebnis; external 'somelib.dll' name 'Get???Idle???Info'; einbinden, da diese dann statisch eingebunden wäre ...

Du musst das etwa folgendermaßen machen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
hDLL = LoadLibrary('DeineDll.dll');
If (hDLL <> 0and (hDLL <> INVALID_HANDLE_VALUE) Then
Begin
    @DieInfoProc := GetProcAddress(hDLL, 'DerFunktionsname');
    If Assigned(DieInfoProc) Then
        DeineInfoProc;//Ausführen mit normalem Aufruf
    FreeLibrary(hDLL);
end;

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
matze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Sa 25.12.04 11:00 
ah OK danke !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 25.12.04 12:28 
matze hat folgendes geschrieben:

ja das wusste ich auch schon. ich wollte ja nur wissen, wie sich das dann unter 9x äussert !!!

Hat dir AXMD doch schon geschrieben. Lesen bildet.
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Sa 25.12.04 12:31 
Luckie hat folgendes geschrieben:
Hat dir AXMD doch schon geschrieben. Lesen bildet.
Hast Du heute Deinen freundlichen Tag? ;-)

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
matze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Sa 25.12.04 13:25 
@luckie: Wieso gibts du denn deinen Senf zu einem vorangegangenen post auch noch drunter, selbst wenn das post auf das du dich beziehst schon recht alt ist und deine aussage keinen zusammenhang mit dem thema hat?
auf solche antowrten kann ich persönlich echt verzichten.
ausserdem war das in meinem post keine frage sondern eher eine aussage, was ich wisssen wollte.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 25.12.04 19:01 
Entschuldigen der Herr, dass sich mich auf deine Antwort auf mein Posting bezogen haben. Aber gut, das war es dann. Schöne Feiertage noch.
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Mo 10.01.05 22:12 
naja und

If (hDLL <> 0) and (hDLL <> INVALID_HANDLE_VALUE) Then

kann man durch

If (hDLL > 0) Then

ersetzen wenn hDLL nen integer ist
(oder hab ich etwa unrecht :P)