MFC-App and Hyper-Threading
-
Hello, maybe this can be of interest for someone: my multi-threading mfc-app crashed sometimes not reproducable on systems with hyper-threading active. So it would be very nice if i could tell my app to use only one cpu even if hyper-threading is active. After searching msdn and the internet for a method to do this, i found this api-function: SetProcessAffinityMask(GetCurrentProcess(), 1); The first parameter is the handle to the current process (my app) and the second parameter is a 32-bit value (mask) where every bit represents a cpu. Calling this function solved the problem of my hardly to reproduce exceptions. Of course it does not fix the problem at the root because my app isn't HT-compatible at least, but now i have more time to learn about the difference between using HT and not using HT. Maybe someone knows a good starting-point for this. Best regards, Tabor25
-
Hello, maybe this can be of interest for someone: my multi-threading mfc-app crashed sometimes not reproducable on systems with hyper-threading active. So it would be very nice if i could tell my app to use only one cpu even if hyper-threading is active. After searching msdn and the internet for a method to do this, i found this api-function: SetProcessAffinityMask(GetCurrentProcess(), 1); The first parameter is the handle to the current process (my app) and the second parameter is a 32-bit value (mask) where every bit represents a cpu. Calling this function solved the problem of my hardly to reproduce exceptions. Of course it does not fix the problem at the root because my app isn't HT-compatible at least, but now i have more time to learn about the difference between using HT and not using HT. Maybe someone knows a good starting-point for this. Best regards, Tabor25
Nice to know, thx ... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
-
Hello, maybe this can be of interest for someone: my multi-threading mfc-app crashed sometimes not reproducable on systems with hyper-threading active. So it would be very nice if i could tell my app to use only one cpu even if hyper-threading is active. After searching msdn and the internet for a method to do this, i found this api-function: SetProcessAffinityMask(GetCurrentProcess(), 1); The first parameter is the handle to the current process (my app) and the second parameter is a 32-bit value (mask) where every bit represents a cpu. Calling this function solved the problem of my hardly to reproduce exceptions. Of course it does not fix the problem at the root because my app isn't HT-compatible at least, but now i have more time to learn about the difference between using HT and not using HT. Maybe someone knows a good starting-point for this. Best regards, Tabor25
Good Thank you if any one has idea how to do a VPN connection through a vc++ ?? Some special API's for it are availabel for VPN connection? Vikas Amin Embin Technology Bombay vikas.amin@embin.com