System.Diagnostics.Process: redirect StandardInput, StandardOutput, StandardError

Sometimes you want to launch an external utility and send input to it and also capture its output. But it’s easy to run into deadlock this way… ‘ BAD CODE Using p As New System.Diagnostics.Process     p.StartInfo.FileName = “cat”     p.StartInfo.UseShellExecute = False     p.StartInfo.RedirectStandardOutput = True     p.StartInfo.RedirectStandardInput = True     p.Start()     p.StandardInput.Write(“world”…

1

Romeo and Juliette and Windows Azure

1. Juliette sends a message “I’ll take a drug which makes me look dead but I’m not really”2. Romeo receives the message3. Romeo finds Juliette looking dead, but knows she’s not really dead4. They live happily ever after vs. 1. Juliette sends a message “I’ll take a drug which makes me look dead but I’m…

1

Where are the SDK tools? Where is ildasm?

C:\Program Files\Microsoft SDKs\Windows\v6.0\bin\ildasm.exeC:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\ildasm.exeC:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\ildasm.exeC:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\x64\ildasm.exeC:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\ildasm.exeC:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\x64\ildasm.exeC:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\ildasm.exeC:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\x64\ildasm.exeC:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\ildasm.exeC:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\x64\ildasm.exe What are all these different versions for? Which one should I use? Sumit Kumar is the Project Manager for “Windows SDK”, so…

9

My dog has no type (Expressions with "Superposition" types)

“My dog has no type.””How does he smell?””Awful!” This article originally was called “Expressions with no types” but that was a misleading title. This article is really about expressions which have a “quantum superposition” of several types: that’s to say, the expression on its own could be one of several different types, but then the immediate context…

2

LiveRun – a VS plugin to see the output of your program immediately

Say you’re demonstrating a compiler at a conference. What’s the best way to do it? Should you just type in code in the code window? Doing this, you’re relying on the audience’s imagination — that they form a mental picture of how the program will behave. You’re also relying on their trust that your code really does what…

1

Reflection on COM objects

I’d like to own a “Gestalt Camera”. When you photograph an object it wouldn’t just save a flat 2-dimensional projection of the object onto an SD card; instead it’d record the “gestalt”, an understanding of the whole object and its complete web of relations. This would include a 3d representation of the object from all angles, an essay on its…

2

Co- and contra-variance: how do I convert a List(Of Apple) into a List(Of Fruit)?

This is the first in a series of posts exploring how we might implement generic co- and contra-variance in a hypothetical future version of VB. This is not a promise about the next version of VB; it’s just one possible proposal, written up here to get early feedback from potential users.   Sub EatFruit(ByVal x…

5

Hello!

Hello! I’m starting this blog as a way to communicate with VB users — to hear what you want, to answer what questions I can, and to share my ideas about things the language could include in the future. I’ve recently become the Visual Basic specification lead, taking over this role from Paul Vick. He did…

0