Ver Mensaje Individual
  #3  
Antiguo 08-10-2019
Avatar de TOPX
TOPX TOPX is offline
Miembro
 
Registrado: may 2008
Ubicación: Bogotá
Posts: 527
Reputación: 17
TOPX Va camino a la fama
Hola,

Por ahí hay una documentación de la estructura que pide esa DLL. Dice así:
Código:
struct SSP_COMMAND
{
SSP_FULL_KEY Key;
unsigned long BaudRate;
unsigned long Timeout;
unsigned char PortNumber;
unsigned char SSPAddress;
unsigned char RetryLevel;
unsigned char EncryptionStatus;
unsigned char CommandDataLength;
unsigned char CommandData[255];
unsigned char ResponseStatus;
unsigned char ResponseDataLength;
unsigned char ResponseData[255];
unsigned char IgnoreError;
};
Pero la está declarando así:
Código Delphi [-]
TSSP_COMMAND = record
  Key: TSSP_FULL_KEY;
  BaudRate: LongInt;
  Timeout: LongInt;
  PortNumber: Byte;
  SSPAddress: Byte;
  RetryLevel: Byte;
  EncryptionStatus: Byte;
  CommandDataLength: Byte;
  CommandData: Array[0..255-1] of Byte;
  ResponseStatus: Byte;
  ResponseDataLength: Byte;
  ResponseData: Array[0..255-1] of Byte;
  IgnoreError: Byte;
end {SSP_COMMAND};

De manera que todos esos tipos de dato están mal, parece que hubiera copiado y pegado de un código Java.

Supongo que debe definir si estará usando Int32 ó Int64, y los arrays deben ser de Char (o usar un alias apropiado dentro de Delphi). Pero ya está en sus manos, usando el SDK y su propio entorno de trabajo.

-
__________________
"constructive mind, destructive thoughts"

Última edición por TOPX fecha: 08-10-2019 a las 15:16:00. Razón: Link a la documentación
Responder Con Cita