First - it was a core switching issue. The code to confine to a single core has to be called in advance - I think possibly the thread has to sleep first before the system can assign it to a new core, at any rate doesn't work to just set it immediately before every time check and release it again afterwards. Also there was a bug in my code when checking to see if hte time was going backwards forgot to check if the previous time was recorded for the same thread, the dTimeWas should have been a thread local variable.
But - even after fixing all that, and tied to a single core, the timing was still inaccurate. It was monotonic but inaccurately timed, the reported time in ms sometimes passed more quickly than real time and sometimes passed more slowly.
I could check this by doing a real time recording to audio of the notes played by my app - which according to the high performance counter were played at equally spaced 100 ms intervals - but when you looked at the recording the actual recorded times were offset sometimes as much as 30 ms from the previously recorded note - had one recording that recorded an 80 ms note followed by a 110 ms note when the high precision timer said that they were all exactly 100 ms to within sub millisecond precision.
Finally fixed it by looking up the interrupt timer which is available to every user mode process as a volatile area of shared memory in a structure called KUSER_SHARED_DATA in the same location in the address space in every process.
This timer is highly accurate, not just sub-millisecond, it is also well sub-microsecond on my laptop anyway. It also records the time correctly. And there is almost no overhead involved in looking it up as it is only a memory look up, just like accessing any other area of memory.
Thanks for your suggestion, I tried this and its successful.
I did EnableDHCP and few others but on enable static it's not working.
on enable static IP address is to be there in an array(SafeArray).
Do you have any Idea?
Yet another useful error code from Microsoft. It is quite possible that your code is somehow trying to link to a 32 bit DLL; try using Dependency Walker to track all the dependencies. Other than that you should try the Microsoft help sites.
Please check the return value again. 0x800700C1 seems to be wrong. The high word 0x8007 indicates that it is a normal Windows error code. But 0xC1 / 193 is ERROR_BAD_EXE_FORMAT: '%1 is not a valid Win32 application' which makes no sense here.
When I used CFileDialog in MFC Dialog Project, it ran correctly. But when CFileDialog is used in DLL Projects(MFC Dll and Win32 Dll) it didn't run.
In detail, DoModal() function didn't run. program stopped.
Please Help me.
Thank you for reading my question.