Category Archives: .NET

Beware of using stack-based COM objects from .NET

COM objects that don’t have the expected lifetime can cause chaos when combined with .NETs garbage collection system.

Also posted in COM, Debugging, Software Development, WinDbg | Tagged , , , , , , | Leave a comment

A WPF custom control in F#

What F# language and syntax features are required to implement a fundamentally object-oriented WPF custom control?

Also posted in F#, Software Development, WPF, Windows | Tagged , , , | 2 Comments

Generating and plotting random numbers

An example of generating random numbers in F# and visualising their distribution using the WPF charting control.

Also posted in F#, Finance, Visual Studio, WPF | Tagged , , , | Leave a comment

FormatException in WPF DataBinding

A FormatException is generated by the WPF DataBinding diagnostics if the original exception text contains curly brackets.

Also posted in Uncategorized, Visual Studio, Windows | Tagged , , , , | Leave a comment

Getting IUnknown from __ComObject

How do you find the unmanaged COM object that’s being referenced by a .NET object?

Also posted in COM, Debugging, Software Development, WinDbg, Windows | Tagged , , , , | 4 Comments

Visualising Black-Scholes option pricing using F# and WPF

Using F# to create simple plots of Black-Scholes option prices and greeks using WPF.

Also posted in F#, Software Development | Tagged , , | 3 Comments

F# May CTP released

Well, what are you still doing here, get over to Don Syme’s blog and download it…!

Also posted in F#, Software Development | Tagged | Leave a comment

IL analysis using F#

A description of using F# language features and reflection to enable basic analysis of .NET IL (intermediate language).

Also posted in F#, Software Development | Tagged , , | 2 Comments

Verifying dynamically generated IL

It’s safe to assume that when you use the C#, F# or (heaven forfend) VB.NET compilers, the IL generated for you will be correct. But, if you’re using Reflection.Emit to generate code “by hand” in a dynamic method or assembly it can be difficult to identify problems with the IL you emit. In the majority [...]

Also posted in F#, Software Development | Tagged , , , , , | 2 Comments

Getting .NET type information in the unmanaged world

One of the tools that I write and maintain displays type information for COM objects hidden behind “handles” in Excel spreadsheets. The underlying objects can either support an interface that allows them to be richly rendered to XML, or the viewer will fall-back to using metadata and displaying the supported interfaces and their properties and methods. It [...]

Also posted in COM, Debugging, Software Development | Tagged , , , , , | Leave a comment