Problem with mfc?

Hy,

i hope someone could help me

i have written an programm to controll an fpga card with an existing libary. The example programm was in c and i have to use c++ and the mfc for my project. I managed it to get rid of all error messages and the programm starts without any warnings but if i want to acess the dfpga board i get an Messagebox with the Error