Thanks you sir, you have been most helpful.
By the way for other people with a similar problem, not looking to be personally attacked, the function that I was looking for is
http://msdn.microsoft.com/en-us/library/windows/desktop/aa969510%28v=vs.85%29.aspx[
^]
Now I will do this in my application, and lets see if its a crime. You , dear sir , can take me to court if you wish.