hmmm...
dass ganze ist wahrscheinlich ein bisschen verwirrend
hab nun mal alles reingepackt was hierfür notwendig ist...
Delphi-Quellcode:
type
TFtData = Record
VendorID : word;
ProductID : word;
Manufacturer : PChar;
ManufacturerID : PChar;
Description : PChar;
SerialNumber : PChar;
MaxPower : word;
PnP : Word;
SelfPowered : Word;
RemoteWakeup : Word;
Rev4 : boolean;
IsoIn : boolean;
IsoOut : boolean;
PullDownEnable : boolean;
SerNumEnable : boolean;
USBVersionEnable : boolean;
USBVersion : Word;
end;
var
ftData : TFtData;
implementation
function FT_EE_Program(fthandle: DWord; FT_Data: Pointer) : FT_Result; stdcall ; External FT_DLL_Name name 'FT_EE_Program';
function FT_EE_Read(fthandle: DWord; FT_Data: Pointer) : FT_Result; stdcall ; External FT_DLL_Name name 'FT_EE_Read';
Function ReadEE : FT_Result;
var
ManufacturerBuf : string[32];
ManufacturerIDBuf : string[16];
DescriptionBuf : string[64];
SerialNumberBuf : string[16];
begin
ManufacturerBuf := ftData.Manufacturer;
ManufacturerIDBuf := ftData.ManufacturerID;
DescriptionBuf := ftData.Description;
SerialNumberBuf := ftData.SerialNumber;
Result := FT_EE_Read(Multi_Handle,@FtData);
if Result <> FT_OK then FT_Error_Report('FT_EE_Read',Result);
end;
Function ProgramEE : FT_Result;
begin
Result := FT_EE_Program(Multi_Handle,@FtData);
if Result <> FT_OK then FT_Error_Report('FT_EE_Program',Result);
end;
die Functionen ReadEE und ProgramEE werden durch ButtonClicks aufgerufen...
das komische ist, wenn ich
Delphi-Quellcode:
ManufacturerBuf := ftData.Manufacturer;
ManufacturerIDBuf := ftData.ManufacturerID;
DescriptionBuf := ftData.Description;
SerialNumberBuf := ftData.SerialNumber;
vollkommen weglasse, stürzt das Prog nicht mehr ab.
Die anderen Werte werden alle angezeigt! ( Also boolean, word -werte vom record) ...