PP is hanging because PP's main thread is waiting for an event indefinitely. The culprit is this one.
CoUninitialize(); SetEvent(m_hEvtActionDone); You said it always stuck at CoUninitialize, right? Then, obviously SetEvent will never run, so m_hEvtActionDone never signaled, meaning PP's main thread will be blocking indefinitely.
