Maybe LPVOID should have a LPVOID(Pointer p) constructor? Or maybe CoTaskMemFree should take a Pointer?