Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Can't find problem in this code, need help...

 
   Web Hosting Problem Solving Community! (Home) -> IIS RSS
Next:  Internet Information Sevices console  
Author Message
dlong2005

External


Since: Apr 12, 2005
Posts: 4



(Msg. 1) Posted: Sun Apr 17, 2005 10:00 pm
Post subject: Can't find problem in this code, need help...
Archived from groups: microsoft>public>inetserver>iis (more info?)

Here is some code I am working on. I keep getting a
ERROR_INVALID_PARAMETER error on the ServerSupportFunction. All I am
trying to do is re-create the request and pass it on. In other words,
decompress the content and modify the headers to show the new content
length. I can't figure out why i keep getting an invalid parameter
error, could anyone help.

//Populate your HSE_EXEC_URL_ENTITY_INFO structure
HSE_EXEC_URL_ENTITY_INFO * phseExecuteURLEntityInfo =new
HSE_EXEC_URL_ENTITY_INFO;
phseExecuteURLEntityInfo->lpbData = deDecompressed.DecompData();
phseExecuteURLEntityInfo->cbAvailable = deDecompressed.DecompSize();

//Populate your HSE_EXEC_URL_INFO structure
HSE_EXEC_URL_INFO * phseExecuteURLInfo = new HSE_EXEC_URL_INFO;
phseExecuteURLInfo->pszUrl = NULL;
phseExecuteURLInfo->pszMethod = NULL;
phseExecuteURLInfo->pszChildHeaders = const_cast<char
*>(sNewHeaders.c_str());
phseExecuteURLInfo->pUserInfo = NULL;
phseExecuteURLInfo->pEntity = phseExecuteURLEntityInfo;
phseExecuteURLInfo->dwExecUrlFlags =
HSE_EXEC_URL_IGNORE_CURRENT_INTERCEPTOR;

if (pECB->ServerSupportFunction(pECB->ConnID, HSE_REQ_EXEC_URL,
phseExecuteURLInfo, NULL, NULL))
reqExtension->LogDebugInfo("ServerSupportFunction succeeded", true);
else
{
reqExtension->LogDebugInfo("ServerSupportFunction failed", true);
DWORD dw = GetLastError();
if (dw == ERROR_INVALID_PARAMETER)
reqExtension->LogDebugInfo("ERROR_INVALID_PARAMETER", true);
else if (dw == ERROR_INVALID_INDEX)
reqExtension->LogDebugInfo("ERROR_INVALID_INDEX", true);
else if (dw == ERROR_INSUFFICIENT_BUFFER)
reqExtension->LogDebugInfo("ERROR_INSUFFICIENT_BUFFER", true);
else if (dw == ERROR_NO_DATA)
reqExtension->LogDebugInfo("ERROR_NO_DATA", true);

char szBuf[80];
LPVOID lpMsgBuf;

FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM, NULL, dw, MAKELANGID(LANG_NEUTRAL,
SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0, NULL);

sprintf(szBuf, "Failed with error %d: %s", dw, (char *)lpMsgBuf);
reqExtension->LogDebugInfo(szBuf, true);
}

Thanks in advance
Damien

 >> Stay informed about: Can't find problem in this code, need help... 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting Problem Solving Community! (Home) -> IIS All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]