Llamada a Dll
Publicado por Melin (1 intervención) el 02/01/2006 09:34:12
Tengo que llamar a una Dll, y tengo la descripcion de como se llama en C++, pero no tengo ni idea de como convertirlo para usarlo en visual basic, ya que peta.
La funcion es:
rmonLogReadExt()
Synopsis: rmonRet __stdcall rmonLogReadExt(int nodeid, int operation, int* values_per_rec, int* entries_in_buffer, char* buffer);
Description This function reads up to 21 log entries from the datalogger each time it is called. When it is called, the current read pointer is either incremented or decremented, according to the operation parameter.
Input
nodeid: Always 1,
operation: RMONLOGGET_NEXT or RMONLOGGET_PREV
Output
values_per_rec: Number of entries in tdefExtLog logvalues (array length), maximum 8
entries_in_buffer: Number of tdefExtLog records in buffer, maximum 21
buffer: Buffer containing entries in buffer records with a tdefExtLog structure, see struct definition below
Returns: rmonComError, rmonOK, rmonNoData, rmonNoMoreData, rmonError
typedef struct {
signed char year;
unsigned char month;
unsigned char date;
unsigned char hour;
unsigned char minute;
unsigned char second;
unsigned char tag;
int logvalue[8];
} tdefExtLog;
Alguien sabe como definir las variables y si son Byval o Byref.
Gracias por vuestro tiempo
La funcion es:
rmonLogReadExt()
Synopsis: rmonRet __stdcall rmonLogReadExt(int nodeid, int operation, int* values_per_rec, int* entries_in_buffer, char* buffer);
Description This function reads up to 21 log entries from the datalogger each time it is called. When it is called, the current read pointer is either incremented or decremented, according to the operation parameter.
Input
nodeid: Always 1,
operation: RMONLOGGET_NEXT or RMONLOGGET_PREV
Output
values_per_rec: Number of entries in tdefExtLog logvalues (array length), maximum 8
entries_in_buffer: Number of tdefExtLog records in buffer, maximum 21
buffer: Buffer containing entries in buffer records with a tdefExtLog structure, see struct definition below
Returns: rmonComError, rmonOK, rmonNoData, rmonNoMoreData, rmonError
typedef struct {
signed char year;
unsigned char month;
unsigned char date;
unsigned char hour;
unsigned char minute;
unsigned char second;
unsigned char tag;
int logvalue[8];
} tdefExtLog;
Alguien sabe como definir las variables y si son Byval o Byref.
Gracias por vuestro tiempo
Valora esta pregunta


0