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

2009-02-04 Thread Keith Willis
] 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 my target machine, (an ASUS EEE Box B202 running Windows XP

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

2009-02-04 Thread Dod
: Re: [twsocket] EAccessViolations when Posting Data to a HTTPServer KW 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

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 reliable

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

2009-02-04 Thread brian
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 and free without any joy. I have however been able to ascertain that its crashing in the call to Receive. More significantly its only

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 my

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

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

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 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 as

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

2009-01-31 Thread Keith Willis
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-Receive(Junk, sizeof(Junk)); I don't think so, I meant the address of Junk

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

[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

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

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