Thank you very much! It works fine and I was in such hurry and I overlooked (Managed), and I should have posted on the VC++/MFC board? Sorry for my mistake.:) Besides, how can I convert the resulting hex to ASCII string? Is there a function _tprintf_s(_T("%s\n"), h1+h2); ? I tried but it does not work.:confused: -- modified at 13:35 Saturday 2nd December, 2006