CL_OUT_OF_HOST_MEMORY in clCreateKernel

Hi, I’m having an strange error.
I’m developing under MS VisualStudio 2010 and I have a program that if I run from VisualStudio works correct (even If I run with ctrl+F5) but if I run the .exe directly I’m getting the error CL_OUT_OF_HOST_MEMORY in function clCreateKernel. I tried running on tow different computers one with Intel’s drivers for CPU and on NVDIA, and another with ATI AMD drivers for both, but I have the same problem on all devices.

What do you think may be happenig?
Thank you.