What are the main changes in the “AddressOf” functionality between Visual Basic 6.0 and VB .NET?

Certain Windows API functions, such as EnumFontsFamilies, require a pointer to a callback function. When you call the API function, Windows invokes the callback function that you provided. In the case of EnumFontsFamilies, Windows will call the function for each available font.

Visual Basic 6.0 allows you to declare Windows API functions that take callback function pointers by declaring the function pointer parameter as Long, to represent a 32-bit pointer. Your code calls the API function and by qualifying the subroutine name with the AddressOf keyword, it passes the subroutine to serve as the callback function. Visual Basic .

NET still supports the AddressOf keyword, but instead of returning a 32-bit integer, it returns a delegate. A delegate is a new type in Visual Basic . NET that allows you to declare pointers to functions or to class members.

This means that you can still create Declare statements for Windows API functions that take a callback function pointer as a parameter. The ... more.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions