Fixes #176 I've also added a sample (a copy of the `simple` sample, but without the `(PVOID&)` casts) to validate the functionality.