{$PACKRECORDS C} ... type LPSSLPROTOCOL = ^SSLPROTOCOL; SSLPROTOCOL = record dwProtocol : DWORD; dwVersion : DWORD; dwFlags : DWORD; end; _SSLPROTOCOL = SSLPROTOCOL;
On Sat, Feb 23, 2008 at 5:59 AM, Sooky Boo <[EMAIL PROTECTED]> wrote: > > > 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 - fpc-devel@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-devel > > -- http://ik.homelinux.org/ _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel