The API using it does not require the string buffer to be null terminated, as far as i could descern from MSDN, thats why i am doing some checks on the string length..