|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi all,
I compiled a sample ISAPI DLL file in windows server 2003 64-bit machine. In the sample file I wrote a wrapper class around CHttpServer (I am not using DllMain function). In side the function "MyClass::HttpExtensionProc" , I tried to call base class function "CHttpServer::HttpExtensionProc". But this functions throws an parse error. The parse error code is "callNoStackSpace". and the HTTP status code is "HTTP_STATUS_SERVER_ERROR". The same code is working fine without parse error in 32 bit windows 2003 machine. In the 64 bit machine if i tried to compile the code without calling base class function, then it did not throw parse error. I created this sample code In visual studio by using the following the steps. 1. open a new visual studio c++ IDE. 2. select file -> new 3. In the project tab select ISAPI Extension Wizard. 4. leave the default & create a workspace. 5. Then added function HttpExtensionProc in the derived class (for overrinding) 6. Then I ported this code to 64 bit env using the link "http://www.eggheadcafe.com/ng/microsoft.public.vstudio.general/post272156.asp" and under the heading "4/26/2004 7:45:18 PM RE: VS6 and intel C++ 8.0 - how to compile for WIN64?" After doing the modification the compiler option is :- /nologo /MD /W3 /GX /O2 /D "WIN64" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_USRDLL" /Fp"Release64/our_isapi_32.pch" /Yu"stdafx.h" /Fo"Release64/" /Fd"Release64/" /FD /c After doing the modification the linker option is :- /nologo /subsystem:windows /dll /incremental:no /pdb:"Release64/our_isapi_32.pdb" /machine:IX86 /nodefaultlib:"odbc32.lib" /nodefaultlib:"odbccp32.lib" /def:".\our_isapi_32.def" /out:"Release64/our_isapi_32.dll" /implib:"Release64/our_isapi_32.lib" /machine:IA64 The sample code is :- #include "stdafx.h" #include "our_isapi_32.h" CWinApp theApp; int g_test=0; BEGIN_PARSE_MAP(COur_isapi_32Extension, CHttpServer) ON_PARSE_COMMAND(Default, COur_isapi_32Extension, ITS_EMPTY) DEFAULT_PARSE_COMMAND(Default, COur_isapi_32Extension) END_PARSE_MAP(COur_isapi_32Extension) COur_isapi_32Extension theExtension; COur_isapi_32Extension::COur_isapi_32Extension() { } COur_isapi_32Extension::~COur_isapi_32Extension() { } BOOL COur_isapi_32Extension::GetExtensionVersion(HSE_VE RSION_INFO* pVer) { CHttpServer::GetExtensionVersion(pVer); TCHAR sz[HSE_MAX_EXT_DLL_NAME_LEN+1]; ISAPIVERIFY(::LoadString(AfxGetResourceHandle(), IDS_SERVER, sz, HSE_MAX_EXT_DLL_NAME_LEN)); _tcscpy(pVer->lpszExtensionDesc, sz); return TRUE; } BOOL COur_isapi_32Extension::TerminateExtension(DWORD dwFlags) { return TRUE; } void COur_isapi_32Extension:efault(CHttpServerContext* pCtxt){} DWORD COur_isapi_32Extension::HttpExtensionProc( EXTENSION_CONTROL_BLOCK *pECB ) { CHAR szBuff[4096] = { 0 }; DWORD dwLen = 0; CHttpServer::HttpExtensionProc(pECB); if (g_test == 0) wsprintf( szBuff, "Mytest line(parse error not called)" ); else wsprintf( szBuff, "Mytest line (parse error called)" ); dwLen = lstrlen( szBuff ); pECB->WriteClient(pECB->ConnID, szBuff, &dwLen, dwLen ); return HSE_STATUS_SUCCESS; } BOOL COur_isapi_32Extension::OnParseError(CHttpServerCo ntext* pCtxt, int nErrCode) { g_test = 1; system("echo \"OnParseError called in sample file... \" >> c:\\MY_LOG.txt"); CHttpServer::OnParseError( pCtxt, nErrCode ); return(true); } // Do not edit the following lines, which are needed by ClassWizard. #if 0 BEGIN_MESSAGE_MAP(COur_isapi_32Extension, CHttpServer) //{{AFX_MSG_MAP(COur_isapi_32Extension) //}}AFX_MSG_MAP END_MESSAGE_MAP() #endif // 0 |
|
#2
|
|||
|
|||
|
It is a bug in IIS 6.0
|
![]() |
| Viewing: ASP Free Forums > System Administration > Microsoft IIS > Parse error in 64-bit windows server 2003 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|