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