Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

tag_name 

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


[ tag_name(
      name,
   parse_func
) ]

Parameters

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.

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.

Attribute Context

Applies to

Method

Repeatable

Yes

Required attributes

None

Invalid attributes

None

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

Attribute Requirements

Header

atlstencil.h

Project

EXE, DLL

Compiler

/D "_ATL_ATTRIBUTES"

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

Community Additions

ADD
Show:
© 2015 Microsoft