windows - c++ try-except statement -


i came across article detecting vmware or virtual pc
http://www.codeproject.com/kb/system/vmdetect.aspx
, saw use kind of try-except statement.
looked in msdn: http://msdn.microsoft.com/en-us/library/s58ftw19%28v=vs.80%29.aspx

and don't understand why use try-except instead of old try-catch. give me additional information exception?
if so, can use try-catch when use code attached article, right?
:)

__try/__except is try/catch, different kind of exception. can catch hardware exceptions floating point violation, bad pointer de-reference, etc, , not c++ exceptions. referred structured exception handling, or seh, , msdn has quite bit on if know look.

in case, they're using detect invalid instructions. attempt execute instructions x86 doesn't support, , virtual machines use them. if you're running on real cpu, invalid instruction exception, , if you're running on virtual machine, talked it.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -