Thanks for all the help already working :), realized after last email,
getmem allocates enough memory regardless of what sizeof() says.
Hopefully this will help someone in future with the same type of question.
After the function returns (and populates SSLPROTOCOLS) dwCount is
the amount of elem
Sooky Boo wrote:
I put the function in a for loop and passed I as the size paramater
until it succeeded,
the size of the structure it expects is 40.
BTW what is the value of dwCount?
40 is equal to GetMem(sizeOf(SSLPROTOCOLS) + (2) * sizeOf(SSLPROTOCOL));
Indeed.
so
protocols := LPSSL
I put the function in a for loop and passed I as the size paramater until it
succeeded,
the size of the structure it expects is 40.
40 is equal to GetMem(sizeOf(SSLPROTOCOLS) + (2) * sizeOf(SSLPROTOCOL));
so
protocols := LPSSLPROTOCOLS(GetMem(sizeOf(SSLPROTOCOLS) + (2) *
sizeOf(SSLPROTOCOL)));
Sooky Boo wrote:
On 2/23/08, ik <[EMAIL PROTECTED]> wrote:
{$PACKRECORDS C}
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 inv
On 2/23/08, ik <[EMAIL PROTECTED]> wrote:
> {$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]> wr
{$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 h
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