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 );
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.)
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
ISymbolWriter Interface | ISymbolWriter Members | System.Diagnostics.SymbolStore Namespace