I'd be tempted to use an overloaded method called RegisterTemporaryResourceHandler for both binaries and instances assuming the compiler can differentiate between LPCOLESTR and HINSTANCE (or does the latter just look like a void*?).