Forum: Win32/Win64 API (native code)
Delphi
by NetSonic,
11. Mai 2007
ok, du hast recht! so ist es einfach besser!
Hab mein "kleines" Programm zum Testen jetzt auch so weit zusammen, dass ich den integrierten Watchdog-Timer ansprechen kann. Übers Wochenende geht's dann an die Einbindung in das derzeitige Steuerungsprogramm.
Und da es schon Freitag-Mittag ist, wünsch ich Dir / allen anderen schon mal ein schönes Wochenende, mit halbwegs vernünftigem Wetter. Hier...
Forum: Win32/Win64 API (native code)
Delphi
by NetSonic,
11. Mai 2007
Das ganze sieht jetzt so aus, allerdings mosert der kompiler...
type
PWDTPARAM = ^WDTPARAM;
WDTPARAM = record
timeout: Byte;
data_b: Byte;
end;
Forum: Win32/Win64 API (native code)
Delphi
by NetSonic,
11. Mai 2007
Ok, hier nachfolgend der originale c-aufruf
DWORD nReturn;
WDTPARAM cParam;
typedef struct tagWDTPARAM {
unsigned char timeout;
unsigned char data_b;
} WDTPARAM, *PWDTPARAM;
Forum: Win32/Win64 API (native code)
Delphi
by NetSonic,
10. Mai 2007
Ok, die Konstante hab ich jetzt eingepflegt und der Kompiler mosert und sagt mir:
"Konstantenausdruck verletzt untere grenzen"
Steh ehrlich gesagt ein bissl auf'm Schlauch! Hat das mit dem fehlerhaften DeviceIOControl-Aufruf zu tun, den Du meinst?
Forum: Win32/Win64 API (native code)
Delphi
by NetSonic,
10. Mai 2007
Das heißt, es könnte dann so aussehen...
const
WDT_TYPE = 35001;
WDT_DEVICE = '\\.\WDT_DEVICE';
WDT_DEVICE_NAME = '\Device\WDT_DEVICE';
WDT_DOS_DEVICE_NAME = '\DosDevices\WDT_DEVICE';
Forum: Win32/Win64 API (native code)
Delphi
by NetSonic,
10. Mai 2007
Ich habe folgenden C Quelltext vorliegen, den ich nach Delphi portieren möchte um die digitalen IO-Ports eines Industrie-Mainboards anzusprechen.
#define WDT_DEVICE "\\\\.\\WDT_DEVICE"
#define WDT_DEVICE_NAME L"\\Device\\WDT_DEVICE"
#define WDT_DOS_DEVICE_NAME L"\\DosDevices\\WDT_DEVICE"
// Device type
#define WDT_TYPE 35001