I am working at an update of the C2N Emulator GUI client as I noticed that under Windows 10 there seem to be problems invoking the GetCommConfig function. Everything works fine under Windows XP.
Oddly enough, I had this sort of issues when I was working on the IECHost GUI client. What made things work at that time was removing gcc’s optimization option -O3 at compilation time. For C2N Emulator GUI Client I don’t use the -O3 option at all, but I would get this behavior:
- the first call to GetCommConfig would succeed when starting TAP playback, but subsequent ones would always fail
- the first call to GetCommConfig would always fail when updating the device firmware
- any call to GetDefaultCommConfig would always succeed for the TAP playback option
- any call to GetDefaultCommConfig would always fail for updating the firmware
I’ve put together a strategy that tries both functions in case the first one fails, which seems to always work reliably now.
I’d like to dig more into this issue and understand what the root cause for this behavior is. In fact, all port access is handled consistently through one of my libraries and there’s absolutely no difference I can see in the execution flow.
Once I am done with this I shall publish an update to my C2N Emulator GUI client.