Hello everyone, I've been running into some problems writing code for my boss and I was wondering if you could help me. You see, I have a function that is called after clicking a button on a GUI. Inside this function I make the declaration:

Code:
SuspendCount=PortThread[PortNumber-1]->ResumeThread();
Where PortThread is a CWinThread* and SuspendCount and the return on ResumeThread() are DWORDs. The odd occurance arises when debugging the same declaration in a previous version of the code that I am trying to re-create. When doing so, stepping into (or over, for that matter) that line of code, it initiates this line of code:

Code:
DWORD aword = ::WaitForMultipleObjects(2,EventHandles,FALSE,INFINITE);
And only that declaration in a completely different source file and unrelated function. Can anyone explain why this may happen? (I'll put more code up if this isn't enough information.)