Re: [twsocket] EAccessViolations when Posting Data to a HTTPServer

2009-01-31 Thread Keith Willis
Well I tried "malloc" and "free" without any joy. I have however been able to ascertain that its crashing in the call to "Receive". More significantly its only crashing on my target machine, (an ASUS EEE Box B202 running Windows XP Home). I can't seem to crash it on my development PC, (A generic P

Re: [twsocket] EAccessViolations when Posting Data to a HTTPServer

2009-01-31 Thread Keith Willis
In C/C++ if you declare Junk statically eg: "char Junk[1024];", Junk is of type "char*" so the &Junk will be of type "char**". -Original Message- From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On Behalf Of Arno Garrels Sent: Sunday, 1 February 2009 3:55 AM To: ICS

Re: [twsocket] EAccessViolations when Posting Data to a HTTPServer

2009-01-31 Thread Arno Garrels
Keith Willis wrote: > Just confirming that you meant to write: > > ClientCnx->Receive(Junk, sizeof(Junk)); > > Instead of: > > ClientCnx->Receive(&Junk, sizeof(Junk)); I don't think so, I meant the address of Junk which is the address of the first element of the static array, isn't it? Same

Re: [twsocket] EAccessViolations when Posting Data to a HTTPServer

2009-01-31 Thread Keith Willis
Arno, No luck I'm afraid... I'm still getting those AV's :( Keith. Here's my current code... As per your suggested code. I also made the TMemoryManager global to the application. I will try free and malloc next. <<< CODE SNIPPETS >>> //---

Re: [twsocket] EAccessViolations when Posting Data to a HTTPServer

2009-01-31 Thread Keith Willis
Hi Arno, Just confirming that you meant to write: ClientCnx->Receive(Junk, sizeof(Junk)); Instead of: ClientCnx->Receive(&Junk, sizeof(Junk)); Cheers, Keith. -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/tw

Re: [twsocket] EAccessViolations when Posting Data to a HTTPServer

2009-01-31 Thread Arno Garrels
Keith Willis wrote: > Hi Arno, > >> You never check PostedDataSize, the size of your receive buffer. >> The pascal demo allocates this buffer dynamically depending on the > RequestContentLength plus one byte for the null terminator in the > OnPostDocument event handler. >> What is the value of Rcv