2 tracyliuyan127 tracyliuyan127 于 2014.04.29 15:54 提问

求各位帮我看看这段代码怎么改改
c++

我想做个ISAPI的扩展程序,平台是vs2010,然后建立了一个 win32控制台控程序 代码如下
enter code here#include
#include
#include
#include
#include //ISAPI扩展的头文件

void WriteContext(EXTENSION_CONTROL_BLOCK *pECB, char *pszFormat);
void StartContext(EXTENSION_CONTROL_BLOCK *pECB);
void EndContext(EXTENSION_CONTROL_BLOCK *pECB);

BOOL APIENTRY DLLMain(HANDLE hModule, DWORD dwCallReason, LPVOID lpReserved)
{
return TRUE;
}

BOOL WINAPI GetExtensionVersion(HSE_VERSION_INFO *pVer)
{
pVer->dwExtensionVersion = HSE_VERSION;
strncpy(pVer->lpszExtensionDesc, "My first ISAPI program", HSE_MAX_EXT_DLL_NAME_LEN);
return TRUE;
}

DWORD WINAPI HttpExtensionProc(EXTENSION_CONTROL_BLOCK *pECB)
{
StartContext(pECB);
WriteContext(pECB, "

this is my first ISAPI program!!hello money!!

");
EndContext(pECB);
return HSE_STATUS_SUCCESS;
}

BOOL WINAPI TerminateExtension(DWORD dwFlags)
{
return TRUE;
}

void WriteContext(EXTENSION_CONTROL_BLOCK *pECB, char *pszFormat)
{
char szBuffer[1024];
va_list arg_ptr;
va_start(arg_ptr, pszFormat);
vsprintf(szBuffer, pszFormat, arg_ptr);
va_end(arg_ptr);

DWORD dwSize = strlen(szBuffer);
pECB->WriteClient(pECB->ConnID, szBuffer, &dwSize, 0);

}

void StartContext(EXTENSION_CONTROL_BLOCK *pECB)
{
WriteContext(pECB, "\r\n

\r\n");
}

void EndContext(EXTENSION_CONTROL_BLOCK *pECB)
{
WriteContext(pECB, "\r\n");
}
提示错误是
错误 3 error LNK1561: 必须定义入口点 D:\学习\test\web.net\hello11\hello11\LINK hello11
请问各位我该怎么设置

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!