Please help I am unsure how to port from C++ to fpc this code.
The function this must be passed to says that the structure pointer or size
is invalid.
----C++----
typedef struct _SSLPROTOCOL {
DWORD dwProtocol;
DWORD dwVersion;
DWORD dwFlags;
} SSLPROTOCOL, FAR *LPSSLPROTOCOL;
typedef struct _SSLPROTOCOLS {
DWORD dwCount;
SSLPROTOCOL ProtocolList[1]; // array of 'count' structures
} SSLPROTOCOLS, FAR *LPSSLPROTOCOLS;
----My Attempt FPC Delphi Mode----
type SSLPROTOCOL = record
dwProtocol : DWORD;
dwVersion : DWORD;
dwFlags : DWORD;
end;
_SSLPROTOCOL = SSLPROTOCOL;
LPSSLPROTOCOL = ^SSLPROTOCOL;
type SSLPROTOCOLS = record
dwCount :DWORD;
ProtocolList : array[0..0] of SSLPROTOCOL; // array of 'count'
structures
end;
_SSLPROTOCOLS = SSLPROTOCOLS;
LPSSLPROTOCOLS = ^SSLPROTOCOLS;
PSSLPROTOCOLS = ^SSLPROTOCOLS;
---- ----
Thanks in advance.
If my port seems correct are there any ideas what could be the problem?
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel