Microsoft IIS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsSystem AdministrationMicrosoft IIS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old August 31st, 2004, 05:59 AM
balaji_ars balaji_ars is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 2 balaji_ars User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Parse error in 64-bit windows server 2003

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

Reply With Quote
  #2  
Old October 6th, 2004, 06:47 AM
balaji_ars balaji_ars is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 2 balaji_ars User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thumbs up

It is a bug in IIS 6.0

Reply With Quote
Reply

Viewing: ASP Free ForumsSystem AdministrationMicrosoft IIS > Parse error in 64-bit windows server 2003


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway