Thanks a lot anyway, everyone who helped. I have got it working now, I will look into the _variant_t thing further as I am still not entirely sure how it works. I understand what your saying it does but how it does it is another thing.
Thanks again.