im a newbie with c++ and ole programming

does sombody know how i can get these exceptions in c++ ?

a piece of code would be nice :)