// ----------------------------------------------------------------------// Function:// CThing1::OnSomethingHappening()//// Description:// Called when something happens//// Return:// S_OK if successful//// ----------------------------------------------------------------------HRESULT CThing1::OnSomethingHappening(){ HRESULT hr; :
: <Do Some Stuff> : // Perform some operation... hr = PerformAnOperation(); if (FAILED(hr)) hr = ERROR_NOT_SUPPORTED; IF_FAILED_JUMP(hr, Error);Exit: return hr;Error: goto Exit;}
Not much code, no? So what's wrong with it?
As usual, answers and kudos tomorrow.