Buongiorno a tutti, avrei bisogno di chiamare una funzione che mi
restituisce valori di una memoria esterna.
La funzione da richiamare ᅵ la seguente:
// read from a connected socket
LONG WINAPI MBTReadRegisters(
IN HANDLE hSocket, // handle of the connected socket
IN BYTE tableType, // Modbus/TCP Tabellen Typ
(MODBUSTCP_TABLE_xxx)
// (here: input register or output register
IN WORD dataStartAddress, // start address of the registers to be read
IN WORD numWords, // number of the registers to be read
OUT LPBYTE pReadBuffer, // memory section from which the data are
read
// (NULL at asynchronous call)
OPTIONAL IN MBTReadCompleted fpReadCompletedCallback = NULL,
// C-callback function, called after
termination
// of asynchronous reading (NULL at synchronous
// call)
OPTIONAL IN DWORD callbackContext = 0
// context, handed over to the asynchronous
// (callback function (0 at synchronous call)
);
Il problema che ho ᅵ quello di passare il primo parametro "IN HANDLE
hSocket" dato che non conosco bene cosa sia "HANDLE".
Nel progetto ho dichiarato una variabile "SOCKET ConnectSocket" ma non
essendo di tipo HANDLE, non riesco a chiamare la funzione.
Potete consigliarmi la soluzione a questo problema?
Grazie