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