Export (0) Print
Expand All


Visual Studio .NET 2003

Apply this attribute to a method in a request handler to expose it as a replacement method associated with a tag name.

[ tag_name(
) ]


A string specifying the tag name for the replacement handler that will invoke this method.
parse_func (optional)
Specifies the name of the function used to parse arguments passed to the method.

Attribute Context

Applies to Method
Repeatable Yes
Required attributes None
Invalid attributes None

For more information about the attribute contexts, see Attribute Contexts.


Header atlstencil.h
Project EXE, DLL

For more information about the meaning of the requirements, see Attribute Requirements.


This attribute is used to classify a method as a replacement method. A method may have multiple tag_name attributes.

If parse_func is specified, the parse function should have the following signature:

HTTP_CODE parse_func(IAtlMemMgr* pMemoryManager, LPCSTR szArg, Type** ppArg);

The replacement method should have a corresponding signature:

HTTP_CODE methodFunc(Type* pArg);

If parse_func is omitted, the method should have a signature in one of the following forms:

HTTP_CODE MethodName();
HTTP_CODE MethodName(Type* pArg);

Where Type can be one of the types listed:

Type Parsing algorithm
bool DefaultParseBool
char DefaultParseString
unsigned char DefaultParseUChar
short DefaultParseShort
unsigned short DefaultParseUShort
int DefaultParseInt
unsigned int DefaultParseUInt
__int64 DefaultParseInt64
unsigned __int64 DefaultParseUInt64
double DefaultParseDouble
float DefaultParseFloat

See Passing An Argument To A Replacement Method for details.

Use of this attribute corresponds to the REPLACEMENT_METHOD_ENTRY macro when the method does not have a parameter, and it corresponds to REPLACEMENT_METHOD_ENTRY_EX when the method does have a parameter.


See Attributed Request Handler Code and see the following samples:

See Also

ATL Server Attributes | COM Attributes | Method Attributes | Attributes Samples

© 2014 Microsoft