Changes to the third printing

The third printing already incorporates changes listed later under "Changes to the first and second printing".

Chapter 1

Page 19 - Change first sentence to "While it is too early ..."

Chapter 4

Page 25 - Last line in the 3rd bulletted item at the end of the page. Delete "the explore".

Page 32 - Figure 4-4A, there is a missing arrow pointing inward on the right hand side (where the gap is in the line).

Page 37 - 5th paragraph, 7th line, 2nd word - delete "more than".

Page 49 - Line 12 in the listing, change explicitely to explicitly.

Chapter 5

Page 59 - Figure 5-2. The arrow from Root should point to the outer (Customer) box, not the inner LinkList box. The arrow from the left LinkList box should point to the outer (Customer) box, not the inner LinkList box.

Page 91 - 1st paragraph. Change "The new form inherits from the System.WinForms.Form object" to "The new form inherits from the System.Windows.Forms.Form object"

Chapter 7

Page 127 - Set term for the Withdrawn property. Parameters should be after the Set, not the End statement (I have no idea how this typo got into the text - the sample code is correct).

Page 128 - Set term for the Deposited property. Missing left paren before parameter list.

Page 132 - Set term for the NumberOfKids property. 

Change:

If Value<>0 Then

to

If Value < 1 Or Value > 50 Then

Make this change in the FamilyOperation.vb file for the Threading1, Threading2, Threading3, Threading4 and Threading5 sample programs.

Page 143 - Paragraph starting "This appears", 5th line, replace "who have every used" with "who have ever used".

Chapter 10

Page 292 - 2nd paragraph, last sentence, last word - replace "property" with "properly".

Chapter 12

Page 362 - Function Clone in class WillClone. In the comment replace "... you'll usually want to close internal objects" with "...you'll usually want to clone internal objects"

Page 385 - First paragraph, 3rd line, replace "treat a String variable as if it were a string" with "treat a String variable as if it were a stream"

Chapter 15

Page 479 - Paragraph 2, 2nd sentence, should begin: "All the hack techniques that are typically..."

Chapter 16

Page 515 - Middle of the page, 1st sentence after the sample configuration file. Should begin "This allows and application to specify that it requires a specific"

Page 525 - Third paragraph, should begin: "For instance, you would never want to grant unmanaged code permission to execute code downloaded..."

 

Changes to the second printing

Chapter 3

Page 21:Footnote #9

The Ebook referenced should be "Visual Basic.NET or C#: Which to Choose", not the "Introduction to NT/2000 Security Programming with Visual Basic".

Changes to the first printing

The following changes and corrections apply to the first printing of the book "Moving to VB.NET: Strategies, Concepts and Code".

Chapter 2

On page 11, the bullet starting with "The Forms Engine", at the end of the first sentence add:

("Ruby" was the code name for the forms engine developed by Alan Cooper, that ultimately became the forms package for VB1).

Chapter 4

Change Footnote 4 to:

Purists will note that the CLR does, of course, include methods intended to be used primarily by Visual Basic.

 

Chapter 5

Page 86, the section named "Dealing with Naming Conflicts", 2nd paragraph, last sentence.

"The Namespace defines two interfaces" should be "The example defines two interfaces"

Page 90, final line in the page, change "Systems.Winforms" with "System.Windows.Form".

Page 91, add the following at the end of the first sentence:

(for now, think of a namespace can be thought of as a way to logically group classes).

Chapter 8

This is not so much a change as an addition. Visual Basic.NET includes support for both multidimensional arrays and jagged arrays (which are not mentioned in the chapter).

It also includes a rather poorly documented alternate syntax for dynamically creating arrays which can then be assigned to existing array variables or passed as parameters to methods expecting arrays as parameters. Specifically, both of the lines shown below create an integer array initialized to {1, 2, 3}. The first one declares the variable. The second line creates a new array and assigns it to an existing variable.

Dim a() As Integer = {1, 2, 3}
a = New Integer() {1, 2, 3}

Refer to the sample code in the Source\Additions\MoreArrays directory for example code demonstrating this feature and both multidimensional and jagged arrays.

Chapter 15

Page 457

In listing 15.1 change

Dim ComObject As New dwComFromDotNet_8_0.SampleClass1()

to:

Dim ComObject As New dwComFromDotNet.SampleClass1

This reflects a last minute change to beta 2. Also, add the line

newThread.Join()

before the Console.ReadLine() statement in the Main function. This makes sure the message from the other thread can be viewed when the program is run.

Other Notes

Interop seems to be less stable than other parts of beta 2. You may see Visual Studio crash occasionally when testing the Interop examples. These reflect problems in Visual Studio - not the examples. Be sure to allow Visual Studio to send error information to Microsoft when this occurs to help them resolve these problems.

Chapter 16

Few things are more frustrating for an author than when something works fine in an intermediate build, but fails during the released beta. Here I am in the unusual situation where the code in the book is correct, yet fails compilation with a message "catastrophic error - unable to emit code".

It seems that declarative security in beta 2 of VB.NET is broken - specifically, you can't use the SecurityPermission attribute. I'm fairly sure it's a compiler bug, partly because it worked with an earlier build, and partly because the C# equivalent code works fine. I'll be contacting Microsoft for further information and will post updates when I can. Meanwhile, the sample code has been modified to use imperative security. The changes are noted in the code. (Note: this is based on tests on a clean Windows 2000 pro build).

Page 527

The mmc snap-in now no longer prompts you to check the "Exclusive" check box. Instead, you are prompted to right click to view the properties of the newly added code group, select the general tab, and check the checkbox labeled "This policy level will only have the permissions from the permission set associated with this code group".

Note that in beta 2, you may have trouble using the mmc snap-in - I've been seeing a variety of errors (win2k pro). You can use the caspol.exe application to set security as well. Refer to the .NET tools documentation for information on caspol. You can see four batch files in the source\ch16\CallsUnmanaged2 directory labeled cas1.bat, cas2.bat, cas3.bat and cas4.bat that I used to manually set the code groups for this example. You will need to modify these batch files depending on where files are loaded on your system if you wish to use them. You should also use the cas1.bat batch file to verify the number of the All-Code group before you try to run the other code groups. Take the time to read the documentation so you know what you are doing before you use these batch files, because incorrect use can make the .NET framework unusable on your system.