I am trying to figure out where the code is that interacts with the Serial Port on an MFC Win32 binary - and am utterly out of ideas on how to find this code block.
I have even tried, say, stopping the process right before I click the button to initialize serial communication and then stepping through. The program returns with an error immediately.
I have even tried setting a breakpoint over the string text of the error message in the .data
segment, and even then no breakpoint.
What is causing this? Why can't I just step through a process to see where its contacting the serial port?
How is it possible that its hiding at this level?
CreateFile
or its native counterpartNtCreateFile
. But in general when communication with a driver is involved you can expect there to be a call to something likeCreateFile
. Windows is not so dissimilar to Unix, since the object manager namespace also has just a single root and you talk to devices the same way as you read/write files.