LPT Port in "C" mit Hilfe von DlPortIO ansprechen
-
Hallo!
Ich hab folgendes Problem. Ich arbeite an einem Projekt in "C" (Visaul C++ 6.0 und Win XP).
In diesem Projekt muss ich Daten am LPT Port ausgeben. Ich verwende dafür DlPortIO, bring das Ganze aber nicht zum laufen. In einem C++ Projekt läufts einwandfrei, allerdings in "C" will das ganze nicht. In meinem Projekt hab ich die dlportio.h-Datei includiert und die Lib-Datei dem Projekt hinzugefügt.Der Compiler spuckt dann jede Menge Fehlermeldungen raus:
...dlportio.h(44) : error C2143: Syntaxfehler : Fehlendes '{' vor '__stdcall'
...dlportio.h(46) : error C2146: Syntaxfehler : Fehlendes ')' vor Bezeichner 'Port'und noch viele mehr!
Ist DlportIO nur für Anwendungen in C++?
oder mache ich sonst was falsch?Auszug aus der Datei Dlportio.h:
#ifndef DLPORTIO_H #define DLPORTIO_H #ifdef __cplusplus extern "C" { #endif #ifndef IN #define IN #endif #define DLPORT_API _stdcall UCHAR DLPORT_API DlPortReadPortUchar( IN ULONG Port ); USHORT DLPORT_API DlPortReadPortUshort( IN ULONG Port ); ULONG DLPORT_API DlPortReadPortUlong( IN ULONG Port ); VOID DLPORT_API DlPortReadPortBufferUchar( IN ULONG Port, IN PUCHAR Buffer, IN ULONG Count ); VOID DLPORT_API DlPortReadPortBufferUshort( IN ULONG Port, IN PUSHORT Buffer, IN ULONG Count ); #ifdef __cplusplus } #endif #endif // DLPORTIO_HFür Eure Hilfe bedanke ich mich schon mal im voraus!