Clearing memory in structures

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dan

    #1

    Clearing memory in structures

    In C, it's usually necessary to clear the memory in structures before passing
    them to certain WinAPI functions. How would one do that in VB.NET?
  • Herfried K. Wagner [MVP]

    #2
    Re: Clearing memory in structures

    "Dan" <Dan@discussion s.microsoft.com > schrieb:[color=blue]
    > In C, it's usually necessary to clear the memory in structures before
    > passing
    > them to certain WinAPI functions. How would one do that in VB.NET?[/color]

    You don't need to do that because VB automatically initializes numeric
    variables with value 0.

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://classicvb.org/petition/>

    Comment

    • Dan

      #3
      Re: Clearing memory in structures

      Thanks, but I wasn't asking about numeric variables. Does it initialize all
      the memory contained in a structure to 0? And, supposing that I did want to
      clear the memory in structure, how would I do that?


      "Herfried K. Wagner [MVP]" wrote:
      [color=blue]
      > "Dan" <Dan@discussion s.microsoft.com > schrieb:[color=green]
      > > In C, it's usually necessary to clear the memory in structures before
      > > passing
      > > them to certain WinAPI functions. How would one do that in VB.NET?[/color]
      >
      > You don't need to do that because VB automatically initializes numeric
      > variables with value 0.
      >
      > --
      > M S Herfried K. Wagner
      > M V P <URL:http://dotnet.mvps.org/>
      > V B <URL:http://classicvb.org/petition/>
      >
      >[/color]

      Comment

      Working...