This documentation is archived and is not being maintained.

ISymbolWriter.DefineLocalVariable Method

Defines a single variable in the current lexical scope.

[Visual Basic]
Sub DefineLocalVariable( _
   ByVal name As String, _
   ByVal attributes As FieldAttributes, _
   ByVal signature() As Byte, _
   ByVal addrKind As SymAddressKind, _
   ByVal addr1 As Integer, _
   ByVal addr2 As Integer, _
   ByVal addr3 As Integer, _
   ByVal startOffset As Integer, _
   ByVal endOffset As Integer _
)
[C#]
void DefineLocalVariable(
   string name,
 FieldAttributes attributes,
 byte[] signature,
 SymAddressKind addrKind,
 int addr1,
 int addr2,
 int addr3,
 int startOffset,
 int endOffset
);
[C++]
void DefineLocalVariable(
   String* name,
 FieldAttributes attributes,
 unsigned char signature __gc[],
 SymAddressKind addrKind,
 int addr1,
 int addr2,
 int addr3,
 int startOffset,
 int endOffset
);
[JScript]
function DefineLocalVariable(
   name : String,
 attributes : FieldAttributes,
 signature : Byte[],
 addrKind : SymAddressKind,
 addr1 : int,
 addr2 : int,
 addr3 : int,
 startOffset : int,
 endOffset : int
);

Parameters

name
The local variable name.
attributes
The local variable attributes specified using the FieldAttributes enumerator.
signature
The local variable signature.
addrKind
The address types for addr1, addr2, and addr3 using SymAddressKind.
addr1
The first address for the local variable specification.
addr2
The second address for the local variable specification.
addr3
The third address for the local variable specification.
startOffset
The start offset for the variable. If zero, this parameter is ignored and the variable is defined throughout the entire scope. If nonzero, it falls within the offsets of the current scope.
endOffset
The end offset for the variable. If zero, this parameter is ignored and the variable is defined throughout the entire scope. If nonzero, it falls within the offsets of the current scope.

Remarks

The startOffset and endOffset parameters are optional. If their value is zero, they are ignored and the variable is defined throughout the entire scope. If their value is nonzero, they fall within the offsets of the current scope.

You can call DefineLocalVariable multiple times for a variable of the same name that occurs multiple times in different offset ranges throughout a scope. (In this case, start and end offsets must not overlap.)

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

ISymbolWriter Interface | ISymbolWriter Members | System.Diagnostics.SymbolStore Namespace

Show: