Results 1 to 4 of 4

Thread: "address of" operator in VB.NET

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2003
    Posts
    11

    Unhappy "address of" operator in VB.NET

    Can anyone tell me how to get the memory address of a variable in Visual Basic.NET?

    I know you are supposed to just pass things around "ByRef" but I am using C functions as well which take pointers so i need specific memory addresses so that I can be sure I am passing things in right.

    Can someone tell me how to find the address of a variable? This would be equivalent to the & operator in C. i.e. &x means address of x.

    Thanks in advance!

  2. #2
    Junior Member
    Join Date
    May 2003
    Posts
    24
    I'm not quite sure if this is what you're looking for but you could try this AddressOf operator...

  3. #3
    Lively Member
    Join Date
    Mar 2003
    Location
    US
    Posts
    68
    did u ever resolve this?

  4. #4
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    Originally posted by 1337_Vince
    I'm not quite sure if this is what you're looking for but you could try this AddressOf operator...
    No!
    The AddressOf operator creates a function delegate that points to the function specified by procedurename. When the specified procedure is an instance method then the function delegate refers to both the instance and the method so that when the function delegate is invoked the specified method of the specified instance is called.

    The AddressOf operator can be used as the operand of a delegate constructor or it can be used in a context in which the type of the delegate can be determined by the compiler.
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width