Beginning F#: Records

In the second of an unknown number of parts in my series of Beginning F# posts, I’ll be talking about record types. They’re a useful and powerful F# feature that you’ll probably find yourself using very widely. I’ll take a look at what they are, how they’re used and how they integrate with the rest of the language.
Read More »

Posted in F#, Software Development | Tagged , , , , , | Leave a comment

.NET DLLs Loaded Twice

If, like me, you’re still squeezing yourself into 32-bit Windows processes, you’re probably, also like me, constantly keeping an eye on the virtual address space usage of your application. If you happen to have used something like vmmap to take a peek at your memory contents, maybe you’ve noticed something strange with some .NET assemblies: they’re loaded twice! What’s going on…?
Read More »

Posted in .NET, Debugging, Windows | Tagged , , , | Leave a comment

30 years ago at CES…

candvg_logoThe other day while I was looking through some of my ancient copies of Computer and Video Games magazine (”the first fun computer magazine!”) I discovered some coverage of the 1982 Consumer Electronics Show. It’s such a contrast to today’s shiny, immaculately produced, PR-fest that I couldn’t help but scan it in for everyone to see.
Read More »

Posted in Gaming, Graphics | Tagged , , | Leave a comment

Tax Avoidance 2.0

dislikeWarning: This is a bit off-topic for my blog, but I had to write it and get it off my chest.

In these times of financial woe, people love to complain about all the big, nasty, faceless companies avoiding paying tax. They inevitably moan about it on Facebook, Google and Twitter (and sometimes even do something about it in the real, physical, world). But what about those companies themselves? The Web 2.0 behemoths are now some of the largest companies in the world, and they’ve decided – just like the evil old companies – that they don’t like paying all that tax. Don’t be evil… and don’t pay any tax if you can help it. But how do they do it?
Read More »

Posted in Finance, Rant | Tagged , | Leave a comment

Looking back at 2011

Well, we’re a few days into 2012 and no armageddon yet, so it’s probably safe to take a quick glance back over our shoulder at some of the technical stuff that’s flashed past in the preceding 12 months.
Read More »

Posted in F#, Software Development, WPF, iOS | Tagged , , , , , , | Leave a comment

Drawing animated shapes and text in Core Animation layers

Star and text

Star and text

The other day I was overcome by the desire to create an animated start-burst, price-tag type graphic with iOS. Time to break out some Core Graphics and Core Animation code. On the way to getting it going, I came across some interesting gotchas, which I thought it’d be useful to talk about here.
Read More »

Posted in Mac, Software Development, iOS, iPhone | Tagged , , , , , , , | Leave a comment

Creating a physics-based OpenGL iOS app

puppet_grabWith the success of iOS games like Angry Birds and its flocks of imitators, there are lots of people looking at creating physics-based games, so I decided to try and create a simple demo using OpenGL ES and the Bullet physics engine.
Read More »

Posted in C++, Graphics, Software Development, iOS, iPhone | Tagged , , , , , , | Leave a comment

C++: The oldest new kid on the block

TastyNobody could have failed to notice the recent resurgence of interest in the C++ programming language. In particular, the recent Build conference was the most we’ve seen Microsoft talking about C++ for several years. Why has a language that’s been languishing in the “prehistoric irrelevance” category for so long suddenly come back into vogue?
Read More »

Posted in C++, Rant, Software Development, Windows | Tagged , , , | Leave a comment

Kinect SDK with F#

Just what do you think you're doing, Dave?

Just what do you think you're doing, Dave?

I finally got around to taking a look at the Kinect SDK the other day, partly because I was interested to see how the API looked from F#. Unfortunately getting it going turned out to be more of a pain than I was expecting.

The first bit was easy: I’m “lucky” enough to have one of the older Xboxes, which meant I’d had to get a Kinect with separate power, which is the one required by the SDK. Now all I needed was a Windows machine to develop on.
Read More »

Posted in .NET, F#, Graphics, Software Development, WPF | Tagged , , , , | Leave a comment

Am I being called from DllMain?

Lock; literal images 'r' us

Lock; literal images 'r' us

While Googling for an obscure Windows function the other day, I came across this fantastically useful repository of undocumented WinAPI functions, put together by Geoff Chappell. I’m not sure how I hadn’t discovered it before.

One of the functions that immediately caught my eye was LdrLockLoaderLock. I’d previously spent quite a few frustrating hours trying to figure out how to determine whether some code was being executed from DllMain, i.e. while in the loader lock, so I could avoid doing anything dodgy – or indeed, anything at all.

The case I was looking at was some logging library code that was used, amongst other things, to record the fact that DLLs were being unloaded. Unfortunately when this was called from DllMain, it sometimes caused a deadlock, for all the reasons we already know about. The library code was called from lots of DLLs, so it wasn’t feasible to fix all of the call sites, instead I had to make the logging a no-op when it’s not safe.
Read More »

Posted in .NET, Debugging, Visual Studio, WinDbg, Windows | Leave a comment
  • Follow me on Twitter Follow me on Twitter @voyce

  • Categories

  • Archives