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

2009-02-04 Thread Arno Garrels
Dod wrote: > You said "disabled", one thing I learned by experience about FWs and > AVs is that they are never 100% "disabled", you MUST uninstall them to > be sure they are not causing the problem because disabling keep low > level drivers loaded. That's my experience as well and the only r

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

2009-02-04 Thread Dod
t; Behalf Of Arno Garrels KW> Sent: Monday, 2 February 2009 3:43 AM KW> To: ICS support mailing KW> Subject: Re: [twsocket] EAccessViolations when Posting Data to a HTTPServer KW> Keith Willis wrote: >> Well I tried "malloc" and "free" without any joy. I have

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

2009-02-04 Thread brian
sts.org [mailto:twsocket-boun...@elists.org] On > Behalf Of Arno Garrels > Sent: Monday, 2 February 2009 3:43 AM > To: ICS support mailing > Subject: Re: [twsocket] EAccessViolations when Posting Data to a > HTTPServer > > Keith Willis wrote: >> Well I tried "malloc&q

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

2009-02-04 Thread Keith Willis
[twsocket] EAccessViolations when Posting Data to a HTTPServer Keith Willis wrote: > 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

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

2009-02-01 Thread Arno Garrels
Keith Willis wrote: > 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 m

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
y, 1 February 2009 3:55 AM To: ICS support mailing Subject: Re: [twsocket] EAccessViolations when Posting Data to a HTTPServer Keith Willis wrote: > Just confirming that you meant to write: > > ClientCnx->Receive(Junk, sizeof(Junk)); > > Instead of: > > ClientCnx->

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

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

2009-01-30 Thread Keith Willis
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 RcvdByteCount when the error happe

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

2009-01-30 Thread Arno Garrels
Keith Willis wrote: > I have managed to improve the code reliability by not dynamically > allocating the PostedDataBuffer at all, (but this is not an > acceptable solution). In the code snippets below I pre-allocate once > in the constructor but this still generates AV's. You never check PostedDa

[twsocket] EAccessViolations when Posting Data to a HTTPServer

2009-01-30 Thread Keith Willis
Dear All, I have recently written a small Web Server application using the THttpServer component in ICS 5 with C++ Builder 5. It serves GET requests perfectly, but when I added POST functionality, (following the WebServ example) it has started generating EAccessViolations. CodeGuard reports that