473,385 Members | 1,402 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Clearing memory in structures

Dan
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?
Nov 21 '05 #1
2 2493
"Dan" <Da*@discussions.microsoft.com> schrieb:
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?


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/>

Nov 21 '05 #2
Dan
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:
"Dan" <Da*@discussions.microsoft.com> schrieb:
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?


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/>

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Jason | last post by:
Hi. I have a structure that was used in a previous iteration of a loop, and I want to clear out all the structures values that the previous iteration assigned without assigning every variable to...
12
by: Hans B | last post by:
Please bear with me if I ask silly questions....I am a somewhat newbie to the C language.... If I had: struct test1_{ unsigned char mycount1; unsigned short mycount2; unsigned short...
15
by: berthelot samuel | last post by:
Hi, I'm trying to develop an application for modeling 3D objects from Bezier patches, but I have a memory allocation problem. Here are my structures: typedef struct _vector3 { union { struct...
5
by: Migrators | last post by:
1)How is the memory structure organised in C. i.e., the way in which the stack and heap memory are used in C. 2) What will be the value of EOF.
5
by: mikegw | last post by:
Hello all. I am currently using an implementation of sysV shared memory. The entire shared memory is allocated is one continuous block of which I get the pointer to the head, everything should...
15
by: roberts.noah | last post by:
I ran across some code that called memset(this, 0, sizeof(*this)) in the member function of a structure in C++. This just looked wrong to me so I did some web searching and it does indeed seem...
11
by: skumar434 | last post by:
Hi everybody, I am faceing problem while assigning the memory dynamically to a array of structures . Suppose I have a structure typedef struct hom_id{ int32_t nod_de; int32_t hom_id;
94
by: smnoff | last post by:
I have searched the internet for malloc and dynamic malloc; however, I still don't know or readily see what is general way to allocate memory to char * variable that I want to assign the substring...
3
by: Martin | last post by:
Is clearing a structure the following way well defined in C89? The structure ACTION contains no floating point or pointer members. Only integral types. My thoughts concern the padding - can and...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.