求助ISAPI扩展默认请求处理 isapi 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我参考了WildcardMap的例子,有一个问题没法解决,代码红色部分,GetLastError = 1001,递归错误,百思不得其解,希望有经验的朋友能给做下解答,不胜感激1DWORD WINAPI HttpExtensionProc( EXTENSION_CONTROL_BLOCK * pecb ){ HSE_EXEC_URL_INFO ExecUrlInfo; LPSTR pUrl = NULL; DWORD cbData; if ( pecb->GetServerVariable( pecb->ConnID, "URL", NULL, &cbData ) == FALSE ) { if ( GetLastError() == ERROR_INSUFFICIENT_BUFFER ) { pUrl = (LPSTR)LocalAlloc( LPTR, cbData ); if ( pUrl ) { pecb->GetServerVariable( pecb->ConnID, "URL", pUrl, &cbData ); } } } if ( !pUrl ) { WriteDebug( "Error %d occurred acquiring URL.\r\n", GetLastError() ); goto Failed; } WriteDebug( "Request Received: URL=%s\r\n", pUrl ); ExecUrlInfo.pszUrl = NULL; // Use original request URL ExecUrlInfo.pszMethod = NULL; // Use original request method ExecUrlInfo.pszChildHeaders = NULL; // Use original request headers ExecUrlInfo.pUserInfo = NULL; // Use original request user info ExecUrlInfo.pEntity = NULL; // Use original request entity // // Since this extension is intended to be used as a wildcard script // map, we need to set the below flag to prevent recursion, which // can occur in some cases. // ExecUrlInfo.dwExecUrlFlags = HSE_EXEC_URL_IGNORE_CURRENT_INTERCEPTOR; // // Associate the completion routine and the current URL with // this request. // if ( pecb->ServerSupportFunction( pecb->ConnID, HSE_REQ_IO_COMPLETION, ExecUrlCompletion, NULL, (LPDWORD)pUrl ) == FALSE ) { WriteDebug( "Error %d occurred setting I/O completion.\r\n", GetLastError() ); goto Failed; } if ( pecb->ServerSupportFunction( pecb->ConnID, HSE_REQ_EXEC_URL, &ExecUrlInfo, NULL, NULL ) == FALSE ) { WriteDebug( "Error %d occurred calling HSE_REQ_EXEC_URL.\r\n", GetLastError() ); goto Failed; } return HSE_STATUS_PENDING;Failed: if ( pUrl ) { LocalFree( pUrl ); pUrl = NULL; } SendServerError( pecb ); return HSE_STATUS_ERROR;} 真的搞不懂串口(MSComm) 新手关于线程创建(孙鑫的) CPropertySheet 中字体的问题? 请各位大侠帮忙,困惑我很久的问题! 求助!!你知道吗? 散分了:)!!google上回记录以前搜索过的记录 真样才能讲这些记录删除?? 有懂LabView这个东东的人吗? 谁能帮我把这段Java转换成C++,或者告诉我方法 C++编译问题(CXImage) mfc键盘消息捕获 CADODatabase* pDb = new CADODatabase 快速的连接释放 句柄一直增加 vc能不能调用vb.net写的dll
EXTENSION_CONTROL_BLOCK * pecb
)
{
HSE_EXEC_URL_INFO ExecUrlInfo;
LPSTR pUrl = NULL;
DWORD cbData; if ( pecb->GetServerVariable( pecb->ConnID,
"URL",
NULL,
&cbData ) == FALSE )
{
if ( GetLastError() == ERROR_INSUFFICIENT_BUFFER )
{
pUrl = (LPSTR)LocalAlloc( LPTR, cbData ); if ( pUrl )
{
pecb->GetServerVariable( pecb->ConnID,
"URL",
pUrl,
&cbData );
}
}
} if ( !pUrl )
{
WriteDebug( "Error %d occurred acquiring URL.\r\n",
GetLastError() ); goto Failed;
}
WriteDebug( "Request Received: URL=%s\r\n",
pUrl ); ExecUrlInfo.pszUrl = NULL; // Use original request URL
ExecUrlInfo.pszMethod = NULL; // Use original request method
ExecUrlInfo.pszChildHeaders = NULL; // Use original request headers
ExecUrlInfo.pUserInfo = NULL; // Use original request user info
ExecUrlInfo.pEntity = NULL; // Use original request entity //
// Since this extension is intended to be used as a wildcard script
// map, we need to set the below flag to prevent recursion, which
// can occur in some cases.
// ExecUrlInfo.dwExecUrlFlags = HSE_EXEC_URL_IGNORE_CURRENT_INTERCEPTOR; //
// Associate the completion routine and the current URL with
// this request.
// if ( pecb->ServerSupportFunction( pecb->ConnID,
HSE_REQ_IO_COMPLETION,
ExecUrlCompletion,
NULL,
(LPDWORD)pUrl ) == FALSE )
{
WriteDebug( "Error %d occurred setting I/O completion.\r\n",
GetLastError() ); goto Failed;
} if ( pecb->ServerSupportFunction( pecb->ConnID,
HSE_REQ_EXEC_URL,
&ExecUrlInfo,
NULL,
NULL ) == FALSE )
{
WriteDebug( "Error %d occurred calling HSE_REQ_EXEC_URL.\r\n",
GetLastError() ); goto Failed;
}
return HSE_STATUS_PENDING;Failed: if ( pUrl )
{
LocalFree( pUrl );
pUrl = NULL;
} SendServerError( pecb ); return HSE_STATUS_ERROR;
}