AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Sprachen und Entwicklungsumgebungen Object-Pascal / Delphi-Language USB Display - API Problem (Fehler bei Kompilierung)
Thema durchsuchen
Ansicht
Themen-Optionen

USB Display - API Problem (Fehler bei Kompilierung)

Ein Thema von delphihase · begonnen am 2. Sep 2012 · letzter Beitrag vom 3. Sep 2012
Antwort Antwort
Seite 1 von 3  1 23      
delphihase

Registriert seit: 24. Jun 2011
21 Beiträge
 
Delphi XE Professional
 
#1

USB Display - API Problem (Fehler bei Kompilierung)

  Alt 2. Sep 2012, 16:24
Delphi-Version: XE
Hi,

habe mir jetzt mal ein ABACOM USB-LCD-Display für 4x20 Zeichen ASCII zugelegt. Funktioniert mit dem Demoprogramm einwandfrei, nur klappt das mit nem eigenen Projekt nicht so wie ich will.

Vorab: Die API gibts unter http://www.abacom-online.de/div/setup-usb-lcd.exe , die Anleitung dazu unter http://www.abacom-online.de/div/ABACOM_USB_LCD.pdf .

Das Sample Projekt für Delphi 5 funktioniert gut, ich kann es modifizieren und so das Display ansteuern. Nur das Problem ist, dass ich jetzt diese Unit in ein anderes Projekt einbauen will. Beim kompilieren kommt mir dann der Fehler:

ABACOM_USB_LCD_TLB.pas(497): E2064 Der linken Seite kann nichts zugewiesen werden

Die Zeile 497:
  TControlData2(CControlData).FirstEventOfs := Cardinal(@@FOnActivate) - Cardinal(Self);
Ich hoffe, es kann mir jemand helfen.

Danke im Voraus!
Grüße,

Maximilian alias delphihase
  Mit Zitat antworten Zitat
Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
43.116 Beiträge
 
Delphi 12 Athens
 
#2

AW: USB Display - API Problem (Fehler bei Kompilierung)

  Alt 2. Sep 2012, 16:45
Was ist FirstEventOfs? ( ein Property? )

Die Setup lad ich mir jetzt nicht runter ... wäre ja zu paraktisch, wenn es die PAS pur gäbe.
Garbage Collector ... Delphianer erzeugen keinen Müll, also brauchen sie auch keinen Müllsucher.
my Delphi wish list : BugReports/FeatureRequests
  Mit Zitat antworten Zitat
delphihase

Registriert seit: 24. Jun 2011
21 Beiträge
 
Delphi XE Professional
 
#3

AW: USB Display - API Problem (Fehler bei Kompilierung)

  Alt 3. Sep 2012, 10:45
Ich dachte, 628 Zeilen Quellcode sind zu viel ...

Hmm, die CControlData ist ein Typ von TControlData2, definiert in OleCtrls ...

Die ganze Funktion:

Delphi-Quellcode:
procedure TUSBLCDX.InitControlData;
const
  CEventDispIDs: array [0..9] of DWORD = (
    $000000C9, $000000CA, $000000CB, $000000CC, $000000CD, $000000CE,
    $000000CF, $000000D0, $000000D1, $000000D2);
  CTFontIDs: array [0..0] of DWORD = (
    $FFFFFE00);
  CControlData: TControlData2 = (
    ClassID: '{32F7D76C-7571-4142-8C35-A78F5CCE120D}';
    EventIID: '{CCA105D4-0627-49C3-8181-D097ED4B5A30}';
    EventCount: 10;
    EventDispIDs: @CEventDispIDs;
    LicenseKey: nil (*HR:$00000000*);
    Flags: $0000001D;
    Version: 401;
    FontCount: 1;
    FontIDs: @CTFontIDs);
begin
  ControlData := @CControlData;
  TControlData2(CControlData).FirstEventOfs := Cardinal(@@FOnActivate) - Cardinal(Self);
end;
Im Anhang das Sample-Projekt für Delphi 5.

Mein Vorgehen für das neue Projekt:
VCL-Anwendung erstellt
ABACOM_USB_LCD_TLB.pas hinzugefügt und in die includes
die Includes des Sample Projects, welche bei mir nicht vorhanden waren, auch inkludiert

Soll ich sonst noch was uploaden?
Angehängte Dateien
Dateityp: zip Borland Delphi 5.zip (229,3 KB, 7x aufgerufen)
Grüße,

Maximilian alias delphihase
  Mit Zitat antworten Zitat
hathor
(Gast)

n/a Beiträge
 
#4

AW: USB Display - API Problem (Fehler bei Kompilierung)

  Alt 3. Sep 2012, 11:19
Bei mir gibt es den Fehler: Klasse nicht registriert.

OCX fehlt - ActiveX ?

Geändert von hathor ( 3. Sep 2012 um 11:42 Uhr)
  Mit Zitat antworten Zitat
delphihase

Registriert seit: 24. Jun 2011
21 Beiträge
 
Delphi XE Professional
 
#5

AW: USB Display - API Problem (Fehler bei Kompilierung)

  Alt 3. Sep 2012, 11:37
Hat mich zwar auch gewundert, aber auch in der lauffähigen Version ist dieses @@ drin ...

Das Entfernen von einem @ ändert allerdings nichts an dem Fehler.
Grüße,

Maximilian alias delphihase
  Mit Zitat antworten Zitat
hathor
(Gast)

n/a Beiträge
 
#6

AW: USB Display - API Problem (Fehler bei Kompilierung)

  Alt 3. Sep 2012, 11:48
So OCX ist geladen und registriert.

Sowohl Original-EXE als auch selbstcompilierte EXE sind fehlerfrei.

DELPHI 2009
  Mit Zitat antworten Zitat
delphihase

Registriert seit: 24. Jun 2011
21 Beiträge
 
Delphi XE Professional
 
#7

AW: USB Display - API Problem (Fehler bei Kompilierung)

  Alt 3. Sep 2012, 12:11
Sorry, aber was muss ich tun, um diese OCX zu registrieren?

Von OCX noch nie was gehört und Google sagt auch nur was von ActiveX, und damit habe ich noch nie gearbeitet.
Grüße,

Maximilian alias delphihase
  Mit Zitat antworten Zitat
hathor
(Gast)

n/a Beiträge
 
#8

AW: USB Display - API Problem (Fehler bei Kompilierung)

  Alt 3. Sep 2012, 12:50
Das macht das setup_usb_lcd.exe automatisch.
Vor dem 1. Test hatte ich das Setup noch nicht ausgeführt.
  Mit Zitat antworten Zitat
delphihase

Registriert seit: 24. Jun 2011
21 Beiträge
 
Delphi XE Professional
 
#9

AW: USB Display - API Problem (Fehler bei Kompilierung)

  Alt 3. Sep 2012, 13:08
Diese Setup-Datei habe ich ja installiert !?!

Also habe ich jetzt deinstalliert, nochmal installiert - gleicher Fehler ...

Welche Dateien hast du bei deinem neuen Projekt alle drin? (Kannst du das vielleicht als zip hochladen, evtl. kann er das ja kompilieren ...)
Grüße,

Maximilian alias delphihase
  Mit Zitat antworten Zitat
Benutzerbild von DeddyH
DeddyH

Registriert seit: 17. Sep 2006
Ort: Barchfeld
27.538 Beiträge
 
Delphi 11 Alexandria
 
#10

AW: USB Display - API Problem (Fehler bei Kompilierung)

  Alt 3. Sep 2012, 13:24
Musst Du die *.ocx evtl. noch in Delphi installieren (Komponente - Komponente importieren)?
Detlef
"Ich habe Angst vor dem Tag, an dem die Technologie unsere menschlichen Interaktionen übertrumpft. Die Welt wird eine Generation von Idioten bekommen." (Albert Einstein)
Dieser Tag ist längst gekommen
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 1 von 3  1 23      


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:09 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz