firstatlserver.h
来自「Visual_C++[1].NET_Bible1 Visual_C++宝典书中」· C头文件 代码 · 共 50 行
H
50 行
// FirstATLServer.h : Defines the ATL Server request handler class
//
#pragma once
[ request_handler("Default") ]
class CFirstATLServerHandler
{
private:
// Put private members here
protected:
// Put protected members here
public:
// Put public members here
HTTP_CODE ValidateAndExchange()
{
// TODO: Put all initialization and validation code here
// Set the content-type
m_HttpResponse.SetContentType("text/html");
return HTTP_SUCCESS;
}
protected:
// Here is an example of how to use a replacement tag with the stencil processor
[ tag_name(name="Hello") ]
HTTP_CODE OnHello(void)
{
m_HttpResponse << "Hello World!";
return HTTP_SUCCESS;
}
[ tag_name(name="ProcessInvoice") ]
HTTP_CODE OnProcessInvoice(int* pInvoiceNbr)
{
m_HttpResponse << "Invoice number = " << *pInvoiceNbr;
return HTTP_SUCCESS;
}
[ tag_name(name="ProcessCustomer") ]
HTTP_CODE OnProcessCustomer(TCHAR* pszCustomer)
{
m_HttpResponse << "Customer = '" << pszCustomer << "'";
return HTTP_SUCCESS;
}
}; // class CFirstATLServerHandler
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?