Autor Beitrag
Simon Joker
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 236
Erhaltene Danke: 1



BeitragVerfasst: Di 08.04.03 15:21 
Hi

Ich kapier die Funktion "GetKeyboardState" nicht. Was für ein Array will die als Parameter?, Wie muss ich sie aufrufen?

Danke
wulfskin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1349
Erhaltene Danke: 1

Win XP
D5 Pers (SSL), D2005 Pro, C, C#
BeitragVerfasst: Di 08.04.03 15:38 
Hallo Simon!

Die Prozedur erwartet bei mir zumindest einen Typ TKeyBoardState der in der Unit Windows als Array [0..255] of Bytes definiert ist.
So kann ein Aufruf lauten:
ausblenden Quelltext
1:
2:
3:
4:
var
  State: TKeyBoardState;
begin
  if GetKeyboardState(State) then
Gruß wulfskin!

_________________
Manche antworten um ihren Beitragszähler zu erhöhen, andere um zu Helfen.
Simon Joker Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 236
Erhaltene Danke: 1



BeitragVerfasst: Di 08.04.03 15:46 
Hätte ich auch selber drauf kommen! Das komisch ist nur, wenn ich mir das Array selber definiere, meckert er "tatsächliche und formale var parameter müssen übereinstimmen". Nun gut, danke!
wulfskin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1349
Erhaltene Danke: 1

Win XP
D5 Pers (SSL), D2005 Pro, C, C#
BeitragVerfasst: Di 08.04.03 18:09 
Hallo Simon!

Du musst wohl oder übel den Typ TKeyBoardState benutzen, da sonst der Compiler meckert. Der Compiler möchte nämlich genau den selben Typ haben, der in der Prozedure vordefiniert wurde.

Gruß wulfskin!

_________________
Manche antworten um ihren Beitragszähler zu erhöhen, andere um zu Helfen.
Simon Joker Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 236
Erhaltene Danke: 1



BeitragVerfasst: Fr 11.04.03 09:02 
Ich wusste nicht, das Borland eine eigenen Typ definiert hat. Bei F1 ist Delphi direkt in die SDK-Hilfe gesprungen und die wollte die Adresse eines Array of byte. Daher die Verwirrung.