Re: CGIcc under Apache and Windows 2000
Jean ANDRE <[email protected]> Sat, 29 Jan 2005 02:05:52 +0500
| Newsgroups | gmane.comp.gcc.cgicc.general |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I found the problem, in fact, even an .exe must be compiled in Multithread.
Regards,
Jorelia.
Jean ANDRE wrote:
> Hello,
>
> I actually got an error in using CGIcc under Apache server 2.0 and
> Windows 2000.
>
> I got a crash on the follwing instruction "cout << HTTPHTMLHeader()"
> what ever the method POST or GET. Under the debugger I got the error
> in this part of code, so here is the caller stack (in reverse order).
> The std::ostream& out parameter seems to be invalid. All members
> contains 0x00000 or have a bad ptr. I've joined a print screen. Does I
> missed something ?. I've compiled my CGIn in single thread program.
>
> void _Mtxlock(_Rmtx *_Mtx)
> { /* lock mutex */
> EnterCriticalSection(_Mtx);
> }
>
> void _Mutex::_Lock()
> { // lock mutex
> _Mtxlock((_Rmtx*)_Mtx);
> }
>
> void _Lock()
> { // set the thread lock
> _Mylock._Lock();
> }
>
> class _Sentry_base
> { // stores thread lock and reference to output stream
> public:
> _Sentry_base(_Myt& _Ostr)
> : _Myostr(_Ostr)
> { // lock the stream buffer, if there
> if (_Myostr.rdbuf() != 0)
> _Myostr.rdbuf()->_Lock();
> }
>
> class sentry
> : public _Sentry_base
> { // stores thread lock and state of stream
> public:
> explicit sentry(_Myt& _Ostr)
> : _Sentry_base(_Ostr)
> { // construct locking and testing stream
> if (_Ostr.good() && _Ostr.tie() != 0)
>
>
> template<class _Traits> inline
> basic_ostream<char, _Traits>& __cdecl operator<<(
> basic_ostream<char, _Traits>& _Ostr,
> const char *_Val)
> { // insert NTBS into char stream
> typedef char _Elem;
> typedef basic_ostream<_Elem, _Traits> _Myos;
> ios_base::iostate _State = ios_base::goodbit;
> streamsize _Count = (streamsize)_Traits::length(_Val); // may
> overflow
> streamsize _Pad = _Ostr.width() <= 0 || _Ostr.width() <= _Count
> ? 0 : _Ostr.width() - _Count;
> const typename _Myos::sentry _Ok(_Ostr);
>
> void
> cgicc::HTTPContentHeader::render(std::ostream& out) const
> {
> out << "Content-Type: " << getData() << std::endl;
>
> std::vector<HTTPCookie>::const_iterator iter;
>
> / ============================================================
> // Class MStreamable
> // ============================================================
> std::ostream&
> cgicc::operator<<(std::ostream& out,
> const MStreamable& obj)
> {
> obj.render(out);
> return out;
> }
>
>
>
>
>
> ------------------------------------------------------------------------
>
>------------------------------------------------------------------------
>
>_______________________________________________
>help-cgicc mailing list
>[email protected]
>http://lists.gnu.org/mailman/listinfo/help-cgicc
>
>